Re: [lfs-support] glibc compilation error (in chroo environmentt)
On Thu, 20 Jul 2017 18:48:20 -0400 "Isaac D. Cohen"wrote: > But then I decided to try, just to make sure, and redo the second pass > of gcc with --enable-threads. After doing that I redid the compilation of > glibc and got the same error. So that doesn't seem to be the problem. Isaac, That first URL: https://www.mail-archive.com/gcc@gcc.gnu.org/msg81240.html gives a test program for gcc's threads ability. Create a file, thread.cc, which contains #include int main(int, char **){ std::thread tt; } and then try compiling it with: g++ -std=c++11 thread.cc -lpthread -o x which should work without error and produce the executable "x". If that fails, then your gcc (or should I say, libstdc++) does not have the proper thread support. I note that in section 5.8 for Libstdc++-7.1.0 there is: "--disable-libstdcxx-threads Since we have not yet built the C threads library, the C++ one cannot be built either." Also, note the "--with-gxx-include-dir" This initial version of libstdc++ will/must be overwritten later by a full version from gcc. If that does not happen and your gcc is still using this earlier limited version of libstdc++, then it will not have thread support from the libstdc++ library no matter how gcc itself was configured and compiled. And watch out that in GCC pass 2 you started with a fresh unpacking of the gcc tarball. (We have to do this, right?) After all, in the Libstdc++-7.1.0 a ../libstdc++-v3/configure --disable-libstdcxx-threads had been done in the pass 1 tarball's libstdc++-v3 subdirectory. Does anyone know if those libstdc++ configure settings will remain or be properly overridden if gcc's main directory configure is run - e.g., what if the LFS builder attempts to start gcc pass 2 with the existing unpacked gcc tar ball from pass 1? A question I now have is: At what point in the build process can the LFS system (i.e., gcc) be expected to be able to compile the thread.cc test above? Is it after GCC-7.1.0 Pass 2, or is it only after the final build of GCC? If the former is true, then how can GCC-7.1.0 Pass 2 have thread support when Glibc-2.25+adc7e06 has not yet been rebuilt (since just after Pass 1, and libstdc++ could not be enabled with thread support under that glibc)? And if the latter is true, how can the final build of glibc be expected to pass make check if doing so requires thread support in gcc/libstdc++ ? Cheers, Mike -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] glibc compilation error (in chroo environmentt)
Ken Moffat wrote: Unless anyone has any easier suggestions, I'm going to suggest that you start over. If your lfs user still has the command history, look at that before you restart, in case anything now jumps out and says "whoops!". For a restart, save all the sources and patches so that you don't need to download them again. Then make a new filesystem for /mnt/lfs. If your distro insists on mounting the new filesystem under /media, then get a root shell (you need that anyway during the build, even on ubuntu which hates letting users get root shells) and bind it to /mnt/lfs (mount --bind : man mount). I agree with Ken. Start over and follow the book closely. If needed, install sudo on the host to help doing those commands that require root. We can help with the configuration if needed, but you should also be able to do everything needed with su. If your distro is not cooperating, we can help overcome those issues. One thing to keep in mind is that for testing we have automated extraction of the commands from the book. The instructions in the book work without modification. When you start changing things, you are likely to run into problems as documented in your requests for help. -- Bruce -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] glibc compilation error (in chroo environmentt)
On Thu, Jul 20, 2017 at 06:48:20PM -0400, Isaac D. Cohen wrote: > > But then I decided to try, just to make sure, and redo the second pass > of gcc with --enable-threads. After doing that I redid the compilation of > glibc and got the same error. So that doesn't seem to be the problem. > That error is not at all common in LFS, so maybe nobody knows the answer. I think you said that gcc wasn't working when you went into chroot, so you rebuilt pass2 binutils and gcc. That destroyed any evidence that might have been available (you didn't mention the error message, or whatever led you to realise it wasn't working). Your current problems suggest that maybe there were other errors - my first guess was that g++ had not been built correctly, but that is just a guess. Unless anyone has any easier suggestions, I'm going to suggest that you start over. If your lfs user still has the command history, look at that before you restart, in case anything now jumps out and says "whoops!". For a restart, save all the sources and patches so that you don't need to download them again. Then make a new filesystem for /mnt/lfs. If your distro insists on mounting the new filesystem under /media, then get a root shell (you need that anyway during the build, even on ubuntu which hates letting users get root shells) and bind it to /mnt/lfs (mount --bind : man mount). Then rerun the stuff to setup the environment, including any checks. For the build, please remember that you need clean source for each package, so remove the extracted directories when you move on to the next package (particularly binutils and gcc, but also relevant for all packages in chapter 6 that were also built in chapter 5). And I hope your next attempt is successful. ĸen -- I live in a city. I know sparrows from starlings. After that everything is a duck as far as I'm concerned. -- Monstrous Regiment -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
Re: [lfs-support] glibc compilation error (in chroo environmentt)
On Tue, 18 Jul 2017 21:12:41 -0400 "Isaac D. Cohen" icohen2...@zoho.com wrote: make check. It compiled a little and then got stuck on this: tst-thread_local1.cc: In lambda function: tst-thread_local1.cc:172:7: error: 'thread' is not a member of 'std' On Wed, 19 Jul 2017 23:29:15 -0400 Michael Shellli...@michaelshell.org wrote Isaac, A google search found this: https://www.mail-archive.com/gcc@gcc.gnu.org/msg81240.html https://www.mail-archive.com/gcc@gcc.gnu.org/msg81257.html "Yes, I finally realized I had built a GCC with '--enable-threads=no' and was using that GCC to build GLIBC. Once I rebuilt GCC with threads I could build GLIBC and not get this error." In the book, the first pass of gcc is built without thread support, but thread support should be enabled for the second pass (5.10.1). Hi Michael, I looked up the command I used to configure gcc on the second pass (or perhaps the third as I redid the second pass to make gcc work in the chroot environment) and it exactly matched the command in the book. (I looked it up using the command gcc -v.) That is, it didn't use --disable-threads. However, it didn't use --enable-threads either (the book didn't say to). But then I decided to try, just to make sure, and redo the second pass of gcc with --enable-threads. After doing that I redid the compilation of glibc and got the same error. So that doesn't seem to be the problem. Thank you very much, Isaac D. Cohen -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style