-
-
Save lsmag/aeb520908cc16d475072741bcc9d21e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Running `ldd` on the container-based executable from the host | |
$ ldd hello | |
linux-vdso.so.1 (0x00007fff61986000) | |
libgambit.so.4 => not found | |
libc.so.6 => /usr/lib/libc.so.6 (0x00007f9185b30000) | |
/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f9185d4e000) | |
# The same executable, from within the container itself | |
$ ldd hello | |
linux-vdso.so.1 (0x00007ffebdf80000) | |
libgambit.so.4 => /usr/lib/x86_64-linux-gnu/libgambit.so.4 (0x00007f7e923f8000) | |
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7e92238000) | |
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f7e92233000) | |
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f7e9222e000) | |
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7e920e9000) | |
libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007f7e92057000) | |
libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f7e91d6a000) | |
/lib64/ld-linux-x86-64.so.2 (0x00007f7e92a4e000) | |
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7e91d49000) | |
# After recompiling using host gerbil (arch linux, same args as the docker invocation) | |
$ ldd hello | |
linux-vdso.so.1 (0x00007ffdc258c000) | |
libutil.so.1 => /usr/lib/libutil.so.1 (0x00007f0e4f02f000) | |
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f0e4f02a000) | |
libm.so.6 => /usr/lib/libm.so.6 (0x00007f0e4eee4000) | |
libc.so.6 => /usr/lib/libc.so.6 (0x00007f0e4ed1d000) | |
/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f0e4f69b000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:sid | |
ARG UNAME=myuser | |
ARG UID=1000 | |
ARG GID=1000 | |
ARG GERBIL_VERSION=v0.15.1 # FWIW, this is overriden on invocation to `master` | |
ARG GERBIL_HOME=/opt/gerbil | |
RUN apt-get update \ | |
&& apt-get install -y \ | |
build-essential \ | |
gambc \ | |
openssl \ | |
libssl-dev \ | |
sqlite3 \ | |
libsqlite3-dev \ | |
zlib1g-dev \ | |
git \ | |
&& rm -rf /var/lib/apt-get/lists/* | |
RUN git clone https://github.com/vyzo/gerbil.git $GERBIL_HOME | |
RUN cd $GERBIL_HOME \ | |
&& git checkout $GERBIL_VERSION \ | |
&& cd src/ \ | |
&& ./build.sh | |
VOLUME /usr/src | |
RUN groupadd -g $GID -o $UNAME \ | |
&& useradd -m -u $UID -g $GID -o -s /bin/bash $UNAME | |
USER $UNAME | |
ENV PATH="$GERBIL_HOME/bin:$PATH" \ | |
GERBIL_HOME="$GERBIL_HOME" | |
CMD /bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package: hello | |
(export main) | |
(def (main . args) | |
(displayln "hello world")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
build: | |
docker run -it --rm \ | |
-v $(shell pwd):/usr/src \ | |
-w /usr/src \ | |
$(CST_GERBIL_DOCKER) \ | |
gxc -static -exe -o hello hello.ss |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment