INSTALL for autotools packages with hardcoded '-s'
PATCH 1/1 INSTALL for autotools packages with hardcoded '-s'
From: Jonathan Ben Avraham <[email protected]>
The Makefile.in's of some autotools packages such as yp-tools and ypbind-mt do not use the "install-sh" script for installing executables but instead call the detected BSD compatible 'install' binary directly with hardcoded '-s' parameter. This results in a build failure when the host 'strip' is invoked on binaries compiled for a different arch. The 'install-without-strip' script removes the '-s' parameter and execs the 'install' binary in PATH to solve this problem. These autotools packages can then be build under Buildroot by specifying <package>_CONF_ENV = INSTALL=support/scripts/install-without-strip
--- support/scripts/install-without-strip | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 support/scripts/install-without-strip
support/scripts/install-without-strip new file +11 -0
@@ -0,0 +1,11 @@ +#!/bin/sh -e +# Needed for autotools packages with hardcoded "install -s" + +INSTALL=$(which install) +if [ -x "${INSTALL}" ] +then + exec ${INSTALL} $(echo ${@} | sed 's/-s//g') +fi + +echo "error: $0 needs an executable \"install\" in PATH" +exit 1
Signature · 1 line
1.7.9.5
PATCH 1/1 INSTALL for autotools packages with hardcoded '-s'
Jonathan, All,
On 2015-11-22 17:31 +0200, Jonathan Ben-Avraham spake thusly:
Quoted 3 lines
From: Jonathan Ben Avraham <[email protected]>
The Makefile.in's of some autotools packages such as yp-tools and ypbind-mt do
Are you planning on submitting those two packages?
If so, you should probably have sent a patch series with this patch as patch 1/3, followed by patches 2/3 and 3/3 to add the two packages.
Having this single patch on its own does not make sense. It needs to have users for it in the tree.
However... See below...
Quoted 7 lines
not use the "install-sh" script for installing executables but instead call the detected BSD compatible 'install' binary directly with hardcoded '-s' parameter. This results in a build failure when the host 'strip' is invoked on binaries compiled for a different arch. The 'install-without-strip' script removes the '-s' parameter and execs the 'install' binary in PATH to solve this problem. These autotools packages can then be build under Buildroot by specifying <package>_CONF_ENV = INSTALL=support/scripts/install-without-strip
Could you not just set:
YP_TOOLS_AUTORECONF = YES
YPBIND_MT_AUTORECONF = YES
to force re-generation of the autostuff?
(Note: it will need to depend on host-gettext, since it wants to run autotopint)
Regards,
Yann E. MORIN.
Quoted 30 lines
Signed-off-by Jonathan Ben Avraham <[email protected]>--- support/scripts/install-without-strip | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 support/scripts/install-without-stripsupport/scripts/install-without-strip new file +11
-0@@ -0,0 +1,11 @@ +#!/bin/sh -e +# Needed for autotools packages with hardcoded "install -s" + +INSTALL=$(which install) +if [ -x "${INSTALL}" ] +then + exec ${INSTALL} $(echo ${@} | sed 's/-s//g') +fi + +echo "error: $0 needs an executable \"install\" in PATH" +exit 1Signature · 6 lines
1.7.9.5 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
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/1 INSTALL for autotools packages with hardcoded '-s'
Hi Yann,
See inlines below...
Quoted 7 lines · Yann E. MORIN
Date: Sun, 22 Nov 2015 16:49:13 +0100
From: Yann E. MORIN <[email protected]>
To: Jonathan Ben-Avraham <[email protected]>
Cc: buildroot at busybox.net
Subject: Re: [Buildroot] [PATCH 1/1] INSTALL for autotools packages with
hardcoded '-s'
Quoted 8 lines
Jonathan, All,
On 2015-11-22 17:31 +0200, Jonathan Ben-Avraham spake thusly:
Quoted 3 lines
From: Jonathan Ben Avraham <[email protected]>
The Makefile.in's of some autotools packages such as yp-tools and ypbind-mt do
Are you planning on submitting those two packages?
Yes, I have already tested them on an unsuspecting client.
Quoted 2 lines
If so, you should probably have sent a patch series with this patch as patch 1/3, followed by patches 2/3 and 3/3 to add the two packages.
Ok, that might solve the other problem I have been wrestling with, which is how to submit each package separately but add a top-level Config.in submenu called "NIS client" beneath "nfs-utils" that has both the yp-tools and ypbind-mt packages in the submenu.
Quoted 13 lines
Having this single patch on its own does not make sense. It needs to have users for it in the tree.
However... See below...
Quoted 7 lines
not use the "install-sh" script for installing executables but instead call the detected BSD compatible 'install' binary directly with hardcoded '-s' parameter. This results in a build failure when the host 'strip' is invoked on binaries compiled for a different arch. The 'install-without-strip' script removes the '-s' parameter and execs the 'install' binary in PATH to solve this problem. These autotools packages can then be build under Buildroot by specifying <package>_CONF_ENV = INSTALL=support/scripts/install-without-strip
Quoted 5 lines
Could you not just set:
YP_TOOLS_AUTORECONF= YES
YPBIND_MT_AUTORECONF= YESto force re-generation of the autostuff?
That's exactly what I do, but the problem is that the Makefile.in's have the -s parameter hardcoded. This is an old and well-known issue that has a patch for each of these packages in Yocto.
Quoted 2 lines
(Note: it will need to depend on host-gettext, since it wants to run autotopint)
I will study that again. I had thought that by configuring --without-nls I could avoid the gettext dependency. Maybe I didn't look carefully enough.
Many thanks for you input.
- yba (Jonathan)
Quoted 35 lines
Regards,
Yann E. MORIN.Quoted 30 lines
Signed-off-by Jonathan Ben Avraham <[email protected]>--- support/scripts/install-without-strip | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 support/scripts/install-without-stripsupport/scripts/install-without-strip new file +11
-1@@ -0,0 +1,11 @@ +#!/bin/sh -e +# Needed for autotools packages with hardcoded "install -s" + +INSTALL=$(which install) +if [ -x "${INSTALL}" ] +then + exec ${INSTALL} $(echo ${@} | sed 's/-s//g') +fi + +echo "error: $0 needs an executable \"install\" in PATH" +exit 1 --1.7.9.5
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 3 lines
9590 8E58 D30D 1660 C349 673D B205 4FC4 B8F5 B7F9 ~. .~ Tk Open Systems
=}-------- Jonathan Ben-Avraham ("yba") ----------ooO--U--Ooo------------{=
mailto:yba at tkos.co.il tel:+972.52.486.3386 http://tkos.co.il skype:benavrhmPATCH 1/1 INSTALL for autotools packages with hardcoded '-s'
Jonathan, All,
On 2015-11-22 18:00 +0200, Jonathan Ben Avraham spake thusly:
Quoted 10 lines · Yann E. MORIN
Quoted 9 lines
Date: Sun, 22 Nov 2015 16:49:13 +0100
From: Yann E. MORIN <[email protected]>
To: Jonathan Ben-Avraham <[email protected]>
Cc: buildroot at busybox.net
Subject: Re: [Buildroot] [PATCH 1/1] INSTALL for autotools packages with
hardcoded '-s'Jonathan, All,
Quoted 8 lines
Quoted 6 lines
On 2015-11-22 17:31 +0200, Jonathan Ben-Avraham spake thusly:
Quoted 3 lines
From: Jonathan Ben Avraham <[email protected]>
The Makefile.in's of some autotools packages such as yp-tools and ypbind-mt do
Are you planning on submitting those two packages?
Yes, I have already tested them on an unsuspecting client.
Muhahaha! :-)
Quoted 4 lines
Quoted 2 lines
If so, you should probably have sent a patch series with this patch as patch 1/3, followed by patches 2/3 and 3/3 to add the two packages.
Ok, that might solve the other problem I have been wrestling with
When you have multiple related changes to send, then you should send them as what we call a "series". See git-send-email on how to do so. We also have a blurb about that in our manual:
http://buildroot.org/manual.html#submitting-patches
Quoted 4 lines
, which is
how to submit each package separately but add a top-level Config.in submenu called "NIS client" beneath "nfs-utils" that has both the yp-tools and ypbind-mt packages in the submenu.
Do not add a sub-directory for this. We only add a sub-directory when we have a lot of packages of the same category (or when a single package has a lot of options). "A lot" being pretty arbitrary, but "two" is not "a lot".
[--SNIP--]
Quoted 9 lines
Quoted 5 lines
Could you not just set:
YP_TOOLS_AUTORECONF= YES
YPBIND_MT_AUTORECONF= YESto force re-generation of the autostuff?
That's exactly what I do, but the problem is that the Makefile.in's have the -s parameter hardcoded. This is an old and well-known issue that has a patch for each of these packages in Yocto.
Well, Makefile.in should be regenerated by autoreconf. Also, I've looked at the git trees of both projects, and could not spot any hard-coded '-s'.
(I tried to autoreconf them, too, but since my gettext is too old, it fails).
Quoted 5 lines
Quoted 2 lines
(Note: it will need to depend on host-gettext, since it wants to run autotopint)
I will study that again. I had thought that by configuring --without-nls I could avoid the gettext dependency. Maybe I didn't look carefully enough.
All I'm saying is that it is needed during autoreconf, hence the need for _host-gettext_ (the gettext for the host, not for the target).
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 1/1 INSTALL for autotools packages with hardcoded '-s'
In reply to Jonathan Ben-AvrahamJonathan,
Quoted 11 lines · Jonathan Ben-Avraham
From: Jonathan Ben Avraham <[email protected]>
The Makefile.in's of some autotools packages such as yp-tools and ypbind-mt do not use the "install-sh" script for installing executables but instead call the detected BSD compatible 'install' binary directly with hardcoded '-s' parameter. This results in a build failure when the host 'strip' is invoked on binaries compiled for a different arch. The 'install-without-strip' script removes the '-s' parameter and execs the 'install' binary in PATH to solve this problem. These autotools packages can then be build under Buildroot by specifying <package>_CONF_ENV = INSTALL=support/scripts/install-without-strip
Quoted 5 lines
Signed-off-by Jonathan Ben Avraham <[email protected]>--- support/scripts/install-without-strip | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 support/scripts/install-without-strip
Following the feedback and discussion with Yann, I've marked this patch as Changes Requested in our patch tracking system. I guess we will see what the proper solution for the problem will be when you submit the packages affected by the 'install -s' problem.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 INSTALL for autotools packages with hardcoded '-s'
Hi Thomas,
Summary: This patch is apparently no longer required.
The patch that I submitted seems to be the only way to fix the older autotools packages that have this problem with the hardcoded '-s'. I don't think that there is another solution that is simpler or cleaner.
I submitted the patch in preparation for the ypbind-mt and yp-tools packages that I made using the old tarfiles on
https://www.kernel.org/pub/linux/utils/net/NIS/. I had assumed that the presence of these tarballs on linux.org implied that they were the package versions that are blessed for use with Linux when in fact they appear to have been left on kernel.org there for the archeologists. Baruch pointed out to me what I had refused to believe beforehand, that the NIS upstream really is https://github.com/thkukuk.
The latest tagged commits for yp-tools and ypbind mount on
https://github.com/thkukuk have updated autotools configuration that do not require this '-s' patch. I built them last week for ARM using GCC 5.2 with built-in RPC and encountered a -Wcast-align bug for which I submitted a patch to Thorsten and which I included in my Buildroot ypbind-mt package (not yet submitted to this list) until the patch is accepted by Thorsten.
At this point what remains to do is for me to build and test autofs, and the newer yp-tools and ypbind-mt packages using the toolchain without RPC that you sent me and to verify that tirpc builds and works. I hope to finish this coming week. In the meantime the client who ordered the work is using the rootfs with the older versions of yp-tools and ypbind-mt that I built last month which seem to work just fine for his application.
Thanks,
- yba
Quoted 36 lines · Thomas Petazzoni
Date: Sat, 19 Dec 2015 14:02:42 +0100
From: Thomas Petazzoni <[email protected]>
To: Jonathan Ben-Avraham <[email protected]>
Cc: buildroot at busybox.net
Subject: Re: [Buildroot] [PATCH 1/1] INSTALL for autotools packages with
hardcoded '-s'Jonathan,
Quoted 11 lines · Jonathan Ben-Avraham
From: Jonathan Ben Avraham <[email protected]>
The Makefile.in's of some autotools packages such as yp-tools and ypbind-mt do not use the "install-sh" script for installing executables but instead call the detected BSD compatible 'install' binary directly with hardcoded '-s' parameter. This results in a build failure when the host 'strip' is invoked on binaries compiled for a different arch. The 'install-without-strip' script removes the '-s' parameter and execs the 'install' binary in PATH to solve this problem. These autotools packages can then be build under Buildroot by specifying <package>_CONF_ENV = INSTALL=support/scripts/install-without-strip
Quoted 5 lines
Signed-off-by Jonathan Ben Avraham <[email protected]>--- support/scripts/install-without-strip | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 support/scripts/install-without-stripFollowing the feedback and discussion with Yann, I've marked this patch as Changes Requested in our patch tracking system. I guess we will see what the proper solution for the problem will be when you submit the packages affected by the 'install -s' problem.
Best regards,
Thomas
Signature · 3 lines
9590 8E58 D30D 1660 C349 673D B205 4FC4 B8F5 B7F9 ~. .~ Tk Open Systems
=}-------- Jonathan Ben-Avraham ("yba") ----------ooO--U--Ooo------------{=
mailto:yba at tkos.co.il tel:+972.52.486.3386 http://tkos.co.il skype:benavrhmPATCH 1/1 INSTALL for autotools packages with hardcoded '-s'
Jonathan,
Quoted 6 lines · Jonathan Ben Avraham
At this point what remains to do is for me to build and test autofs, and the newer yp-tools and ypbind-mt packages using the toolchain without RPC that you sent me and to verify that tirpc builds and works. I hope to finish this coming week. In the meantime the client who ordered the work is using the rootfs with the older versions of yp-tools and ypbind-mt that I built last month which seem to work just fine for his application.
Thanks a lot for the feedback and background about the topic. Don't hesitate to submit the yp-tools and ypbind-mt packages when you have the time to do so.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com