rpath: fix fallout of check-host-rpath (branch yem/host-gawk)
cover rpath: fix fallout of check-host-rpath (branch yem/host-gawk)
Hello All!
This series, intended for master *and* a 2015.11.x maitenance branch, fixes two bugs related to the RPATH handling that we introduced in 2015.11.
The first is a trivial oversight in sanitising the host directory in the check-host-rpath script.
The second is more complex. It simply disables optional features of our host gawk when the user has gmp and mpfr or readline development files installed on its host system.
See the second commit log, the topic is fully explained there, and is not trivial to sumarise.
Regards,
Yann E. MORIN.
The following changes since commit 3f90e532ff48669873f682a4f0c3b6f0910cb2e9:
Update for 2015.11 (2015-11-30 23:13:41 +0100)
are available in the git repository at:
git://git.busybox.net/~ymorin/git/buildroot yem/host-gawk
for you to fetch changes up to 9cd7b6bdd9790d4105829b278c0e6acba9f103f3:
package/gawk: do not use readeline ormpfr in host variant (2015-12-01 22:56:50 +0100)
----------------------------------------------------------------
Yann E. MORIN (2):
support/check-host-rpath: remove trailing '/' in host dir package/gawk: do not use readeline ormpfr in host variant
package/gawk/gawk.mk | 4 +++- support/scripts/check-host-rpath | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-)
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/2 support/check-host-rpath: remove trailing '/' in host dir
Despite the comment saying so, the trailing '/' in the host directory is not removed. note however that it is properly removed from extracted RPATH tags.
This is not visible when the host directory is our default $(O)/host location, but breaks for user-supplied external host ditrectory, when the user leaves a trailing slash in the path.
Fix that.
---
Peter, for the maintenance branch over 2015.11.
Sorry for the mess, it's a case I did not test...
--- support/scripts/check-host-rpath | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
support/scripts/check-host-rpath +1 -1
@@ -14,7 +14,7 @@ main() { local file ret # Remove duplicate and trailing '/' for proper match - hostdir="$( sed -r -e 's:/+:/:g;' <<<"${hostdir}" )" + hostdir="$( sed -r -e 's:/+:/:g; s:/$::;' <<<"${hostdir}" )" ret=0 while read file; do
Signature · 1 line
1.9.1
PATCH 1/2 support/check-host-rpath: remove trailing '/' in host dir
Quoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
Despite the comment saying so, the trailing '/' in the host directory is not removed. note however that it is properly removed from extracted RPATH tags.
This is not visible when the host directory is our default $(O)/host location, but breaks for user-supplied external host ditrectory, when the user leaves a trailing slash in the path.
Fix that.
Quoted 7 lines
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Peter Korsgaard <[email protected]>Cc Thomas Petazzoni <[email protected]>---
Peter, for the maintenance branch over 2015.11.
Sorry for the mess, it's a case I did not test...
Committed, thanks.
I'll create a 2015.11.x branch and cherry pick it there as well.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 2/2 package/gawk: do not use readeline ormpfr in host variant
In reply to Yann E. MORINgawk has an optional dependency on mpfr (and thus gmp) and readline, and will probe for them. If they are present, they are used; if they are missing, that's not an error. mpfr (and gmp) is used for "BIGNUM" support on gawk; readline is used by the gawk debugger.
However, mpfr (bringing gmp) are also host-packages in Buildroot, but in the standard build order (i.e. a plain 'make'), they are built after gawk. Ditto readline (from ncurses).
If the user has the development files for gmp and mpfr, then gawk is linked to them. Ditto readline.
Now, further on in the build, we build gmp and mpfr (for gcci or guile), so we install them in the host dir. Ditto readline (for gdb, ncurses itself and a few other packages...)
But because we forcibly set an RPATH tag on all our host binaries, our host gawk will now dynamically link with our versions, when it was in fact built against the host ones.
This did not seem to cause any harm dso far, but is far from ideal.
Since we do not really need BIGNUM or the debugger in our host gawk, we just forcibly disable them and configure gawk without readline or mpfr (there's no switch for gmp, but it;s not a direct dependency, it comes just with mpfr).
---
Peter, that's also for the 2015.11.x maintenance branch.
--- package/gawk/gawk.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
package/gawk/gawk.mk +3 -1
@@ -16,9 +16,11 @@ ifeq ($(BR2_PACKAGE_BUSYBOX),y) GAWK_DEPENDENCIES += busybox endif -# We don't have a host-busybox +# We don't have a host-busybox, and we don't want to use mpfr HOST_GAWK_DEPENDENCIES = +HOST_GAWK_CONF_OPTS = --without-readline --without-mpfr + define GAWK_CREATE_SYMLINK ln -sf /usr/bin/gawk $(TARGET_DIR)/usr/bin/awk endef
Signature · 1 line
1.9.1
PATCH 2/2 package/gawk: do not use readeline ormpfr in host variant
Dear Yann E. MORIN,
Two typos in the commit title.
Quoted 16 lines · Yann E. MORIN
gawk has an optional dependency on mpfr (and thus gmp) and readline, and will probe for them. If they are present, they are used; if they are missing, that's not an error. mpfr (and gmp) is used for "BIGNUM" support on gawk; readline is used by the gawk debugger.
However, mpfr (bringing gmp) are also host-packages in Buildroot, but in the standard build order (i.e. a plain 'make'), they are built after gawk. Ditto readline (from ncurses).
If the user has the development files for gmp and mpfr, then gawk is linked to them. Ditto readline.
Now, further on in the build, we build gmp and mpfr (for gcci or guile), so we install them in the host dir. Ditto readline (for gdb, ncurses itself and a few other packages...)
Quoted 5 lines
But because we forcibly set an RPATH tag on all our host binaries, our host gawk will now dynamically link with our versions, when it was in fact built against the host ones.
This did not seem to cause any harm dso far, but is far from ideal.
dso -> so
Quoted 4 lines
Since we do not really need BIGNUM or the debugger in our host gawk, we just forcibly disable them and configure gawk without readline or mpfr (there's no switch for gmp, but it;s not a direct dependency, it comes
it;s -> it's
package/gawk/gawk.mk ifeq ($(BR2_PACKAGE_BUSYBOX),y) · line 19
Quoted 2 lines
package/gawk/gawk.mk +1
-1-# We don't have a host-busybox +# We don't have a host-busybox, and we don't want to use mpfr
Is the comment really important, especially when it talks about mpfr but not about readline ?
package/gawk/gawk.mk ifeq ($(BR2_PACKAGE_BUSYBOX),y) · line 23
Quoted 4 lines
HOST_GAWK_DEPENDENCIES=package/gawk/gawk.mk +2
-0+HOST_GAWK_CONF_OPTS = --without-readline --without-mpfr +
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 2/2 package/gawk: do not use readeline ormpfr in host variant
Thomas, All,
On 2015-12-01 23:22 +0100, Thomas Petazzoni spake thusly:
Quoted 30 lines · Yann E. MORIN
Quoted 16 lines
gawk has an optional dependency on mpfr (and thus gmp) and readline, and will probe for them. If they are present, they are used; if they are missing, that's not an error. mpfr (and gmp) is used for "BIGNUM" support on gawk; readline is used by the gawk debugger.
However, mpfr (bringing gmp) are also host-packages in Buildroot, but in the standard build order (i.e. a plain 'make'), they are built after gawk. Ditto readline (from ncurses).
If the user has the development files for gmp and mpfr, then gawk is linked to them. Ditto readline.
Now, further on in the build, we build gmp and mpfr (for gcci or guile), so we install them in the host dir. Ditto readline (for gdb, ncurses itself and a few other packages...)
Quoted 5 lines
But because we forcibly set an RPATH tag on all our host binaries, our host gawk will now dynamically link with our versions, when it was in fact built against the host ones.
This did not seem to cause any harm dso far, but is far from ideal.
dso -> so
Quoted 4 lines
Since we do not really need BIGNUM or the debugger in our host gawk, we just forcibly disable them and configure gawk without readline or mpfr (there's no switch for gmp, but it;s not a direct dependency, it comes
Quoted 7 lines
it;s -> it's
package/gawk/gawk.mk ifeq ($(BR2_PACKAGE_BUSYBOX),y) · line 19
Quoted 2 lines
package/gawk/gawk.mk +1
-1-# We don't have a host-busybox +# We don't have a host-busybox, and we don't want to use mpfrIs the comment really important, especially when it talks about mpfr but not about readline ?
Or just append 'or readline' to the comment.
Thanks!
Regards,
Yann E. MORIN.
Quoted 10 lines
package/gawk/gawk.mk ifeq ($(BR2_PACKAGE_BUSYBOX),y) · line 23
Quoted 4 lines
HOST_GAWK_DEPENDENCIES=package/gawk/gawk.mk +2
-0+HOST_GAWK_CONF_OPTS = --without-readline --without-mpfr +Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 2/2 package/gawk: do not use readeline ormpfr in host variant
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
Hi,
Quoted 7 lines
Quoted 5 lines
package/gawk/gawk.mk ifeq ($(BR2_PACKAGE_BUSYBOX),y) · line 19
Quoted 2 lines
package/gawk/gawk.mk +1
-1-# We don't have a host-busybox +# We don't have a host-busybox, and we don't want to use mpfrIs the comment really important, especially when it talks about mpfr but not about readline ?
Or just append 'or readline' to the comment.
But we _DO_ have a host-readline?
Signature · 1 line
Bye, Peter Korsgaard
PATCH 2/2 package/gawk: do not use readeline ormpfr in host variant
Peter, All,
On 2015-12-02 23:34 +0100, Peter Korsgaard spake thusly:
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
Hi,
Quoted 5 lines
Quoted 5 lines
package/gawk/gawk.mk ifeq ($(BR2_PACKAGE_BUSYBOX),y) · line 19
Quoted 2 lines
package/gawk/gawk.mk +1
-1-# We don't have a host-busybox +# We don't have a host-busybox, and we don't want to use mpfrIs the comment really important, especially when it talks about mpfr but not about readline ?
Quoted 3 lines
Quoted 1 line
Or just append 'or readline' to the comment.
But we _DO_ have a host-readline?
Yes, but we do not need it for the our host-gawk (or glibc would have been broken quite a long time ago). And since it is a host package, we do not usually enable unneeded features.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 2/2 package/gawk: do not use readeline ormpfr in host variant
In reply to Yann E. MORINQuoted 29 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
gawk has an optional dependency on mpfr (and thus gmp) and readline, and will probe for them. If they are present, they are used; if they are missing, that's not an error. mpfr (and gmp) is used for "BIGNUM" support on gawk; readline is used by the gawk debugger.
However, mpfr (bringing gmp) are also host-packages in Buildroot, but in the standard build order (i.e. a plain 'make'), they are built after gawk. Ditto readline (from ncurses).
If the user has the development files for gmp and mpfr, then gawk is linked to them. Ditto readline.
Now, further on in the build, we build gmp and mpfr (for gcci or guile), so we install them in the host dir. Ditto readline (for gdb, ncurses itself and a few other packages...)
But because we forcibly set an RPATH tag on all our host binaries, our host gawk will now dynamically link with our versions, when it was in fact built against the host ones.
This did not seem to cause any harm dso far, but is far from ideal.
Since we do not really need BIGNUM or the debugger in our host gawk, we just forcibly disable them and configure gawk without readline or mpfr (there's no switch for gmp, but it;s not a direct dependency, it comes just with mpfr).
Quoted 6 lines
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Peter Korsgaard <[email protected]>Cc Thomas Petazzoni <[email protected]>---
Peter, that's also for the 2015.11.x maintenance branch.
Committed, thanks - And I'll also cherry pick this.
Not directly related to this, but we should probably also explictly handle the readline/mpfr dependencies for the target gawk.
Signature · 1 line
Bye, Peter Korsgaard