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

USERVER_FEATURE_PATCH_LIBPQ fails to build with Postgresql16 #570

Closed
root-kidik opened this issue May 7, 2024 · 1 comment
Closed

USERVER_FEATURE_PATCH_LIBPQ fails to build with Postgresql16 #570

root-kidik opened this issue May 7, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@root-kidik
Copy link
Contributor

root-kidik commented May 7, 2024

OS: ubuntu24.04
Compiler: g++ 4:13.2.0-7ubuntu1
Postgresql: postgresql 16.2-1ubuntu4

Error:

CMake Error at postgresql/pq-extra/CMakeLists.txt:40 (message):
  Error while compiling libpq patch:

  Change Dir:
  '/home/rtkid/Downloads/userver/build_debug/postgresql/pq-extra/require_pq_extra/CMakeFiles/CMakeTmp'




  Run Build Command(s): /usr/bin/ninja -v cmTC_fb285

  [1/4] /usr/bin/cc -isystem /usr/include/postgresql/16/server -isystem
  /usr/include/postgresql/internal -isystem /usr/include/postgresql -isystem
  /usr/include/gssapi -o CMakeFiles/cmTC_fb285.dir/check_main.c.o -c
  /home/rtkid/Downloads/userver/postgresql/pq-extra/check_main.c

  [2/4] /usr/bin/cc -isystem /usr/include/postgresql/16/server -isystem
  /usr/include/postgresql/internal -isystem /usr/include/postgresql -isystem
  /usr/include/gssapi -o CMakeFiles/cmTC_fb285.dir/pq_portal_funcs.c.o -c
  /home/rtkid/Downloads/userver/postgresql/pq-extra/pq_portal_funcs.c

  [3/4] /usr/bin/cc -isystem /usr/include/postgresql/16/server -isystem
  /usr/include/postgresql/internal -isystem /usr/include/postgresql -isystem
  /usr/include/gssapi -o CMakeFiles/cmTC_fb285.dir/pq_workaround.c.o -c
  /home/rtkid/Downloads/userver/postgresql/pq-extra/pq_workaround.c

  [4/4] : && /usr/bin/cc -Wl,--gc-sections
  CMakeFiles/cmTC_fb285.dir/check_main.c.o
  CMakeFiles/cmTC_fb285.dir/pq_portal_funcs.c.o
  CMakeFiles/cmTC_fb285.dir/pq_workaround.c.o -o cmTC_fb285
  /usr/lib/aarch64-linux-gnu/libpq.a /usr/lib/postgresql/16/lib/libpgcommon.a
  /usr/lib/postgresql/16/lib/libpgport.a
  /usr/lib/aarch64-linux-gnu/libldap.so /usr/lib/aarch64-linux-gnu/libssl.so
  /usr/lib/aarch64-linux-gnu/libcrypto.so
  /usr/lib/aarch64-linux-gnu/libgssapi_krb5.so && :

  FAILED: cmTC_fb285

  : && /usr/bin/cc -Wl,--gc-sections CMakeFiles/cmTC_fb285.dir/check_main.c.o
  CMakeFiles/cmTC_fb285.dir/pq_portal_funcs.c.o
  CMakeFiles/cmTC_fb285.dir/pq_workaround.c.o -o cmTC_fb285
  /usr/lib/aarch64-linux-gnu/libpq.a /usr/lib/postgresql/16/lib/libpgcommon.a
  /usr/lib/postgresql/16/lib/libpgport.a
  /usr/lib/aarch64-linux-gnu/libldap.so /usr/lib/aarch64-linux-gnu/libssl.so
  /usr/lib/aarch64-linux-gnu/libcrypto.so
  /usr/lib/aarch64-linux-gnu/libgssapi_krb5.so && :

  /usr/bin/ld: /usr/lib/postgresql/16/lib/libpgcommon.a(pg_prng.o): in
  function `pg_prng_double_normal':

  (.text+0x4d4): undefined reference to `log'

  /usr/bin/ld: (.text+0x4e8): undefined reference to `sqrt'

  /usr/bin/ld: (.text+0x504): undefined reference to `sin'

  collect2: error: ld returned 1 exit status

  ninja: build stopped: subcommand failed.





  If there are errors up above then the versions of libpq, libpgport and
  libpgcommon diverged:
  /usr/lib/aarch64-linux-gnu/libpq.a;/usr/lib/postgresql/16/lib/libpgcommon.a;/usr/lib/postgresql/16/lib/libpgport.a


  Install the same versions of PostgreSQL client and server libraries, use
  USERVER_PG_SERVER_INCLUDE_DIR, USERVER_PG_SERVER_LIBRARY_DIR,
  USERVER_PG_INCLUDE_DIR and USERVER_PG_LIBRARY_DIR CMake options if needed;
  or disable libpq patching via CMake flag -DUSERVER_FEATURE_PATCH_LIBPQ=OFF.
@Anton3 Anton3 added the bug Something isn't working label May 7, 2024
@Anton3 Anton3 changed the title BUG: Postgresql16 USERVER_FEATURE_PATCH_LIBPQ fails to build with Postgresql16 May 7, 2024
@root-kidik
Copy link
Contributor Author

Resolved: 0737152

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants