Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 533570 - www-servers/nginx with sys-libs/musl - NGINX includes glibc-specific code to work around some issues in sys-libs/glibc(?)
Summary: www-servers/nginx with sys-libs/musl - NGINX includes glibc-specific code to ...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Tiziano Müller (RETIRED)
Keywords: PATCH
Depends on:
Blocks: musl-porting
  Show dependency tree
Reported: 2014-12-26 07:08 UTC by James Taylor
Modified: 2015-03-10 09:34 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---

musl-crypt-fix.patch (file_533570.txt,296 bytes, text/plain)
2014-12-26 07:08 UTC, James Taylor
=www-servers/nginx-1.7.8-r99 for hardened-development overlay (file_533570.txt,59.59 KB, patch)
2015-02-20 09:37 UTC, James Taylor
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Taylor 2014-12-26 07:08:45 UTC
Created attachment 392410 [details]

NGINX includes glibc-specific code to work around some issues in glibc, and as such fails to build under musl.

This patch surrounds the code in #ifdef __GLIBC__ .. #endif to prevent it being built under musl.

I have already submitted the fix upstream, which has been accepted.

Reproducible: Always
Comment 1 Anthony Basile gentoo-dev 2015-01-31 22:04:56 UTC
Hi can you make this into a single commit against the hardened-dev::musl overlay.  Its worth taking the time to learn this since it makes my life easy and I'll just shoot your commits in as soon as I get and review them.  Otherwise I got to piece stuff together.

Its not hard:

1. git clone git://

2. git checkout musl

3. add the ebuild and patches etc.  make sure the ebuild has rev version -r99.  look at other ebuilds in that overlay for examples.  reduce the KEYWORDS to just the musl supported arches.  don't include the ChangeLog, its not really necessary.

4. git add -A .

5. git commit -m "<cat>/<pkg>: fixed to build on musl"  obviously change <cat> and <pkg> and make "fixed ..." as precise as possible

6. git format-patch HEAD^

7. attack to the bug.

8. profit!

Thanks for helping out!
Comment 2 James Taylor 2015-02-20 09:37:03 UTC
Created attachment 397030 [details, diff]
=www-servers/nginx-1.7.8-r99 for hardened-development overlay

This contains the fix from upstream that I've backported from the nginx-1.7.10 release (as submitted prior)
Comment 3 Justin Lecher (RETIRED) gentoo-dev 2015-03-10 09:34:52 UTC
+*nginx-1.7.10 (10 Mar 2015)
+  10 Mar 2015; Justin Lecher <> +files/AJP-nginx-1.7.9+.patch,
+  +nginx-1.7.10.ebuild, metadata.xml, nginx-1.7.6.ebuild, nginx-1.7.7.ebuild,
+  nginx-1.7.8.ebuild:
+  Version BUmp, #531542; fix for musl, #533570; drop suspecious einstall,
+  #521662; fix SLOT operators