Skip to content

Instantly share code, notes, and snippets.

@x-yuri

x-yuri/.md Secret

Last active March 24, 2024 17:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save x-yuri/1b4c19891be50b2b8801689de1487009 to your computer and use it in GitHub Desktop.
Save x-yuri/1b4c19891be50b2b8801689de1487009 to your computer and use it in GitHub Desktop.
$ docker run --rm -it alpine:3.4
/ # apk update
/ # apk add build-base gettext-dev
...
(2/29) Installing binutils (2.26-r1)
...
(13/29) Installing gcc (5.3.0-r0)
...
/ # echo 'int main() {}' | cc -v -o a -lintl -xc - && ldd a
...
 /usr/libexec/gcc/x86_64-alpine-linux-musl/5.3.0/collect2
  ... -lintl ... --as-needed -lgcc_s --no-as-needed
  ... --as-needed -lgcc_s --no-as-needed ...
        /lib/ld-musl-x86_64.so.1 (0x7506ef72b000)
        libintl.so.8 => /usr/lib/libintl.so.8 (0x7506ef31b000)
        libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7506ef72b000)
$ docker run --rm -it alpine:3.5
/ # apk update
/ # apk add build-base gettext-dev
...
(2/28) Installing binutils (2.27-r1)
...
(12/28) Installing gcc (6.2.1-r1)
...
/ # echo 'int main() {}' | cc -v -o a -lintl -xc - && ldd a
...
 /usr/libexec/gcc/x86_64-alpine-linux-musl/6.2.1/collect2
  ... --as-needed ...  -lintl ...  --as-needed -lgcc_s --no-as-needed
  ...  --as-needed -lgcc_s --no-as-needed ...
        /lib/ld-musl-x86_64.so.1 (0x70c4132a7000)
        libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x70c4132a7000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment