Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build fails with musl libc #2013

Closed
tomalok opened this issue Mar 14, 2019 · 1 comment · Fixed by containerd/containerd#3139
Closed

build fails with musl libc #2013

tomalok opened this issue Mar 14, 2019 · 1 comment · Fixed by containerd/containerd#3139

Comments

@tomalok
Copy link

tomalok commented Mar 14, 2019

commits 16612d7 and af9da0a have broken builds on musl libc systems.

# github.com/opencontainers/runc/libcontainer/nsenter
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: $WORK/b123/_x003.o: in function `try_bindfd':
libcontainer/nsenter/cloned_binary.c:354: undefined reference to `secure_getenv'
/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: $WORK/b123/_x003.o: in function `make_execfd':
libcontainer/nsenter/cloned_binary.c:252: undefined reference to `secure_getenv'
collect2: error: ld returned 1 exit status
# github.com/opencontainers/runc/libcontainer/nsenter
cloned_binary.c: In function 'make_execfd':
cloned_binary.c:252:17: warning: implicit declaration of function 'secure_getenv' [-Wimplicit-function-declaration]
  char *prefix = secure_getenv("_LIBCONTAINER_STATEDIR");
                 ^~~~~~~~~~~~~
cloned_binary.c:252:17: warning: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
cloned_binary.c: In function 'try_bindfd':
cloned_binary.c:354:17: warning: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  char *prefix = secure_getenv("_LIBCONTAINER_STATEDIR");
                 ^~~~~~~~~~~~~
make: *** [Makefile:33: runc] Error 2
@tomalok tomalok changed the title build vails with musl libc build fails with musl libc Mar 14, 2019
@cyphar
Copy link
Member

cyphar commented Mar 16, 2019

This was fixed by #2015.

@cyphar cyphar closed this as completed Mar 16, 2019
thaJeztah added a commit to thaJeztah/containerd that referenced this issue Mar 28, 2019
full diff: opencontainers/runc@2b18fe1...v1.0.0-rc7

changes included:

- opencontainers/runc#2012 Need to setup labeling of kernel keyrings
- opencontainers/runc#2014 Add $RUNC_USE_SYSTEMD to run tests using systemd cgroup driver
- opencontainers/runc#2015 Use getenv not secure_getenv
  - fixes opencontainers/runc#2013 build fails with musl libc
- opencontainers/runc#2023 Fixes regression causing zombie runc:[1:CHILD] processes

Signed-off-by: Sebastiaan van Stijn <[email protected]>
thaJeztah added a commit to thaJeztah/containerd that referenced this issue Mar 28, 2019
full diff: opencontainers/runc@2b18fe1...v1.0.0-rc7

changes included:

- opencontainers/runc#2012 Need to setup labeling of kernel keyrings
- opencontainers/runc#2014 Add $RUNC_USE_SYSTEMD to run tests using systemd cgroup driver
- opencontainers/runc#2015 Use getenv not secure_getenv
  - fixes opencontainers/runc#2013 build fails with musl libc
- opencontainers/runc#2023 Fixes regression causing zombie runc:[1:CHILD] processes

Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit bc6ac08)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
thaJeztah added a commit to thaJeztah/containerd that referenced this issue Mar 28, 2019
full diff: opencontainers/runc@2b18fe1...v1.0.0-rc7

changes included:

- opencontainers/runc#2012 Need to setup labeling of kernel keyrings
- opencontainers/runc#2014 Add $RUNC_USE_SYSTEMD to run tests using systemd cgroup driver
- opencontainers/runc#2015 Use getenv not secure_getenv
  - fixes opencontainers/runc#2013 build fails with musl libc
- opencontainers/runc#2023 Fixes regression causing zombie runc:[1:CHILD] processes

Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit bc6ac08)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants