Closed sgerrand closed 7 years ago
@jairov4: Does this meet your requirements?
Good catch. Thanks!
@andyshinn: Due to the magic that occurs in abuild
for -dev
subpackages, I think that this change is OK. The files that appear in the intended packages are correct.
Ah, I didn't realize that happened automagically.
looks awsome! @sgerrand
Guys, how can I test the artifact APK? I dont see any link in circleci
You need to log in to CircleCI to see artifacts. They should be at https://circleci.com/gh/sgerrand/alpine-pkg-glibc/86#artifacts/containers/0.
I got the APKs but now Im seeing that gcc is not taking as default. Should I set somthing? Im getting:
fatal error: sys/queue.h: No such file or directory
#include <sys/queue.h>
Any environment variable may be?
This error is related to gcc, not this library. You'll need to set CPATH to let gcc know the location of the header files and LIBRARY_PATH for gcc to pick up the location of any libraries which need to be linked.
e.g.
CPATH=/usr/glibc-compat/include LIBRARY_PATH=/usr/glibc-compat/lib
An example of the above:
/ # echo '#include <sys/queue.h>' > /tmp/test.c
/ # apk add -q -U gcc
/ # gcc -o test /tmp/test.c
/tmp/test.c:1:23: fatal error: sys/queue.h: No such file or directory
#include <sys/queue.h>
^
compilation terminated.
/ # apk add --allow-untrusted -q /pkgs/builder/x86_64/glibc-dev-2.25-r1.apk
/ # CPATH=/usr/glibc-compat/include gcc -o test /tmp/test.c
/usr/lib/gcc/x86_64-alpine-linux-musl/6.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find Scrt1.o: No such file or directory
/usr/lib/gcc/x86_64-alpine-linux-musl/6.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find crti.o: No such file or directory
/usr/lib/gcc/x86_64-alpine-linux-musl/6.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lssp_nonshared
collect2: error: ld returned 1 exit status
/ # CPATH=/usr/glibc-compat/include LIBRARY_PATH=/usr/glibc-compat/lib gcc -o test /tmp/test.c
/usr/lib/gcc/x86_64-alpine-linux-musl/6.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lssp_nonshared
collect2: error: ld returned 1 exit status
The last command succeeded, albeit failing due to another dependency not existing.
@sgerrand I can open a new issue if warranted, but I wanted to get your feedback. I'm attempting to use the glibc-dev
package per this PR (and pulled from CircleCI's artifacts), but I'm getting strange problems when compiling.
When I install the grpio
and grpcio-tools
Python packages they fail at compilation time due to an error in glibc-compat. I'm hoping this package will solve this issue with grpc.
Here is a gist that provides a reproducible Dockerfile and the output I'm seeing.
@nickpresta, may be you need add this
wget -q -O /tmp/gcc-libs.tar.xz "https://www.archlinux.org/packages/core/x86_64/gcc-libs/download" \
&& tar -xvJf /tmp/gcc-libs.tar.xz -C /tmp usr/lib/libgcc_s.so.1 usr/lib/libgcc_s.so \
&& mv /tmp/usr/lib/libgcc* /usr/glibc-compat/lib \
&& rm -rf /tmp/$GLIBC_VER.apk /tmp/usr /tmp/gcc-libs.tar.xz /var/cache/apk/* \
@nickpresta: Thanks for bringing this up. It'd be great if you would create a new issue for the python compilation issue that you're facing. We can resolve it there.
@sgerrand thanks! I've created https://github.com/sgerrand/alpine-pkg-glibc/issues/45
💁 These changes add a
glibc-dev
package.Closes #43