Last active
February 9, 2022 15:19
-
-
Save hennevogel/d22b0e16a87b32914075754f700e0934 to your computer and use it in GitHub Desktop.
pg compile error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gem::Ext::BuildError: ERROR: Failed to build gem native extension. | |
current directory: /tmp/bundler20220209-7003-7jrib8pg-1.3.1/gems/pg-1.3.1/ext | |
/usr/bin/ruby.ruby3.1 -I /usr/lib64/ruby/3.1.0 -r ./siteconf20220209-7003-dspmoi.rb extconf.rb | |
Calling libpq with GVL unlocked | |
checking for pg_config... yes | |
Using config values from /usr/bin/pg_config | |
checking for whether -Wl,-rpath,/usr/lib/postgresql12/lib64 is accepted as LDFLAGS... yes | |
Using libpq from /usr/lib/postgresql12/lib64 | |
checking for libpq-fe.h... yes | |
checking for libpq/libpq-fs.h... yes | |
checking for pg_config_manual.h... yes | |
checking for PQconnectdb() in -lpq... yes | |
checking for PQconninfo()... yes | |
checking for PQsslAttribute()... yes | |
checking for PQresultVerboseErrorMessage()... yes | |
checking for PQencryptPasswordConn()... yes | |
checking for PQresultMemorySize()... yes | |
checking for PQenterPipelineMode()... yes | |
checking for timegm()... yes | |
checking for rb_gc_adjust_memory_usage()... yes | |
checking for rb_gc_mark_movable()... yes | |
checking for rb_io_wait()... yes | |
checking for unistd.h... yes | |
checking for inttypes.h... yes | |
checking for C99 variable length arrays... yes | |
creating extconf.h | |
creating Makefile | |
current directory: /tmp/bundler20220209-7003-7jrib8pg-1.3.1/gems/pg-1.3.1/ext | |
make DESTDIR\= clean | |
current directory: /tmp/bundler20220209-7003-7jrib8pg-1.3.1/gems/pg-1.3.1/ext | |
make DESTDIR\= | |
compiling gvl_wrappers.c | |
compiling pg.c | |
In file included from /usr/include/ruby-3.1.0/ruby/internal/arithmetic/int.h:26:0, | |
from /usr/include/ruby-3.1.0/ruby/internal/arithmetic/char.h:23, | |
from /usr/include/ruby-3.1.0/ruby/internal/arithmetic.h:23, | |
from /usr/include/ruby-3.1.0/ruby/ruby.h:27, | |
from /usr/include/ruby-3.1.0/ruby.h:38, | |
from pg.h:21, | |
from pg.c:49: | |
pg.c: In function 'Init_pg_ext': | |
pg.c:554:66: error: 'PGRES_PIPELINE_SYNC' undeclared (first use in this function); did you mean 'PGRES_POLLING_OK'? | |
rb_define_const(rb_mPGconstants, "PGRES_PIPELINE_SYNC", INT2FIX(PGRES_PIPELINE_SYNC)); | |
^ | |
/usr/include/ruby-3.1.0/ruby/internal/arithmetic/long.h:350:30: note: in definition of macro 'INT2FIX' | |
__builtin_constant_p(i), \ | |
^ | |
pg.c:554:66: note: each undeclared identifier is reported only once for each function it appears in | |
rb_define_const(rb_mPGconstants, "PGRES_PIPELINE_SYNC", INT2FIX(PGRES_PIPELINE_SYNC)); | |
^ | |
/usr/include/ruby-3.1.0/ruby/internal/arithmetic/long.h:350:30: note: in definition of macro 'INT2FIX' | |
__builtin_constant_p(i), \ | |
^ | |
/usr/include/ruby-3.1.0/ruby/internal/arithmetic/long.h:349:5: error: first argument to '__builtin_choose_expr' not a constant | |
__builtin_choose_expr( \ | |
^ | |
pg.c:554:58: note: in expansion of macro 'INT2FIX' | |
rb_define_const(rb_mPGconstants, "PGRES_PIPELINE_SYNC", INT2FIX(PGRES_PIPELINE_SYNC)); | |
^~~~~~~ | |
pg.c:560:69: error: 'PGRES_PIPELINE_ABORTED' undeclared (first use in this function); did you mean 'PGRES_PIPELINE_SYNC'? | |
rb_define_const(rb_mPGconstants, "PGRES_PIPELINE_ABORTED", INT2FIX(PGRES_PIPELINE_ABORTED)); | |
^ | |
/usr/include/ruby-3.1.0/ruby/internal/arithmetic/long.h:350:30: note: in definition of macro 'INT2FIX' | |
__builtin_constant_p(i), \ | |
^ | |
/usr/include/ruby-3.1.0/ruby/internal/arithmetic/long.h:349:5: error: first argument to '__builtin_choose_expr' not a constant | |
__builtin_choose_expr( \ | |
^ | |
pg.c:560:61: note: in expansion of macro 'INT2FIX' | |
rb_define_const(rb_mPGconstants, "PGRES_PIPELINE_ABORTED", INT2FIX(PGRES_PIPELINE_ABORTED)); | |
^~~~~~~ | |
pg.c:687:61: error: 'PQ_PIPELINE_ON' undeclared (first use in this function); did you mean 'PGRES_PIPELINE_SYNC'? | |
rb_define_const(rb_mPGconstants, "PQ_PIPELINE_ON", INT2FIX(PQ_PIPELINE_ON)); | |
^ | |
/usr/include/ruby-3.1.0/ruby/internal/arithmetic/long.h:350:30: note: in definition of macro 'INT2FIX' | |
__builtin_constant_p(i), \ | |
^ | |
/usr/include/ruby-3.1.0/ruby/internal/arithmetic/long.h:349:5: error: first argument to '__builtin_choose_expr' not a constant | |
__builtin_choose_expr( \ | |
^ | |
pg.c:687:53: note: in expansion of macro 'INT2FIX' | |
rb_define_const(rb_mPGconstants, "PQ_PIPELINE_ON", INT2FIX(PQ_PIPELINE_ON)); | |
^~~~~~~ | |
pg.c:693:62: error: 'PQ_PIPELINE_OFF' undeclared (first use in this function); did you mean 'PQ_PIPELINE_ON'? | |
rb_define_const(rb_mPGconstants, "PQ_PIPELINE_OFF", INT2FIX(PQ_PIPELINE_OFF)); | |
^ | |
/usr/include/ruby-3.1.0/ruby/internal/arithmetic/long.h:350:30: note: in definition of macro 'INT2FIX' | |
__builtin_constant_p(i), \ | |
^ | |
/usr/include/ruby-3.1.0/ruby/internal/arithmetic/long.h:349:5: error: first argument to '__builtin_choose_expr' not a constant | |
__builtin_choose_expr( \ | |
^ | |
pg.c:693:54: note: in expansion of macro 'INT2FIX' | |
rb_define_const(rb_mPGconstants, "PQ_PIPELINE_OFF", INT2FIX(PQ_PIPELINE_OFF)); | |
^~~~~~~ | |
pg.c:700:66: error: 'PQ_PIPELINE_ABORTED' undeclared (first use in this function); did you mean 'PGRES_PIPELINE_ABORTED'? | |
rb_define_const(rb_mPGconstants, "PQ_PIPELINE_ABORTED", INT2FIX(PQ_PIPELINE_ABORTED)); | |
^ | |
/usr/include/ruby-3.1.0/ruby/internal/arithmetic/long.h:350:30: note: in definition of macro 'INT2FIX' | |
__builtin_constant_p(i), \ | |
^ | |
/usr/include/ruby-3.1.0/ruby/internal/arithmetic/long.h:349:5: error: first argument to '__builtin_choose_expr' not a constant | |
__builtin_choose_expr( \ | |
^ | |
pg.c:700:58: note: in expansion of macro 'INT2FIX' | |
rb_define_const(rb_mPGconstants, "PQ_PIPELINE_ABORTED", INT2FIX(PQ_PIPELINE_ABORTED)); | |
^~~~~~~ | |
make: *** [Makefile:255: pg.o] Error 1 | |
make failed, exit code 2 | |
Gem files will remain installed in /tmp/bundler20220209-7003-7jrib8pg-1.3.1/gems/pg-1.3.1 for inspection. | |
Results logged to /tmp/bundler20220209-7003-7jrib8pg-1.3.1/extensions/x86_64-linux/3.1.0/pg-1.3.1/gem_make.out | |
/usr/lib64/ruby/3.1.0/rubygems/ext/builder.rb:95:in `run' | |
/usr/lib64/ruby/3.1.0/rubygems/ext/builder.rb:44:in `block in make' | |
/usr/lib64/ruby/3.1.0/rubygems/ext/builder.rb:36:in `each' | |
/usr/lib64/ruby/3.1.0/rubygems/ext/builder.rb:36:in `make' | |
/usr/lib64/ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:63:in `block in build' | |
/usr/lib64/ruby/3.1.0/tempfile.rb:317:in `open' | |
/usr/lib64/ruby/3.1.0/rubygems/ext/ext_conf_builder.rb:26:in `build' | |
/usr/lib64/ruby/3.1.0/rubygems/ext/builder.rb:161:in `build_extension' | |
/usr/lib64/ruby/3.1.0/rubygems/ext/builder.rb:195:in `block in build_extensions' | |
/usr/lib64/ruby/3.1.0/rubygems/ext/builder.rb:192:in `each' | |
/usr/lib64/ruby/3.1.0/rubygems/ext/builder.rb:192:in `build_extensions' | |
/usr/lib64/ruby/3.1.0/rubygems/installer.rb:847:in `build_extensions' | |
/usr/lib64/ruby/gems/3.1.0/gems/bundler-2.3.3/lib/bundler/rubygems_gem_installer.rb:71:in `build_extensions' | |
/usr/lib64/ruby/gems/3.1.0/gems/bundler-2.3.3/lib/bundler/rubygems_gem_installer.rb:28:in `install' | |
/usr/lib64/ruby/gems/3.1.0/gems/bundler-2.3.3/lib/bundler/source/rubygems.rb:204:in `install' | |
/usr/lib64/ruby/gems/3.1.0/gems/bundler-2.3.3/lib/bundler/installer/gem_installer.rb:54:in `install' | |
/usr/lib64/ruby/gems/3.1.0/gems/bundler-2.3.3/lib/bundler/installer/gem_installer.rb:16:in `install_from_spec' | |
/usr/lib64/ruby/gems/3.1.0/gems/bundler-2.3.3/lib/bundler/installer/parallel_installer.rb:186:in `do_install' | |
/usr/lib64/ruby/gems/3.1.0/gems/bundler-2.3.3/lib/bundler/installer/parallel_installer.rb:177:in `block in worker_pool' | |
/usr/lib64/ruby/gems/3.1.0/gems/bundler-2.3.3/lib/bundler/worker.rb:62:in `apply_func' | |
/usr/lib64/ruby/gems/3.1.0/gems/bundler-2.3.3/lib/bundler/worker.rb:57:in `block in process_queue' | |
/usr/lib64/ruby/gems/3.1.0/gems/bundler-2.3.3/lib/bundler/worker.rb:54:in `loop' | |
/usr/lib64/ruby/gems/3.1.0/gems/bundler-2.3.3/lib/bundler/worker.rb:54:in `process_queue' | |
/usr/lib64/ruby/gems/3.1.0/gems/bundler-2.3.3/lib/bundler/worker.rb:91:in `block (2 levels) in create_threads' | |
An error occurred while installing pg (1.3.1), and Bundler cannot continue. | |
In Gemfile: | |
pg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is with
GCC
$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/7/lto-wrapper OFFLOAD_TARGET_NAMES=hsa:nvptx-none Target: x86_64-suse-linux Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,ada,go --enable-offload-targets=hsa,nvptx-none, --without-cuda-driver --enable-checking=release --disable-werror --with-gxx-include-dir=/usr/include/c++/7 --enable-ssp --disable-libssp --disable-libvtv --disable-libcc1 --disable-plugin --with-bugurl=https://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --with-slibdir=/lib64 --with-system-zlib --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --with-gcc-major-version-only --enable-linker-build-id --enable-linux-futex --enable-gnu-indirect-function --program-suffix=-7 --without-system-libunwind --enable-multilib --with-arch-32=x86-64 --with-tune=generic --build=x86_64-suse-linux --host=x86_64-suse-linux Thread model: posix gcc version 7.5.0 (SUSE Linux)
pg_config