Open hloeung opened 2 years ago
For stackprof, https://paste.ubuntu.com/p/mbpjvRzf7j/:
//snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined reference to
__open64_nocancel@GLIBC_PRIVATE' /snap/ruby/237/lib/libruby.so: undefined reference to
log2@GLIBC_2.29' //snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined reference to__libc_fcntl64@GLIBC_PRIVATE' //snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined reference to
write_nocancel@GLIBC_PRIVATE' /snap/ruby/237/lib/libruby.so: undefined reference tolog@GLIBC_2.29' //snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined reference to
twalk_r@GLIBC_PRIVATE' /snap/ruby/237/lib/libruby.so: undefined reference topow@GLIBC_2.29' /snap/ruby/237/lib/libruby.so: undefined reference to
exp@GLIBC_2.29' /snap/ruby/237/lib/libruby.so: undefined reference to `statx@GLIBC_2.28' collect2: error: ld returned 1 exit status
Similar to what's reported in https://github.com/ruby/snap.ruby/issues/14
@hsbt ?
@hloeung From what I've learned in https://github.com/brianmario/mysql2/issues/1100 and similar issues: gems with native extensions might fail to build because the ruby snap (and thus the Ruby binaries) were built with different – likely newer – versions of GLIBC. If my understanding is correct, all track versions of the Ruby snap are now built on core20 bases. So if you cannot upgrade your Bionic host to 20.04, I think you're out of luck using the ruby snap to compile native gem extensions.
Hi, I am getting basically the same on 22.04 when trying to use the Snap version (as that would sound like the easiest approach for running latest Ruby - apt repos only have 3.1 and I need 3.2 now)
LD_LIBRARY_PATH=.:/snap/ruby/317/lib "gcc -o conftest -I/snap/ruby/317/include/ruby-3.2.0/x86_64-linux -I/snap/ruby/317/include/ruby-3.2.0/ruby/backward -I/snap/ruby/317/include/ruby-3.2.0 -I. -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef -fPIC -Wall -Wno-unknown-pragmas -std=c99 conftest.c -L. -L/snap/ruby/317/lib -Wl,-rpath,/snap/ruby/317/lib -L. -L/build/snapcraft-ruby-2c41636617a6ccb92a530f6f568ec82e/parts/ruby/install/usr/lib -L/build/snapcraft-ruby-2c41636617a6ccb92a530f6f568ec82e/parts/ruby/install/usr/lib/x86_64-linux-gnu -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -Wl,-rpath,/snap/ruby/317/lib -L/snap/ruby/317/lib -lruby -lm -lpthread -lc"
/usr/bin/ld: /snap/core20/current/lib/x86_64-linux-gnu/libdl.so.2: undefined reference to `_dl_sym@GLIBC_PRIVATE'
/usr/bin/ld: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined reference to `__libc_dlclose@GLIBC_PRIVATE'
/usr/bin/ld: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined reference to `__libc_allocate_rtsig_private@GLIBC_PRIVATE'
/usr/bin/ld: /snap/core20/current/lib/x86_64-linux-gnu/librt.so.1: undefined reference to `__libc_dlsym@GLIBC_PRIVATE'
/usr/bin/ld: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined reference to `__libc_siglongjmp@GLIBC_PRIVATE'
/usr/bin/ld: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined reference to `__libc_thread_freeres@GLIBC_PRIVATE'
/usr/bin/ld: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined reference to `__libc_current_sigrtmax_private@GLIBC_PRIVATE'
/usr/bin/ld: /snap/core20/current/lib/x86_64-linux-gnu/libdl.so.2: undefined reference to `_dl_vsym@GLIBC_PRIVATE'
/usr/bin/ld: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined reference to `__libc_current_sigrtmin_private@GLIBC_PRIVATE'
/usr/bin/ld: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined reference to `_dl_make_stack_executable@GLIBC_PRIVATE'
/usr/bin/ld: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined reference to `__libc_longjmp@GLIBC_PRIVATE'
/usr/bin/ld: /snap/core20/current/lib/x86_64-linux-gnu/librt.so.1: undefined reference to `__libc_dlopen_mode@GLIBC_PRIVATE'
/usr/bin/ld: /snap/core20/current/lib/x86_64-linux-gnu/libdl.so.2: undefined reference to `_dl_addr@GLIBC_PRIVATE'
/usr/bin/ld: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined reference to `__libc_pthread_init@GLIBC_PRIVATE'
collect2: error: ld returned 1 exit status
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return !!argv[argc];
6: }
/* end */
Hi,
Recently noticed failures in installing the following gems on VMs running Ubuntu Bionic. Each with a different weird and wonderful error.
For cbor:
For raindrops:
For kgio:
Finally, for stackprof:
The last successful collection of these were from Jan 7th so I think it may be related to the recent core18 to core20 change - https://github.com/ruby/snap.ruby/pull/26
It's possible it's commits around then, I'm not sure.