Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

broken postgres compatibility #282

Closed
p-alik opened this issue Feb 27, 2020 · 5 comments
Closed

broken postgres compatibility #282

p-alik opened this issue Feb 27, 2020 · 5 comments
Labels

Comments

@p-alik
Copy link
Collaborator

p-alik commented Feb 27, 2020

Well, otherwise make dies

libgearman-server/plugins/queue/postgres/queue.cc:55:11: fatal error: libpq-fe.h: No such file or directory
 # include <libpq-fe.h>
           ^~~~~~~~~~~~

Digging deeper:

$ locate libpq-fe.h
/usr/include/postgresql/libpq-fe.h
$ git diff libgearman-server/plugins/queue/postgres/queue.cc
diff --git a/libgearman-server/plugins/queue/postgres/queue.cc b/libgearman-server/plugins/queue/postgres/queue.cc
index ed834aab..c7735dd6 100644
--- a/libgearman-server/plugins/queue/postgres/queue.cc
+++ b/libgearman-server/plugins/queue/postgres/queue.cc
@@ -52,7 +52,7 @@
 #pragma GCC diagnostic push
 #if defined(HAVE_LIBPQ) and HAVE_LIBPQ
 # pragma GCC diagnostic ignored "-Wundef"
-# include <libpq-fe.h>
+# include <postgresql/libpq-fe.h>
 #endif
 
 #include <cerrno>

