Skip to contentSkip to conversation

Use the original install-sh file from SGI

PATCH In review Theodore Ts'o 3 participants 4 messages May 3, 2018 – May 5, 2018 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Use the original install-sh file from SGI

The install-sh file is much more efficient than the libtool version (50% faster wall clock time; much more than that when running in a qemu emulation build environment). There doesn't seem to be any real need for the libtool version, so bring back the original install-sh script.

---

A very large amount of time when running "make install" in a build chroot using qemu emulation, such as constructed by running "sudo setup-buildchroot --arch-armhf" using the script found here[1] is in running the install-sh provided by libtool, which is amazing bloated and forks a crazy number of processes to do something very simple.

As near as I can tell there is zero benefit in using the install-sh provided by libtool, so restore the version that SGI originally used.

[1] https://github.com/tytso/xfstests-bld/blob/master/setup-buildchroot

 .gitignore |   1 -
 install-sh | 351 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 351 insertions(+), 1 deletion(-)
 create mode 100755 install-sh
.gitignore +0 -1
index 192ca35e..dfd3da7d 100644
@@ -24,7 +24,6 @@
 
 # libtool
 /libtool
-/install-sh
 /ltmain.sh
 
 # build system
install-sh new file +351 -0

351 lines not on this page · raw message

Signature · 1 line
2.16.1.72.g5be1f00a9a
#1 lore raw
Quoted 9 lines · Theodore Ts'o

The install-sh file is much more efficient than the libtool version (50% faster wall clock time; much more than that when running in a qemu emulation build environment). There doesn't seem to be any real need for the libtool version, so bring back the original install-sh script.

---

Quoted 8 lines

A very large amount of time when running "make install" in a build chroot using qemu emulation, such as constructed by running "sudo setup-buildchroot --arch-armhf" using the script found here[1] is in running the install-sh provided by libtool, which is amazing bloated and forks a crazy number of processes to do something very simple.

As near as I can tell there is zero benefit in using the install-sh provided by libtool, so restore the version that SGI originally used.

This saves me 8s on 'make install' (23s -> 15s).

But one problem with this is that after every 'make', install-sh is overwritten & modified by 'libtoolize -cfi', and git diff complains about the change.

I think we could follow what xfsprogs does on this, that puts install-sh in include dir and copy it from there after it's overwritten by libtoolize.

Quoted 14 lines

[1] https://github.com/tytso/xfstests-bld/blob/master/setup-buildchroot

 .gitignore |   1 -
 install-sh | 351 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 351 insertions(+), 1 deletion(-)
 create mode 100755 install-sh
.gitignore +0 -0
index 192ca35e..dfd3da7d 100644

.gitignore line 27

Quoted 4 lines
.gitignore +0 -1
@@ -24,7 +24,6 @@
 
 # libtool
 /libtool
-/install-sh

Then we don't need this change.

So the patch would be like:

Makefile +1 -0
index d97385f90142..1064984573be 100644
@@ -80,6 +80,7 @@ endif
 
 configure: configure.ac
        libtoolize -cfi
+       cp include/install-sh .
        aclocal -I m4
        autoheader
        autoconf
include/install-sh new file +0 -0
new file mode 100755
index 000000000000..06d8aa9b6b9c

<new file content here>

This looks like a straightforward change, I can fix it on commit if the change looks sane to you.

Thanks,
Eryu

#2 lore raw
Quoted 6 lines · Eryu Guan

I think we could follow what xfsprogs does on this, that puts install-sh in include dir and copy it from there after it's overwritten by libtoolize.

This looks like a straightforward change, I can fix it on commit if the change looks sane to you.

Sounds good to me. Thanks!!

- Ted

Reviewed-by Eryu Guan on v1 1/1
#3 lore raw
In reply to Theodore Ts'o
Quoted 15 lines · Theodore Ts'o

The install-sh file is much more efficient than the libtool version (50% faster wall clock time; much more than that when running in a qemu emulation build environment). There doesn't seem to be any real need for the libtool version, so bring back the original install-sh script.

---

A very large amount of time when running "make install" in a build chroot using qemu emulation, such as constructed by running "sudo setup-buildchroot --arch-armhf" using the script found here[1] is in running the install-sh provided by libtool, which is amazing bloated and forks a crazy number of processes to do something very simple.

Quoted 4 lines

As near as I can tell there is zero benefit in using the install-sh provided by libtool, so restore the version that SGI originally used.

[1] https://github.com/tytso/xfstests-bld/blob/master/setup-buildchroot

Does this break cross-compilation for chromeeOS?

I ask, because that is why the hard coded install-sh was originally replaced by the libtool provided one last year:

commit 5d20084fefaf09e86be26d7c71bd1c7ac2a2b35c

Author: Gwendal Grignou <[email protected]>
Date:   Wed Apr 19 16:33:48 2017 -0700

build: allow cros-compilation on chromeOS

- Request LIBTOOL to be used
- Set topbuildir based on a Makefile variable to call libtool
- Use /usr/local instead of /var for xfstest final location
- Move macros from aclocal.m4 to acinclude.m4, aclocal.m4 is autogenerated.
- Use autoconf variables @prefix@, @exec_prefix@.

The regular way of compiling xfstests - make - remains. But it now runs autoreconf and libtoolize -i to produce a valid configure.
Verified with 'make install --dry-run' that files are installed at the same place.
Verified compiling in chromeOS chroot works as well.

[eguan: resolve merge conflicts and update .gitignore and remove generated files by realclean]

Cheers,

Dave.

Signature · 2 lines
Dave Chinner
[email protected]