LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 09-01-2015, 09:02 PM   #16
Jerasmussen
Member
 
Registered: Jul 2015
Location: San Antonio, TX
Distribution: XCP on Debian Wheezy; Raspbian; HLFS
Posts: 30

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by Luridis View Post
... A piece of software doesn't have to be broken to create problems. All it needs is to have some unforeseen & hidden incompatibility with what you happen to be trying to do in order for it to become a problem.
...
LOL, "unforeseen and hidden incompatibility ". In other words, broken.

I take your point however, as well as Keith's about sanitizing the host before building an initial tool chain. To be honest, I never even considered the problems associated with Dash vs. Bash. It's easy to forget about Dash, as it's purely a system shell: Debian users rarely ever see it.

Interestingly, I downloaded and installed PaX Utilities-1.0.2; no textrel errors show up in the scanelf or pspax output for the code I've already installed. I'm tempted to install GMP as is, then run scanelf and see if it finds the registers associated with the errors GCC is throwing. Since I'm going to have to rebuild the toolchain on a sanitized host anyway, what have I got to lose?

Oh, and thanks again for the advice and help. Folks like you are what make LQ such a valuable resource.

Regards,
James Rasmussen
 
Old 09-02-2015, 10:17 PM   #17
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
Just an FYI James, I tried building on Debian again today... Part II GCC pass 2... couldn't finish the build. Going to see if it fails on Slackware now. I setup the Debian machine exactly to spec to. Even replacing the link to sh from dash. (Last time I built on Debian, that wasn't a problem as long as bash was at least installed.)

Edit: There is one other thing I noticed about it too... When I used cfdisk there was some weirdness with the partitioning.

/dev/sdb2 sector: xxxxxx to sector: xxx329
0 Free Sectors (in red lettering)
/dev/sdb3 sector: xxx328 to sector: xxxxxx

That looks like some sort of floating point problem to me. As if rounding created overlap in the partitions. I deleted, retried, then rebooted, deleted and retried again. It always had overlap when they were created. If there is indeed a bug in the basic floating point arithmetic of Debian 8 i386's C library... That's probably going to show up in a bootstrap of GCC.

Last edited by Luridis; 09-02-2015 at 10:31 PM.
 
Old 09-03-2015, 09:09 AM   #18
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
Just an update here... No issues with the build on Slackware. My guess is the Debian issue is specific to version 8. As I said, I built on Debian the last time without issue.
 
Old 09-04-2015, 01:07 PM   #19
Jerasmussen
Member
 
Registered: Jul 2015
Location: San Antonio, TX
Distribution: XCP on Debian Wheezy; Raspbian; HLFS
Posts: 30

Original Poster
Rep: Reputation: Disabled
Thanks for the update Luridis;

I'm building on Wheezy, aka Debian 7.5 and I've not seen the partitioning errors you encountered.

I installed GMP anyway and using Gentoo's pax utilities, ran scanelf -lqmyt. This scans all non-symlink library paths in ld.so.conf, reporting any ELF binary containing a text relocation . I then ran scanelf -qtmyR / which extends the scan to all files in chroot. Not a single text relocation found.

So, it appears that the DT_TEXTREL diagnostic messages gcc was throwing during make -k check are spurious. That doesn't "prove" GMP was built correctly, but it does mean that text relocations are not an issue. That leaves the error 2 associated with the absence of automake which as I said, is to be expected. I believe I'll drive on, at least through the installation of GCC-4.5.3. If I can get the compiler up and working with the correct linker, this OS might actually build.

Regards,
James Rasmussen
 
Old 09-04-2015, 02:47 PM   #20
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
If you're building LFS 7.7 and you run into 3 errors during the g++ ipa tests related to pr61160-3.c you can safely ignore them. It's a bug in the test itself they forgot to backport to 4.9.(2,3) from the gcc mainline.

Also, I don't recommend building glibc-2.2 from the current LFS SVN because there's some sort of large data type problem in the library that makes tar fail on files over 8GB. There was no patch available when I looked.
 
Old 09-04-2015, 03:03 PM   #21
re_nelson
Member
 
Registered: Oct 2011
Location: Texas, USA
Distribution: LFS-SVN, Gentoo~amd64, CentOS-7, Slackware64-current, FreeBSD-11.1, Arch
Posts: 229

Rep: Reputation: Disabled
Quote:
Originally Posted by Luridis View Post
Also, I don't recommend building glibc-2.2 from the current LFS SVN because there's some sort of large data type problem in the library that makes tar fail on files over 8GB. There was no patch available when I looked.
I follow SVN for both LFS and BLFS. One thing I noticed after upgrading to glibc-2.22 is that anything involving authentication is now slower than with the prior 2.21. For example, the su command used to respond immediately with a password prompt. It now takes anywhere from 2-3 seconds for the prompt to appear. Since I also use PAM, it may be involved in some way. Likewise logins from the console also experience this delay as well.

The problem noted with glibc-2.22 also occurs on another instance of LFS/BLFS on a virtual machine. Rolling back to glibc-2.21 restores the immediate password prompt. Nevertheless, I plan to stay with the newer version and will await to see if others have noticed this.

Note that I did NOT rebuild PAM after the upgrade to glibc-2.22.
 
Old 09-04-2015, 03:40 PM   #22
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
Quote:
Originally Posted by re_nelson View Post
I follow SVN for both LFS and BLFS. One thing I noticed after upgrading to glibc-2.22 is that anything involving authentication is now slower than with the prior 2.21. For example, the su command used to respond immediately with a password prompt. It now takes anywhere from 2-3 seconds for the prompt to appear. Since I also use PAM, it may be involved in some way. Likewise logins from the console also experience this delay as well.

The problem noted with glibc-2.22 also occurs on another instance of LFS/BLFS on a virtual machine. Rolling back to glibc-2.21 restores the immediate password prompt. Nevertheless, I plan to stay with the newer version and will await to see if others have noticed this.

Note that I did NOT rebuild PAM after the upgrade to glibc-2.22.
Once I get this down and can branch out on my own I'm moving to Musl libc.
 
Old 09-05-2015, 01:53 AM   #23
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
Quote:
To be honest... I'm seriously considering giving up Linux for BSD. The current kernels are breaking everything.

Slackware 3.10 kernel... everything works without issue. Older LFS systems... same.

/dev/mouse imps2... 0 issues.

Current kernel

/dev/psaux, /dev/input/mice, /dev/input/mouse0, /dev/input/mouse1 - tried every protocol, none of them work.

If I say with Linux I have to build a year old system to get my hardware working it seems. Kernel config was not this nightmare 15 years ago. No wonder market share has dropped so much.
Please excuse that, was a frustrated last night, and a little drunk.

So, I've been going about it the wrong way... I keep seeing messages posted in my searches for kernels > 3.1x about various vm drivers breaking on vmware, qemu, etc. It seems they're working on paravirtualization stuff, or at least that's what I am getting from the menuconfig. Lots of stuff gone and lots of virtualization stuff marked as NEW. So, what I need to do is build around the latest long-term stable and wait for them to sort that stuff out. That way, I'll get bug fixes and security updates without changes to stuff that is working. And I've got both a 3.15 slackware config file and one of my own from LFS 7.5 that I can make oldconfig with.

Last edited by Luridis; 09-05-2015 at 08:01 PM.
 
Old 09-10-2015, 10:04 AM   #24
Jerasmussen
Member
 
Registered: Jul 2015
Location: San Antonio, TX
Distribution: XCP on Debian Wheezy; Raspbian; HLFS
Posts: 30

Original Poster
Rep: Reputation: Disabled
Thanks to everyone for their input on this. Also, kudos to the Gentoo folks for creating a set of utilities to track down hardening errors.

As a result of the discussion, I'm going to:

a) Create a new VM with a stripped down, sanitized version of Debian 7.5;
b) Use that VM to build CLFS 3.0.0;
c) Use CLFS 3.0.0 as the host for HLFS (and all subsequent) builds.

I may also continue the current HLFS build on Debian Wheezy, as a learning exercise.

Giving this a solved tag; thanks again to all for your most welcome assistance!

Regards,
James Rasmussen
 
Old 09-10-2015, 05:51 PM   #25
re_nelson
Member
 
Registered: Oct 2011
Location: Texas, USA
Distribution: LFS-SVN, Gentoo~amd64, CentOS-7, Slackware64-current, FreeBSD-11.1, Arch
Posts: 229

Rep: Reputation: Disabled
Quote:
Originally Posted by Luridis View Post
Once I get this down and can branch out on my own I'm moving to Musl libc.
For what it's worth -- and it's only tangential to the main topic of this thread -- my problem noted a few posts back with glibc-2.22 and sluggishness with authentication has been SOLVED. The remedy was to enable nscd, the name service caching daemon. Voila! Login, su and sudo prompts now occur instantly. The lag I mentioned is gone. This may be helpful to those encountering a similar problem.
 
Old 09-10-2015, 11:03 PM   #26
basica
Member
 
Registered: Nov 2011
Location: Australia
Distribution: Arch, LFS
Posts: 171

Rep: Reputation: 38
Though this thread is resolved now, I wanted to chime in and say that Debian is a bit of a hit or miss for me. Same goes with Suse (more of a miss tbh). The only systems I have consistently managed to build LFS from is Slackware and Ubuntu, though I have switched to Slackware now since I don't need to make any changes like you do with Ubuntu to make things work. I just did 7.7 with the default kernel, but I am thinking of having another go this time using the development copy of the systemd configuration. Should be fun. I'll be using VirtualBox myself so I'll let y'all know how I fare in a separate thread just to see if I encounter the same issues as y'all are with the latest kernel etc.
 
Old 09-11-2015, 12:03 AM   #27
Luridis
Member
 
Registered: Mar 2014
Location: Texas
Distribution: LFS 9.0 Custom, Merged Usr, Linux 4.19.x
Posts: 616

Rep: Reputation: 167Reputation: 167
Quote:
Originally Posted by basica View Post
Though this thread is resolved now, I wanted to chime in and say that Debian is a bit of a hit or miss for me. Same goes with Suse (more of a miss tbh). The only systems I have consistently managed to build LFS from is Slackware and Ubuntu, though I have switched to Slackware now since I don't need to make any changes like you do with Ubuntu to make things work. I just did 7.7 with the default kernel, but I am thinking of having another go this time using the development copy of the systemd configuration. Should be fun. I'll be using VirtualBox myself so I'll let y'all know how I fare in a separate thread just to see if I encounter the same issues as y'all are with the latest kernel etc.
I've got the 4.1 kernel built in now. If you run into issues with paravirtual drivers then use their hardware emulated counterparts. i.e. VMware vmxnet isn't working but AMD PCNet32 is working, etc.
 
Old 09-12-2015, 07:40 AM   #28
basica
Member
 
Registered: Nov 2011
Location: Australia
Distribution: Arch, LFS
Posts: 171

Rep: Reputation: 38
Quote:
Originally Posted by Luridis View Post
I've got the 4.1 kernel built in now. If you run into issues with paravirtual drivers then use their hardware emulated counterparts. i.e. VMware vmxnet isn't working but AMD PCNet32 is working, etc.
Thanks, I didn't end up running into any issues thankfully, however I did use the 4.2 kernel instead of the 4.1.6.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] [HLFS] make -k check fails, section 6.9. Glibc-2.12.2 Jerasmussen Linux From Scratch 1 08-24-2015 10:58 PM
[SOLVED] GCC make error - lib/cpp fails sanity check n1k0 Linux From Scratch 4 11-16-2011 01:56 PM
LFS 6.6 on Ubuntu 10.04 / 6.13 GMP-5.0.0 make error SmokingSquirrel Linux From Scratch 3 06-12-2010 02:45 AM
6.13 GMP-5.0.0 LFS make error SmokingSquirrel Linux - General 5 06-11-2010 12:34 PM
GCC make error 2; stage 1 gmp (Book 6.4) agrestic Linux From Scratch 0 01-25-2009 03:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 04:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration