gearman / gearmand

http://gearman.org/
Other
740 stars 137 forks source link

1.1.19 libgearman-server failed to link, missing '-lpq' #271

Closed cheese closed 4 years ago

cheese commented 4 years ago

When attempting to update gearmand for Fedora, libgearmand-server failed to link. Build environment is Fedora Rawhide and has libpq-devel installed. So libqp support is implicitly enabled.

Related build log:

libtool: link: c++ -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wno-unknown-pragmas -Wno-pragmas -Wextra -Wno-attributes -Wvarargs -Waddress -Warray-bounds -Wchar-subscripts -Wcomment -Wctor-dtor-privacy -Wfloat-equal -Wformat=2 -Wformat-y2k -Wmaybe-uninitialized -Wmissing-field-initializers -Wlogical-op -Wnon-virtual-dtor -Wnormalized=id -Woverloaded-virtual -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-compare -Wstrict-overflow=1 -Wswitch-enum -Wtrampolines -Wundef -funsafe-loop-optimizations -Wc++11-compat -Wclobbered -Wunused -Wunused-result -Wunused-variable -Wunused-parameter -Wunused-local-typedefs -Wwrite-strings -Wformat-security -fwrapv -fPIE -pie -Wsizeof-pointer-memaccess -Wpacked -std=c++0x -o gearmand/gearmand gearmand/gearmand_gearmand-gearmand.o util/gearmand_gearmand-daemon.o util/gearmand_gearmand-pidfile.o libtest/gearmand_gearmand-cpu.o  libgearman-server/.libs/libgearman-server.a -L/usr/lib64/ -lmariadb -lboost_system -L/usr/lib64 -lhiredis -L/usr/lib -lsqlite3 -ltokyocabinet -levent -levent_pthreads -lboost_program_options -ldl -lrt -lmemcached -pthread
/usr/bin/ld: libgearman-server/.libs/libgearman-server.a(lt5-libgearman_server_libgearman_server_la-queue.o): in function `gearmand::plugins::queue::Postgres::~Postgres()':
/builddir/build/BUILD/gearmand-1.1.19/libgearman-server/plugins/queue/postgres/queue.cc:128: undefined reference to `PQfinish'
/usr/bin/ld: libgearman-server/.libs/libgearman-server.a(lt5-libgearman_server_libgearman_server_la-queue.o): in function `_libpq_add(gearman_server_st*, void*, char const*, unsigned long, char const*, unsigned long, void const*, unsigned long, gearman_job_priority_t, long)':
/builddir/build/BUILD/gearmand-1.1.19/libgearman-server/plugins/queue/postgres/queue.cc:283: undefined reference to `PQexecParams'
/usr/bin/ld: /builddir/build/BUILD/gearmand-1.1.19/libgearman-server/plugins/queue/postgres/queue.cc:286: undefined reference to `PQresultStatus'
/usr/bin/ld: /builddir/build/BUILD/gearmand-1.1.19/libgearman-server/plugins/queue/postgres/queue.cc:288: undefined reference to `PQerrorMessage'
/usr/bin/ld: /builddir/build/BUILD/gearmand-1.1.19/libgearman-server/plugins/queue/postgres/queue.cc:289: undefined reference to `PQclear'
/usr/bin/ld: /builddir/build/BUILD/gearmand-1.1.19/libgearman-server/plugins/queue/postgres/queue.cc:293: undefined reference to `PQclear'
/usr/bin/ld: libgearman-server/.libs/libgearman-server.a(lt5-libgearman_server_libgearman_server_la-queue.o): in function `_libpq_replay(gearman_server_st*, void*, gearmand_error_t (*)(gearman_server_st*, void*, char const*, unsigned long, char const*, unsigned long, void const*, unsigned long, gearman_job_priority_t, long), void*)':
/builddir/build/BUILD/gearmand-1.1.19/libgearman-server/plugins/queue/postgres/queue.cc:350: undefined reference to `PQexecParams'
/usr/bin/ld: /builddir/build/BUILD/gearmand-1.1.19/libgearman-server/plugins/queue/postgres/queue.cc:351: undefined reference to `PQresultStatus'
/usr/bin/ld: /builddir/build/BUILD/gearmand-1.1.19/libgearman-server/plugins/queue/postgres/queue.cc:374: undefined reference to `PQgetlength'
/usr/bin/ld: /builddir/build/BUILD/gearmand-1.1.19/libgearman-server/plugins/queue/postgres/queue.cc:382: undefined reference to `PQgetvalue'
/usr/bin/ld: /builddir/build/BUILD/gearmand-1.1.19/libgearman-server/plugins/queue/postgres/queue.cc:392: undefined reference to `PQgetvalue'
/usr/bin/ld: /builddir/build/BUILD/gearmand-1.1.19/libgearman-server/plugins/queue/postgres/queue.cc:391: undefined reference to `PQgetvalue'
/usr/bin/ld: /builddir/build/BUILD/gearmand-1.1.19/libgearman-server/plugins/queue/postgres/queue.cc:389: undefined reference to `PQgetlength'
/usr/bin/ld: /builddir/build/BUILD/gearmand-1.1.19/libgearman-server/plugins/queue/postgres/queue.cc:388: undefined reference to `PQgetvalue'
/usr/bin/ld: /builddir/build/BUILD/gearmand-1.1.19/libgearman-server/plugins/queue/postgres/queue.cc:387: undefined reference to `PQgetlength'
/usr/bin/ld: /builddir/build/BUILD/gearmand-1.1.19/libgearman-server/plugins/queue/postgres/queue.cc:386: undefined reference to `PQgetvalue'
/usr/bin/ld: /builddir/build/BUILD/gearmand-1.1.19/libgearman-server/plugins/queue/postgres/queue.cc:358: undefined reference to `PQntuples'
/usr/bin/ld: /builddir/build/BUILD/gearmand-1.1.19/libgearman-server/plugins/queue/postgres/queue.cc:360: undefined reference to `PQgetvalue'
/usr/bin/ld: /builddir/build/BUILD/gearmand-1.1.19/libgearman-server/plugins/queue/postgres/queue.cc:360: undefined reference to `PQgetlength'
/usr/bin/ld: /builddir/build/BUILD/gearmand-1.1.19/libgearman-server/plugins/queue/postgres/queue.cc:367: undefined reference to `PQgetlength'
/usr/bin/ld: /builddir/build/BUILD/gearmand-1.1.19/libgearman-server/plugins/queue/postgres/queue.cc:353: undefined reference to `PQerrorMessage'
/usr/bin/ld: /builddir/build/BUILD/gearmand-1.1.19/libgearman-server/plugins/queue/postgres/queue.cc:354: undefined reference to `PQclear'
/usr/bin/ld: /builddir/build/BUILD/gearmand-1.1.19/libgearman-server/plugins/queue/postgres/queue.cc:400: undefined reference to `PQclear'
/usr/bin/ld: /builddir/build/BUILD/gearmand-1.1.19/libgearman-server/plugins/queue/postgres/queue.cc:395: undefined reference to `PQclear'
/usr/bin/ld: /builddir/build/BUILD/gearmand-1.1.19/libgearman-server/plugins/queue/postgres/queue.cc:378: undefined reference to `PQclear'
...

Full build log https://kojipkgs.fedoraproject.org//work/tasks/3533/41463533/build.log

It works with 1.1.18.

esabol commented 4 years ago

When attempting to update gearmand for Fedora...

Kind of off-topic, sorry, is this for the official rpm found at https://rpmfind.net/linux/rpm2html/search.php?query=gearmand ? If so, may I request that you add "--enable-ssl" to your ./configure and package appropriately? I wish more packagers would include SSL support.... :)

SpamapS commented 4 years ago

I'm guessing this has the same root cause as #270

SpamapS commented 4 years ago

Definitely the same as #270