You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
I'm struggling getting enroot to compile in an alpine container (also enroot in case that makes a difference). Some advice would be much appreciated.
I've adapted the instructions so far:
apk add git gcc make libtool automake alpine-sdk libcap autoconf linux-headers tar bash
git clone --recurse-submodules https://github.com/NVIDIA/enroot.git
cd enroot
make install
Compilation gets underway, but there's an issue in the libbsd dependency:
libtool: compile: /usr/bin/gcc -DHAVE_CONFIG_H -I.. -isystem ../include/bsd/ -include ../config.h -DLIBBSD_OVERLAY -DLIBBSD_DISABLE_DEPRECATED -D__REENTRANT -D_FORTIFY_SOURCE=2 -O2 -fdata-sections -ffunction-sections -fstack-protector -MT flopen.lo -MD -MP -MF .deps/flopen.Tpo -c flopen.c -fPIE -o flopen.o
flopen.c: In function'vflopenat':
flopen.c:60:21: error: 'O_CREAT' undeclared (first use in this function)
60 |if (flags & O_CREAT) {
| ^~~~~~~
flopen.c:60:21: note: each undeclared identifier is reported only once foreach function it appearsin
flopen.c:65:21: error: 'O_NONBLOCK' undeclared (first use in this function)
65 |if (flags & O_NONBLOCK)
| ^~~~~~~~~~
flopen.c:68:26: error: 'O_TRUNC' undeclared (first use in this function)
68 | trunc = (flags & O_TRUNC);| ^~~~~~~
flopen.c:72:27: warning: implicit declaration of function'openat'; did you mean 'flopenat'? [-Wimplicit-function-declaration]
72 |if((fd = openat(dirfd, path, flags, mode)) == -1)
| ^~~~~~
| flopenat
flopen.c: In function'flopen':
flopen.c:130:25: error: 'AT_FDCWD' undeclared (first use in this function)
130 | ret = vflopenat(AT_FDCWD, path, flags, ap);| ^~~~~~~~
Adding #include <fcntl.h> to flopen.c lets libbsd compile.
However it seems like musl doesn't compile correctly now:
Yeah, right now the build vendors every dependencies including Musl.
We also need to patchmusl-gcc for static PIE.
Is there any reason why you want to use the toolchain from the container rather than the one that is vendored with Enroot?
Hello!
I'm struggling getting enroot to compile in an alpine container (also enroot in case that makes a difference). Some advice would be much appreciated.
I've adapted the instructions so far:
Compilation gets underway, but there's an issue in the
libbsd
dependency:Adding
#include <fcntl.h>
toflopen.c
letslibbsd
compile.However it seems like
musl
doesn't compile correctly now:There don't appear to be any errors in the
musl
build log, but the dist folder is basically empty:I've attached the full build log: enroot-build-log.txt
The text was updated successfully, but these errors were encountered: