All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] INSTALL for autotools packages with hardcoded '-s'
@ 2015-11-22 15:31 Jonathan Ben-Avraham
  2015-11-22 15:49 ` Yann E. MORIN
  2015-12-19 13:02 ` Thomas Petazzoni
  0 siblings, 2 replies; 7+ messages in thread
From: Jonathan Ben-Avraham @ 2015-11-22 15:31 UTC (permalink / raw)
  To: buildroot

From: Jonathan Ben Avraham <yba@tkos.co.il>

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

Signed-off-by: Jonathan Ben Avraham <yba@tkos.co.il>
---
 support/scripts/install-without-strip |   11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100755 support/scripts/install-without-strip

diff --git a/support/scripts/install-without-strip b/support/scripts/install-without-strip
new file mode 100755
index 0000000..f167c28
--- /dev/null
+++ b/support/scripts/install-without-strip
@@ -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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 1/1] INSTALL for autotools packages with hardcoded '-s'
  2015-11-22 15:31 [Buildroot] [PATCH 1/1] INSTALL for autotools packages with hardcoded '-s' Jonathan Ben-Avraham
@ 2015-11-22 15:49 ` Yann E. MORIN
  2015-11-22 16:00   ` Jonathan Ben Avraham
  2015-12-19 13:02 ` Thomas Petazzoni
  1 sibling, 1 reply; 7+ messages in thread
From: Yann E. MORIN @ 2015-11-22 15:49 UTC (permalink / raw)
  To: buildroot

Jonathan, All,

On 2015-11-22 17:31 +0200, Jonathan Ben-Avraham spake thusly:
> From: Jonathan Ben Avraham <yba@tkos.co.il>
> 
> 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...

> 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.

> Signed-off-by: Jonathan Ben Avraham <yba@tkos.co.il>
> ---
>  support/scripts/install-without-strip |   11 +++++++++++
>  1 file changed, 11 insertions(+)
>  create mode 100755 support/scripts/install-without-strip
> 
> diff --git a/support/scripts/install-without-strip b/support/scripts/install-without-strip
> new file mode 100755
> index 0000000..f167c28
> --- /dev/null
> +++ b/support/scripts/install-without-strip
> @@ -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

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 1/1] INSTALL for autotools packages with hardcoded '-s'
  2015-11-22 15:49 ` Yann E. MORIN
@ 2015-11-22 16:00   ` Jonathan Ben Avraham
  2015-11-22 16:15     ` Yann E. MORIN
  0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Ben Avraham @ 2015-11-22 16:00 UTC (permalink / raw)
  To: buildroot

Hi Yann,
See inlines below...

On Sun, 22 Nov 2015, Yann E. MORIN wrote:

> Date: Sun, 22 Nov 2015 16:49:13 +0100
> From: Yann E. MORIN <yann.morin.1998@free.fr>
> To: Jonathan Ben-Avraham <yba@tkos.co.il>
> Cc: buildroot at busybox.net
> Subject: Re: [Buildroot] [PATCH 1/1] INSTALL for autotools packages with
>     hardcoded '-s'
> 
> Jonathan, All,
>
> On 2015-11-22 17:31 +0200, Jonathan Ben-Avraham spake thusly:
>> From: Jonathan Ben Avraham <yba@tkos.co.il>
>>
>> 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.

> 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.

> Having this single patch on its own does not make sense. It needs to
> have users for it in the tree.
>
> However... See below...
>
>> 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?

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.

> (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)


> Regards,
> Yann E. MORIN.
>
>> Signed-off-by: Jonathan Ben Avraham <yba@tkos.co.il>
>> ---
>>  support/scripts/install-without-strip |   11 +++++++++++
>>  1 file changed, 11 insertions(+)
>>  create mode 100755 support/scripts/install-without-strip
>>
>> diff --git a/support/scripts/install-without-strip b/support/scripts/install-without-strip
>> new file mode 100755
>> index 0000000..f167c28
>> --- /dev/null
>> +++ b/support/scripts/install-without-strip
>> @@ -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
>
>

-- 
  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:benavrhm

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 1/1] INSTALL for autotools packages with hardcoded '-s'
  2015-11-22 16:00   ` Jonathan Ben Avraham
@ 2015-11-22 16:15     ` Yann E. MORIN
  0 siblings, 0 replies; 7+ messages in thread
From: Yann E. MORIN @ 2015-11-22 16:15 UTC (permalink / raw)
  To: buildroot

Jonathan, All,

On 2015-11-22 18:00 +0200, Jonathan Ben Avraham spake thusly:
> On Sun, 22 Nov 2015, Yann E. MORIN wrote:
> >Date: Sun, 22 Nov 2015 16:49:13 +0100
> >From: Yann E. MORIN <yann.morin.1998@free.fr>
> >To: Jonathan Ben-Avraham <yba@tkos.co.il>
> >Cc: buildroot at busybox.net
> >Subject: Re: [Buildroot] [PATCH 1/1] INSTALL for autotools packages with
> >    hardcoded '-s'
> >
> >Jonathan, All,
> >
> >On 2015-11-22 17:31 +0200, Jonathan Ben-Avraham spake thusly:
> >>From: Jonathan Ben Avraham <yba@tkos.co.il>
> >>
> >>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! :-)

> >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

> , 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--]
> >Could you not just set:
> >   YP_TOOLS_AUTORECONF = YES
> >   YPBIND_MT_AUTORECONF = YES
> >
> >to 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).

> >(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.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 1/1] INSTALL for autotools packages with hardcoded '-s'
  2015-11-22 15:31 [Buildroot] [PATCH 1/1] INSTALL for autotools packages with hardcoded '-s' Jonathan Ben-Avraham
  2015-11-22 15:49 ` Yann E. MORIN
@ 2015-12-19 13:02 ` Thomas Petazzoni
  2015-12-19 22:42   ` Jonathan Ben Avraham
  1 sibling, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2015-12-19 13:02 UTC (permalink / raw)
  To: buildroot

Jonathan,

On Sun, 22 Nov 2015 17:31:16 +0200, Jonathan Ben-Avraham wrote:
> From: Jonathan Ben Avraham <yba@tkos.co.il>
> 
> 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
> 
> Signed-off-by: Jonathan Ben Avraham <yba@tkos.co.il>
> ---
>  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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 1/1] INSTALL for autotools packages with hardcoded '-s'
  2015-12-19 13:02 ` Thomas Petazzoni
@ 2015-12-19 22:42   ` Jonathan Ben Avraham
  2015-12-20  8:38     ` Thomas Petazzoni
  0 siblings, 1 reply; 7+ messages in thread
From: Jonathan Ben Avraham @ 2015-12-19 22:42 UTC (permalink / raw)
  To: buildroot

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


On Sat, 19 Dec 2015, Thomas Petazzoni wrote:

> Date: Sat, 19 Dec 2015 14:02:42 +0100
> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> To: Jonathan Ben-Avraham <yba@tkos.co.il>
> Cc: buildroot at busybox.net
> Subject: Re: [Buildroot] [PATCH 1/1] INSTALL for autotools packages with
>     hardcoded '-s'
> 
> Jonathan,
>
> On Sun, 22 Nov 2015 17:31:16 +0200, Jonathan Ben-Avraham wrote:
>> From: Jonathan Ben Avraham <yba@tkos.co.il>
>>
>> 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
>>
>> Signed-off-by: Jonathan Ben Avraham <yba@tkos.co.il>
>> ---
>>  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
>

-- 
  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:benavrhm

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [PATCH 1/1] INSTALL for autotools packages with hardcoded '-s'
  2015-12-19 22:42   ` Jonathan Ben Avraham
@ 2015-12-20  8:38     ` Thomas Petazzoni
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2015-12-20  8:38 UTC (permalink / raw)
  To: buildroot

Jonathan,

On Sun, 20 Dec 2015 00:42:29 +0200 (IST), Jonathan Ben Avraham wrote:

> 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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-12-20  8:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-22 15:31 [Buildroot] [PATCH 1/1] INSTALL for autotools packages with hardcoded '-s' Jonathan Ben-Avraham
2015-11-22 15:49 ` Yann E. MORIN
2015-11-22 16:00   ` Jonathan Ben Avraham
2015-11-22 16:15     ` Yann E. MORIN
2015-12-19 13:02 ` Thomas Petazzoni
2015-12-19 22:42   ` Jonathan Ben Avraham
2015-12-20  8:38     ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.