Thread: [BUGS] BUG #14742: build fails on psql
The following bug has been logged on the website: Bug reference: 14742 Logged by: Chris Ruprecht Email address: chris@cdrbill.com PostgreSQL version: 10beta2 Operating system: macOS 10.12.5 Description: The build fails at this point: gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 command.o common.o conditional.o copy.o crosstabview.o describe.o help.o input.o large_obj.o mainloop.o prompt.o psqlscanslash.o sql_help.o startup.o stringutils.o tab-complete.o variables.o -L../../../src/common -lpgcommon -L../../../src/port -lpgport -L../../../src/interfaces/libpq -lpq -L../../../src/port -L../../../src/common -L/usr/local/lib -Wl,-dead_strip_dylibs -L../../../src/fe_utils -lpgfeutils -lpq -lpgcommon -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lm-o psql Undefined symbols for architecture x86_64: "_appendShellStringNoError", referenced from: _psql_get_variable in common.o"_psql_scan_set_passthrough", referenced from: _MainLoop in mainloop.o _main in startup.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Configure options are: ./configure \ --prefix=/usr/local \ --enable-integer-datetimes \ --enable-thread-safety \ --with-perl \ --with-python \ --with-gssapi \ --with-openssl \ --with-pam \ --with-zlib \ --with-libxml \ --with-libxslt \ --with-uuid=e2fs \ --with-perl\ --with-wal-segsize=64 \ --with-wal-segsize=16 \ --with-bonjour -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
chris@cdrbill.com writes: > Undefined symbols for architecture x86_64: > "_appendShellStringNoError", referenced from: > _psql_get_variable in common.o > "_psql_scan_set_passthrough", referenced from: > _MainLoop in mainloop.o > _main in startup.o appendShellStringNoError() and psql_scan_set_passthrough() should be in src/fe_utils/libpgfeutils.a, but they are both new as of v10. I suppose you're somehow linking against a 9.6 or earlier version of that library. Looking at the link line, -L/usr/local/lib is probably the source of the problem. Do you have any idea how it got there? I don't see an equivalent reference to the --prefix lib directory when I do this, so it's not that. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
I wrote: > appendShellStringNoError() and psql_scan_set_passthrough() should be in > src/fe_utils/libpgfeutils.a, but they are both new as of v10. I suppose > you're somehow linking against a 9.6 or earlier version of that > library. Looking at the link line, -L/usr/local/lib is probably the > source of the problem. Do you have any idea how it got there? > I don't see an equivalent reference to the --prefix lib directory > when I do this, so it's not that. On further consideration, however that got there, it's definitely a bug in our makefiles that the -L flag for src/fe_utils isn't being placed in front of -L flags for system libraries. I've pushed a fix for that. Thanks for the report! regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Tom, That was the problem. There was a 9.6.3 version in /usr/local/lib. Thank you!! > On Jul 14, 2017, at 10:22, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > chris@cdrbill.com writes: >> Undefined symbols for architecture x86_64: >> "_appendShellStringNoError", referenced from: >> _psql_get_variable in common.o >> "_psql_scan_set_passthrough", referenced from: >> _MainLoop in mainloop.o >> _main in startup.o > > appendShellStringNoError() and psql_scan_set_passthrough() should be in > src/fe_utils/libpgfeutils.a, but they are both new as of v10. I suppose > you're somehow linking against a 9.6 or earlier version of that > library. Looking at the link line, -L/usr/local/lib is probably the > source of the problem. Do you have any idea how it got there? > I don't see an equivalent reference to the --prefix lib directory > when I do this, so it's not that. > > regards, tom lane
I was thinking the same thing, we should be able to build what ever release, regardless if there is a previous release alreadyinstalled ;). > On Jul 14, 2017, at 12:33, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > I wrote: >> appendShellStringNoError() and psql_scan_set_passthrough() should be in >> src/fe_utils/libpgfeutils.a, but they are both new as of v10. I suppose >> you're somehow linking against a 9.6 or earlier version of that >> library. Looking at the link line, -L/usr/local/lib is probably the >> source of the problem. Do you have any idea how it got there? >> I don't see an equivalent reference to the --prefix lib directory >> when I do this, so it's not that. > > On further consideration, however that got there, it's definitely a > bug in our makefiles that the -L flag for src/fe_utils isn't being > placed in front of -L flags for system libraries. I've pushed a fix > for that. Thanks for the report! > > regards, tom lane