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

Can't compile with musl-libc (aka Alpine Linux) #322

Closed
m4c0 opened this issue Apr 29, 2019 · 1 comment
Closed

Can't compile with musl-libc (aka Alpine Linux) #322

m4c0 opened this issue Apr 29, 2019 · 1 comment

Comments

@m4c0
Copy link

m4c0 commented Apr 29, 2019

A bunch of systems does not use provide execinfo.h in their libc. Android and Alpine are two major Linux players without such header. Android was fixed in #275 but Alpine still doesn't work. Here's a minimal Dockerfile to replicate the issue:

FROM alpine
RUN apk add --no-cache --virtual .deps cmake git build-base
RUN git clone --depth=1 https://github.com/awslabs/aws-c-common
RUN mkdir build && cd build && cmake ../aws-c-common && make

Eventually, that fails with this message:

In file included from /aws-c-common/tests/array_list_test.c:19:
/aws-c-common/include/aws/testing/aws_test_harness.h:448:14: fatal error: execinfo.h: No such file or directory
 #    include <execinfo.h>
              ^~~~~~~~~~~~
compilation terminated.

I'm pretty sure there are more platforms without this header, so it would be good to either:

  1. Add an option to disable testing; or
  2. Extend the #ifndef ANDROID check to be something like #if HAS_EXECINFO_H

Note: I'm aware I could add libexecinfo to the apk add, but that will not solve the root issue. It doesn't resolve the issue in Alpine either, since it adds the execinfo.h file, but it doesn't add -lexecinfo to the linker options.

@bretambrose
Copy link
Contributor

This should be addressed in 0.3.7. Please reopen if not the case.

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

No branches or pull requests

2 participants