$ make
libgearman-server/.libs/libgearman-server.a(lt5-libgearman_server_libgearman_server_la-queue.o): In function `gearmand::plugins::queue::Postgres::~Postgres()':
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:128: undefined reference to `PQfinish'
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)':
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:285: undefined reference to `PQexecParams'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:286: undefined reference to `PQresultStatus'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:288: undefined reference to `PQerrorMessage'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:289: undefined reference to `PQclear'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:293: undefined reference to `PQclear'
libgearman-server/.libs/libgearman-server.a(lt5-libgearman_server_libgearman_server_la-queue.o): In function `_libpq_done(gearman_server_st*, void*, char const*, unsigned long, char const*, unsigned long)':
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:327: undefined reference to `PQexec'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:328: undefined reference to `PQresultStatus'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:330: undefined reference to `PQerrorMessage'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:331: undefined reference to `PQclear'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:335: undefined reference to `PQclear'
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*)':
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:350: undefined reference to `PQexecParams'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:351: undefined reference to `PQresultStatus'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:353: undefined reference to `PQerrorMessage'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:354: undefined reference to `PQclear'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:374: undefined reference to `PQgetlength'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:382: undefined reference to `PQgetvalue'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:392: undefined reference to `PQgetvalue'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:391: undefined reference to `PQgetvalue'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:389: undefined reference to `PQgetlength'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:388: undefined reference to `PQgetvalue'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:387: undefined reference to `PQgetlength'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:386: undefined reference to `PQgetvalue'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:358: undefined reference to `PQntuples'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:360: undefined reference to `PQgetvalue'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:360: undefined reference to `PQgetlength'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:367: undefined reference to `PQgetlength'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:400: undefined reference to `PQclear'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:395: undefined reference to `PQclear'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:378: undefined reference to `PQclear'
libgearman-server/.libs/libgearman-server.a(lt5-libgearman_server_libgearman_server_la-queue.o): In function `_initialize':
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:196: undefined reference to `PQconnectdb'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:198: undefined reference to `PQstatus'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:201: undefined reference to `PQerrorMessage'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:204: undefined reference to `PQsetNoticeProcessor'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:208: undefined reference to `PQexec'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:209: undefined reference to `PQresultStatus'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:212: undefined reference to `PQerrorMessage'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:214: undefined reference to `PQclear'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:218: undefined reference to `PQntuples'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:220: undefined reference to `PQclear'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:224: undefined reference to `PQexec'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:225: undefined reference to `PQresultStatus'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:227: undefined reference to `PQerrorMessage'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:229: undefined reference to `PQclear'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:235: undefined reference to `PQclear'
collect2: error: ld returned 1 exit status
libgearman-server/.libs/libgearman-server.a(lt5-libgearman_server_libgearman_server_la-queue.o): In function `gearmand::plugins::queue::Postgres::~Postgres()':
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:128: undefined reference to `PQfinish'
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)':
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:285: undefined reference to `PQexecParams'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:286: undefined reference to `PQresultStatus'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:288: undefined reference to `PQerrorMessage'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:289: undefined reference to `PQclear'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:293: undefined reference to `PQclear'
libgearman-server/.libs/libgearman-server.a(lt5-libgearman_server_libgearman_server_la-queue.o): In function `_libpq_done(gearman_server_st*, void*, char const*, unsigned long, char const*, unsigned long)':
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:327: undefined reference to `PQexec'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:328: undefined reference to `PQresultStatus'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:330: undefined reference to `PQerrorMessage'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:331: undefined reference to `PQclear'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:335: undefined reference to `PQclear'
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*)':
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:350: undefined reference to `PQexecParams'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:351: undefined reference to `PQresultStatus'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:353: undefined reference to `PQerrorMessage'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:354: undefined reference to `PQclear'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:374: undefined reference to `PQgetlength'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:382: undefined reference to `PQgetvalue'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:392: undefined reference to `PQgetvalue'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:391: undefined reference to `PQgetvalue'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:389: undefined reference to `PQgetlength'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:388: undefined reference to `PQgetvalue'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:387: undefined reference to `PQgetlength'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:386: undefined reference to `PQgetvalue'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:358: undefined reference to `PQntuples'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:360: undefined reference to `PQgetvalue'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:360: undefined reference to `PQgetlength'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:367: undefined reference to `PQgetlength'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:400: undefined reference to `PQclear'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:395: undefined reference to `PQclear'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:378: undefined reference to `PQclear'
libgearman-server/.libs/libgearman-server.a(lt5-libgearman_server_libgearman_server_la-queue.o): In function `_initialize':
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:196: undefined reference to `PQconnectdb'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:198: undefined reference to `PQstatus'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:201: undefined reference to `PQerrorMessage'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:204: undefined reference to `PQsetNoticeProcessor'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:208: undefined reference to `PQexec'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:209: undefined reference to `PQresultStatus'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:212: undefined reference to `PQerrorMessage'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:214: undefined reference to `PQclear'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:218: undefined reference to `PQntuples'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:220: undefined reference to `PQclear'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:224: undefined reference to `PQexec'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:225: undefined reference to `PQresultStatus'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:227: undefined reference to `PQerrorMessage'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:229: undefined reference to `PQclear'
/opt/devel/Gearman/gearmand/libgearman-server/plugins/queue/postgres/queue.cc:235: undefined reference to `PQclear'
Makefile:4472: recipe for target 'gearmand/hostile_gearmand' failed
make[2]: *** [gearmand/hostile_gearmand] Error 1
collect2: error: ld returned 1 exit status
make[2]: *** Waiting for unfinished jobs....
Makefile:4460: recipe for target 'gearmand/gearmand' failed
make[2]: *** [gearmand/gearmand] Error 1
ar: `u' modifier ignored since `D' is the default (see `U')
make[2]: Leaving directory '/opt/devel/Gearman/gearmand'
Makefile:8319: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/opt/devel/Gearman/gearmand'
Makefile:3082: recipe for target 'all' failed
make: *** [all] Error 2

As to me (and not only to me) it is convenient and pragmatic solution.

Originally posted by @p-alik in #280

@p-alik p-alik mentioned this issue Feb 27, 2020
@esabol
Copy link
Member

esabol commented Aug 22, 2021

I think this was fixed by the 1.1.19.1 release (which reverted the m4 files)? Can I close this?

@esabol esabol added the bug label Aug 22, 2021
@p-alik
Copy link
Collaborator Author

p-alik commented Aug 25, 2021

I don't think so and I couldn't find any related commit.

@esabol
Copy link
Member

esabol commented Aug 25, 2021

That's because the problem was with the m4 files that were mistakenly modified in the 1.1.19 release. That was the whole reason for the 1.1.19.1 release. No commit was necessary to fix the problem because the m4 files in the repository work correctly.

Can you reproduce the issue with the 1.1.19.1 release?

@p-alik
Copy link
Collaborator Author

p-alik commented Aug 26, 2021

If I didn't oversee anything, the release 1.1.19.1 contains following m4-commits.
45bd954
59c6bac
f859451
c67c766
0019a07
106b140
It appears to me none of them is related to this issue.

@SpamapS
Copy link
Member

SpamapS commented Aug 26, 2021 via email

@esabol esabol added invalid and removed invalid labels Aug 29, 2022
@esabol esabol closed this as completed Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants