https://redmine.lighttpd.net/https://redmine.lighttpd.net/favicon.ico?13667327412019-01-19T17:22:14Zlighty labsLighttpd - Bug #2925: autotools cross build failure with lighttpdhttps://redmine.lighttpd.net/issues/2925?journal_id=116322019-01-19T17:22:14Zgstrauss
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Patch Pending</i></li><li><strong>Target version</strong> changed from <i>1.4.x</i> to <i>1.4.53</i></li></ul><p><a class="user active user-mention" href="https://redmine.lighttpd.net/users/11658">@helmut</a>, thank you for the patch.</p>
<p>I replaced the AS_IF() for consistency with the rest of configure.ac</p>
<p>I chose to preserve the spelling change from MYSQL_INCLUDE to MYSQL_CONFIG, even though it adds non-required noise to the patch.</p> Lighttpd - Bug #2925: autotools cross build failure with lighttpdhttps://redmine.lighttpd.net/issues/2925?journal_id=116332019-01-19T22:45:06Zgstrauss
<ul><li><strong>Status</strong> changed from <i>Patch Pending</i> to <i>Fixed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Applied in changeset <a class="changeset" title="[build] autotools: try mysqlclient.pc and mariadb.pc (fixes #2925) (thx helmut) x-ref: "autot..." href="https://redmine.lighttpd.net/projects/lighttpd/repository/14/revisions/4608ddec2f94daa84d69fc1b311a8b3aae16ec5c">4608ddec2f94daa84d69fc1b311a8b3aae16ec5c</a>.</p> Lighttpd - Bug #2925: autotools cross build failure with lighttpdhttps://redmine.lighttpd.net/issues/2925?journal_id=116342019-01-21T07:03:25Zhelmut
<ul></ul><p>Please don't replace AS_IF! That's broken. It's broken, because PKG_CHECK_MODULES uses AC_REQUIRE and AC_REQUIRE does not work inside a shell if. Consider the following Code</p>
<p>if something; then<br /> AC_REQUIRE(FOO)<br /> ...<br />else<br /> AC_REQUIRE(FOO)
# boom because FOO is missing<br />fi</p>
<p>Using PKG_CHECK_MODULES inside shell if absolutely is a fatal bug.</p> Lighttpd - Bug #2925: autotools cross build failure with lighttpdhttps://redmine.lighttpd.net/issues/2925?journal_id=116352019-01-21T07:08:05Zhelmut
<ul></ul><p>FYI, the change from MYSQL_INCLUDE to MYSQL_CFLAGS is not entirely non-required, because PKG_CHECK_MODULES populates MYSQL_CFLAGS and doesn't populate MYSQL_INCLUDE. If you wanted to preserve MYSQL_INCLUDE (which seems fair), you'd have to have two additional MYSQL_INCLUDE=$MYSQL_CFLAGS assignments in the positive PKG_CHECK_MODULES branches.</p> Lighttpd - Bug #2925: autotools cross build failure with lighttpdhttps://redmine.lighttpd.net/issues/2925?journal_id=116382019-01-21T17:53:22Zgstrauss
<ul></ul><p>On line 173 of configure.ac, lighttpd has:<br /><pre>
PKG_PROG_PKG_CONFIG
</pre><br />That should be sufficient for later use of PKG_CHECK_MODULES() inside conditionals.<br />See the gory explanation at <a class="external" href="https://autotools.io/pkgconfig/pkg_check_modules.html">https://autotools.io/pkgconfig/pkg_check_modules.html</a></p>
<p>If that were not sufficient, then there are other places in lighttpd configure.ac that would also need to be converted to AS_IF()</p>
<p>(To your other comment, I did accept the use of MYSQL_CFLAGS in commit commmit:4608ddec, so no further changes are needed)</p> Lighttpd - Bug #2925: autotools cross build failure with lighttpdhttps://redmine.lighttpd.net/issues/2925?journal_id=116392019-01-22T06:59:13Zhelmut
<ul></ul><p>Agreed. So not using AS_IF is not a bug here, but requires non-local consistency. I mainly added it because I did not load all of that context. So using AS_IF seemed safer to me. If you ensure that PKG_PROG_PKG_CONFIG is called explicitly, AS_IF is not needed.</p>
<p>Thanks again.</p>