|
|
Chromium Code Reviews
DescriptionUpdate mips sysroot creator script
Update to current debian stable (jessie) from old debian
(wheezy). Since jessie has gcc 4.9 in it a long of the
hacks we needed to make the toolchain and the sysroot
compatible are no longer needed.
Add the ability to upload the sysroot to clound storage
for use by package_version.py.
Remove support for building chromesdk variant. Chrome
now contains its own scripts for building mips sysroot
with all the correct dependencies:
https://codereview.chromium.org/1164073004
TEST=./scons platform=mips smoke_tests
R=bradnelson@google.com, petarj@mips.com
Committed: https://chromium.googlesource.com/native_client/src/native_client/+/5804ccbdacff460ffc7e71b33629728d9b6babcf
Patch Set 1 #
Total comments: 6
Patch Set 2 : #Patch Set 3 : #
Total comments: 12
Patch Set 4 : #Patch Set 5 : #Patch Set 6 : #
Messages
Total messages: 28 (7 generated)
sbc@chromium.org changed reviewers: + petarj@mips.com
Followup CL to add mips_trusted package: https://codereview.chromium.org/1199093002/
https://codereview.chromium.org/1195393006/diff/1/tools/trusted_cross_toolcha... File tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh (left): https://codereview.chromium.org/1195393006/diff/1/tools/trusted_cross_toolcha... tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh:57: readonly JAIL_MIPS32=${INSTALL_ROOT}/sysroot If sysroot does not exist anymore, you need to modify QEMU_JAIL in qemu_tool_mips32.sh too. Also, SetUpLinuxEnvMips (LIBPATH) in SConstruct needs to modified. https://codereview.chromium.org/1195393006/diff/1/tools/trusted_cross_toolcha... File tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh (right): https://codereview.chromium.org/1195393006/diff/1/tools/trusted_cross_toolcha... tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh:459: ln -s ../../../mipsel-linux-gnu/lib/libstdc++.so.6.0.20 . I believe you need to modify this line too. https://codereview.chromium.org/1195393006/diff/1/tools/trusted_cross_toolcha... tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh:464: ln -s ../../../mipsel-linux-gnu/lib/libgcc_s.so.1 . Ditto.
I re-wrote this update such that it maintains the separation between the toolchain and the sysroot. You can see the results here: https://storage.googleapis.com/nativeclient-archive2/toolchain/test/sysroot_m... I verified with ./scons platform=mips. https://codereview.chromium.org/1195393006/diff/1/tools/trusted_cross_toolcha... File tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh (left): https://codereview.chromium.org/1195393006/diff/1/tools/trusted_cross_toolcha... tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh:57: readonly JAIL_MIPS32=${INSTALL_ROOT}/sysroot On 2015/06/24 15:42:04, petarj wrote: > If sysroot does not exist anymore, you need to modify QEMU_JAIL in > qemu_tool_mips32.sh too. > Also, SetUpLinuxEnvMips (LIBPATH) in SConstruct needs to modified. Ok.. I reverted that part of the change. sysroot is still separate for now. https://codereview.chromium.org/1195393006/diff/1/tools/trusted_cross_toolcha... File tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh (right): https://codereview.chromium.org/1195393006/diff/1/tools/trusted_cross_toolcha... tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh:459: ln -s ../../../mipsel-linux-gnu/lib/libstdc++.so.6.0.20 . On 2015/06/24 15:42:04, petarj wrote: > I believe you need to modify this line too. I removed all of this. The new debian stable is recent enough that it contains gcc 4.9 so there is no longer incompatability between the compiler toolchain and the sysroot. https://codereview.chromium.org/1195393006/diff/1/tools/trusted_cross_toolcha... tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh:464: ln -s ../../../mipsel-linux-gnu/lib/libgcc_s.so.1 . On 2015/06/24 15:42:04, petarj wrote: > Ditto. Acknowledged.
https://codereview.chromium.org/1195393006/diff/40001/tools/trusted_cross_too... File tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh (right): https://codereview.chromium.org/1195393006/diff/40001/tools/trusted_cross_too... tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh:260: local PREFIX=/ Correct me if I am wrong, but I believe this will work on the host on which you build everything but the tarball you create will not be portable. Have you checked that? Here is the idea how to make it portable... https://codereview.chromium.org/1195393006/diff/40001/tools/trusted_cross_too... tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh:271: --prefix=${PREFIX} \ ${INSTALL_ROOT} instead of $(PREFIX) https://codereview.chromium.org/1195393006/diff/40001/tools/trusted_cross_too... tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh:279: make ${MAKE_OPTS} DESTDIR=${INSTALL_ROOT} install-binutils install-gas install-ld No need for DESTDIR=${INSTALL_ROOT} then. https://codereview.chromium.org/1195393006/diff/40001/tools/trusted_cross_too... tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh:292: --prefix=${PREFIX} \ ${INSTALL_ROOT} instead of $(PREFIX) https://codereview.chromium.org/1195393006/diff/40001/tools/trusted_cross_too... tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh:314: make ${MAKE_OPTS} DESTDIR=${INSTALL_ROOT} install No need for DESTDIR=${INSTALL_ROOT} then. https://codereview.chromium.org/1195393006/diff/40001/tools/trusted_cross_too... tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh:364: --prefix=${PREFIX} \ --prefix=${INSTALL_ROOT} https://codereview.chromium.org/1195393006/diff/40001/tools/trusted_cross_too... tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh:378: --includedir=/usr/include/mipsel-linux-gnueabi/ --includedir=${INSTALL_ROOT}/usr/include/mipsel-linux-gnueabi/ https://codereview.chromium.org/1195393006/diff/40001/tools/trusted_cross_too... tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh:384: make ${MAKE_OPTS} DESTDIR=${INSTALL_ROOT} install No need for DESTDIR=${INSTALL_ROOT} https://codereview.chromium.org/1195393006/diff/40001/tools/trusted_cross_too... tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh:396: --prefix=${PREFIX} \ --prefix=${INSTALL_ROOT} https://codereview.chromium.org/1195393006/diff/40001/tools/trusted_cross_too... tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh:403: make ${MAKE_OPTS} DESTDIR=${INSTALL_ROOT} install-gdb No need for DESTDIR=${INSTALL_ROOT}.
https://codereview.chromium.org/1195393006/diff/40001/tools/trusted_cross_too... File tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh (right): https://codereview.chromium.org/1195393006/diff/40001/tools/trusted_cross_too... tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh:260: local PREFIX=/ On 2015/06/26 21:58:32, petarj wrote: > Correct me if I am wrong, but I believe this will work on the host on which you > build everything but the tarball you create will not be portable. Have you > checked that? > Here is the idea how to make it portable... Actually I think the opposite is true. --prefix is supposed to be relative to the root to the sysroot. If you specified INSTALL_ROOT as the prefix then you would/could be baking a local path into a portable tarball (since the INSTRALL_ROOT, which is just some randoms local path on my machine, would be known at build time). The way I'm doing it is to build it with prefix of /, and only at 'make install' time setting DESTROOT to choose the final location. Nothing actually gets installed to / or /usr on my local mahine, since I'm not running any of this as root. This method seems to be recommended way to build cross compiler AFAICT. https://codereview.chromium.org/1195393006/diff/40001/tools/trusted_cross_too... tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh:378: --includedir=/usr/include/mipsel-linux-gnueabi/ On 2015/06/26 21:58:32, petarj wrote: > --includedir=${INSTALL_ROOT}/usr/include/mipsel-linux-gnueabi/ Actually I think I can just drop this line.
On 2015/06/26 23:13:12, Sam Clegg wrote: > https://codereview.chromium.org/1195393006/diff/40001/tools/trusted_cross_too... > File tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh > (right): > > https://codereview.chromium.org/1195393006/diff/40001/tools/trusted_cross_too... > tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh:260: > local PREFIX=/ > On 2015/06/26 21:58:32, petarj wrote: > > Correct me if I am wrong, but I believe this will work on the host on which > you > > build everything but the tarball you create will not be portable. Have you > > checked that? > > Here is the idea how to make it portable... > > Actually I think the opposite is true. --prefix is supposed to be relative to > the root to the sysroot. If you specified INSTALL_ROOT as the prefix then you > would/could be baking a local path into a portable tarball (since the > INSTRALL_ROOT, which is just some randoms local path on my machine, would be > known at build time). The way I'm doing it is to build it with prefix of /, > and only at 'make install' time setting DESTROOT to choose the final location. > > Nothing actually gets installed to / or /usr on my local mahine, since I'm not > running any of this as root. > > This method seems to be recommended way to build cross compiler AFAICT. > > https://codereview.chromium.org/1195393006/diff/40001/tools/trusted_cross_too... > tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh:378: > --includedir=/usr/include/mipsel-linux-gnueabi/ > On 2015/06/26 21:58:32, petarj wrote: > > --includedir=${INSTALL_ROOT}/usr/include/mipsel-linux-gnueabi/ > > Actually I think I can just drop this line. You can verify the produced tarball for yourself if you like: https://storage.googleapis.com/nativeclient-archive2/toolchain/test/sysroot_m...
On 2015/06/26 23:15:22, Sam Clegg wrote: > On 2015/06/26 23:13:12, Sam Clegg wrote: > > > https://codereview.chromium.org/1195393006/diff/40001/tools/trusted_cross_too... > > File tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh > > (right): > > > > > https://codereview.chromium.org/1195393006/diff/40001/tools/trusted_cross_too... > > tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh:260: > > local PREFIX=/ > > On 2015/06/26 21:58:32, petarj wrote: > > > Correct me if I am wrong, but I believe this will work on the host on which > > you > > > build everything but the tarball you create will not be portable. Have you > > > checked that? > > > Here is the idea how to make it portable... > > > > Actually I think the opposite is true. --prefix is supposed to be relative to > > the root to the sysroot. If you specified INSTALL_ROOT as the prefix then you > > would/could be baking a local path into a portable tarball (since the > > INSTRALL_ROOT, which is just some randoms local path on my machine, would be > > known at build time). The way I'm doing it is to build it with prefix of /, > > and only at 'make install' time setting DESTROOT to choose the final location. > > > > Nothing actually gets installed to / or /usr on my local mahine, since I'm not > > running any of this as root. > > > > This method seems to be recommended way to build cross compiler AFAICT. > > > > > https://codereview.chromium.org/1195393006/diff/40001/tools/trusted_cross_too... > > tools/trusted_cross_toolchains/trusted-toolchain-creator.mipsel.debian.sh:378: > > --includedir=/usr/include/mipsel-linux-gnueabi/ > > On 2015/06/26 21:58:32, petarj wrote: > > > --includedir=${INSTALL_ROOT}/usr/include/mipsel-linux-gnueabi/ > > > > Actually I think I can just drop this line. > > You can verify the produced tarball for yourself if you like: > > https://storage.googleapis.com/nativeclient-archive2/toolchain/test/sysroot_m... > Have you intentionally or unintentionally given me the wheezy (instead of jessie) tarball? The toolchain inside seems to be configured with --prefix=/usr/local/google/home/sbc/dev/native_client/native_client/toolchain/linux Target: mipsel-linux-gnu Configured with: /usr/local/google/home/sbc/dev/native_client/out/sysroot_mips_trusted/gcc-4.9.0/configure --prefix=/usr/local/google/home/sbc/dev/native_client/native_client/toolchain/linux _x86/mips_trusted --disable-libssp --disable-libgomp --disable-libmudflap --disable-fixed-point --disable-decimal-float --with-mips-plt --with-endian=little --with-arch=mips32 --target=mipse l-linux-gnu --enable-__cxa_atexit --enable-languages=c,c++ --with-sysroot=/usr/local/google/home/sbc/dev/native_client/native_client/toolchain/linux_x86/mips_trusted Thread model: posix gcc version 4.9.0 (GCC)
A colleague of mine tried to use the jessie tarball you mentioned in the comment #5: https://storage.googleapis.com/nativeclient-archive2/toolchain/test/sysroot_m... This tarball has some paths embedded inside. Here is an error that comes up at some point: ignoring nonexistent directory "/usr/local/google/home/sbc/dev/native_client/native_client/toolchain/linux_x86/mips_trusted/sysroot/usr/include/mipsel-linux-gnu" ignoring nonexistent directory "/usr/local/google/home/sbc/dev/native_client/native_client/toolchain/linux_x86/mips_trusted/sysroot/usr/include" Also, he tried to use the latest patch you provided, he created a tarball, copied into a different machine and tried to use. The same error happened: ignoring nonexistent directory "/home/leporis/work/PNACL_1/native_client/toolchain/linux_x86/mips_trusted/sysroot/usr/include/mipsel-linux-gnu" ignoring nonexistent directory "/home/leporis/work/PNACL_1/native_client/toolchain/linux_x86/mips_trusted/sysroot/usr/include
Also, can you make an extra check for the portability of the tarball you create by running the smoke tests with the tarball you download? FWIW, all the tests pass. ./scons platform=mips32 smoke_tests
On 2015/06/29 23:09:42, petarj wrote: > A colleague of mine tried to use the jessie tarball you mentioned in the comment > #5: > > https://storage.googleapis.com/nativeclient-archive2/toolchain/test/sysroot_m... > > This tarball has some paths embedded inside. Here is an error that comes up at > some point: > > ignoring nonexistent directory > "/usr/local/google/home/sbc/dev/native_client/native_client/toolchain/linux_x86/mips_trusted/sysroot/usr/include/mipsel-linux-gnu" > ignoring nonexistent directory > "/usr/local/google/home/sbc/dev/native_client/native_client/toolchain/linux_x86/mips_trusted/sysroot/usr/include" > > Also, he tried to use the latest patch you provided, he created a tarball, > copied into a different machine and tried to use. The same error happened: > > ignoring nonexistent directory > "/home/leporis/work/PNACL_1/native_client/toolchain/linux_x86/mips_trusted/sysroot/usr/include/mipsel-linux-gnu" > ignoring nonexistent directory > "/home/leporis/work/PNACL_1/native_client/toolchain/linux_x86/mips_trusted/sysroot/usr/include Interesting.. did these not occur with previous version. Until "make install" is modifying some builtin paths i can't see how those would get in there but I will investigate. It certainly seems worse to configure with a local path in --prefix.
Ok. I found the issue with the embedded paths. Turns out the the --sysroot= configure argument should be relative to the --prefix. I've uploaded the new jessie version to the same url from comment 5 (https://storage.googleapis.com/nativeclient-archive2/toolchain/test/sysroot_m...).
On 2015/06/30 23:52:53, Sam Clegg wrote: > Ok. I found the issue with the embedded paths. Turns out the the --sysroot= > configure argument should be relative to the --prefix. > > I've uploaded the new jessie version to the same url from comment 5 > (https://storage.googleapis.com/nativeclient-archive2/toolchain/test/sysroot_m...). lgtm Thanks for figuring this out. You were right this is the correct way to do it, my bad for the misleading comments in #6.
The CQ bit was checked by sbc@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1195393006/100001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: nacl-presubmit on tryserver.nacl (JOB_FAILED, http://build.chromium.org/p/tryserver.nacl/builders/nacl-presubmit/builds/134)
sbc@chromium.org changed reviewers: + bradnelson@chromium.org
+bradnelson
ping bradnelson
bradnelson@google.com changed reviewers: + bradnelson@google.com
lgtm
The CQ bit was checked by sbc@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1195393006/100001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: nacl-presubmit on tryserver.nacl (JOB_FAILED, http://build.chromium.org/p/tryserver.nacl/builders/nacl-presubmit/builds/151)
Message was sent while issue was closed.
Committed patchset #6 (id:100001) manually as 5804ccbdacff460ffc7e71b33629728d9b6babcf (presubmit successful). |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
