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.
I've done it with LFS 9.0 and didn't run into any problems apart from the ones noted above. Your link is to the svn version so there could be a problem there. That "cannot create executables" thing usually occurs when gcc is trying to use the wrong architecture for your build system.
Thank you Hazel. Sometimes you can't see the forest for the trees.
I think I misread Emmitt1's original post. I thought Emmitt1 was following the multilib book at the link in my last post. After re-reading the original post, it looks like he is applying some of the things in the multilib book to the basic LFS book. I will try this approach. Thanks.
Hi. I've managed to build an LFS system with xfce (for the time being at least). I tried to implement multilib into it via this method, but by just recompiling glibc, gcc, and binutils. I built the toolchain as explained, then just installed the dependencies to my LFS system when it came to chapter 6. However, I'm running into an issue with LLVM 10 when it comes to BLFS. When I try to compile it, ninja is just throwing:
Hi. I've managed to build an LFS system with xfce (for the time being at least). I tried to implement multilib into it via this method, but by just recompiling glibc, gcc, and binutils. I built the toolchain as explained, then just installed the dependencies to my LFS system when it came to chapter 6. However, I'm running into an issue with LLVM 10 when it comes to BLFS. When I try to compile it, ninja is just throwing:
I'm building with a 3700X, so this would have 16 threads running. By the time it exits, I get:
Code:
/usr/bin/ld: /usr/lib/libffi.so: error adding symbols: file in wrong format
collect2: error: ld returned 1 exit status
[4170/4376] Building CXX object tools/...Files/llvm-readobj.dir/ELFDumper.cpp.o
ninja: build stopped: subcommand failed.
Does anyone know what could possibly cause this? I can provide more info if needed. Thanks in advance.
Looks like its trying to linking to libffi.so library but it does not find 32bit library, only 64bit library found, then it caused failed. So you need to install 32bit libraries of libffi. In my system, 32bit llvm is depends on 32bit libffi.
Looks like its trying to linking to libffi.so library but it does not find 32bit library, only 64bit library found, then it caused failed. So you need to install 32bit libraries of libffi. In my system, 32bit llvm is depends on 32bit libffi.
Ah that explains it then thanks. I just installed libffi with:
Code:
CC="gcc -m32" \
CXX="g++ -m32" \
PKG_CONFIG_PATH="/usr/lib32/pkgconfig" \
./configure --prefix=/usr \
--libdir=/usr/lib32
make
make DESTDIR=$PWD/DESTDIR install
cp -Rv DESTDIR/usr/lib32/* /usr/lib32
Now I get the same error but about libxml2.so instead of libffi. I'll just use this command to install 32-bit versions of each one it needs. Thanks for this guide!
Ah that explains it then thanks. I just installed libffi with:
Code:
CC="gcc -m32" \
CXX="g++ -m32" \
PKG_CONFIG_PATH="/usr/lib32/pkgconfig" \
./configure --prefix=/usr \
--libdir=/usr/lib32
make
make DESTDIR=$PWD/DESTDIR install
cp -Rv DESTDIR/usr/lib32/* /usr/lib32
Now I get the same error but about libxml2.so instead of libffi. I'll just use this command to install 32-bit versions of each one it needs. Thanks for this guide!
Yes, same issue and same solution, just build required 32bit library, again ;D
Yes, same issue and same solution, just build required 32bit library, again ;D
I've been trying to work my way back and ended up running into a Python issue (while trying to resolve libxml2). Trying to properly compile Python 2.7 with 32 bit libs results in issues relating to other dependencies, right back to tk and tcl. Tcl then tells me that it can't find part of its own library: "/usr/bin/ld: cannot find -ltclstub8.6".
I kept a backup of my toolchain from chapter 5 (built from the guide in the first post). Where should I go from here ideally? I'm assuming the same command from above should work on the likes of tcl and tk, but it doesn't seem to. Also, Python was just throwing this, which is why I need tcl and tk:
Code:
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../libtk8.6.so when searching for -ltk8.6
/usr/bin/ld: skipping incompatible /usr/lib/libtk8.6.so when searching for -ltk8.6
/usr/bin/ld: cannot find -ltk8.6
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../libtcl8.6.so when searching for -ltcl8.6
/usr/bin/ld: skipping incompatible /usr/lib/libtcl8.6.so when searching for -ltcl8.6
/usr/bin/ld: cannot find -ltcl8.6
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/../../../libX11.so when searching for -lX11
/usr/bin/ld: skipping incompatible /usr/lib/libX11.so when searching for -lX11
/usr/bin/ld: cannot find -lX11
collect2: error: ld returned 1 exit status
Python build finished, but the necessary bits to build these modules were not found:
bsddb185 nis sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
Failed to build these modules:
_bsddb _curses _curses_panel
_hashlib _sqlite3 _ssl
_tkinter bz2 cmath
dbm gdbm math
readline
EDIT: I think I managed to sort out tcl, but tk (tk8.6.10) seems to be reporting incompatible libs that I know I installed the 32-bit version of. I'm using the --libdir=/usr/lib32 argument and it still just throws out incompatible errors, which makes me wonder if it's trying to compile a 64-bit version, or just finding the 64-bit libs.
EDIT2: I think Python is my hurdle right now actually, I just need to figure out how to compile 32-bit versions of it successfully. I'm having problems with --enable-unicode=ucs4, and I'm having to use --disable-ipv6. I can't remove the --enable-unicode=ucs4 argument, otherwise I just get unicode errors while trying to compile libxml2. :P
EDIT3: I think Python 3 managed to work, but LLVM is trying to use Python 2.7 during the process it seems.
EDIT4: I retraced my steps, and it seemed libxml2 could be compiled with Python 3, which resulted in me managing to install 32-bit llvm. Steam still reports libGL.so.1 and libdrm.so.2 are missing, but this seems to be mesa related from what people are saying.
____
UPDATE: I went through the multilib folder from the github link in the first post and managed to get mesa 32-bit libs installed. Vulkan doesn't seem to be working for me at the moment despite vulkan-icd-loader being present, but I'm sure this is just something small causing this.
Hey, sorry for the double. I'm just wondering has anyone managed to install vulkan and have wine find it during configure (both 32 and 64-bit versions)? It doesn't seem to even find Vulkan 64-bit for me despite installing Vulkan-Loader. I tried Lutris, and this only complains that Vulkan i386 is missing, meaning it manages to find the 64-bit version, though I'm not having much luck installing the loader as 32-bit either...
You can get a current version of LFS multilib book via SVN if you have that installed. See this post on the mailing list: http://lists.linuxfromscratch.org/pi...st/053839.html I just built a complete multilib version of that book that i checked out on Sept 2 (essentially same as version 10.0). That was svn version 12043. There was one problem i think with respect to Ncurses in that revision. I needed to add
Code:
--with-pkg-config-libdir=/usr/lib/pkgconfig
option, or it would put stuff in /usr/lib32/pkgconfig. I am a bit surprised they didn't include a ML version with the official releases, or at least mention on the download page how to get it.
I ended up getting everything to work and making some Python scripts to keep things up to date. It hasn't all been smooth sailing of course, but I've learned a lot in the process. The system seems pretty stable for the most part, and multilib works fine for both Steam and Wine. Thanks for this info on multilib.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.