Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 595942 - dev-scheme/guile - ./configure needs --without-*-prefix options for cross-compiling
Summary: dev-scheme/guile - ./configure needs --without-*-prefix options for cross-com...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Scheme Project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2016-10-02 15:48 UTC by James Le Cuirot
Modified: 2016-10-02 20:11 UTC (History)
0 users

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


Attachments
Patch using grep against 2.0.12-r1 (guile-without-prefix-grep.patch,480 bytes, patch)
2016-10-02 15:48 UTC, James Le Cuirot
Details | Diff
Patch without grep against 2.0.12-r1 (guile-without-prefix.patch,604 bytes, patch)
2016-10-02 15:49 UTC, James Le Cuirot
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Le Cuirot gentoo-dev 2016-10-02 15:48:31 UTC
Created attachment 448844 [details, diff]
Patch using grep against 2.0.12-r1

Some projects like guile and gnutls use gnulib's AC_LIB_HAVE_LINKFLAGS, which does silly things by default when trying to locate dependencies that break cross-compiling.

configure:46419: checking for libltdl
configure:46441: armv7a-hardfloat-linux-gnueabi-gcc -o conftest -mcpu=cortex-a9 -mfpu=neon -O3 -pipe  -Wl,-O1 -Wl,--as-needed conftest.c /usr/lib/libltdl.so /usr/lib/libdl.so  >&5
/usr/lib/libltdl.so: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status

Sane behaviour can be restored by passing the various --without-*-prefix options. This makes it trust the toolchain like most software does and this is beneficial for native, multilib, cross, and prefix situations.

To reduce the maintenance burden of having to check the list of flags on each release, you can do this instead.

$(./configure --help | grep -o -e '--without-[^ ]*-prefix\b')

I've included two patches with each approach so just pick the one you prefer.
Comment 1 James Le Cuirot gentoo-dev 2016-10-02 15:49:17 UTC
Created attachment 448846 [details, diff]
Patch without grep against 2.0.12-r1
Comment 2 Amy Liffey gentoo-dev 2016-10-02 20:11:03 UTC
committer	Amy Winston <amynka@gentoo.org>	2016-10-02 19:58:33 (GMT)
commit	b8dc70338e454eff146c7c5584a6b053ef37ea6b

dev-scheme/guile: fix cross compiling bug #595942

Thanks ! :)