-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Rust programs require recent glibc due to __cxa_thread_atexit_impl
#36826
Comments
Seems like an unintended behaviour indeed, though I feel like solving it is not something we can easily do! Probably the best way to crosscompile a rustc in a way which does not introduce a dependency on GLIBC_2.18 is to crosscompile from a system with glibc older than 2.18 as well. http://stackoverflow.com/questions/6136423/how-can-i-avoid-dependency-on-glibc-x-y-when-using-weak-symbols#6139218 describes the same problem. I wonder what is meant by weak alias in the answer. EDIT: less relevant: https://web.archive.org/web/20160107032111/http://www.trevorpounds.com/blog/?p=103 and http://stackoverflow.com/questions/2856438/how-can-i-link-to-a-specific-glibc-version. |
This page describes weak aliases. I don't think the alias is important - probably it is the fact that he provided a default implementation, so GCC doesn't try very hard to find another. I wonder if the code were reworked somewhat like this it would work:
I am a Rust beginner thought so kind of out of my depth with this code! |
I've always personally been under the impression that if you want compatibility with glibc version X+ then you must compile against version X. I think I've seen problems like where you compile against glibc Y and because you called I'm not currently sure whether having a weak definition of |
Sorry I'm a bit confused - did you change your mind since writing "we run on lots older linuxes, as well as cross compiling from a newer linux to an older linux, so we also have a fallback implementation to use as well."? That suggests to me that you thought this should work at one time. Anyway, compiling against an old version of glibc is a massive pain. The oldest version of GCC that Linaro provide still uses glibc 2.19. I'm willing to try the above code but to be honest I have no idea how to cross-compile a new version of libstd.so from Windows. If you can give me a hint of the steps I will give it a go and see if it works! |
So that comment isn't really related to this scenario, compiling against a newer linux and then running on an older one. Once you've compiled for a particular glibc version you can never take that binary backwards (in theory). Yeah it's true though that if you're compiling from Windows to Linux you'll basically just have to figure out how to get your hands on an older glibc. If you're on Linux you can typically use docker to achieve this easily, but that may not be too applicable to you unfortunately :( |
Fix `GLIBC` compatible issues: - Fixes #33854 - All `CentOS 7` related issues in #30468 Should also fix: - #33530 Refactored jobs tested in https://github.com/Brooooooklyn/next.js/runs/5233199833?check_suite_focus=true ### `objdump` in `[email protected]` <details> <summary>Symbols</summary> node_modules/@next/swc-linux-x64-gnu/next-swc.linux-x64-gnu.node: file format elf64-x86-64 DYNAMIC SYMBOL TABLE: 0000000000000000 D *UND* 0000000000000000 napi_resolve_deferred 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3.4 __xpg_strerror_r 0000000000000000 D *UND* 0000000000000000 napi_typeof 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_setspecific 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3.2 pthread_cond_destroy 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.4 __stack_chk_fail 0000000000000000 DF *UND* 0000000000000000 GCC_3.0 _Unwind_GetRegionStart 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 memset 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 fputs 0000000000000000 DF *UND* 0000000000000000 GCC_3.3 _Unwind_FindEnclosingFunction 0000000000000000 DF *UND* 0000000000000000 GCC_3.0 _Unwind_GetTextRelBase 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 setgroups 0000000000000000 DO *UND* 0000000000000000 GLIBC_2.2.5 stdout 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 madvise 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3 realpath 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 posix_spawn_file_actions_adddup2 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pow 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 sigaltstack 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_self 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 trunc 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3.4 __strncat_chk 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_attr_setstacksize 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 sigemptyset 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_detach 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 __fxstat64 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3.2 pthread_cond_broadcast 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 strtol 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 __cxa_atexit 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 round 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 sigaddset 0000000000000000 DF *UND* 0000000000000000 GCC_3.0 _Unwind_RaiseException 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.15 posix_spawnp 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 memcmp 0000000000000000 D *UND* 0000000000000000 napi_queue_async_work 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_rwlock_wrlock 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 floor 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3.4 __vsnprintf_chk 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_key_create 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 close 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_mutexattr_destroy 0000000000000000 D *UND* 0000000000000000 napi_throw_error 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3 __ctype_toupper_loc 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 poll 0000000000000000 D *UND* 0000000000000000 napi_reject_deferred 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 signal 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 getcwd 0000000000000000 w D *UND* 0000000000000000 __gmon_start__ 0000000000000000 D *UND* 0000000000000000 napi_get_value_string_utf8 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 posix_spawnattr_setsigmask 0000000000000000 D *UND* 0000000000000000 napi_create_promise 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 dup2 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_attr_getguardsize 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 __xstat64 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_attr_getstack 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 strerror 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 getenv 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 read 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 memrchr 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_rwlock_rdlock 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 fmod 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 fork 0000000000000000 DF *UND* 0000000000000000 GCC_3.3 _Unwind_Backtrace 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 posix_spawn_file_actions_destroy 0000000000000000 D *UND* 0000000000000000 napi_get_value_bool 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 setuid 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.9 pipe2 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3.4 __snprintf_chk 0000000000000000 DF *UND* 0000000000000000 GCC_3.0 _Unwind_SetIP 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 dlsym 0000000000000000 D *UND* 0000000000000000 napi_create_error 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_mutex_destroy 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 access 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 ioctl 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 strncpy 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 localtime_r 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 memmove 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 syscall 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 readlink 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 fma 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 getuid 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 sin 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_mutex_init 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 strlen 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 posix_spawnattr_setflags 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 posix_spawn_file_actions_init 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 strstr 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_key_delete 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_getattr_np 0000000000000000 D *UND* 0000000000000000 napi_get_buffer_info 0000000000000000 DO *UND* 0000000000000000 GLIBC_2.2.5 stderr 0000000000000000 DF *UND* 0000000000000000 GCC_3.0 _Unwind_Resume 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 posix_spawnattr_destroy 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3.2 pthread_cond_signal 0000000000000000 w DF *UND* 0000000000000000 GLIBC_2.18 __cxa_thread_atexit_impl 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_mutex_trylock 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 writev 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 clock_gettime 0000000000000000 D *UND* 0000000000000000 napi_delete_async_work 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_getspecific 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_condattr_destroy 0000000000000000 DF *UND* 0000000000000000 GCC_3.0 _Unwind_DeleteException 0000000000000000 D *UND* 0000000000000000 napi_create_function 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 prctl 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 waitpid 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 lseek64 0000000000000000 D *UND* 0000000000000000 napi_set_named_property 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 cos 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 posix_spawnattr_init 0000000000000000 DF *UND* 0000000000000000 GCC_3.0 _Unwind_GetIP 0000000000000000 w D *UND* 0000000000000000 _ITM_registerTMCloneTable 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 execvp 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 ceil 0000000000000000 DO *UND* 0000000000000000 GLIBC_2.2.5 environ 0000000000000000 D *UND* 0000000000000000 napi_get_cb_info 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_mutexattr_init 0000000000000000 D *UND* 0000000000000000 napi_coerce_to_object 0000000000000000 D *UND* 0000000000000000 napi_throw 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 mprotect 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.14 memcpy 0000000000000000 w D *UND* 0000000000000000 _ITM_deregisterTMCloneTable 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_attr_init 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 fcntl 0000000000000000 DF *UND* 0000000000000000 GCC_4.2.0 _Unwind_GetIPInfo 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 free 0000000000000000 w DF *UND* 0000000000000000 GLIBC_2.2.5 __cxa_finalize 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_mutex_unlock 0000000000000000 DF *UND* 0000000000000000 GCC_3.0 _Unwind_GetDataRelBase 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_mutex_lock 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 dl_iterate_phdr 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3.4 sched_getaffinity 0000000000000000 DF *UND* 0000000000000000 GCC_3.0 _Unwind_SetGR 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3.2 pthread_cond_init 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 memchr 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 open 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3 __tls_get_addr 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 log10 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3.2 pthread_cond_wait 0000000000000000 D *UND* 0000000000000000 napi_create_async_work 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 sysconf 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 munmap 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 log2 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3.3 pthread_condattr_setclock 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_attr_destroy 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 bcmp 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_create 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 posix_spawnattr_setsigdefault 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 abort 0000000000000000 D *UND* 0000000000000000 napi_create_string_utf8 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_condattr_init 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_sigmask 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_mutexattr_settype 0000000000000000 DO *UND* 0000000000000000 GLIBC_2.2.5 __environ 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 mmap 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 __errno_location 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 _exit 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 write 0000000000000000 DF *UND* 0000000000000000 GCC_3.3 _Unwind_GetCFA 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 getrusage 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_rwlock_unlock 0000000000000000 DF *UND* 0000000000000000 GCC_3.0 _Unwind_GetLanguageSpecificData 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 sched_yield 0000000000000000 D *UND* 0000000000000000 napi_create_object 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 setgid 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 chdir 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 open64 000000000039bbd0 g DF .text 000000000000032a Base napi_register_module_v1 0000000001ddd750 g DF .text 00000000000002e5 Base rust_eh_personality </details> There is `0000000000000000 w DF *UND* 0000000000000000 GLIBC_2.18 __cxa_thread_atexit_impl` introduced by rust-lang/rust#36826 ### `objdump` in current branch <details> <summary>Symbols</summary> next-swc.linux-x64-gnu.node: file format elf64-x86-64 DYNAMIC SYMBOL TABLE: 0000000000000000 w D *UND* 0000000000000000 Base __gmon_start__ 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 memcpy 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 trunc 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3 __tls_get_addr 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 bcmp 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 memmove 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 memset 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_mutex_lock 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_mutex_trylock 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 memcmp 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_mutex_unlock 0000000000000000 D *UND* 0000000000000000 Base napi_create_function 0000000000000000 D *UND* 0000000000000000 Base napi_set_named_property 0000000000000000 D *UND* 0000000000000000 Base napi_create_string_utf8 0000000000000000 D *UND* 0000000000000000 Base napi_coerce_to_object 0000000000000000 D *UND* 0000000000000000 Base napi_get_cb_info 0000000000000000 D *UND* 0000000000000000 Base napi_create_error 0000000000000000 D *UND* 0000000000000000 Base napi_throw 0000000000000000 D *UND* 0000000000000000 Base napi_throw_error 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 fma 0000000000000000 D *UND* 0000000000000000 Base napi_create_object 0000000000000000 D *UND* 0000000000000000 Base napi_create_promise 0000000000000000 D *UND* 0000000000000000 Base napi_create_async_work 0000000000000000 D *UND* 0000000000000000 Base napi_queue_async_work 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 strlen 0000000000000000 D *UND* 0000000000000000 Base napi_get_value_string_utf8 0000000000000000 D *UND* 0000000000000000 Base napi_get_value_bool 0000000000000000 D *UND* 0000000000000000 Base napi_typeof 0000000000000000 D *UND* 0000000000000000 Base napi_get_buffer_info 0000000000000000 D *UND* 0000000000000000 Base napi_reject_deferred 0000000000000000 D *UND* 0000000000000000 Base napi_resolve_deferred 0000000000000000 D *UND* 0000000000000000 Base napi_delete_async_work 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 close 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pow 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 round 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 localtime_r 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 log10 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 cos 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 sin 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 fmod 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 ceil 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3.2 pthread_cond_wait 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3.4 sched_getaffinity 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 sysconf 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3.4 __xpg_strerror_r 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 syscall 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 __errno_location 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 read 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 open64 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 poll 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 log2 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 munmap 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 mmap 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 dl_iterate_phdr 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 clock_gettime 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 getrusage 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 snprintf 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 access 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 vsnprintf 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 madvise 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 strerror 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 mprotect 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_setspecific 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 memchr 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3 realpath 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 getenv 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_key_create 0000000000000000 DO *UND* 0000000000000000 GLIBC_2.2.5 stderr 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 fputs 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 strncat 0000000000000000 DO *UND* 0000000000000000 GLIBC_2.2.5 environ 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3 __ctype_toupper_loc 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 strncpy 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 strstr 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 strtol 0000000000000000 DO *UND* 0000000000000000 GLIBC_2.2.5 stdout 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 posix_spawnattr_destroy 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 posix_spawn_file_actions_destroy 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_mutexattr_destroy 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_rwlock_unlock 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_mutex_destroy 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 sched_yield 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 getcwd 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_rwlock_rdlock 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_rwlock_wrlock 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 getuid 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 write 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 fcntl 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 lseek64 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 writev 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 memrchr 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 ioctl 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 waitpid 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3.2 pthread_cond_broadcast 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_condattr_init 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3.3 pthread_condattr_setclock 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3.2 pthread_cond_init 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_condattr_destroy 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3.2 pthread_cond_signal 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 sigaltstack 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 abort 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 signal 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_self 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_getattr_np 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_attr_getstack 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_attr_destroy 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 malloc 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 free 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.3.2 pthread_cond_destroy 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_mutexattr_init 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_mutexattr_settype 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_mutex_init 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_getspecific 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_key_delete 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 dlsym 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 readlink 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 chdir 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.9 pipe2 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_attr_init 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_attr_setstacksize 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_create 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 prctl 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_detach 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_attr_getguardsize 0000000000000000 w D *UND* 0000000000000000 Base __cxa_thread_atexit_impl 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 posix_spawnattr_init 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 posix_spawn_file_actions_init 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 posix_spawn_file_actions_adddup2 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 sigemptyset 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 posix_spawnattr_setsigmask 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 sigaddset 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 posix_spawnattr_setsigdefault 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 posix_spawnattr_setflags 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 fork 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 posix_spawnp 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 _exit 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 dup2 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 setgroups 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 setgid 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 setuid 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 pthread_sigmask 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 execvp 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 fprintf 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 fflush 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 dladdr 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 fwrite 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 __cxa_atexit 0000000002830dc0 g DF .text 00000000000002e5 Base rust_eh_personality 0000000000e10380 g DF .text 000000000000032a Base napi_register_module_v1 </details> No more `GLIBC_2.18` symbols. Confirm it works on `centos:7` docker image.
Triage: The requirement to link against the oldest version of glibc you want to run on is not something that the Rust project can do anything about I'm afraid (I think that would have to be supported by glibc itself), so let's close this as works as designed/won't fix. |
I think this is a bug but I'm not 100% sure. Anyway, I have cross-compiled a simple Rust program with the toolchain
stable-x86_64-pc-windows-gnu
and the targetarmv7-unknown-linux-gnueabihf
, using this GCC cross compiler from Linaro.However when I run it on a reasonably old system I get:
objdump -T foo
reveals that this is the only symbol that needs glibc 2.18. The others all need 2.4.The symbol is weakly defined, however the dependency on glibc 2.18 is still strong:
I found a site where they should how to hex edit the binary so it shows this:
However it still doesn't work:
Now, I wouldn't have thought this was a bug, except that the code that uses
__cxa_thread_atexit_impl
seems to have been written intending it to be a weak reference so it seems like a bug.I'm not an expert on glibc's insanity though so I could be wrong. I posted a SO question but no answers yet. :-/
The text was updated successfully, but these errors were encountered: