Summary: | libtool.eclass: cross/2.4.3 patch does not suffice for dev-scheme/guile-1.8.8-r2 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Gerhard Bräunlich <g.braeunlich> |
Component: | Eclasses | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | chewi, joakim.tjernlund, sam |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=572038 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Improved patch for eclass/ELT-patches/cross/2.4.3
patch for econf in phase-helpers.sh |
#572038 seems to be related This also fixed net-libs/gnutls-3.4.14 for me. I'm a little rusty on this stuff but I think this makes sense. Not for me to decide though. :) I suspect this SYSROOT stuff (as in ${lt_sysroot:-${SYSROOT}) is doomed unless it is applied everywhere in libtool. Why not make sure libtool is called with --with-sysroot=$SYSROOT instead? (In reply to Joakim Tjernlund from comment #4) > I suspect this SYSROOT stuff (as in ${lt_sysroot:-${SYSROOT}) is doomed > unless it is applied everywhere in libtool. > Why not make sure libtool is called with --with-sysroot=$SYSROOT instead? Good point. Is the problem here that configure isn't being given --with-sysroot=$SYSROOT in the first place? In that case, I don't agree with this. I really want to see this added by default where supported for cross stuff and I gather the prefix guys want it too. We can check for its presence in --help like we already do for --docdir. (In reply to James Le Cuirot from comment #5) > (In reply to Joakim Tjernlund from comment #4) > > I suspect this SYSROOT stuff (as in ${lt_sysroot:-${SYSROOT}) is doomed > > unless it is applied everywhere in libtool. > > Why not make sure libtool is called with --with-sysroot=$SYSROOT instead? > > Good point. Is the problem here that configure isn't being given > --with-sysroot=$SYSROOT in the first place? I suspect so no sysroot at all > In that case, I don't agree with > this. I really want to see this added by default where supported for cross > stuff and I gather the prefix guys want it too. We can check for its > presence in --help like we already do for --docdir. That is what I meant actually. cross tools/crossdev should configure sysroot, default it should pint to the standard sysroot under /usr/xxxxx-linux-gnu/ Not sure if there is a need for dynamic sysrooting using $SYSROOT too? (In reply to Joakim Tjernlund from comment #6) > That is what I meant actually. cross tools/crossdev should configure > sysroot, default it should pint to the standard sysroot under > /usr/xxxxx-linux-gnu/ > Not sure if there is a need for dynamic sysrooting using $SYSROOT too? Yes please, I don't build stuff in that location. (In reply to James Le Cuirot from comment #7) > (In reply to Joakim Tjernlund from comment #6) > > That is what I meant actually. cross tools/crossdev should configure > > sysroot, default it should pint to the standard sysroot under > > /usr/xxxxx-linux-gnu/ > > Not sure if there is a need for dynamic sysrooting using $SYSROOT too? > > Yes please, I don't build stuff in that location. Do you have portage make.conf for that ? If so you can add EXTRA_ECONF=--with-sysroot=/your/sysroot (In reply to Joakim Tjernlund from comment #8) > (In reply to James Le Cuirot from comment #7) > > (In reply to Joakim Tjernlund from comment #6) > > > That is what I meant actually. cross tools/crossdev should configure > > > sysroot, default it should pint to the standard sysroot under > > > /usr/xxxxx-linux-gnu/ > > > Not sure if there is a need for dynamic sysrooting using $SYSROOT too? > > > > Yes please, I don't build stuff in that location. > > Do you have portage make.conf for that ? > If so you can add EXTRA_ECONF=--with-sysroot=/your/sysroot Unfortunately older configure scripts don't support --with-sysroot so you can't blindly pass it all the time. (In reply to James Le Cuirot from comment #9) > (In reply to Joakim Tjernlund from comment #8) > > (In reply to James Le Cuirot from comment #7) > > > (In reply to Joakim Tjernlund from comment #6) > > > > That is what I meant actually. cross tools/crossdev should configure > > > > sysroot, default it should pint to the standard sysroot under > > > > /usr/xxxxx-linux-gnu/ > > > > Not sure if there is a need for dynamic sysrooting using $SYSROOT too? > > > > > > Yes please, I don't build stuff in that location. > > > > Do you have portage make.conf for that ? > > If so you can add EXTRA_ECONF=--with-sysroot=/your/sysroot > > Unfortunately older configure scripts don't support --with-sysroot so you > can't blindly pass it all the time. You only pass it for cross builds and isn't unknown configure options ignored? Also, when cross compiling it is a bug in these old configure scripts that needs to be fixed. @Joakim Tjernlund and James Le Cuirot: The approach using --with-sysroot sounds very reasonable to me. In any case having this feature won't hurt. I'd like to prepare a draft. What would you say: Which is the place to put it in? The src_configure of autotools-utils.elass would not suffice, because many ebuilds like gnutls call econf directly. Changing econf in phase-helpers.sh directly is too drastically in my opinion. Is there some other possibility? (In reply to Joakim Tjernlund from comment #10) > You only pass it for cross builds and isn't unknown configure options > ignored? I seem to recall that passing this to scripts that didn't support it made them blow up, which is why I dealt with it the way I did in cross-boss. On the other hand, I have seen non-fatal warnings about unsupported options before. I may struggle to find an example of a script that doesn't support it now. > Also, when cross compiling it is a bug in these old configure scripts > that needs to be fixed. (In reply to Gerhard Bräunlich from comment #11) > Changing econf in phase-helpers.sh directly is too drastically in my opinion. I think econf would be appropriate and it may not need a PMS change. PMS says what options you must pass to econf but it doesn't say you can't pass additional ones beyond what the ebuild itself passes. Created attachment 444914 [details, diff]
patch for econf in phase-helpers.sh
Tested with gnutls. Works for armv6j-hardfloat-linux-gnueabi (cross-compiling) and x86_64-pc-linux-gnu (ordinary emerge).
(In reply to James Le Cuirot from comment #12) > I think econf would be appropriate and it may not need a PMS change. PMS > says what options you must pass to econf but it doesn't say you can't pass > additional ones beyond what the ebuild itself passes. @James Le Cuirot: What do you think about the patch? I saw, that at the position where I inserted the check, whether the configure script accepts "--with-sysroot", there are only calls of "___eapi_" functions. Do we have to introduce a new one for the sysroot fix? Should I post the patch to the gentoo-dev mailinglist? Or what would you suggest? (In reply to Gerhard Bräunlich from comment #14) > (In reply to James Le Cuirot from comment #12) > > I think econf would be appropriate and it may not need a PMS change. PMS > > says what options you must pass to econf but it doesn't say you can't pass > > additional ones beyond what the ebuild itself passes. > > @James Le Cuirot: > What do you think about the patch? I saw, that at the position where I > inserted the check, whether the configure script accepts "--with-sysroot", > there are only calls of "___eapi_" functions. Do we have to introduce a new > one for the sysroot fix? > Should I post the patch to the gentoo-dev mailinglist? > Or what would you suggest? As of EAPI 7, it's required. Do we actually need the libtool patch still? I'm not sure what you mean by "required", but I did make econf pass --with-sysroot where it's supported under EAPI 7. Sorry to forgetting to update the situation here. Given that EAPI 7 is usually needed for cross to work properly, I think we're done here. (In reply to James Le Cuirot from comment #16) > I'm not sure what you mean by "required", but I did make econf pass > --with-sysroot where it's supported under EAPI 7. Sorry to forgetting to > update the situation here. Given that EAPI 7 is usually needed for cross to > work properly, I think we're done here. PMS requires passing it in newer EAPIs where appropriate, so there's no need for the patches previously discussed (as they're effectively merged), that's all. |
Created attachment 442402 [details, diff] Improved patch for eclass/ELT-patches/cross/2.4.3 After applying the suggested patch from #507156, cross-compiling dev-scheme/guile-1.8.8-r2 with crossdev, i.e. `armv6j-hardfloat-linux-gnueabi` still fails with /bin/sh ../libtool --tag=CC --mode=link armv6j-hardfloat-linux-gnueabi-gcc -pthread -O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard -Wall -Wmissing-prototypes -version-info 21:0:4 -export-dynamic -no-undefined -Wl,-O1 -Wl,--as-needed -o libguile.la -rpath /usr/lib libguile_la-alist.lo libguile_la-arbiters.lo libguile_la-async.lo libguile_la-backtrace.lo libguile_la-boolean.lo libguile_la-chars.lo libguile_la-continuations.lo libguile_la-convert.lo libguile_la-debug.lo libguile_la-deprecation.lo libguile_la-deprecated.lo libguile_la-discouraged.lo libguile_la-dynwind.lo libguile_la-environments.lo libguile_la-eq.lo libguile_la-error.lo libguile_la-eval.lo libguile_la-evalext.lo libguile_la-extensions.lo libguile_la-feature.lo libguile_la-fluids.lo libguile_la-fports.lo libguile_la-futures.lo libguile_la-gc.lo libguile_la-gc-mark.lo libguile_la-gc-segment.lo libguile_la-gc-malloc.lo libguile_la-gc-card.lo libguile_la-gc-freelist.lo libguile_la-gc_os_dep.lo libguile_la-gdbint.lo libguile_la-gh_data.lo libguile_la-gh_eval.lo libguile_la-gh_funcs.lo libguile_la-gh_init.lo libguile_la-gh_io.lo libguile_la-gh_list.lo libguile_la-gh_predicates.lo libguile_la-goops.lo libguile_la-gsubr.lo libguile_la-guardians.lo libguile_la-hash.lo libguile_la-hashtab.lo libguile_la-hooks.lo libguile_la-i18n.lo libguile_la-init.lo libguile_la-inline.lo libguile_la-ioext.lo libguile_la-keywords.lo libguile_la-lang.lo libguile_la-list.lo libguile_la-load.lo libguile_la-macros.lo libguile_la-mallocs.lo libguile_la-modules.lo libguile_la-numbers.lo libguile_la-objects.lo libguile_la-objprop.lo libguile_la-options.lo libguile_la-pairs.lo libguile_la-ports.lo libguile_la-print.lo libguile_la-procprop.lo libguile_la-procs.lo libguile_la-properties.lo libguile_la-random.lo libguile_la-rdelim.lo libguile_la-read.lo libguile_la-root.lo libguile_la-rw.lo libguile_la-scmsigs.lo libguile_la-script.lo libguile_la-simpos.lo libguile_la-smob.lo libguile_la-sort.lo libguile_la-srcprop.lo libguile_la-stackchk.lo libguile_la-stacks.lo libguile_la-stime.lo libguile_la-strings.lo libguile_la-srfi-4.lo libguile_la-srfi-13.lo libguile_la-srfi-14.lo libguile_la-strorder.lo libguile_la-strports.lo libguile_la-struct.lo libguile_la-symbols.lo libguile_la-threads.lo libguile_la-null-threads.lo libguile_la-throw.lo libguile_la-values.lo libguile_la-variable.lo libguile_la-vectors.lo libguile_la-version.lo libguile_la-vports.lo libguile_la-weaks.lo libguile_la-ramap.lo libguile_la-unif.lo dynl.lo filesys.lo posix.lo regex-posix.lo -lgmp -lcrypt -lm -lltdl libtool: link: armv6j-hardfloat-linux-gnueabi-gcc -shared -fPIC -DPIC .libs/libguile_la-alist.o .libs/libguile_la-arbiters.o .libs/libguile_la-async.o .libs/libguile_la-backtrace.o .libs/libguile_la-boolean.o .libs/libguile_la-chars.o .libs/libguile_la-continuations.o .libs/libguile_la-convert.o .libs/libguile_la-debug.o .libs/libguile_la-deprecation.o .libs/libguile_la-deprecated.o .libs/libguile_la-discouraged.o .libs/libguile_la-dynwind.o .libs/libguile_la-environments.o .libs/libguile_la-eq.o .libs/libguile_la-error.o .libs/libguile_la-eval.o .libs/libguile_la-evalext.o .libs/libguile_la-extensions.o .libs/libguile_la-feature.o .libs/libguile_la-fluids.o .libs/libguile_la-fports.o .libs/libguile_la-futures.o .libs/libguile_la-gc.o .libs/libguile_la-gc-mark.o .libs/libguile_la-gc-segment.o .libs/libguile_la-gc-malloc.o .libs/libguile_la-gc-card.o .libs/libguile_la-gc-freelist.o .libs/libguile_la-gc_os_dep.o .libs/libguile_la-gdbint.o .libs/libguile_la-gh_data.o .libs/libguile_la-gh_eval.o .libs/libguile_la-gh_funcs.o .libs/libguile_la-gh_init.o .libs/libguile_la-gh_io.o .libs/libguile_la-gh_list.o .libs/libguile_la-gh_predicates.o .libs/libguile_la-goops.o .libs/libguile_la-gsubr.o .libs/libguile_la-guardians.o .libs/libguile_la-hash.o .libs/libguile_la-hashtab.o .libs/libguile_la-hooks.o .libs/libguile_la-i18n.o .libs/libguile_la-init.o .libs/libguile_la-inline.o .libs/libguile_la-ioext.o .libs/libguile_la-keywords.o .libs/libguile_la-lang.o .libs/libguile_la-list.o .libs/libguile_la-load.o .libs/libguile_la-macros.o .libs/libguile_la-mallocs.o .libs/libguile_la-modules.o .libs/libguile_la-numbers.o .libs/libguile_la-objects.o .libs/libguile_la-objprop.o .libs/libguile_la-options.o .libs/libguile_la-pairs.o .libs/libguile_la-ports.o .libs/libguile_la-print.o .libs/libguile_la-procprop.o .libs/libguile_la-procs.o .libs/libguile_la-properties.o .libs/libguile_la-random.o .libs/libguile_la-rdelim.o .libs/libguile_la-read.o .libs/libguile_la-root.o .libs/libguile_la-rw.o .libs/libguile_la-scmsigs.o .libs/libguile_la-script.o .libs/libguile_la-simpos.o .libs/libguile_la-smob.o .libs/libguile_la-sort.o .libs/libguile_la-srcprop.o .libs/libguile_la-stackchk.o .libs/libguile_la-stacks.o .libs/libguile_la-stime.o .libs/libguile_la-strings.o .libs/libguile_la-srfi-4.o .libs/libguile_la-srfi-13.o .libs/libguile_la-srfi-14.o .libs/libguile_la-strorder.o .libs/libguile_la-strports.o .libs/libguile_la-struct.o .libs/libguile_la-symbols.o .libs/libguile_la-threads.o .libs/libguile_la-null-threads.o .libs/libguile_la-throw.o .libs/libguile_la-values.o .libs/libguile_la-variable.o .libs/libguile_la-vectors.o .libs/libguile_la-version.o .libs/libguile_la-vports.o .libs/libguile_la-weaks.o .libs/libguile_la-ramap.o .libs/libguile_la-unif.o .libs/dynl.o .libs/filesys.o .libs/posix.o .libs/regex-posix.o -Wl,--as-needed -lgmp -lcrypt -lm /usr/lib/libltdl.so -ldl -pthread -O2 -march=armv6j -mfpu=vfp -mfloat-abi=hard -Wl,-O1 -pthread -Wl,-soname -Wl,libguile.so.17 -o .libs/libguile.so.17.4.0 /usr/lib/libltdl.so: file not recognized: File format not recognized collect2: error: ld returned 1 exit status It seems that in libtool, the variable lt_sysroot is not set correctly. The current patch eclass/ELT-patches/cross/2.4.3 seems to address this by overriding this variable with SYSROOT if not set. However, when linking libraries, the variable lt_sysroot stays untouched, resulting in a host system libpath instead of the sysroot libpath. The following patch fixes the issue in my case.