Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 481696 - www-servers/lighttpd when cross-compiling, configure sets --target as program prefix
Summary: www-servers/lighttpd when cross-compiling, configure sets --target as program...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Markos Chandras (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-08-19 22:15 UTC by Rafal Lalik
Modified: 2017-07-25 22:48 UTC (History)
2 users (show)

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


Attachments
fix the program-prefix setting up when ./configure --target is set for cross-compiling (lighttpd-1.4.32-r2_target_prefix.patch,362 bytes, patch)
2013-08-19 22:15 UTC, Rafal Lalik
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rafal Lalik 2013-08-19 22:15:15 UTC
Created attachment 356450 [details, diff]
fix the program-prefix setting up when ./configure --target is set for cross-compiling

In the lighttpd configure script there are two ways to set program prefix:
* "--binary-prefix=foo" will generate foo-lighttpd{,-angel}, or if this is not set
* "--target=foo" where target is the machine for which we compile (when cross compiling) will also generate foo-lighttpd{,_angel}.

The latter comes from following lines in the configure script:
configure-2756-# The aliases save the names the user supplied, while $host
etc.
configure-2757-# will get canonicalized.
configure-2758-test -n "$target_alias" &&
configure:2759:  test "$program_prefix$program_suffix$program_transform_name"
= \
configure-2760-    NONENONEs,x,x, &&
configure:2761:  program_prefix=${target_alias}-

So when cross compiling, the executable will have prefix but this prefix will not be included in the /etc/init.d/lighttpd. I guess that most of the cases anyway we don't want this prefix.

Simple patch can fix this by setting dummy variable program_prefix_ which will not affect the program prefix. The latter one can be still set with --binary-prefix.

Behavior is reproducible always when cross-compiling (CTARGET!=CBUILD) and ./configure is called with --target parameter.

When testing be carefull, "make" will produce non-prefixed binaries, prefix is add when "make install" is called.

Rafal
Comment 1 zlg (RETIRED) gentoo-dev 2016-09-02 08:51:35 UTC
It's been over three years since this was reported. Do we still have this problem? I don't have the setup or the hardware to cross-compile.
Comment 2 zlg (RETIRED) gentoo-dev 2017-07-25 22:48:16 UTC
No further comments have been added in almost a year and newer lighttpd versions might fix it. Version 1.4.45 is the next version being considered for stabilization. Please test with that version, since older versions will be getting axed.

Closing for now; if this problem persists, please reopen.