LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-17-2019, 09:15 AM   #1
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Question 9.0 Gotcha's


Updating to (B)LFS 9.0 and came across a few compile errors, don't know if anyone else has run into them but here's my solutions.

Doxygen needs git installed even though its not listed as a dependency.

Xkeyboard-config installs a bad keycode for evdev ( keycodes too high ) preventing X starting up, use this sed to remove these codes:
Code:
sed 's|\(<I[3|5].*>\)|//\1|' /usr/share/X11/xkb/keycodes/evdev
JS needs to have the env var SHELL defined and exported, this used to be in the build instructions in the book but seems to have fell out, building in chroot may mean it's not so use
Code:
 SHELL=/bin/bash
gtk-doc broken on a number of pkgs, usual gtkdevs shit attitude! ( don't get me started! ).

Polkit needs --enable-libelogind=no if optional dep elogind not installed.

Cups needs this to compile
Code:
sed -i '/stat.h/a #include <asm-generic/ioctls.h>' test/ipptool.c
Feel free to add more gotchas to this thread.
 
Old 10-18-2019, 10:31 AM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Original Poster
Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Installing Pygments-2.4.2 module here:
http://www.linuxfromscratch.org/blfs....html#pygments

Seems to fix a number of problems with using gtk-doc this should be a required dependency of gtk-doc not just a recommended dependency.
 
Old 10-19-2019, 03:28 PM   #3
bryan_S
Member
 
Registered: Aug 2014
Location: N. Florida
Distribution: LinuxfromScratch, OpenSuse, Slackware
Posts: 107

Rep: Reputation: Disabled
I'm now using the svn version but the worst 'gotcha' I remember with 9.0 was: (minor) The NINJAJOBS variable didn't work with qtwebengine and (major) the patch applied to qtwebingine resulted in a broken falkon browser. Ksysguard was also broken - nothing but a blank window. Apparently it now also uses qtwebengine. Someone on the mailing list mentioned a broken dolphin but I didn't notice that. That's the longest compile job for me (3:20 hrs/mts) so having to recompile it was a pain. But that fixed it - omitting the patch.
 
1 members found this post helpful.
Old 10-19-2019, 05:31 PM   #4
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Original Poster
Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Thx qt is on my list to do, as for ninjajobs var ninja accepts -j flag same as make to set number of jobs
 
Old 10-22-2019, 10:07 AM   #5
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Original Poster
Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Gvfs-1.40.2
If you haven't installed all thre optional deps you need to add:
-Dgcrypt=false -Dgcr=false -Dudisks2=false -Dlogind=false -Dcdda=false -Dsftp=false
to the meson configure.
I hate meson/ninja its more trouble than its worth!

Compiling rust, DONT!
The build system is a "£$%^&* nightmare! Evry minor change results in a complete recompile at 3/4 hours every time, 3 days later I gave up and installed a prebuilt version like so:
Code:
ARCH=$(uname -m)
wget -c https://static.rust-lang.org/dist/rust-1.35.0-$ARCH-unknown-linux-gnu.tar.gz
tar -xvf rust-1.35.0-$ARCH-unknown-linux-gnu.tar.gz
cd rust-1.35.0-$ARCH-unknown-linux-gnu
./install.sh --prefix=/opt/rust
Also the post install for rust includes an unknown command "pathprepend" which doesn't seem to be in any LFS files so change it to:
Code:
mkdir -vp /etc/profile.d/||true
cat > /etc/profile.d/rustc.sh << "EOF"
# Begin /etc/profile.d/rustc.sh

if ! $(echo "$PATH"|grep "/opt/rust/bin");then
	PATH="${PATH}:/opt/rust/bin"
fi

# End /etc/profile.d/rustc.sh
EOF
 
Old 10-23-2019, 09:07 AM   #6
rabidlinux
Member
 
Registered: Aug 2017
Location: Wild West
Distribution: Arch,Tumbleweed,BLFS 9.0
Posts: 227

Rep: Reputation: Disabled
Thanks for Rustc info

I have had more problems with that and qt-everywhere. I'm redoing my desktop and will give it a try.
 
Old 11-08-2019, 07:11 AM   #7
hendrickxm
Member
 
Registered: Feb 2014
Posts: 344

Rep: Reputation: Disabled
The pathprepend is actually set when you create your /etc/profile postlfs:
http://www.linuxfromscratch.org/blfs...s/profile.html

Last edited by hendrickxm; 11-08-2019 at 08:03 AM.
 
Old 11-08-2019, 08:35 AM   #8
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Original Poster
Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Quote:
Originally Posted by hendrickxm View Post
The pathprepend is actually set when you create your /etc/profile postlfs:
http://www.linuxfromscratch.org/blfs...s/profile.html
thanks searched and searched couldn't find it must be going blind in my old age!
 
Old 02-11-2020, 05:45 AM   #9
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Original Poster
Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Quote:
Originally Posted by bryan_S View Post
I'm now using the svn version but the worst 'gotcha' I remember with 9.0 was: (minor) The NINJAJOBS variable didn't work with qtwebengine and (major) the patch applied to qtwebingine resulted in a broken falkon browser. Ksysguard was also broken - nothing but a blank window. Apparently it now also uses qtwebengine. Someone on the mailing list mentioned a broken dolphin but I didn't notice that. That's the longest compile job for me (3:20 hrs/mts) so having to recompile it was a pain. But that fixed it - omitting the patch.
See this post:
https://www.linuxquestions.org/quest...9/#post6088678
 
Old 02-11-2020, 04:11 PM   #10
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, LFS, Manjaro (for gaming)
Posts: 570

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
I compile Rust on my LFS. It takes me about an hour. I just upgraded my Rust to 1.41 yesterday, in fact.

The thing is to not try to get clever trying to bootstrap it with an existing installed previous version of rust (just let it automatically download binaries into the build tree to get Stage0 off the ground) and don't bother linking against system llvm.

Also, don't compile it as a user then su to root to install it, or it will recompile everything (I've found). If you want to build as a user, use DESTDIR= for the install then chown and copy to $prefix or make the prefix somewhere you own and set environment variables.

Copy config.toml.example to config.toml and edit (uncomment and change settings from their defaults. The following would get you a decent, optimized, non-debug build.

Code:
[build]
# Indicate whether git submodules are managed and updated automatically.
submodules = false

# Enable a build of the extended rust tool set which is not only the compiler
# but also tools such as Cargo. This will also produce "combined installers"
# which are used to install Rust and Cargo together. This is disabled by
# default.
extended = true

[install]
# Instead of installing to /usr/local, install to this path instead.
#prefix = "/usr/local" (defaults to /usr/local which is what I want, but you can change it there)

[rust]
# Number of codegen units to use for each compiler invocation. A value of 0
# means "the number of cores on this machine", and 1+ is passed through to the
# compiler.
codegen-units = 0

# Sets the number of codegen units to build the standard library with,
# regardless of what the codegen-unit setting for the rest of the compiler is.
codegen-units-std = 0

# The "channel" for the Rust build to produce. The stable/beta channels only
# allow using stable features, whereas the nightly and dev channels allow using
# nightly features
channel = "stable"

# Flag indicating whether codegen tests will be run or not. If you get an error
# saying that the FileCheck executable is missing, you may want to disable this.
# Also see the target's llvm-filecheck option.
codegen-tests = false
If you didn't change those codegen-units settings, they default to 1 job which may be why it takes you 4 hours+

Then simply:

Code:
./x.py build
DESTDIR=/some/place ./x.py install
OR, as root, even more simply:

Code:
./x.py build && ./x.py install
I strip the results, but there won't be debugging symbols so it's not that critical.

Note that there is $PREFIX/$libdir/rustlib/uninstall.sh that seems to do the right thing, for uninstalling the previous before installing the new. I've used it several times.

P.S. If you're just going to use it a couple of times, e.g. to compile librsvg and Firefox once, it really doesn't matter, but I compile Firefox very often so it's worth it to me to have a good bootstrapped Rust build.

Last edited by TheRealGrogan; 02-11-2020 at 06:56 PM. Reason: forgot codegen-tests = false
 
Old 02-11-2020, 04:58 PM   #11
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Original Poster
Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Thx for the detailed instructions, I actually only needed rust for librsvg for gimp, so unless i need it again i'll probably just stick to the precompiled version.
 
Old 02-12-2020, 01:11 AM   #12
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, LFS, Manjaro (for gaming)
Posts: 570

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
No problem, I used to feel the same way, that Rust was a horrible pain in the ass to bootstrap. I'd done it with packaging scripting, in Archaroo and Slackware but had difficulty trying to bootstrap it without. Knowing this, for my first one on this new LFS I stepped through the SlackBuild script from Slackware and that worked, but then I later realized that it really doesn't have to be that complicated. Worth sharing.
 
  


Reply

Tags
blfs, compile, errors, gotchas, lfs



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
compiling code gotcha peterlowrie Linux - Software 7 11-17-2013 03:10 PM
LXer: Avoiding the iCloud storage gotcha LXer Syndicated Linux News 0 10-27-2011 04:30 AM
LXer: A Little VCS NFS Gotcha On Solaris 10 LXer Syndicated Linux News 0 02-05-2009 02:10 PM
a gotcha with the at command? stabu Linux - Software 4 12-25-2008 07:09 AM
SOLVED -- Hard-to-find gotcha in OpenVPN jlinkels Linux - Networking 0 07-30-2007 11:34 AM

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

All times are GMT -5. The time now is 07:47 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