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

Any plans to support musl libc? #914

Closed
james-aurizn opened this issue May 28, 2019 · 5 comments · Fixed by #2275
Closed

Any plans to support musl libc? #914

james-aurizn opened this issue May 28, 2019 · 5 comments · Fixed by #2275
Assignees

Comments

@james-aurizn
Copy link

james-aurizn commented May 28, 2019

Version

6.5.5

Host machine and operating system

Alpine linux docker container.

Target machine and operating system (if different from host)

Compiler name and version (including patch level)

# g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-alpine-linux-musl/8.3.0/lto-wrapper
Target: x86_64-alpine-linux-musl
Configured with: /home/buildozer/aports/main/gcc/src/gcc-8.3.0/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --build=x86_64-alpine-linux-musl --host=x86_64-alpine-linux-musl --target=x86_64-alpine-linux-musl --with-pkgversion='Alpine 8.3.0' --enable-checking=release --disable-fixed-point --disable-libstdcxx-pch --disable-multilib --disable-nls --disable-werror --disable-symvers --enable-__cxa_atexit --enable-default-pie --enable-default-ssp --enable-cloog-backend --enable-languages=c,c++,objc,fortran,ada --disable-libssp --disable-libmpx --disable-libmudflap --disable-libsanitizer --enable-shared --enable-threads --enable-tls --with-system-zlib --with-linker-hash-style=gnu
Thread model: posix
gcc version 8.3.0 (Alpine 8.3.0)

The $ACE_ROOT/ace/config.h file

https://github.com/LASAGNE-Open-Systems/LASAGNE-Core/blob/release-1.5.1/bin/build/ace/config.h

The $ACE_ROOT/include/makeinclude/platform_macros.GNU file

https://github.com/LASAGNE-Open-Systems/LASAGNE-Core/blob/release-1.5.1/bin/build/ace/platform_macros.GNU

AREA/CLASS/EXAMPLE AFFECTED:

ACE.cpp fails to compile, and many if not all following units.

Synopsis

Looks like a bunch of types are defined differently, i.e. loff_t, ucontext_t, cpu_set_t.

Repeat by

Based on this https://github.com/LASAGNE-Open-Systems/docker-lasagne-core/blob/master/lasagne-core/Dockerfile except the top updated to read

FROM alpine:3.9
RUN apk update && apk add --virtual build-group build-base git figlet perl linux-headers
RUN git clone --depth 1 -b ACE+TAO-6_5_5 git://github.com/DOCGroup/MPC.git /opt/MPC \
 && git clone --depth 1 -b ACE+TAO-6_5_5 git://github.com/DOCGroup/ACE_TAO.git /opt/ACE_TAO \
 && git clone --depth 1 -b DDS-3.13.2 git://github.com/objectcomputing/OpenDDS.git /opt/OpenDDS \
 && git clone --depth 1 -b v1.5.1 git://github.com/LASAGNE-Open-Systems/LASAGNE-Core.git /opt/DAF

Sample fix/ workaround

Possibly too much effort, looks like musl has no backwards compatibility, and it may be too much effort to update ACE+TAO to be compliant with modern standards and also older libraries.

@jwillemsen
Copy link
Member

Feel free to open a pull request to add support for musl libc or contact one of the commercial support provides to do a port for you, see http://www.dre.vanderbilt.edu/~schmidt/commercial-support.html

@drandreas
Copy link
Contributor

I've fixed ACE compilation against musl libc. I'm aware that ACE is not ACE+TAO but the attached patch perhaps gives a good starting point for someone else who picks up the task.

ace-add-musl-support.txt

@jwillemsen
Copy link
Member

Can you open a pull request with your changes @drandreas ? Most portability issues are in ACE so your changes would help anyone interested in musl libc

@drandreas
Copy link
Contributor

Sorry, I do not yet consider the patch mature enough for production.
I report back when the code passed enough quality gates.

@mitza-oci
Copy link
Member

I'm not sure why this was closed in 2019. Now reopened with PR #2275 linked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

4 participants