Re: [lfs-dev] Errors with Linux From Scratch Version SVN-20200707
On 2020-07-11 09:54 -0500, Bruce Dubbs via lfs-dev wrote: > On 7/11/20 7:38 AM, Xi Ruoyao via lfs-dev wrote: > > On 2020-07-11 11:28 +, John Frankish via lfs-dev wrote: > > > A couple of errors found: > > > > > > Chapter 6. Cross Compiling Temporary Tools > > > 6.7. File-5.39 > > > > > > Building gives the error: > > > > > > Cannot use the installed version of file (5.37) to > > > cross-compile file 5.39 > > > Please install file 5.39 locally first > > > > > > ..fixed by updating file on the host. > > > > Forcing a exact version of file in Host System Requirements is > > stupid. We'll > > have to install a file for host system in Chap. 5. There is also a FIXME in > > file-5.39/magic/Makefile.am: > > > > > # FIXME: Build file natively as well so that it can be used to compile > > > # the target's magic file; for now we bail if the local version does not > > > match > > > > Could someone give upstream a patch for it? > > I don't know why this is happening in Chapter 6. On my log I have: > > checking whether we are cross compiling... no > > It worked fine for me when the host version of file was 5.38. The script checks if the output of the compiler can be executed. If it can be executed it persumes that we are only "faking" cross compiling. Perhaps the OP is building for i386 on (non-multilib) x86_64 host, which would be a real cross- compilation. I'm not sure if we "offically" support this configuration (building for i386 on x86_64 host OS). But theoretically this configuration should work before cross- chap5. -- Xi Ruoyao School of Aerospace Science and Technology, Xidian University -- http://lists.linuxfromscratch.org/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
Re: [lfs-dev] Errors with Linux From Scratch Version SVN-20200707
On 7/11/20 7:38 AM, Xi Ruoyao via lfs-dev wrote: On 2020-07-11 11:28 +, John Frankish via lfs-dev wrote: A couple of errors found: Chapter 6. Cross Compiling Temporary Tools 6.7. File-5.39 Building gives the error: Cannot use the installed version of file (5.37) to cross-compile file 5.39 Please install file 5.39 locally first ..fixed by updating file on the host. Forcing a exact version of file in Host System Requirements is stupid. We'll have to install a file for host system in Chap. 5. There is also a FIXME in file-5.39/magic/Makefile.am: # FIXME: Build file natively as well so that it can be used to compile # the target's magic file; for now we bail if the local version does not match Could someone give upstream a patch for it? I don't know why this is happening in Chapter 6. On my log I have: checking whether we are cross compiling... no It worked fine for me when the host version of file was 5.38. Chapter 6. Cross Compiling Temporary Tools 6.10. Grep-3.4 Building pulls in a dep on libpcre from the host, which causes problems later, but can be fixed with "--disable-perl-regexp" It's because configure script picks up the host pkg-config. Other packages may have similar issue. I think we should create a "fake" x86_64-lfs-linux-gnu-pkg-config: ln -sv /bin/false /mnt/lfs/tools/bin/x86_64-lfs-linux-gnu-pkg-config I'll need to check into this a bit more. I do prefer a switch to a symlink. Also, but probably out of scope, Chapter 5. Compiling a Cross-Toolchain 5.5. Glibc-2.31 Fails for arm (RPi) with a long double error fixed with an upstream patch: https://sourceware.org/pipermail/glibc-cvs/2020q1/069150.html Glibc-2.32 will be released soon (the scheduled date is Aug. 1st). We will wait for Glibc-2.32. Thanks for the feedback. -- Bruce -- http://lists.linuxfromscratch.org/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
Re: [lfs-dev] Errors with Linux From Scratch Version SVN-20200707
On Sat, 2020-07-11 at 11:28 +, John Frankish via lfs-dev wrote: > A couple of errors found: > > Chapter 6. Cross Compiling Temporary Tools > 6.7. File-5.39 > > Building gives the error: > > Cannot use the installed version of file (5.37) to > cross-compile file 5.39 > Please install file 5.39 locally first > > ..fixed by updating file on the host. When faking cross compilation, and using the instructions in the book (that is, not passing --build=$(./config.guess)), the build system is aware that it can use the just built file to compile the "magic" file, and so it does... If doing a true cross compilation, this error will occur; two solutions: - as you did, update file on host - first compile a local "file" executable, similarly to what is done with ncurses (see Also what Xi Ruoyao has said about that, his mail arrived while I was writing this one) Note that we cannot change Makefile.am and use autoreconf, because we do not require autotools on the host. > > Chapter 6. Cross Compiling Temporary Tools > 6.10. Grep-3.4 > > Building pulls in a dep on libpcre from the host, which causes > problems later, but can be fixed with "--disable-perl-regexp" Normally, this shouldn't happen: configure makes two tests, one is using pkg-config to find libpcre, the second is testing whether some function from the library can be called. The second one should fail in a cross-compiling environment, if sysroot is correctly set. (creating a fake pkg-config as suggested by Xi Ruoyao shouldn't be needed, at least if compiling on x86 for x86) > > Also, but probably out of scope, > > Chapter 5. Compiling a Cross-Toolchain > 5.5. Glibc-2.31 > > Fails for arm (RPi) with a long double error fixed with an upstream > patch: > > https://sourceware.org/pipermail/glibc-cvs/2020q1/069150.html We may want to make chapter 5/6 more compatible with a general cross- compilation environment (at least x86->arm). I cannot look at that ATM. Pierre -- http://lists.linuxfromscratch.org/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
Re: [lfs-dev] Errors with Linux From Scratch Version SVN-20200707
On 2020-07-11 11:28 +, John Frankish via lfs-dev wrote: > A couple of errors found: > > Chapter 6. Cross Compiling Temporary Tools > 6.7. File-5.39 > > Building gives the error: > > Cannot use the installed version of file (5.37) to > cross-compile file 5.39 > Please install file 5.39 locally first > > ..fixed by updating file on the host. Forcing a exact version of file in Host System Requirements is stupid. We'll have to install a file for host system in Chap. 5. There is also a FIXME in file-5.39/magic/Makefile.am: > # FIXME: Build file natively as well so that it can be used to compile > # the target's magic file; for now we bail if the local version does not match Could someone give upstream a patch for it? > Chapter 6. Cross Compiling Temporary Tools > 6.10. Grep-3.4 > > Building pulls in a dep on libpcre from the host, which causes problems later, > but can be fixed with "--disable-perl-regexp" It's because configure script picks up the host pkg-config. Other packages may have similar issue. I think we should create a "fake" x86_64-lfs-linux-gnu-pkg-config: ln -sv /bin/false /mnt/lfs/tools/bin/x86_64-lfs-linux-gnu-pkg-config > Also, but probably out of scope, > > Chapter 5. Compiling a Cross-Toolchain > 5.5. Glibc-2.31 > > Fails for arm (RPi) with a long double error fixed with an upstream patch: > > https://sourceware.org/pipermail/glibc-cvs/2020q1/069150.html Glibc-2.32 will be released soon (the scheduled date is Aug. 1st). -- Xi Ruoyao School of Aerospace Science and Technology, Xidian University -- http://lists.linuxfromscratch.org/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page