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

Update m4 #280

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Update m4 #280

wants to merge 3 commits into from

Conversation

p-alik
Copy link
Collaborator

@p-alik p-alik commented Feb 20, 2020

This PR aims to update outdated m4 file.
See #270

@@ -159,7 +159,7 @@ before_script:
script:
- ${CC} --version
- ./bootstrap.sh -a
- ./configure --enable-ssl
- ./configure --enable-ssl --with-postgresql=no
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What’s the reason for this change?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this should not be necessary!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

@esabol esabol Feb 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Well, I strongly disagree. The person configuring gearmand should not have to specify --postgresql=no. Configure should be able to determine whether or not PostgreSQL is installed and configure itself accordingly. This is a regression from how previous releases work.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bootstrap should be running defaults. Let's figure out why it can't find that file.

Copy link
Member

@esabol esabol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to see this split into separate PRs.

I object to the PostgeSQL changes.

@esabol
Copy link
Member

esabol commented Feb 21, 2020

I'm also concerned that these changes will cause the build to fail if sqlite3 is not installed, which is what happened in issue #270.

@p-alik
Copy link
Collaborator Author

p-alik commented Feb 21, 2020

I'm also concerned that these changes will cause the build to fail if sqlite3 is not installed, which is what happened in issue #270.

yes, build dies if no sqlite3 is installed

@esabol
Copy link
Member

esabol commented Feb 21, 2020

yes, build dies if no sqlite3 is installed

Well, that is also wrong. The build should not die if sqlite3 is not installed. That's a regression.

@SpamapS
Copy link
Member

SpamapS commented Feb 25, 2020

Agree with ed. @p-alik let's fix this to find the bugs, or not merge it.

@p-alik
Copy link
Collaborator Author

p-alik commented Feb 27, 2020

Agree with ed. @p-alik let's fix this to find the bugs, or not merge it

Postgresql compatibilit is an extra issue. #282

Why don't we change default for flags sa with-sqlite3, with-postgresql to no?

$ ./configure -h | grep -E '\--(with-(mysql|sqlite3|postgresql)|(disable-(libmemcached|libtokyocabinet|hiredis)))'
  --disable-libtokyocabinet
  --disable-hiredis       Build with hiredis support [default=on]
  --disable-libmemcached  Build with libmemcached support [default=on]
  --with-mysql=[ARG]      use MySQL client library [default=yes], optionally
  --with-sqlite3=[ARG]    use SQLite 3 library [default=yes], optionally
  --with-postgresql=[ARG] use PostgreSQL library [default=yes], optionally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants