Linux From ScratchThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Currently building a LFS system on my Arch host.
I ran into a error, spent some time googling it and have not found a solution.
After trying to compile GCC I was given this error.
Code:
../../gcc/ubsan.c: In function 'bool ubsan_use_new_style_p(location_t)':
../../gcc/ubsan.c:1474:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
|| xloc.file == '\0' || xloc.file[0] == '\xff'
^~~~
make[2]: *** [Makefile:1085: ubsan.o] Error 1
make[2]: Leaving directory '/mnt/lfs/sources/gcc-6.3.0/build/gcc'
make[1]: *** [Makefile:4119: all-gcc] Error 2
make[1]: Leaving directory '/mnt/lfs/sources/gcc-6.3.0/build'
make: *** [Makefile:864: all] Error 2
Currently building a LFS system on my Arch host.
I ran into a error, spent some time googling it and have not found a solution.
After trying to compile GCC I was given this error.
Code:
../../gcc/ubsan.c: In function 'bool ubsan_use_new_style_p(location_t)':
../../gcc/ubsan.c:1474:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
|| xloc.file == '\0' || xloc.file[0] == '\xff'
^~~~
make[2]: *** [Makefile:1085: ubsan.o] Error 1
make[2]: Leaving directory '/mnt/lfs/sources/gcc-6.3.0/build/gcc'
make[1]: *** [Makefile:4119: all-gcc] Error 2
make[1]: Leaving directory '/mnt/lfs/sources/gcc-6.3.0/build'
make: *** [Makefile:864: all] Error 2
This is just a shot in the dark, but, if your host is ArchLinux, your GCC version is likely 7.1.0.
This is just a shot in the dark, but, if your host is ArchLinux, your GCC version is likely 7.1.0.
LFS 8.0 only guarantees a host GCC version of between 4.7 and 6.3.0. (See LFS 8.0, Section 2.2)
There have been some that have gotten it to work, but others have not.
My recommendation is to change to a different host and try it again. I have gotten a solid LFS build put together within the last week with slackware.
(Note: I had originally posted this with links to sources for all that stuff, but apparently this forum doesn't like that so it need moderator approval. If this message posts two, three, four times... that's why)
Thanks for the info Rustman. I'm not sure if I resolved my issue or not. I moved the build dirrectory from the gcc folder to the sources folder. After generating the make file even though it finished with a Error2 and installed with a error 2, I was able to install it I think?
In the directory /tools/libs there is a gcc folder.
Inside gcc is a folder called xf86_46-linux-gnu.
Thanks for the info Rustman. I'm not sure if I resolved my issue or not. I moved the build dirrectory from the gcc folder to the sources folder. After generating the make file even though it finished with a Error2 and installed with a error 2, I was able to install it I think?
In the directory /tools/libs there is a gcc folder.
Inside gcc is a folder called xf86_46-linux-gnu.
Maybe? Worst case scenario is you have to scrap it and start over, which is kind of expected anyway. I had to scrap my build twice before I got it to work to completion the first time. Give it a try and see what happens.
I suggest you retry with gcc-6.4.0 or change host.
The newer gcc-version on your archlinux is probably the reason it fails.
Calculate Linux has great live CD's that work out of the box to build lfs.
I myself successfully build lfs-8.0 with gcc-6.4.0 on fedora 26, you need to install m4 and gcc-c++ (7.1.1).
Thanks for the replys everyone.
It seems it will just be better to change the host.
Thanks hendrickxm for recommending Calculate linux.
Ill give format the partions and give Calculate a try.
I'm a bit worried about my partion setup. Does this seem okay?
I have never manually had to make a extended partion till now.
Code:
Disk: /dev/sda
Size: 298.1 GiB, 320072933376 bytes, 625142448 sectors
Label: dos, identifier: 0x364f383e
Device Boot Start End Sectors Size Id Type
>> /dev/sda1 * 2048 978943 976896 477M 83 Linux
/dev/sda2 978944 378961919 377982976 180.2G 83 Linux
/dev/sda3 602861568 625142447 22280880 10.6G 82 Linux swap / Solaris
/dev/sda4 378961920 602861567 223899648 106.8G 5 Extended
|-/dev/sda5 * 378963968 379940863 976896 477M 83 Linux
`-/dev/sda6 379942912 602861567 222918656 106.3G 83 Linux
sda1, sda2, and sda3 are for my Arch install.
The rest are for LFS.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.