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

Glibc compatible issue #146

Closed
Brooooooklyn opened this issue Jan 20, 2021 · 6 comments · Fixed by #207
Closed

Glibc compatible issue #146

Brooooooklyn opened this issue Jan 20, 2021 · 6 comments · Fixed by #207
Assignees
Labels
bug Something isn't working

Comments

@Brooooooklyn
Copy link
Owner

We are compiling skia-rs in ubuntu-latest image, which means native addon's is linking against with higher versions GLIBC than most users have.

objdump -p skia.linux-x64-gnu.node

skia.linux-x64-gnu.node:     file format elf64-x86-64

Program Header:
    LOAD off    0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**12
         filesz 0x000000000002e9a0 memsz 0x000000000002e9a0 flags r--
    LOAD off    0x000000000002f000 vaddr 0x000000000002f000 paddr 0x000000000002f000 align 2**12
         filesz 0x0000000000349821 memsz 0x0000000000349821 flags r-x
    LOAD off    0x0000000000379000 vaddr 0x0000000000379000 paddr 0x0000000000379000 align 2**12
         filesz 0x00000000000aafec memsz 0x00000000000aafec flags r--
    LOAD off    0x00000000004244c0 vaddr 0x00000000004254c0 paddr 0x00000000004254c0 align 2**12
         filesz 0x0000000000020360 memsz 0x000000000022fe18 flags rw-
 DYNAMIC off    0x000000000043af20 vaddr 0x000000000043bf20 paddr 0x000000000043bf20 align 2**3
         filesz 0x0000000000000240 memsz 0x0000000000000240 flags rw-
    NOTE off    0x0000000000000270 vaddr 0x0000000000000270 paddr 0x0000000000000270 align 2**2
         filesz 0x0000000000000024 memsz 0x0000000000000024 flags r--
     TLS off    0x00000000004244c0 vaddr 0x00000000004254c0 paddr 0x00000000004254c0 align 2**5
         filesz 0x0000000000001800 memsz 0x00000000000018d8 flags r--
EH_FRAME off    0x00000000003bdf58 vaddr 0x00000000003bdf58 paddr 0x00000000003bdf58 align 2**2
         filesz 0x000000000000ee34 memsz 0x000000000000ee34 flags r--
   STACK off    0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**4
         filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw-
   RELRO off    0x00000000004244c0 vaddr 0x00000000004254c0 paddr 0x00000000004254c0 align 2**0
         filesz 0x0000000000017b40 memsz 0x0000000000017b40 flags r--

Dynamic Section:
  NEEDED               libfontconfig.so.1
  NEEDED               libpthread.so.0
  NEEDED               libdl.so.2
  NEEDED               libgcc_s.so.1
  NEEDED               libc.so.6
  NEEDED               ld-linux-x86-64.so.2
  NEEDED               libm.so.6
  INIT                 0x000000000002f000
  FINI                 0x0000000000378814
  INIT_ARRAY           0x0000000000426cc0
  INIT_ARRAYSZ         0x0000000000000018
  FINI_ARRAY           0x0000000000426cd8
  FINI_ARRAYSZ         0x0000000000000008
  GNU_HASH             0x0000000000000298
  STRTAB               0x0000000000001a78
  SYMTAB               0x00000000000002c0
  STRSZ                0x00000000000012c8
  SYMENT               0x0000000000000018
  PLTGOT               0x000000000043c160
  PLTRELSZ             0x0000000000000f90
  PLTREL               0x0000000000000007
  JMPREL               0x000000000002da10
  RELA                 0x00000000000030e0
  RELASZ               0x000000000002a930
  RELAENT              0x0000000000000018
  FLAGS                0x0000000000000008
  FLAGS_1              0x0000000000000001
  VERNEED              0x0000000000002f40
  VERNEEDNUM           0x0000000000000006
  VERSYM               0x0000000000002d40
  RELACOUNT            0x0000000000001b94

Version References:
  required from libdl.so.2:
    0x09691a75 0x00 15 GLIBC_2.2.5
  required from ld-linux-x86-64.so.2:
    0x0d696913 0x00 13 GLIBC_2.3
  required from libgcc_s.so.1:
    0x09276060 0x00 17 GCC_4.2.0
    0x0b792653 0x00 14 GCC_3.3
    0x0b792650 0x00 06 GCC_3.0
  required from libm.so.6:
    0x06969189 0x00 08 GLIBC_2.29
    0x09691a75 0x00 07 GLIBC_2.2.5
    0x06969187 0x00 05 GLIBC_2.27
  required from libpthread.so.0:
    0x09691973 0x00 19 GLIBC_2.3.3
    0x06969192 0x00 11 GLIBC_2.12
    0x09691972 0x00 04 GLIBC_2.3.2
    0x09691a75 0x00 03 GLIBC_2.2.5
  required from libc.so.6:
    0x06969194 0x00 21 GLIBC_2.14
    0x09691974 0x00 20 GLIBC_2.3.4
    0x0d696914 0x00 18 GLIBC_2.4
    0x0d696916 0x00 16 GLIBC_2.6
    0x06969198 0x00 12 GLIBC_2.18
    0x09691972 0x00 10 GLIBC_2.3.2
    0x06969197 0x00 09 GLIBC_2.17
    0x09691a75 0x00 02 GLIBC_2.2.5
@Brooooooklyn Brooooooklyn added the bug Something isn't working label Jan 20, 2021
@Brooooooklyn Brooooooklyn self-assigned this Jan 20, 2021
@Brooooooklyn
Copy link
Owner Author

Build binary in ubuntu-16.04 may be a good choice

@Brooooooklyn
Copy link
Owner Author

Build success in ubuntu-16.04, but still failed to load native addon in node:10-slim docker image:

undefined symbol: _ZNSt19_Sp_make_shared_tag5_S_eqERKSt9type_info

@Brooooooklyn Brooooooklyn mentioned this issue Mar 15, 2021
@messense
Copy link

Try manylinux docker images.

@messense
Copy link

You can also take a look at my auditwheel-symbols tool

❯ auditwheel-symbols ~/Downloads/skia.linux-x64-gnu.node -m 2010
skia.linux-x64-gnu.node is not manylinux2010 compliant because it links the following forbidden libraries:
libm.so.6       offending symbols:  powf@@GLIBC_2.27, log2f@@GLIBC_2.27
libc.so.6       offending symbols:  clock_gettime@@GLIBC_2.17, secure_getenv@@GLIBC_2.17, __cxa_thread_atexit_impl@@GLIBC_2.18, memcpy@@GLIBC_2.14

@Brooooooklyn
Copy link
Owner Author

@messense Thanks!
I fixed this by always build the binary in node:lts Docker container: #207

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

Successfully merging a pull request may close this issue.

2 participants