Re: INSTALL_TARGET=install-strip runs into "permission denied"
On Mon, 24 Apr 2017 21:03:22 +0200 (CEST) Gerald Pfeiferwrote: > On Sun, 23 Apr 2017, Tijl Coosemans wrote: >>> [ https://reviews.freebsd.org/D10357 ] >> Yes, but in my opinion we should stop relying on upstream build systems >> to get stripping right and let bsd.port.mk strip ELF files after staging. >> It's less work for maintainers. Then instead of stripping, bsd.port.mk >> could also extract debug symbols into separate files and put them into a >> debug subpackage. > > Yes, that sounds a lot more reliable and maintainable (and overall > less work compared to patching hundreds of ports). > > Until something like this is in place, should we ignore those > complaints from the QA framework or patch individual ports? That's not my decision to make. It's not that important for gcc I think. The only reason to strip files is to make them a bit smaller and gcc is not going to be installed on space constrained systems where this matters. ___ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: INSTALL_TARGET=install-strip runs into "permission denied"
On Sun, 23 Apr 2017, Tijl Coosemans wrote: >> [ https://reviews.freebsd.org/D10357 ] > Yes, but in my opinion we should stop relying on upstream build systems > to get stripping right and let bsd.port.mk strip ELF files after staging. > It's less work for maintainers. Then instead of stripping, bsd.port.mk > could also extract debug symbols into separate files and put them into a > debug subpackage. Yes, that sounds a lot more reliable and maintainable (and overall less work compared to patching hundreds of ports). Until something like this is in place, should we ignore those complaints from the QA framework or patch individual ports? Gerald ___ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: INSTALL_TARGET=install-strip runs into "permission denied"
On Sat, 22 Apr 2017 22:37:57 +0200 (CEST) Gerald Pfeiferwrote: > [ Old thread alert, but still relevant. ] > > On Mon, 19 Jan 2015, Tijl Coosemans wrote: > install -m 555 mkheaders > .../prefix/gcc5/libexec/gcc5/gcc/i386-portbld-freebsd10.1/5.0.0/install-tools/mkheaders > test -z 'strip' || strip > .../prefix/gcc5/libexec/gcc5/gcc/i386-portbld-freebsd10.1/5.0.0/install-tools/fixincl > strip: unable to copy file > '.../prefix/gcc5/libexec/gcc5/gcc/i386-portbld-freebsd10.1/5.0.0/install-tools/fixincl'; > reason: Permission denied > Makefile:191: recipe for target 'install-strip' failed > gmake[3]: *** [install-strip] Error 1 This strip command seems redundant. Isn't fixincl already stripped by the "install -s" command above? >>> Good point. >>> What does this piece of the log look like outside the ports framework? >>> >>> /usr/bin/install -c fixinc.sh >>> .../gcc-ref8-amd64/libexec/gcc/x86_64-unknown-freebsd8.4/5.0.0/install-tools/fixinc.sh >>> /usr/bin/install -c fixincl >>> .../gcc-ref8-amd64/libexec/gcc/x86_64-unknown-freebsd8.4/5.0.0/install-tools/fixincl >>> /usr/bin/install -c mkheaders >>> .../gcc-ref8-amd64/libexec/gcc/x86_64-unknown-freebsd8.4/5.0.0/install-tools/mkheaders >>> test -z 'strip' || strip >>> .../gcc-ref8-amd64/libexec/gcc/x86_64-unknown-freebsd8.4/5.0.0/install-tools/fixincl >>> gmake[2]: Leaving directory '.../OBJ-0118-1528/fixincludes' >>> >>> (I also tried setting STRIP_CMD to true, alas that is not used by GCC.) >> Try adding BINMODE=755 to the port Makefile or STRIP=true to CONFIGURE_ARGS > > Both of these allow the build to succeed as a regular user (non-root), > when INSTALL_TARGET=install-strip is set. > > Alas with STRIP=true many files end up being not stripped, whereas with > the BINMODE setting the list is down to one file. > > This appears to be the case since various aspects of GCC do not use our > install-* tools, but a script install-sh (which you can find at the root > of the GCC source tree that uses cp, chmod, strip,... for compatibility > reasons with many systems). > > So I guess setting BINMODE=755 is the best option if we want binaries > and libraries in the gcc* ports stripped? > > > (This is now also tracked in https://reviews.freebsd.org/D10357 where > miwi proposed a patch originally.) Yes, but in my opinion we should stop relying on upstream build systems to get stripping right and let bsd.port.mk strip ELF files after staging. It's less work for maintainers. Then instead of stripping, bsd.port.mk could also extract debug symbols into separate files and put them into a debug subpackage. Using something like this: objcopy --only-keep-debug file file.debug objcopy -S --add-gnu-debuglink=file.debug file ___ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: INSTALL_TARGET=install-strip runs into "permission denied"
[ Old thread alert, but still relevant. ] On Mon, 19 Jan 2015, Tijl Coosemans wrote: install -m 555 mkheaders .../prefix/gcc5/libexec/gcc5/gcc/i386-portbld-freebsd10.1/5.0.0/install-tools/mkheaders test -z 'strip' || strip .../prefix/gcc5/libexec/gcc5/gcc/i386-portbld-freebsd10.1/5.0.0/install-tools/fixincl strip: unable to copy file '.../prefix/gcc5/libexec/gcc5/gcc/i386-portbld-freebsd10.1/5.0.0/install-tools/fixincl'; reason: Permission denied Makefile:191: recipe for target 'install-strip' failed gmake[3]: *** [install-strip] Error 1 >>> This strip command seems redundant. Isn't fixincl already stripped by >>> the "install -s" command above? >> Good point. >> >>> What does this piece of the log look like outside the ports framework? >> >> /usr/bin/install -c fixinc.sh >> .../gcc-ref8-amd64/libexec/gcc/x86_64-unknown-freebsd8.4/5.0.0/install-tools/fixinc.sh >> /usr/bin/install -c fixincl >> .../gcc-ref8-amd64/libexec/gcc/x86_64-unknown-freebsd8.4/5.0.0/install-tools/fixincl >> /usr/bin/install -c mkheaders >> .../gcc-ref8-amd64/libexec/gcc/x86_64-unknown-freebsd8.4/5.0.0/install-tools/mkheaders >> test -z 'strip' || strip >> .../gcc-ref8-amd64/libexec/gcc/x86_64-unknown-freebsd8.4/5.0.0/install-tools/fixincl >> gmake[2]: Leaving directory '.../OBJ-0118-1528/fixincludes' >> >> (I also tried setting STRIP_CMD to true, alas that is not used by GCC.) > Try adding BINMODE=755 to the port Makefile or STRIP=true to CONFIGURE_ARGS Both of these allow the build to succeed as a regular user (non-root), when INSTALL_TARGET=install-strip is set. Alas with STRIP=true many files end up being not stripped, whereas with the BINMODE setting the list is down to one file. This appears to be the case since various aspects of GCC do not use our install-* tools, but a script install-sh (which you can find at the root of the GCC source tree that uses cp, chmod, strip,... for compatibility reasons with many systems). So I guess setting BINMODE=755 is the best option if we want binaries and libraries in the gcc* ports stripped? (This is now also tracked in https://reviews.freebsd.org/D10357 where miwi proposed a patch originally.) Gerald ___ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: INSTALL_TARGET=install-strip runs into permission denied
On Sun, 18 Jan 2015 23:13:56 +0100 (CET) Gerald Pfeifer ger...@pfeifer.com wrote: On Sunday 2015-01-18 13:01, Tijl Coosemans wrote: Here is the build log: install -m 555 fixinc.sh .../prefix/gcc5/libexec/gcc5/gcc/i386-portbld-freebsd10.1/5.0.0/install-tools/fixinc.sh install -s -m 555 fixincl .../prefix/gcc5/libexec/gcc5/gcc/i386-portbld-freebsd10.1/5.0.0/install-tools/fixincl install -m 555 mkheaders .../prefix/gcc5/libexec/gcc5/gcc/i386-portbld-freebsd10.1/5.0.0/install-tools/mkheaders test -z 'strip' || strip .../prefix/gcc5/libexec/gcc5/gcc/i386-portbld-freebsd10.1/5.0.0/install-tools/fixincl strip: unable to copy file '.../prefix/gcc5/libexec/gcc5/gcc/i386-portbld-freebsd10.1/5.0.0/install-tools/fixincl'; reason: Permission denied Makefile:191: recipe for target 'install-strip' failed gmake[3]: *** [install-strip] Error 1 This strip command seems redundant. Isn't fixincl already stripped by the install -s command above? Good point. What does this piece of the log look like outside the ports framework? /usr/bin/install -c fixinc.sh .../gcc-ref8-amd64/libexec/gcc/x86_64-unknown-freebsd8.4/5.0.0/install-tools/fixinc.sh /usr/bin/install -c fixincl .../gcc-ref8-amd64/libexec/gcc/x86_64-unknown-freebsd8.4/5.0.0/install-tools/fixincl /usr/bin/install -c mkheaders .../gcc-ref8-amd64/libexec/gcc/x86_64-unknown-freebsd8.4/5.0.0/install-tools/mkheaders test -z 'strip' || strip .../gcc-ref8-amd64/libexec/gcc/x86_64-unknown-freebsd8.4/5.0.0/install-tools/fixincl gmake[2]: Leaving directory '.../OBJ-0118-1528/fixincludes' (I also tried setting STRIP_CMD to true, alas that is not used by GCC.) Try adding BINMODE=755 to the port Makefile or STRIP=true to CONFIGURE_ARGS ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: INSTALL_TARGET=install-strip runs into permission denied
On Sun, 18 Jan 2015 12:18:27 +0100 (CET) Gerald Pfeifer ger...@pfeifer.com wrote: The ports q/a framework has been suggesting this for a while, so I added INSTALL_TARGET=install-strip to lang/gcc5/Makefile. Using install-strip for vanilla GCC builds (from source, outside the FreeBSD Ports framework) works just fine. In the context of Ports this runs into a permission problem since install sets binaries to r-x, at which point strip then fails. Here is the build log: install -m 555 fixinc.sh .../prefix/gcc5/libexec/gcc5/gcc/i386-portbld-freebsd10.1/5.0.0/install-tools/fixinc.sh install -s -m 555 fixincl .../prefix/gcc5/libexec/gcc5/gcc/i386-portbld-freebsd10.1/5.0.0/install-tools/fixincl install -m 555 mkheaders .../prefix/gcc5/libexec/gcc5/gcc/i386-portbld-freebsd10.1/5.0.0/install-tools/mkheaders test -z 'strip' || strip .../prefix/gcc5/libexec/gcc5/gcc/i386-portbld-freebsd10.1/5.0.0/install-tools/fixincl strip: unable to copy file '.../prefix/gcc5/libexec/gcc5/gcc/i386-portbld-freebsd10.1/5.0.0/install-tools/fixincl'; reason: Permission denied Makefile:191: recipe for target 'install-strip' failed gmake[3]: *** [install-strip] Error 1 This strip command seems redundant. Isn't fixincl already stripped by the install -s command above? What does this piece of the log look like outside the ports framework? ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
INSTALL_TARGET=install-strip runs into permission denied
The ports q/a framework has been suggesting this for a while, so I added INSTALL_TARGET=install-strip to lang/gcc5/Makefile. Using install-strip for vanilla GCC builds (from source, outside the FreeBSD Ports framework) works just fine. In the context of Ports this runs into a permission problem since install sets binaries to r-x, at which point strip then fails. Here is the build log: install -m 555 fixinc.sh .../prefix/gcc5/libexec/gcc5/gcc/i386-portbld-freebsd10.1/5.0.0/install-tools/fixinc.sh install -s -m 555 fixincl .../prefix/gcc5/libexec/gcc5/gcc/i386-portbld-freebsd10.1/5.0.0/install-tools/fixincl install -m 555 mkheaders .../prefix/gcc5/libexec/gcc5/gcc/i386-portbld-freebsd10.1/5.0.0/install-tools/mkheaders test -z 'strip' || strip .../prefix/gcc5/libexec/gcc5/gcc/i386-portbld-freebsd10.1/5.0.0/install-tools/fixincl strip: unable to copy file '.../prefix/gcc5/libexec/gcc5/gcc/i386-portbld-freebsd10.1/5.0.0/install-tools/fixincl'; reason: Permission denied Makefile:191: recipe for target 'install-strip' failed gmake[3]: *** [install-strip] Error 1 How do we best go about this? Gerald ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org
Re: INSTALL_TARGET=install-strip runs into permission denied
On Sunday 2015-01-18 13:01, Tijl Coosemans wrote: Here is the build log: install -m 555 fixinc.sh .../prefix/gcc5/libexec/gcc5/gcc/i386-portbld-freebsd10.1/5.0.0/install-tools/fixinc.sh install -s -m 555 fixincl .../prefix/gcc5/libexec/gcc5/gcc/i386-portbld-freebsd10.1/5.0.0/install-tools/fixincl install -m 555 mkheaders .../prefix/gcc5/libexec/gcc5/gcc/i386-portbld-freebsd10.1/5.0.0/install-tools/mkheaders test -z 'strip' || strip .../prefix/gcc5/libexec/gcc5/gcc/i386-portbld-freebsd10.1/5.0.0/install-tools/fixincl strip: unable to copy file '.../prefix/gcc5/libexec/gcc5/gcc/i386-portbld-freebsd10.1/5.0.0/install-tools/fixincl'; reason: Permission denied Makefile:191: recipe for target 'install-strip' failed gmake[3]: *** [install-strip] Error 1 This strip command seems redundant. Isn't fixincl already stripped by the install -s command above? Good point. What does this piece of the log look like outside the ports framework? /usr/bin/install -c fixinc.sh .../gcc-ref8-amd64/libexec/gcc/x86_64-unknown-freebsd8.4/5.0.0/install-tools/fixinc.sh /usr/bin/install -c fixincl .../gcc-ref8-amd64/libexec/gcc/x86_64-unknown-freebsd8.4/5.0.0/install-tools/fixincl /usr/bin/install -c mkheaders .../gcc-ref8-amd64/libexec/gcc/x86_64-unknown-freebsd8.4/5.0.0/install-tools/mkheaders test -z 'strip' || strip .../gcc-ref8-amd64/libexec/gcc/x86_64-unknown-freebsd8.4/5.0.0/install-tools/fixincl gmake[2]: Leaving directory '.../OBJ-0118-1528/fixincludes' (I also tried setting STRIP_CMD to true, alas that is not used by GCC.) Gerald ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org