Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/apache: fix dynamic build for mod_lua
Date: Sun, 1 Apr 2018 14:04:25 +0200	[thread overview]
Message-ID: <20180401140425.48a41272@windsurf> (raw)
In-Reply-To: <20180401112900.922-1-bernd.kuhls@t-online.de>

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

      reply	other threads:[~2018-04-01 12:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180401140425.48a41272@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox