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

Compatibility issues with musl on Alpine #253

Open
christian-simmen opened this issue Aug 16, 2021 · 1 comment
Open

Compatibility issues with musl on Alpine #253

christian-simmen opened this issue Aug 16, 2021 · 1 comment

Comments

@christian-simmen
Copy link

Hi Jerry,

I just tried to compile dsc on a Docker Alpine image. It seems to run into an compatibility issue in ip_proto_index.c where getprotobynumber_r is explicitly linked. Unfortunately musl does not support getprotobynumber_r.

Here's a Dockerfile to reproduce:

FROM alpine:3.13
RUN echo 'https://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories \
    && apk add --no-cache --update-cache \
    make \
    musl-dev \
    alpine-sdk \
    libcap libcap-dev \
    libpcap libpcap-dev \
    wget \
    autoconf \
    automake \
    git \
    && apk upgrade

RUN git clone --branch master https://github.com/DNS-OARC/dsc.git dsc \
  && cd dsc \
  && git submodule update --init \
  && ./autogen.sh \
  && ./configure \
  && make \
  && make install

which results in

ip_proto_index.c: In function 'ip_proto_iterator':
ip_proto_index.c:78:5: warning: implicit declaration of function 'getprotobynumber_r'; did you mean 'getprotobynumber'? [-Wimplicit-function-declaration]
   78 |     getprotobynumber_r(next_iter, &proto, buf, sizeof(buf), &p);
      |     ^~~~~~~~~~~~~~~~~~
      |     getprotobynumber
/usr/lib/gcc/x86_64-alpine-linux-musl/10.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: ip_proto_index.o: in function `ip_proto_iterator':
/dsc/src/ip_proto_index.c:78: undefined reference to `getprotobynumber_r'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:582: dsc] Error 1

Best,
Christian

@jelu
Copy link
Member

jelu commented Aug 16, 2021 via email

@jelu jelu changed the title Compatibility issues on Alpine Compatibility issues with musl on Alpine Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants