GithubHelp home page GithubHelp logo

alpine-pkg-glibc's Introduction

alpine-pkg-glibc

CircleCI x86_64

This is the GNU C Library as a Alpine Linux package to run binaries linked against glibc. This package utilizes a custom built glibc binary based on the vanilla glibc source. Built binary artifacts come from https://github.com/sgerrand/docker-glibc-builder.

Releases

See the releases page for the latest download links. If you are using tools like localedef you will need the glibc-bin and glibc-i18n packages in addition to the glibc package.

Installing

The current installation method for these packages is to pull them in using wget or curl and install the local file with apk:

wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r1/glibc-2.35-r1.apk
apk add glibc-2.35-r1.apk

Please Note

⚠️ The URL of the public signing key has changed! ⚠️

Any previous reference to https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub should be updated with immediate effect to https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub.

Locales

You will need to generate your locale if you would like to use a specific one for your glibc application. You can do this by installing the glibc-i18n package and generating a locale using the localedef binary. An example for en_US.UTF-8 would be:

wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r1/glibc-bin-2.35-r1.apk
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r1/glibc-i18n-2.35-r1.apk
apk add glibc-bin-2.35-r1.apk glibc-i18n-2.35-r1.apk
/usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8

alpine-pkg-glibc's People

Contributors

andyshinn avatar cumpsd avatar dennybaa avatar mio-19 avatar nehaljwani avatar perliedman avatar sgerrand avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alpine-pkg-glibc's Issues

Possibility of signing images?

Thank you for your work on this. It's pretty much the basis for any and every Alpine Linux container image that requires glibc :)

Would it be possible to get the resulting artifacts/packages signed in any way? What I usually see in a lot of Dockerfiles is

apk add --allow-untrusted <some-apk>

That really doesn't fit with my understanding of chain of trust, especially when it comes to something as vital as a C runtime library.

Segmentation fault in libc.so.6 when running Oracle JDK 10

Using the latest 2.27

Stack: [0x00007f1a40bdd000,0x00007f1a40cde000],  sp=0x00007f1a40cda1f0,  free space=1012k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libc.so.6+0x5ad48]  _IO_vfscanf+0xc8
C  [libc.so.6+0x6ec67]  vsscanf+0x67

After install glibc 2.22-r8 /usr/bin/resolveip only works for the root user.

I'm trying to setup a MariaDB image, which also has glibc 2.22-r8 installed, but the install for fails from not being able to resolve the IP from the $HOSTNAME using /usr/bin/resolveip.

I played around a bit and it seems to be related to user permissions for example if I test /usr/bin/resolveip as root it works perfectly fine.

As root user:

/ # /usr/bin/resolveip -s $HOSTNAME
172.17.0.8

As mysql user:

/ # /usr/bin/resolveip -s $HOSTNAME
/usr/bin/resolveip: Unable to find hostid for '637bf7cd10b1': try again

If glibc 2.22-r8 is not install then /usr/bin/resolveip works for all users.

glibc-dependent applications ignore /etc/hosts file

Missing /etc/nsswitch.conf configuration results in that glibc-dependent applications ignore /etc/hosts contents entirely. See the reproduction here:

/ # /mnt/ping `hostname`
ping: 2432f83035d9: Name or service not known

/ # ping `hostname`
PING 2432f83035d9 (172.17.0.2): 56 data bytes
64 bytes from 172.17.0.2: seq=0 ttl=64 time=0.043 ms

NOTE: /mnt/ping utility was copied from my glibc-based host system.

I have added the following fix in frolvlad/alpine-glibc long time ago, and it proved to work fine for many people since then:

echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf

configure one php extension to use glibc

Hello
I am trying to get php_excel to work on alpine linux. I have a compiled version of php_excel from CentOS I copied into my Alpine and installed this glibc package. php_excel also requires libxl.so.

I copy them in to correct folders, but how can I get libxl.so to use glibc?
I do not want other extensions to use it, just this libxl.so

/app/src # ldd /usr/local/lib/libxl.so
	ldd (0x7fa0bd8b9000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x7fa0bc15a000)
	libm.so.6 => ldd (0x7fa0bd8b9000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7fa0bbf47000)
	libc.so.6 => ldd (0x7fa0bd8b9000)
Error relocating /usr/local/lib/libxl.so: __swprintf_chk: symbol not found
Error relocating /usr/local/lib/libxl.so: __fprintf_chk: symbol not found
Error relocating /usr/local/lib/libxl.so: __memcpy_chk: symbol not found
Error relocating /usr/local/lib/libxl.so: __wcscat_chk: symbol not found
Error relocating /usr/local/lib/libxl.so: __printf_chk: symbol not found

__strcat_chk: symbol not found

I'm running Linuxbrew on Alpine Linux 3.6 with libc6-compat 1.1.16-r13. Installing any binary package, for example bzip2, fails with…

❯❯❯ brew install bzip2
Error relocating /home/linuxbrew/.linuxbrew/Cellar/bzip2/1.0.6_1/bin/bunzip2: __strcat_chk: symbol not found
Error relocating /home/linuxbrew/.linuxbrew/Cellar/bzip2/1.0.6_1/bin/bunzip2: __fprintf_chk: symbol not found

This binary bzip2 package was compiled against glibc 2.19.
To reproduce this error:

docker run -it --rm linuxbrew/alpine sh -c 'brew remove glibc && brew install bzip2'

execinfo.h not found?

Apologies if this is an ignorant question, but installing these glibc apks does not appear to install the execinfo.h headers needed for backtrace, which I believed were part of glibc though not alpine/musl. Any suggestions on getting these headers on an alpine instance?

Compilation Problem when Installing Python Package (grpio)

Hello,

I've moved the comments over from this PR.

Overview

I'm attempting to use the glibc-dev package, pulled from CircleCI's artifacts, but I'm getting strange problems when compiling the grpio package in Python.

Here is a gist that provides a reproducible Dockerfile and the output I'm seeing.

This is very likely related to this issue filed with grpc.

