Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Link libintl in case of Alpine #5731

Merged
merged 1 commit into from Jun 14, 2016
Merged

Link libintl in case of Alpine #5731

merged 1 commit into from Jun 14, 2016

Conversation

ghost
Copy link

@ghost ghost commented Jun 11, 2016

This delta detects Alpine Linux by using uname -v (kernel version)
and add the libintl in the linker list. This is because gettext is
not part of (per-installed in) Alpine Linux but available via the
package manager. To build CoreCLR, gettext-dev is one unlisted
per-requisite.

This delta detects Alpine Linux by using `uname -v` (kernel version)
and add the `libintl` in the linker list. This is because `gettext` is
not part of (per-installed in) Alpine Linux but available via the
package manager. To build CoreCLR, `gettext-dev` is one unlisted
per-requisite.
@ghost
Copy link
Author

ghost commented Jun 11, 2016

@jkotas, @benpye, @ncopa,

This is the last (6 of 6) patch I have for Alpine at the moment. Here is the full change-set which builds CoreCLR: https://github.com/jasonwilliams200OK/coreclr/commit/4103eb2f457ed8dd57e16e160c0d8f95e8b7ccc7 (I split this into 6 pieces and upstream those for ease-of-review). Two things I haven't included in PRs are disabling of lldb and skipping of event trace feature. Both LLDB and LTTNG are missing from Alpine ports at the moment.

Results in 99% of the build:

[ 99%] Linking CXX shared library libcoreclr.so
[ 99%] Building CXX object src/jit/standalone/CMakeFiles/clrjit.dir/__/targetamd64.cpp.o
[ 99%] Building CXX object src/jit/standalone/CMakeFiles/clrjit.dir/__/unwindamd64.cpp.o
[ 99%] Building CXX object src/jit/standalone/CMakeFiles/clrjit.dir/__/__/__/version.cpp.o
[ 99%] Linking CXX shared library libclrjit.so
/usr/bin/ld: cannot find -leventprovider
clang-3.8: error: linker command failed with exit code 1 (use -v to see invocation)
src/dlls/mscoree/coreclr/CMakeFiles/coreclr.dir/build.make:174: recipe for target 'src/dlls/mscoree/coreclr/libcoreclr.so' failed
make[2]: *** [src/dlls/mscoree/coreclr/libcoreclr.so] Error 1
CMakeFiles/Makefile2:65719: recipe for target 'src/dlls/mscoree/coreclr/CMakeFiles/coreclr.dir/all' failed
make[1]: *** [src/dlls/mscoree/coreclr/CMakeFiles/coreclr.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 99%] Built target clrjit
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
Failed to build coreclr components.

I will later add proper skip mechanics for event tracing and SOS plugins, but at the moment I am trying to build LLDB on Alpine. 🏇

@jkotas
Copy link
Member

jkotas commented Jun 11, 2016

@janvorli Could you please take a look at this change?

@jkotas
Copy link
Member

jkotas commented Jun 11, 2016

@jasonwilliams200OK Thanks a lot of making progress on the Alpine port! I thought it would be much harder from seeing the early discussions about it.

@ghost
Copy link
Author

ghost commented Jun 11, 2016

@jkotas, that was my impression as well. The first 10% of the build was tough then the last fix was around 38% (this one, libintl). After that everything went smooth. :)

@ghost
Copy link
Author

ghost commented Jun 12, 2016

With @mjeanson's patches for musl upstreamed: https://github.com/lttng/lttng-ust/commits/master?author=mjeanson, I can build lttng-ust master branch as is on Alpine.

alp:~/lttng-ust# ldd ./liblttng-ust/.libs/liblttng-ust.so
    ldd (0x74eaadb88000)
    liblttng-ust-tracepoint.so.0 => /root/lttng-ust/liblttng-ust/.libs/liblttng-ust-tracepoint.so.0 (0x74eaad6f2000)
    liburcu-bp.so.4 => /usr/lib/liburcu-bp.so.4 (0x74eaad4eb000)
    liburcu-cds.so.4 => /usr/lib/liburcu-cds.so.4 (0x74eaad2e4000)
    libc.musl-x86_64.so.1 => ldd (0x74eaadb88000)
    liburcu-common.so.4 => /usr/lib/liburcu-common.so.4 (0x74eaad0e0000)

@mjeanson, are you planning to publish lttng-ust package to Alpine testing repository? :)

We can enable the Event Tracing feature here once the package is available in testing repo. We are already using libunwind from testing.

@ghost
Copy link
Author

ghost commented Jun 12, 2016

@barthalion,
Thanks for moving libunwind from testing to main repo: https://github.com/alpinelinux/aports/tree/master/main/libunwind.
While LTTng-ust builds as is, LLDB 3.8 required this tiny patch: https://gist.github.com/jasonwilliams200OK/c84bdd51ede5390b30c7dadcbcad1665 to build on Alpine.

These two are the only missing packages to build fully featured CoreCLR on Alpine. Would highly appreciate, if those packages are made available via standard package manager. 😊

@mjeanson
Copy link

I've sent the patches to add lttng-ust and babeltrace to testing a couple weeks ago :

http://patchwork.alpinelinux.org/patch/2051/
http://patchwork.alpinelinux.org/patch/2053/

I'm also working on an lttng-tools package. If you know the right people to get this merged, don't hesitate to poke them.

@ghost
Copy link
Author

ghost commented Jun 12, 2016

@mjeanson, thanks. I saw that one and sent a request via email to @barthalion to pick APKBUILD from that very patch of yours, since the rest of the changes are merged upstream? I have found IRC channel #alpine-devel @ Freenode the good place to find out about the status of various lib packages.

@barthalion
Copy link

@mjeanson I am actually one of the right people who can merge into aports. I will handle merging your changes tomorrow.

@barthalion
Copy link

I pushed @mjeanson's patches to Edge 15 minutes ago. (Thanks!) I'll work on packaging LLDB with patches from @jasonwilliams200OK later today.

@ghost
Copy link
Author

ghost commented Jun 14, 2016

Thanks a lot @barthalion! I can see the package is listed here https://pkgs.alpinelinux.org/packages?name=lttng-ust&branch=&repo=testing&arch=&maintainer=. Once we get LLDB, i will rebuild CoreCLR enabling all the features. :)

@janvorli, this patch is ready as is, can you please take a look.

@janvorli
Copy link
Member

LGTM, thank you!

@janvorli janvorli merged commit 11a5971 into dotnet:master Jun 14, 2016
@ghost ghost deleted the alpine/patch-6 branch June 14, 2016 13:36
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
This delta detects Alpine Linux by using `uname -v` (kernel version)
and add the `libintl` in the linker list. This is because `gettext` is
not part of (per-installed in) Alpine Linux but available via the
package manager. To build CoreCLR, `gettext-dev` is one unlisted
per-requisite.

Commit migrated from dotnet/coreclr@11a5971
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants