GLIBC symbols not found #149

Closed
crsrivats opened this Issue Mar 9, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@crsrivats

I am trying to run a program inside the Alpine docker container. The machine that I am creating the Docker image and running the container has a CentOS 7.2 distribution. The application was built using the x84-64 version of GCC and not using the Musl toolchain. The program has a number of shared library dependencies including glibc.

The Dockerfile is setup to download and install glibc-2.21-r2.apk. Other libraries such as libstdc++.so are being copied from the /lib64 directory of the CentOS distribution.

I can run the application in the Docker container but 'ldd' displays potential problems:

ldd /root/ut_mac
/lib64/ld-linux-x86-64.so.2 (0x7f6ee22da000)
libcjson.so => /lib/libcjson.so (0x7f6ee20d2000)
libmediashm.so.0 => /lib/libmediashm.so.0 (0x7f6ee1ecd000)
libz.so.1 => /lib/libz.so.1 (0x7f6ee1cb7000)
libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7f6ee22da000)
libstdc++.so.6 => /lib/libstdc++.so.6 (0x7f6ee19af000)
librt.so.1 => /lib64/ld-linux-x86-64.so.2 (0x7f6ee22da000)
libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f6ee22da000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7f6ee179c000)
libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f6ee22da000)
ld-linux-x86-64.so.2 => /lib/ld-linux-x86-64.so.2 (0x7f6ee1578000)
Error relocating /root/ut_mac: mallopt: symbol not found
Error relocating /root/ut_mac: backtrace: symbol not found
Error relocating /root/ut_mac: __fprintf_chk: symbol not found
Error relocating /root/ut_mac: __printf_chk: symbol not found
Error relocating /root/ut_mac: __pthread_unregister_cancel: symbol not found
Error relocating /root/ut_mac: pthread_setname_np: symbol not found
Error relocating /root/ut_mac: argp_error: symbol not found
Error relocating /root/ut_mac: __pthread_register_cancel: symbol not found
Error relocating /root/ut_mac: __isnan: symbol not found
Error relocating /root/ut_mac: backtrace_symbols_fd: symbol not found
Error relocating /root/ut_mac: argp_parse: symbol not found
Error relocating /root/ut_mac: srandom_r: symbol not found
Error relocating /root/ut_mac: __sprintf_chk: symbol not found
Error relocating /root/ut_mac: initstate_r: symbol not found
Error relocating /root/ut_mac: __snprintf_chk: symbol not found
Error relocating /root/ut_mac: __strtok_r: symbol not found
Error relocating /root/ut_mac: random_r: symbol not found

Here is the Dockerfile:

FROM alpine:latest
COPY libcjson.so libmedia* libstdc++.so.6.0.19 /lib/
COPY mim* ut* /root/
RUN apk update &&
apk add --no-cache ca-certificates &&
wget "https://circle-artifacts.com/gh/andyshinn/alpine-pkg-glibc/6/artifacts/0/home/ubuntu/alpine-pkg-glibc/packages/x86_64/glibc-2.21-r2.apk" &&
apk add --allow-untrusted glibc-2.21-r2.apk &&
rm glibc* &&
/usr/glibc/usr/bin/ldconfig /lib /usr/glibc/usr/lib &&
ln -s /usr/glibc/usr/lib/ld-linux-x86-64.so.2 /lib/ld-linux-x86-64.so.2

Any help would be greatly appreciated!

@andyshinn andyshinn added the question label Mar 9, 2016

@andyshinn

This comment has been minimized.

Show comment
Hide comment
@andyshinn

andyshinn Mar 9, 2016

Collaborator

This kind of problem isn't really in scope of the Alpine Linux image. The glibc package is mostly experimental. Please try using a later version from https://github.com/andyshinn/alpine-pkg-glibc/releases and open an issue there if still have problems. A quick search reveals that some of those symbols might be from tls/libc6.so and libbacktrace.

Collaborator

andyshinn commented Mar 9, 2016

This kind of problem isn't really in scope of the Alpine Linux image. The glibc package is mostly experimental. Please try using a later version from https://github.com/andyshinn/alpine-pkg-glibc/releases and open an issue there if still have problems. A quick search reveals that some of those symbols might be from tls/libc6.so and libbacktrace.

@andyshinn andyshinn closed this Mar 9, 2016

@asg1612 asg1612 referenced this issue in asg1612/alpine-oracle-instantclient Apr 10, 2017

Closed

symbol not found #1

@angelzeke

This comment has been minimized.

Show comment
Hide comment
@angelzeke

angelzeke May 17, 2017

Hi everybody,
somebody have find an issue for this problem because i try to install oracle instance on alpine and i have this error
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20160303/intl.so' - Error loading shared library libicui18n.so.57: No such file or directory (needed by /usr/local/lib/php/extensions/no-debug-non-zts-20160303/intl.so) in Unknown on line 0

I think it's the same problem
tks a lot

Hi everybody,
somebody have find an issue for this problem because i try to install oracle instance on alpine and i have this error
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20160303/intl.so' - Error loading shared library libicui18n.so.57: No such file or directory (needed by /usr/local/lib/php/extensions/no-debug-non-zts-20160303/intl.so) in Unknown on line 0

I think it's the same problem
tks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment