sgerrand / alpine-pkg-glibc

A glibc compatibility layer package for Alpine Linux
2.07k stars 280 forks source link

Fatal error: stdio.h: No such file or directory #98

Closed m-peko closed 4 months ago

m-peko commented 6 years ago

Hi there,

I am trying to use alpine-pkg-glibc instead of libc-dev but I am running into some problems while trying to install DPDK. I am performing following steps:

  1. docker pull alpine
  2. docker run -it alpine /bin/sh
  3. apk add --no-cache make gcc linux-headers bsd-compat-headers binutils coreutils diffutils gettext bash grep sed texinfo perl
  4. apk add numactl-dev --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted
  5. apk --no-cache add ca-certificates wget
  6. wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
  7. wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.28-r0/glibc-2.28-r0.apk
  8. apk add glibc-2.28-r0.apk
  9. wget https://git.dpdk.org/dpdk-stable/snapshot/dpdk-stable-16.11.8.tar.gz
  10. tar -xzf dpdk-stable-16.11.8.tar.gz
  11. cd dpdk-stable-16.11.8
  12. make install T=x86_64-native-linuxapp-gcc

And the error I get:

/dpdk-stable-16.11.8/lib/librte_eal/linuxapp/eal/eal.c:35:19: fatal error: stdio.h: No such file or directory

include

I changed LD_LIBRARY_PATH: export LD_LIBRARY_PATH=/usr/glibc-compat/lib:$LD_LIBRARY_PATH but it is not working either.

I also tried setting rpath: make install T=x86_64-native-linuxapp-gcc -Wl,-rpath=/usr/glibc-compat/lib but it is not working.

Now I see there is no /usr/glibc-compat/sbin/ldconfig. Why is that so?

sgerrand commented 4 months ago

I'm so sorry for not responding to this bug report sooner. Without an example Dockerfile it's hard to know what's causing these segmentation faults. If you're still experiencing this problem then would you please reply with an example Dockerfile which reproduces the error.

I suggest that if you have chosen to run non-musl based software inside Alpine Linux because of the size of Alpine's Docker images then you and any other future readers in a situation like this should consider running containers based on Docker images that are based on a GNU C library, rather than trying to run binaries which weren't compiled for musl inside Alpine Linux. As an example, Debian currently provide "slim" Docker images for each of their releases which are ~ 30 MB compressed.