Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 509338 - www-servers/nginx with dev-lang/lua and dev-lang/luajit automagically links against luajit
Summary: www-servers/nginx with dev-lang/lua and dev-lang/luajit automagically links a...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Tiziano Müller (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-01 23:39 UTC by clove
Modified: 2014-07-22 06:52 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description clove 2014-05-01 23:39:37 UTC
The nginx ebuild does not allow a user to specify if to build against lua or luajit. I recommend an introduction of a use flag that allow's the user to specify lua or luajit linking.

Reproducible: Always

Steps to Reproduce:
1. emerge dev-lang/luajit dev-lang/lua
2. emerge nginx
3. ldd /usr/sbin/nginx shows that nginx is linked against luajit



You can work around this by
1. emerge -C lua
2. emerge nginx
3. emerge lua
Comment 1 clove 2014-05-01 23:40:27 UTC
Got a typo

Steps to Reproduce:
1. emerge dev-lang/luajit dev-lang/lua
2. emerge nginx
3. ldd /usr/sbin/nginx shows that nginx is linked against lua (not luajit)
Comment 2 clove 2014-05-02 03:12:48 UTC
This problem occurs with both 1.4 and 1.5 versions of nginx.
Comment 3 Johan Bergström 2014-05-05 07:15:44 UTC
I don't love this approach, but I guess there might be no other options. How does other packages handle this?
Comment 4 clove 2014-05-06 21:49:34 UTC
Older ebuilds included a luajit use flag

The lua section looked like:

	if use nginx_modules_http_lua; then
		http_enabled=1
		if use luajit; then
			export LUAJIT_LIB=$(pkg-config --variable libdir luajit)
			export LUAJIT_INC=$(pkg-config --variable includedir luajit)
		else
			export LUA_LIB=$(pkg-config --variable libdir lua)
			export LUA_INC=$(pkg-config --variable includedir lua)
		fi
		myconf+=" --add-module=${DEVEL_KIT_MODULE_WD}"
		myconf+=" --add-module=${HTTP_LUA_MODULE_WD}"
	fi
Comment 5 Johan Bergström 2014-07-10 23:42:39 UTC
We've introduced support for this in our nginx-overlay (layman -a nginx-overlay). It will land in gentoo-x86 shortly, but feel free to try it out ahead.

More info here: https://github.com/gentoo/nginx-overlay
Comment 6 Tiziano Müller (RETIRED) gentoo-dev 2014-07-22 06:52:36 UTC
luajit USE flag readded in nginx-1.7.3