Thanks to @jairov4 for trying to help. I added the gcc-libs that was suggested, but it didn't seem to fix anything (steps for this also included in the gist linked above).

Next Steps

What is confusing to me is that when I add the glibc-dev package and update the CPATH and LIBRARY_PATH environment variables, I get an error on missing Python.h, which suggests I'm missing the python-dev package, but it's installed. So I attempted to provide a CPATH and LIBRARY_PATH that would include the default locations as well as /usr/glibc-compat/lib and /usr/glibc-compat/include:

export LIBRARY_PATH=/usr/x86_64-alpine-linux-musl/lib64:/usr/local/lib64:/lib64:/usr/lib64:/usr/x86_64-alpine-linux-musl/lib:/usr/local/lib:/lib:/usr/lib:/usr/glibc-compat/lib
export CPATH=/usr/lib:/usr/lib/gcc/x86_64-alpine-linux-musl/6.3.0/include:/usr/glibc-compat/include
python3 -m pip install grpcio==1.1.3 grpcio-tools==1.1.3

But I still get the same problem about missing Python.h.

When I remove all references to the glibc-dev directories when installing, I get the same No symbol version section for versioned symbolmemcpy@GLIBC_2.2.5'` error, which is obviously the original problem I'm hoping this package can solve.

I understand that this may ultimately be a problem with the gRPC project and their interoperability with musl but I'm trying to understand if this issue is supposed to be fixed by this package.

Thanks for the help!

Install any apk,got a message :IO ERROR

This is my dockerfile:
`FROM alpine:3.3
MAINTAINER ******
#add bash
RUN apk add --no-cache --update-cache bash
RUN apk add --update-cache curl ca-certificates
#add glibc
ENV GLIBC_PKG_VERSION=2.25-r1
#download and install
RUN curl -Lo /etc/apk/keys/andyshinn.rsa.pub https://github.com/andyshinn/alpine-pkg-glibc/releases/download/${GLIBC_PKG_VERSION}/andyshinn.rsa.pub

RUN curl -Lo glibc-${GLIBC_PKG_VERSION}.apk https://github.com/andyshinn/alpine-pkg-glibc/releases/download/${GLIBC_PKG_VERSION}/glibc-${GLIBC_PKG_VERSION}.apk

RUN curl -Lo glibc-bin-${GLIBC_PKG_VERSION}.apk https://github.com/andyshinn/alpine-pkg-glibc/releases/download/${GLIBC_PKG_VERSION}/glibc-bin-${GLIBC_PKG_VERSION}.apk

RUN curl -Lo glibc-i18n-${GLIBC_PKG_VERSION}.apk https://github.com/andyshinn/alpine-pkg-glibc/releases/download/${GLIBC_PKG_VERSION}/glibc-i18n-${GLIBC_PKG_VERSION}.apk

RUN apk add glibc-${GLIBC_PKG_VERSION}.apk
RUN apk add glibc-bin-${GLIBC_PKG_VERSION}.apk
RUN apk add glibc-i18n-${GLIBC_PKG_VERSION}.apk

#run bash
CMD ["/bin/bash"]
`

but i still get a message:
Step 10 : RUN apk add glibc-bin-${GLIBC_PKG_VERSION}.apk ---> Running in 7b4ea0e566cf ERROR: glibc-bin-2.25-r1.apk: IO ERROR The command '/bin/sh -c apk add glibc-bin-${GLIBC_PKG_VERSION}.apk' returned a non-zero code: 255
i used centos 7.2 and disabled SElinux.

arm support?

I'm trying to compile glibc for raspberry pi

and here is my commit:

yangxuan8282/docker-glibc-builder@b2e59b5

yangxuan8282/docker-alpine-abuild@c6b9cb3

yangxuan8282@d65d1ff

one change of APKBUILD is add:

ls -s /usr/glibc-compat/lib/ld-linux-armhf.so.3 ${pkgdir}/lib/ld-linux-armhf.so.3

but it will complaint:

ls: cannot access '/usr/glibc-compat/lib/ld-linux-armhf.so.3': No such file or directory
ls: cannot access '/home/builder/package/pkg/glibc/lib/ld-linux-armhf.so.3': No such file or directory

I'm not sure why this happen, because it look pretty same as original:

ln -s /usr/glibc-compat/lib/ld-linux-x86-64.so.2 ${pkgdir}/lib/ld-linux-x86-64.so.2
ln -s /usr/glibc-compat/lib/ld-linux-x86-64.so.2 ${pkgdir}/lib64/ld-linux-x86-64.so.2

when I extract glibc-bin-2.25.tar.gz, found the file did exist:

ls ./usr/glibc-compat/lib/ld-linux-armhf.so.3 
./usr/glibc-compat/lib/ld-linux-armhf.so.3

This breaks applications that depend on libstdc++

If you have a libstdc++-dependent application that also uses glibc, then you end up with this happening:

  • Application wants glibc.
  • Application gets glibc.
  • Application wants libstdc++.
  • libstdc++ wants musl.
  • It's all downhill from there...

e.g.

DevPC-LX:~$ ldd /usr/local/lib/crystal/bin/crystal 
	/lib64/ld-linux-x86-64.so.2 (0x7facb77d7000)
	libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7facb77d7000)
	librt.so.1 => /lib64/ld-linux-x86-64.so.2 (0x7facb77d7000)
	libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x7facb77d7000)
	libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7facb77d7000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x7facb7486000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7facb7274000)
	libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7facb77d7000)
	ld-linux-x86-64.so.2 => /lib/ld-linux-x86-64.so.2 (0x7facb704f000)
Error relocating /usr/local/lib/crystal/bin/crystal: mallinfo: symbol not found
Error relocating /usr/local/lib/crystal/bin/crystal: getcontext: symbol not found
Error relocating /usr/local/lib/crystal/bin/crystal: __register_atfork: symbol not found
Error relocating /usr/local/lib/crystal/bin/crystal: __pthread_register_cancel: symbol not found
Error relocating /usr/local/lib/crystal/bin/crystal: sysctl: symbol not found
Error relocating /usr/local/lib/crystal/bin/crystal: __pthread_unregister_cancel: symbol not found
Error relocating /usr/local/lib/crystal/bin/crystal: backtrace: symbol not found
Error relocating /usr/local/lib/crystal/bin/crystal: errno: symbol not found
DevPC-LX:~$ ldd /usr/lib/libstdc\+\+.so.6
	ldd (0x7fa1abde8000)
	libc.musl-x86_64.so.1 => ldd (0x7fa1abde8000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7fa1ab885000)
DevPC-LX:~$ 

Declare package testsuite

From the warning generated at build time:

WARNING: glibc*: APKBUILD does not run any tests!
Alpine policy will soon require that packages have any relevant testsuites run during the build process.
To fix, either define a check() function, or declare !check in $options to indicate the package does not have a testsuite.

It's probably easiest to declare !check in $options to indicate the package does not have a testsuite.

Signature is untrusted

Copied and pasted the commands from the README into a Alpine Linux based container to see the following:

bash-4.3# apk --no-cache add ca-certificates
fetch http://dl-cdn.alpinelinux.org/alpine/v3.3/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.3/community/x86_64/APKINDEX.tar.gz
OK: 333 MiB in 83 packages
bash-4.3# wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub
bash-4.3# wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.23-r1/glibc-2.23-r1.apk
Connecting to github.com (192.30.252.130:443)
Connecting to github-cloud.s3.amazonaws.com (54.231.73.11:443)
glibc-2.23-r1.apk    100% |**********************************************************************************************************************************|  2874k  0:00:00 ETA
bash-4.3# apk add glibc-2.23-r1.apk
WARNING: Ignoring APKINDEX.5a59b88b.tar.gz: No such file or directory
WARNING: Ignoring APKINDEX.7c1f02d6.tar.gz: No such file or directory
ERROR: glibc-2.23-r1.apk: UNTRUSTED signature

The same goes for the -r2 .apk. I'd like to avoid using --allow-untrusted with apk - any idea why these packages are bust?

looking for missing __printf_chk symbol not found explanation

I have a binary (but not source) dynamic linked against glibc I would like to get up on Alpine. I am finding that all glibc bins are trying to find __printf_chk() and similar symbols. I have done a Google search and get lots of hits, but a conclusive explanation and fix eludes at the moment. Here is, for example, ldd on an echo binary cribbed from a random Debian based distro:

ldd ./echo
        /lib64/ld-linux-x86-64.so.2 (0x7f1a0dc00000)
        libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f1a0dc00000)
Error relocating ./echo: __printf_chk: symbol not found
Error relocating ./echo: error: symbol not found
Error relocating ./echo: __fprintf_chk: symbol not found

echo runs despite the ldd error with alpine-pkg-glibc, but I am looking for an explanation for the cause. I'll keep digging.

java/eclipse thread error

running inside docker:
https://github.com/frol/docker-alpine-glibc
https://github.com/frol/docker-alpine-oraclejdk8

with eclipse 4.5:
https://eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/mars/2/eclipse-jee-mars-2-linux-gtk-x86_64.tar.gz&mirror_id=1135

basic launch:

 java -jar /opt/eclipse/plugins/org.eclipse.equinox.launcher_*.jar

produces error:

GLib (gthread-posix.c): Unexpected error from C library during 'pthread_cond_init': Invalid argument.  Aborting.

trace:

strace java -jar /opt/eclipse/plugins/org.eclipse.equinox.launcher_*.jar &> /tmp/strace.txt

result:

execve("/usr/bin/java", ["java", "-jar", "/opt/eclipse/plugins/org.eclipse"...], [/* 28 vars */]) = 0
brk(NULL)                               = 0x10a4000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8a1643c000
readlink("/proc/self/exe", "/usr/lib/jvm/java-8-oracle/bin/j"..., 4096) = 35
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/usr/lib/jvm/java-8-oracle/bin/../lib/amd64/jli/tls/x86_64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/jvm/java-8-oracle/bin/../lib/amd64/jli/tls/x86_64", 0x7ffea436bed0) = -1 ENOENT (No such file or directory)
open("/usr/lib/jvm/java-8-oracle/bin/../lib/amd64/jli/tls/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/jvm/java-8-oracle/bin/../lib/amd64/jli/tls", 0x7ffea436bed0) = -1 ENOENT (No such file or directory)
open("/usr/lib/jvm/java-8-oracle/bin/../lib/amd64/jli/x86_64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/jvm/java-8-oracle/bin/../lib/amd64/jli/x86_64", 0x7ffea436bed0) = -1 ENOENT (No such file or directory)
open("/usr/lib/jvm/java-8-oracle/bin/../lib/amd64/jli/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/jvm/java-8-oracle/bin/../lib/amd64/jli", {st_mode=S_IFDIR|0755, st_size=23, ...}) = 0
open("/usr/lib/jvm/java-8-oracle/bin/../lib/amd64/tls/x86_64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/jvm/java-8-oracle/bin/../lib/amd64/tls/x86_64", 0x7ffea436bed0) = -1 ENOENT (No such file or directory)
open("/usr/lib/jvm/java-8-oracle/bin/../lib/amd64/tls/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/jvm/java-8-oracle/bin/../lib/amd64/tls", 0x7ffea436bed0) = -1 ENOENT (No such file or directory)
open("/usr/lib/jvm/java-8-oracle/bin/../lib/amd64/x86_64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/jvm/java-8-oracle/bin/../lib/amd64/x86_64", 0x7ffea436bed0) = -1 ENOENT (No such file or directory)
open("/usr/lib/jvm/java-8-oracle/bin/../lib/amd64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/jvm/java-8-oracle/bin/../lib/amd64", {st_mode=S_IFDIR|0755, st_size=35, ...}) = 0
open("/usr/glibc-compat/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=22252, ...}) = 0
mmap(NULL, 22252, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f8a16436000
close(3)                                = 0
open("/usr/glibc-compat/lib/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240r\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=101936, ...}) = 0
mmap(NULL, 2212936, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f8a15fff000
mprotect(0x7f8a16017000, 2093056, PROT_NONE) = 0
mmap(0x7f8a16216000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7f8a16216000
mmap(0x7f8a16218000, 13384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f8a16218000
close(3)                                = 0
open("/usr/lib/jvm/java-8-oracle/bin/../lib/amd64/jli/libjli.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20#\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=102990, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8a16435000
mmap(NULL, 2184904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f8a15de9000
mprotect(0x7f8a15dfe000, 2097152, PROT_NONE) = 0
mmap(0x7f8a15ffe000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x7f8a15ffe000
close(3)                                = 0
open("/usr/lib/jvm/java-8-oracle/bin/../lib/amd64/jli/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/jvm/java-8-oracle/bin/../lib/amd64/libdl.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/glibc-compat/lib/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\16\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=14608, ...}) = 0
mmap(NULL, 2109712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f8a15be5000
mprotect(0x7f8a15be7000, 2097152, PROT_NONE) = 0
mmap(0x7f8a15de7000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f8a15de7000
close(3)                                = 0
open("/usr/lib/jvm/java-8-oracle/bin/../lib/amd64/jli/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/jvm/java-8-oracle/bin/../lib/amd64/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/glibc-compat/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\t\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1676960, ...}) = 0
mmap(NULL, 3783168, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f8a15849000
mprotect(0x7f8a159db000, 2097152, PROT_NONE) = 0
mmap(0x7f8a15bdb000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x192000) = 0x7f8a15bdb000
mmap(0x7f8a15be1000, 14848, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f8a15be1000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8a16434000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8a16433000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8a16432000
arch_prctl(ARCH_SET_FS, 0x7f8a16433700) = 0
mprotect(0x7f8a15bdb000, 16384, PROT_READ) = 0
mprotect(0x7f8a15de7000, 4096, PROT_READ) = 0
mprotect(0x7f8a16216000, 4096, PROT_READ) = 0
mprotect(0x7f8a1643d000, 4096, PROT_READ) = 0
munmap(0x7f8a16436000, 22252)           = 0
set_tid_address(0x7f8a164339d0)         = 70
set_robust_list(0x7f8a164339e0, 24)     = 0
rt_sigaction(SIGRTMIN, {0x7f8a16005d30, [], SA_RESTORER|SA_SIGINFO, 0x7f8a1600fc10}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7f8a16005dc0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7f8a1600fc10}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
brk(NULL)                               = 0x10a4000
brk(0x10c5000)                          = 0x10c5000
open("/opt/eclipse/plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar", O_RDONLY) = 3
mmap(NULL, 200704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8a16401000
lseek(3, -22, SEEK_END)                 = 50505
read(3, "PK\5\6\0\0\0\0\33\0\33\0=\10\0\0\f\275\0\0\0\0", 22) = 22
lseek(3, 48396, SEEK_SET)               = 48396
read(3, "PK\1\2\24\0\24\0\10\10\10\0\4\263\253F\311\267\334/\252\4\0\0\3\n\0\0\24\0\4\0"..., 1024) = 1024
lseek(3, 0, SEEK_SET)                   = 0
read(3, "PK\3\4\24\0\10\10\10\0\4\263\253F\0\0\0\0\0\0\0\0\0\0\0\0\24\0\4\0", 30) = 30
munmap(0x7f8a16401000, 200704)          = 0
lseek(3, 54, SEEK_SET)                  = 54
read(3, "\225UKs\242J\30\335\247*\377\301J\315\254\270\362R\20Me\241\210\221\4\20|'\233\251\6Z"..., 1194) = 1194
close(3)                                = 0
readlink("/proc/self/exe", "/usr/lib/jvm/java-8-oracle/bin/j"..., 4096) = 35
access("/usr/lib/jvm/java-8-oracle/lib/amd64/libjava.so", F_OK) = -1 ENOENT (No such file or directory)
access("/usr/lib/jvm/java-8-oracle/jre/lib/amd64/libjava.so", F_OK) = 0
open("/usr/lib/jvm/java-8-oracle/jre/lib/amd64/jvm.cfg", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=627, ...}) = 0
read(3, "# Copyright (c) 2003, 2013, Orac"..., 4096) = 627
read(3, "", 4096)                       = 0
close(3)                                = 0
stat("/usr/lib/jvm/java-8-oracle/jre/lib/amd64/server/libjvm.so", {st_mode=S_IFREG|0755, st_size=16938578, ...}) = 0
futex(0x7f8a15de80c8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
open("/usr/lib/jvm/java-8-oracle/jre/lib/amd64/server/libjvm.so", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\344!\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=16938578, ...}) = 0
mmap(NULL, 16670088, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f8a14863000
mprotect(0x7f8a15526000, 2093056, PROT_NONE) = 0
mmap(0x7f8a15725000, 888832, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xcc2000) = 0x7f8a15725000
mmap(0x7f8a157fe000, 306568, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f8a157fe000
close(3)                                = 0
open("/usr/lib/jvm/java-8-oracle/bin/../lib/amd64/jli/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/jvm/java-8-oracle/bin/../lib/amd64/libm.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/glibc-compat/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=22252, ...}) = 0
mmap(NULL, 22252, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f8a16436000
close(3)                                = 0
open("/usr/glibc-compat/lib/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260U\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1059160, ...}) = 0
mmap(NULL, 3154224, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f8a14560000
mprotect(0x7f8a14662000, 2093056, PROT_NONE) = 0
mmap(0x7f8a14861000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x101000) = 0x7f8a14861000
close(3)                                = 0
mprotect(0x7f8a14861000, 4096, PROT_READ) = 0
munmap(0x7f8a16436000, 22252)           = 0
mmap(NULL, 1052672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f8a16331000
mprotect(0x7f8a16331000, 4096, PROT_NONE) = 0
clone(child_stack=0x7f8a16430ff0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f8a164319d0, tls=0x7f8a16431700, child_tidptr=0x7f8a164319d0) = 71
futex(0x7f8a164319d0, FUTEX_WAIT, 71, NULLorg.eclipse.m2e.logback.configuration: The org.eclipse.m2e.logback.configuration bundle was activated before the state location was initialized.  Will retry after the state location is initialized.
GLib (gthread-posix.c): Unexpected error from C library during 'pthread_cond_init': Invalid argument.  Aborting.
 <unfinished ...>
+++ killed by SIGABRT (core dumped) +++
Aborted (core dumped)

UTF-8 locale for glibc-dependent applications

Your artifacts do not include any UTF-8 locale, which results in printing question marks instead of non-latin characters from applications relying on LC_* information, and this can even prevent code compilation in case of OracleJDK. There is an initiative to implement C.UTF-8 locale. While it is not in glibc upstream, I have succeeded in building a custom C.UTF-8 locale by copying a minimum required set of files from my Arch Linux:

# tree /usr/glibc-compat/share/i18n/
├── charmaps
│   └── UTF-8.gz
└── locales
    └── POSIX

Once the files are in place, I can generate the locale:

# /usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 C.UTF-8
LC_MONETARY: value of field `int_curr_symbol' has wrong length
No definition for LC_PAPER category found
No definition for LC_NAME category found
No definition for LC_ADDRESS category found
No definition for LC_TELEPHONE category found
No definition for LC_MEASUREMENT category found
No definition for LC_IDENTIFICATION category found

NOTE: I had to force localedef, but it seems to be working fine after that anyway.

Reproduction:

$ echo -e 'public class Main { public static void main(String[] args) { System.out.println("Ф"); } }' > Main.java
$ docker run --rm --volume "$(pwd)":/mnt --workdir /mnt frolvlad/alpine-oraclejdk8:slim sh -c 'javac Main.java && java Main'
Main.java:1: error: unmappable character for encoding ASCII
public class Main { public static void main(String[] args) { System.out.println("??"); } }
                                                                                 ^
Main.java:1: error: unmappable character for encoding ASCII
public class Main { public static void main(String[] args) { System.out.println("??"); } }
                                                                                  ^
2 errors

Using the following Dockerfile (look at the last 3 commands), the issue gets fixed:

FROM alpine:3.3

RUN apk add --no-cache --virtual=build-dependencies wget ca-certificates && \
    export ALPINE_GLIBC_BASE_URL="https://circle-artifacts.com/gh/andyshinn/alpine-pkg-glibc/21/artifacts/0/home/ubuntu/alpine-pkg-glibc/packages/builder/x86_64" && \
    export ALPINE_GLIBC_PACKAGE="glibc-2.22-r5.apk" && \
    export ALPINE_GLIBC_BIN_PACKAGE="glibc-bin-2.22-r5.apk" && \
    wget "$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE" "$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_BIN_PACKAGE" && \
    apk add --no-cache --allow-untrusted "$ALPINE_GLIBC_PACKAGE" "$ALPINE_GLIBC_BIN_PACKAGE" && \
    echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf && \
    apk del build-dependencies && \
    rm "$ALPINE_GLIBC_PACKAGE" "$ALPINE_GLIBC_BIN_PACKAGE"

ENV JAVA_VERSION=8 \
    JAVA_UPDATE=72 \
    JAVA_BUILD=15 \
    JAVA_HOME="/usr/lib/jvm/default-jvm"

RUN apk add --no-cache --virtual=build-dependencies wget ca-certificates && \
    cd "/tmp" && \
    wget --header "Cookie: oraclelicense=accept-securebackup-cookie;" \
        "http://download.oracle.com/otn-pub/java/jdk/${JAVA_VERSION}u${JAVA_UPDATE}-b${JAVA_BUILD}/jdk-${JAVA_VERSION}u${JAVA_UPDATE}-linux-x64.tar.gz" && \
    tar -xzf "jdk-${JAVA_VERSION}u${JAVA_UPDATE}-linux-x64.tar.gz" && \
    mkdir -p "/usr/lib/jvm" && \
    mv "/tmp/jdk1.${JAVA_VERSION}.0_${JAVA_UPDATE}" "/usr/lib/jvm/java-${JAVA_VERSION}-oracle" && \
    ln -s "java-${JAVA_VERSION}-oracle" "$JAVA_HOME" && \
    ln -s "$JAVA_HOME/bin/"* "/usr/bin/" && \
    rm -rf "$JAVA_HOME/"*src.zip && \
    rm -rf "$JAVA_HOME/lib/missioncontrol" \
           "$JAVA_HOME/lib/visualvm" \
           "$JAVA_HOME/lib/"*javafx* \
           "$JAVA_HOME/jre/lib/plugin.jar" \
           "$JAVA_HOME/jre/lib/ext/jfxrt.jar" \
           "$JAVA_HOME/jre/bin/javaws" \
           "$JAVA_HOME/jre/lib/javaws.jar" \
           "$JAVA_HOME/jre/lib/desktop" \
           "$JAVA_HOME/jre/plugin" \
           "$JAVA_HOME/jre/lib/"deploy* \
           "$JAVA_HOME/jre/lib/"*javafx* \
           "$JAVA_HOME/jre/lib/"*jfx* \
           "$JAVA_HOME/jre/lib/amd64/libdecora_sse.so" \
           "$JAVA_HOME/jre/lib/amd64/"libprism_*.so \
           "$JAVA_HOME/jre/lib/amd64/libfxplugins.so" \
           "$JAVA_HOME/jre/lib/amd64/libglass.so" \
           "$JAVA_HOME/jre/lib/amd64/libgstreamer-lite.so" \
           "$JAVA_HOME/jre/lib/amd64/"libjavafx*.so \
           "$JAVA_HOME/jre/lib/amd64/"libjfx*.so && \
    rm -rf "$JAVA_HOME/jre/bin/jjs" \
           "$JAVA_HOME/jre/bin/keytool" \
           "$JAVA_HOME/jre/bin/orbd" \
           "$JAVA_HOME/jre/bin/pack200" \
           "$JAVA_HOME/jre/bin/policytool" \
           "$JAVA_HOME/jre/bin/rmid" \
           "$JAVA_HOME/jre/bin/rmiregistry" \
           "$JAVA_HOME/jre/bin/servertool" \
           "$JAVA_HOME/jre/bin/tnameserv" \
           "$JAVA_HOME/jre/bin/unpack200" \
           "$JAVA_HOME/jre/lib/ext/nashorn.jar" \
           "$JAVA_HOME/jre/lib/jfr.jar" \
           "$JAVA_HOME/jre/lib/jfr" \
           "$JAVA_HOME/jre/lib/oblique-fonts" && \
    apk del build-dependencies && \
    rm "/tmp/"*


# Charset changes are here:
# =========================

COPY ./i18n /usr/glibc-compat/share/i18n

RUN mkdir /usr/glibc-compat/lib/locale && \
    /usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 C.UTF-8 || true

ENV LANG=C.UTF-8

Fixed version output:

$ docker run --rm --volume "$(pwd)":/mnt --workdir /mnt oraclejdk8-with-C-UTF8-locale sh -c 'javac Main.java && java Main'
Ф

__register_atfork: symbol not found

I'm experimenting with using Python manylinux wheel binaries in combination with the glibc package. I started by installing Python 3.5.2, glibc 2.23-r3 and libc6-compat. Then I use pip to install the numpy binary package. However, when I try to import numpy, I get the following error.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.5/site-packages/numpy/__init__.py", line 180, in <module>
    from . import add_newdocs
  File "/usr/local/lib/python3.5/site-packages/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "/usr/local/lib/python3.5/site-packages/numpy/lib/__init__.py", line 8, in <module>
    from .type_check import *
  File "/usr/local/lib/python3.5/site-packages/numpy/lib/type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
  File "/usr/local/lib/python3.5/site-packages/numpy/core/__init__.py", line 14, in <module>
    from . import multiarray
ImportError: Error relocating /usr/local/lib/python3.5/site-packages/numpy/core/../.libs/libopenblasp-r0-39a31c03.2.18.so: __register_atfork: symbol not found

A quick googling didn't reveal anything useful, except for the fact that __register_atfork should be in glibc.

symbol not found

I seem to getting an error while building node-oracledb library getcontext: symbol not found as below. This seems to be due to glibc libraries not being loaded. Ive seen others reporting similar errors with Alpine and glibc. Any ideas ?

Error: Error relocating /opt/oracle/drivers/instantclient/libclntsh.so.11.1: getcontext: symbol not found
    at Error (native)
    at Object.Module._extensions..node (module.js:568:18)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (node_modules/oracledb/lib/oracledb.js:32:19)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (node_modules/oracledb/index.js:1:80)

Does this include glibc-devel?

Hello there,
I need glibc-devel to build mongodb on Alpine. Does this package has that bundled with the bin? If not, how can I get that?

Support for s390x (IBM Z)

Now I'm working on IBM Z (not x86, but s390x architecture).
For some reasons I need a glibc in my s390x/alpine:latest container.

But there is no apk support for s390x, and I don't know how to build glibc-2.26-r0.apk and glibc-bin-2.26-r0.apk in a s390x/alpine:latest container. How can I build it from source? Thanks!

Distribute through the official Alpine APK repo so we can `apk add glibc`

It looks like quite a few people are using your build of glibc in their minimal Docker base images, for things which have it as a hard dependency (like Oracle Java).

At the moment it is necessary to curl the apk from your build server's artifact store, and install it manually (necessitating the use of a technically untrusted package source, which isn't too good).

So it would be great if you could rig your build server to automatically push the compiled APK to the official Alpine repos, so we could just install it with apk add glibc, or alternatively find some other process to release it there.

ldconfig in post install

after I add apk - libs wont be visible to other apps, unless we do ldconfig + LD_CONFIG_PATH

on a side note there might be smth wrong with that I'm doing, in that case could you explain and maybe add a README note?

ldconfig versions

Hi all.

I ran into this when trying to use a Python lib that uses Python's ctypes.util.find_library method to find the name of a library on the system. This call expects the glibc version of ldconfig to find this information, but it was using the alpine one in /sbin/ldconfig. (NB I'm using the conda build of Python, and all of their packages are built against glibc hence using alpine-pkg-glibc!)

I currently do
RUN mv /sbin/ldconfig /sbin/ldconfig_old && \ ln /usr/glibc-compat/sbin/ldconfig /sbin/ldconfig
in my Dockerfile to use the glibc version of ldconfig, as it seems aware of both the alpine libs in /usr/lib/ and the glibc ones in /usr/glibc-compat/lib/.

I guess my questions are:
1 - Is this a good idea!?
2 - Is there a nicer way to do it- potentially something inbuilt that I have missed?
3 - It seems a little messy of have some libraries from alpine and some from glibc, is this mixture going to cause issues?

glibc doesn't work

Hi I just installed this latest version of glibc but it doesn't work, alpine still using musl as libc library.
Where is this installed? I would like to set directly into the LD_LIBRARY_PATH, or what do you suggest to specifi this glibc version in C code?

Thanks in advance,

Possibility of providing x86 porting?

Thanks for excellent work :)
Is it possible to provide a x86(not x86-64) porting of this package? I need run some very OLD binary on my server.
Will it be taken into consideration?

libgcc_s.so.1 dependency?

I do understand that this is a glibc package, but it seems to be a better place to discuss this than the "Java issue" in docker-alpine repo.

I have bumped into a case when libgcc_s.so.1 is required as an indirect dependency:

$ grep -r libgcc_s /usr/glibc-compat/
/usr/glibc-compat/lib/librt-2.22.so:libgcc_s.so.1 must be installed for pthread_cancel to work
/usr/glibc-compat/lib/libpthread-2.22.so:libgcc_s.so.1 must be installed for pthread_cancel to work
/usr/glibc-compat/lib/libc-2.22.so:libgcc_s.so.1 must be installed for pthread_cancel to work

Again, copying the libgcc_s.so.1 from my Arch Linux makes the executables using pthread_cancel call work.

configure: error: cannot run C compiled programs.

I am trying to compile a php extension with pecl (pdflib).
I installed:

https://github.com/sgerrand/alpine-pkg-glibc/releases/download/unreleased/glibc-2.25-r1.apk
https://github.com/sgerrand/alpine-pkg-glibc/releases/download/unreleased/glibc-bin-2.25-r1.apk
https://github.com/sgerrand/alpine-pkg-glibc/releases/download/unreleased/glibc-dev-2.25-r1.apk

After setting:

export LDFLAGS="-L/usr/glibc-compat/lib" 
export CPATH=/usr/lib:/usr/lib/gcc/x86_64-alpine-linux-musl/5.3.0/include:/usr/glibc-compat/include 
 /usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib

I run pecl and it fails with:

configure: error: cannot run C compiled programs.

Is this the correct way? Am I missing something?

Any help would be appreciated
Thank you

Benjamin

mini_racer not working, __fprintf_chk: symbol not found

LoadError: Error relocating /home/app/gems/gems/mini_racer-0.1.3/lib/mini_racer_extension.so: __fprintf_chk: symbol not found - /home/app/gems/gems/mini_racer-0.1.3/lib/mini_racer_extension.so
/home/app/gems/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
/home/app/gems/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
/home/app/gems/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
/home/app/gems/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
/home/app/gems/gems/mini_racer-0.1.3/lib/mini_racer.rb:2:in `<top (required)>'
/home/app/gems/gems/bundler-1.12.2/lib/bundler/runtime.rb:86:in `require'
/home/app/gems/gems/bundler-1.12.2/lib/bundler/runtime.rb:86:in `block (2 levels) in require'
/home/app/gems/gems/bundler-1.12.2/lib/bundler/runtime.rb:81:in `each'
/home/app/gems/gems/bundler-1.12.2/lib/bundler/runtime.rb:81:in `block in require'
/home/app/gems/gems/bundler-1.12.2/lib/bundler/runtime.rb:70:in `each'
/home/app/gems/gems/bundler-1.12.2/lib/bundler/runtime.rb:70:in `require'
/home/app/gems/gems/bundler-1.12.2/lib/bundler.rb:102:in `require'
/home/app/config/application.rb:11:in `<top (required)>'
/home/app/Rakefile:5:in `require'
/home/app/Rakefile:5:in `<top (required)>'

I'm using the latest version of glibc

installation error: glibc-2.25-r0.apk: IO ERROR

/ # apk --no-cache add ca-certificates
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
OK: 325 MiB in 63 packages
/ # wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub
/ # wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.25-r0/glibc-2.25-r0.apk
--2017-05-23 06:42:31-- https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.25-r0/glibc-2.25-r0.apk
Resolving github.com... 192.30.255.113, 192.30.255.112
Connecting to github.com|192.30.255.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-cloud.s3.amazonaws.com/releases/33333969/1374d6ce-f20c-11e6-8591-ef993a8a96d3.apk?X-Amz-Algorithm=AWS4-HMAC-S
HA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20170523%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170523T064238Z&X-Amz-Expires=300&X
-Amz-Signature=9ee60a7c9443e758a32c9119ab4218d9a5b33ba64783c55b5ab1ea10353ecf15&X-Amz-SignedHeaders=host&actor_id=0&response-content-d
isposition=attachment%3B%20filename%3Dglibc-2.25-r0.apk&response-content-type=application%2Fvnd.android.package-archive [following]
--2017-05-23 06:42:33-- https://github-cloud.s3.amazonaws.com/releases/33333969/1374d6ce-f20c-11e6-8591-ef993a8a96d3.apk?X-Amz-Algori
thm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20170523%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170523T064238Z&X-Am
z-Expires=300&X-Amz-Signature=9ee60a7c9443e758a32c9119ab4218d9a5b33ba64783c55b5ab1ea10353ecf15&X-Amz-SignedHeaders=host&actor_id=0&res
ponse-content-disposition=attachment%3B%20filename%3Dglibc-2.25-r0.apk&response-content-type=application%2Fvnd.android.package-archive
Resolving github-cloud.s3.amazonaws.com... 52.216.65.88
Connecting to github-cloud.s3.amazonaws.com|52.216.65.88|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2971990 (2.8M) [application/vnd.android.package-archive]
Saving to: 'glibc-2.25-r0.apk.1'

glibc-2.25-r0.apk.1 100%[===========================================================>] 2.83M 291KB/s in 21s

2017-05-23 06:42:55 (139 KB/s) - 'glibc-2.25-r0.apk.1' saved [2971990/2971990]

/ # apk add glibc-2.25-r0.apk
ERROR: glibc-2.25-r0.apk: IO ERROR

java.awt.geom.Rectangle2D in glibc do not work or support?

Hi, when i use the images to write a string in picture,the method can run and no errors , but can not write string to picture , the code like this

import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.font.*;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.io.FileInputStream;
public class AppsData {
  public static void main(String[] args) throws IOException,FontFormatException,InterruptedException {
    Font font=Font.createFont(Font.TRUETYPE_FONT,new File(args[0]));
    int with=300;
    int hight=300;
    BufferedImage image=new BufferedImage(with,hight,BufferedImage.TYPE_INT_ARGB);
    Graphics2D g2d=image.createGraphics();
    image=g2d.getDeviceConfiguration().createCompatibleImage(with,hight,3);
    g2d.dispose();
    g2d=image.createGraphics();
    g2d.setColor(new Color(10));
    g2d.setStroke(new BasicStroke(1.0F));
    FontRenderContext context=g2d.getFontRenderContext();
    Rectangle2D bounds=font.getStringBounds(“中文”,context);
    double x=(with-bounds.getWidth())/2.0;
    double y=(hight-bounds.getHeight())/2.0;
    double ascent=-bounds.getCenterY();
    double baseY=y+ascent;
    g2d.rotate(Math.toRadians(-45.0D),with/2,hight/2);
    g2d.drawString(args[0],(int)x,(int)baseY);
    g2d.dispose();
    ImageIO.write(image,"png",new File(args[1]));
  }
}

the resoult is like

image

but when i add the font file in ${JRE_HOME}/lib/fonts/fallback/ , then use Font font =new Font("宋体",1,24); it works

i want this
image

when i do not in docker all of the method is work ~

ENV:

  • alpine docker version 3.7
  • glibc 1.2
  • JDK: oracle jdk1.8_65

please give some suggest to solve this problem ~

thinks ~

ERROR: /tmp/glibc-2.26-r0.apk: IO ERROR

I wrote this shell script and when I am trying to install glibc;

#!/bin/sh

GLIBC_VERSION=2.26-r0
ALPINE_URL=https://github.com/sgerrand/alpine-pkg-glibc/releases
LANG=C.UTF-8

apk upgrade --update
apk add --no-cache libstdc++ curl ca-certificates

for pkg in glibc-${GLIBC_VERSION} glibc-bin-${GLIBC_VERSION} glibc-i18n-${GLIBC_VERSION}; do curl -sSL ${ALPINE_URL}/${GLIBC_VERSION}/${pkg}.apk -o /tmp/${pkg}.apk; done

apk add --no-cache /tmp/*.apk
rm -v /tmp/*.apk

this error is prompting - what am I missing here? I am running ALPINE 3.6.
ERROR: /tmp/glibc-2.26-r0.apk: IO ERROR

Problem running applications as non-root

Hello this may not be an issue with this package, but then again others might find this helpful.

I'm running Alpine with your package of glibc so that I can run Oracle Java. Which works perfectly fine as root but not as other users.

As the root user:

$ java -version
java version "1.8.0_72"
Java(TM) SE Runtime Environment (build 1.8.0_72-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.72-b15, mixed mode)

As tomcat user:

$ java -version
java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

By all rights the configuration looks proper:

$ cat /etc/ld.so.conf 
/usr/glibc/usr/lib

And the glibc shows up in /etc/ld.so.cache. For some reason though users other than root aren't aware of glibc.

Manually setting the LD_LIBRARY_PATH works but I don't think it would normally be required.

As tomcat user:

$ export LD_LIBRARY_PATH=/usr/glibc/usr/lib
$ java -version
java version "1.8.0_72"
Java(TM) SE Runtime Environment (build 1.8.0_72-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.72-b15, mixed mode)

Thanks!

-dev subpackage request to allow build glibc based stuff using alpine

It would be nice if you publish other subpackage with developer stuff: includes and .a libraries to allow build stuff using this package, I think doing this we can reach even smaller images than simply use debian, ubuntu or something glibc based and is a less painful migration path to musl-dev while your dependencies get ready too.
I have this use case, I want to migrate to musl-dev but not all of my dependencies are ready but I have other projects now running on alpine. I prefer to move as much as I can to alpine and later go finishing the migration when my dependencies migrate to musl.

Apk proxy

Hi.
Thank you for a great work.
Can you pls return to live Apk proxy script?
It was very easy install by one command:
apk --no-cache -X http://apkproxy.heroku.com/andyshinn/alpine-pkg-glibc add glibc

Glibs not work?

After I add apk -

ldd --version
musl libc (x86_64)
Version 1.1.15
Dynamic Program Loader

Is it normal?
How to check which glibc is used?

apkproxy.heroku.com missing?

I have a Dockerfile that has been building perfectly for quite some time now. No changes were made to it, but now it's getting errors when building. Here's the error:

fetch http://apkproxy.heroku.com/sgerrand/alpine-pkg-glibc/x86_64/APKINDEX.tar.gz
WARNING: Ignoring http://apkproxy.heroku.com/sgerrand/alpine-pkg-glibc/x86_64/APKINDEX.tar.gz: No such file or directory

Even if I just go to http://apkproxy.heroku.com I get the Heroku landing page with There's nothing here, yet.. Why is this happening / what changed? How can I get this build working again? Thank you.

CVE-2015-7547

Is this glibc package (which is in use in many docker containers based on alpine) affected by the CVE-2015-7547?
Many of them use a version from circleci, others the 2.21/2.22 releases from this github page.

I am just curious, because nobody mentions that in the discussions. I have seen you did a prerelease of 2.23-r1. Is it safe to use and will this version fix the security issue with getaddrinfo? (glibc release notes says it is fixed in 2.23)

phantomjs not working

ldd /build/node_modules/phantomjs/lib/phantom/bin/phantomjs'

    /lib64/ld-linux-x86-64.so.2 (0x7fa68b60e000)
    libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x7fa68b35e000)
    libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x7fa68b127000)
    libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x7fa68b60e000)
    librt.so.1 => /lib64/ld-linux-x86-64.so.2 (0x7fa68b60e000)
    libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7fa68b60e000)
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x7fa68add7000)
    libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7fa68b60e000)
    libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7fa68abc4000)
    libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7fa68b60e000)
Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /build/node_modules/phantomjs/lib/phantom/bin/phantomjs)
    libz.so.1 => /lib/libz.so.1 (0x7fa68a9ae000)
    libpng16.so.16 => /usr/lib/libpng16.so.16 (0x7fa68a781000)
    libexpat.so.1 => /usr/lib/libexpat.so.1 (0x7fa68a561000)
Error relocating /build/node_modules/phantomjs/lib/phantom/bin/phantomjs: isinf: symbol not found
Error relocating /build/node_modules/phantomjs/lib/phantom/bin/phantomjs: __strtod_internal: symbol not found
Error relocating /build/node_modules/phantomjs/lib/phantom/bin/phantomjs: __finitef: symbol not found
Error relocating /build/node_modules/phantomjs/lib/phantom/bin/phantomjs: __isnanf: symbol not found
Error relocating /build/node_modules/phantomjs/lib/phantom/bin/phantomjs: __finite: symbol not found
Error relocating /build/node_modules/phantomjs/lib/phantom/bin/phantomjs: getcontext: symbol not found

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.