* [Buildroot] [PATCH 1/1] package/apache: fix dynamic build for mod_lua
@ 2018-04-01 11:29 Bernd Kuhls
2018-04-01 12:04 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Bernd Kuhls @ 2018-04-01 11:29 UTC (permalink / raw)
To: buildroot
Fixes
/accts/mlweber1/rclinux/rc-buildroot-test/scripts/instance-1/output/host/sparc64-buildroot-linux-gnu/sysroot/usr/lib/liblua.so: undefined reference to `dlopen'
/accts/mlweber1/rclinux/rc-buildroot-test/scripts/instance-1/output/host/sparc64-buildroot-linux-gnu/sysroot/usr/lib/liblua.so: undefined reference to `dlclose'
/accts/mlweber1/rclinux/rc-buildroot-test/scripts/instance-1/output/host/sparc64-buildroot-linux-gnu/sysroot/usr/lib/liblua.so: undefined reference to `dlerror'
/accts/mlweber1/rclinux/rc-buildroot-test/scripts/instance-1/output/host/sparc64-buildroot-linux-gnu/sysroot/usr/lib/liblua.so: undefined reference to `dlsym'
detected by autobuilder:
http://autobuild.buildroot.net/results/cc1/cc13f4cef9cf6f18615d58f1d83b233812f19fa0/
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
package/apache/apache.mk | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/package/apache/apache.mk b/package/apache/apache.mk
index 3b39be4a40..6632d0b6ce 100644
--- a/package/apache/apache.mk
+++ b/package/apache/apache.mk
@@ -61,6 +61,10 @@ APACHE_CONF_OPTS += \
--enable-lua \
--with-lua=$(STAGING_DIR)/usr
APACHE_DEPENDENCIES += lua
+# liblua uses dlopen when dynamically linked
+ifneq ($(BR2_STATIC_LIBS),y)
+APACHE_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -ldl"
+endif
else
APACHE_CONF_OPTS += --disable-lua
endif
--
2.14.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH 1/1] package/apache: fix dynamic build for mod_lua
2018-04-01 11:29 [Buildroot] [PATCH 1/1] package/apache: fix dynamic build for mod_lua Bernd Kuhls
@ 2018-04-01 12:04 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2018-04-01 12:04 UTC (permalink / raw)
To: buildroot
Hello,
On Sun, 1 Apr 2018 13:29:00 +0200, Bernd Kuhls wrote:
> APACHE_DEPENDENCIES += lua
> +# liblua uses dlopen when dynamically linked
> +ifneq ($(BR2_STATIC_LIBS),y)
> +APACHE_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -ldl"
> +endif
As usual, I don't like this. Apache uses pkg-config to query for the
availability of Lua, and this should return "the right thing" without
the need for hacks. See modules/lua/config.m4:
if test -n "$PKGCONFIG" -a -z "$lua_path" \
&& $PKGCONFIG --atleast-version=5.1 lua; then
LUA_LIBS="`$PKGCONFIG --libs lua`"
LUA_CFLAGS="`$PKGCONFIG --cflags lua`"
LUA_VERSION="`$PKGCONFIG --modversion lua`"
AC_MSG_NOTICE([using Lua $LUA_VERSION configuration from pkg-config])
So we need to understand why this doesn't work.
In the failing build, host-pkgconf was built before apache, so
pkg-config was available. But apache didn't use it, I believe because
we pass a non_empty lua_path.
Could you try to pass --with-lua instead of --with-lua=$(STAGING_DIR) ?
That should convince the stuff to use pkg-config to detect Lua, which
will get the compiler flags from lua.pc, and hopefully they will
contain the -ldl.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-01 12:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-01 11:29 [Buildroot] [PATCH 1/1] package/apache: fix dynamic build for mod_lua Bernd Kuhls
2018-04-01 12:04 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox