LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-25-2019, 05:19 AM   #31
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,615
Blog Entries: 19

Rep: Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460

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.
 
Old 09-25-2019, 09:20 AM   #32
krash314
LQ Newbie
 
Registered: Sep 2002
Posts: 10

Rep: Reputation: 0
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.

kr
 
Old 10-02-2019, 11:54 AM   #33
krash314
LQ Newbie
 
Registered: Sep 2002
Posts: 10

Rep: Reputation: 0
I was able to follow Emmett1's HowTo with the 9.0 version of the book to successfully build a multilib system. Thanks.
 
Old 10-02-2019, 12:02 PM   #34
krash314
LQ Newbie
 
Registered: Sep 2002
Posts: 10

Rep: Reputation: 0
Has anyone here successfully run 32 bit X applications on the 64 bit X server on a multilib system?
 
Old 11-02-2019, 03:22 PM   #35
voncloft
Member
 
Registered: Mar 2019
Posts: 57

Rep: Reputation: Disabled
I modded the code for the jhalfs, forcing it to use a svn repo on my server on my LAN

The svn on the server has modded code explained by this guide originally , and some newly added pages as well

I tested it out on a virtualbox and it works!!!

The jhalfs can be optained here: svn co svn://svn.linuxfromscratch.org/ALFS/jhalfs/trunk jhalfs

The jhalfs builds a pure 64 bit OS no 32 bit, with the change listed below it works:

I simply edited the code to which had svn.linuxfromscratch.org to 192.168.1.1/LFS in the Config.in or Makefile I forget which....

My router/server has the svn that I manually edited the pages of the book for LFS.

Last edited by voncloft; 11-03-2019 at 12:36 PM.
 
Old 07-01-2020, 11:43 PM   #36
Steo
LQ Newbie
 
Registered: Jul 2020
Location: Ireland
Distribution: Linux From Scratch
Posts: 15

Rep: Reputation: Disabled
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:
Code:
[4153/4376] Linking CXX shared library lib32/libLLVM-10.so
FAILED: lib32/libLLVM-10.so
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.
 
Old 07-02-2020, 05:13 AM   #37
emmett1
Member
 
Registered: Nov 2017
Location: Malaysia
Distribution: Venom Linux, LFS
Posts: 49

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Steo View Post
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:
Code:
[4153/4376] Linking CXX shared library lib32/libLLVM-10.so
FAILED: lib32/libLLVM-10.so
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.
 
Old 07-02-2020, 09:56 AM   #38
Steo
LQ Newbie
 
Registered: Jul 2020
Location: Ireland
Distribution: Linux From Scratch
Posts: 15

Rep: Reputation: Disabled
Quote:
Originally Posted by emmett1 View Post
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!
 
Old 07-02-2020, 10:01 AM   #39
emmett1
Member
 
Registered: Nov 2017
Location: Malaysia
Distribution: Venom Linux, LFS
Posts: 49

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Steo View Post
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
 
Old 07-02-2020, 11:33 AM   #40
Steo
LQ Newbie
 
Registered: Jul 2020
Location: Ireland
Distribution: Linux From Scratch
Posts: 15

Rep: Reputation: Disabled
Quote:
Originally Posted by emmett1 View Post
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.

Last edited by Steo; 07-07-2020 at 12:52 PM.
 
Old 07-13-2020, 11:56 AM   #41
Steo
LQ Newbie
 
Registered: Jul 2020
Location: Ireland
Distribution: Linux From Scratch
Posts: 15

Rep: Reputation: Disabled
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...
 
Old 09-12-2020, 11:45 PM   #42
voncloft
Member
 
Registered: Mar 2019
Posts: 57

Rep: Reputation: Disabled
glibc fails....I don't know why!!

Code:
In file included from <command-line>:
../sysdeps/unix/sysv/linux/gettimeofday.c:55:29: error: 'gettimeofday' alias between functions of incompatible types 'int(struct timeval * restrict,  void * restrict)' and 'int (*(void))(struct timeval *, void *)' [-Werror=attribute-alias]
 weak_alias (__gettimeofday, gettimeofday)
                             ^~~~~~~~~~~~
./../include/libc-symbols.h:152:26: note: in definition of macro '_weak_alias'
   extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))) \
                          ^~~~~~~~~
../sysdeps/unix/sysv/linux/gettimeofday.c:55:1: note: in expansion of macro 'weak_alias'
 weak_alias (__gettimeofday, gettimeofday)
 ^~~~~~~~~~
In file included from <command-line>:
../sysdeps/unix/sysv/linux/gettimeofday.c:41:13: note: aliased declaration here
 libc_ifunc (__gettimeofday,
             ^~~~~~~~~~~~~~
./../include/libc-symbols.h:903:25: note: in definition of macro '__ifunc_resolver'
   __typeof (type_name) *name##_ifunc (arg)    \
                         ^~~~
./../include/libc-symbols.h:1019:32: note: in expansion of macro '__ifunc'
 #define libc_ifunc(name, expr) __ifunc (name, name, expr, void, INIT_ARCH)
                                ^~~~~~~
../sysdeps/unix/sysv/linux/gettimeofday.c:41:1: note: in expansion of macro 'libc_ifunc'
 libc_ifunc (__gettimeofday,
 ^~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [/mnt/lfs/sources/glibc-2.31/build32/sysd-rules:127: /mnt/lfs/sources/glibc-2.31/build32/time/gettimeofday.os] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/mnt/lfs/sources/glibc-2.31/time'
make[1]: *** [Makefile:470: time/subdir_lib] Error 2
make[1]: Leaving directory '/mnt/lfs/sources/glibc-2.31'
make: *** [Makefile:9: all] Error 2
 
Old 09-13-2020, 05:15 AM   #43
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,615
Blog Entries: 19

Rep: Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460Reputation: 4460
Is there going to be an update to cover the new build sequence?
 
Old 09-13-2020, 09:51 AM   #44
bryan_S
Member
 
Registered: Aug 2014
Location: N. Florida
Distribution: Linux-from-Scratch
Posts: 109

Rep: Reputation: Disabled
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.
 
Old 10-22-2020, 08:45 AM   #45
Steo
LQ Newbie
 
Registered: Jul 2020
Location: Ireland
Distribution: Linux From Scratch
Posts: 15

Rep: Reputation: Disabled
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.
 
  


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
Howto: Simple multilib setup for x86_64 LFS ordealbyfire83 Linux From Scratch 7 03-02-2015 03:59 PM
[ANN] mk-slack64-multilib : A tool to create slackware64+multilib tree/iso phenixia2003 Slackware 5 12-28-2012 05:42 AM
upgrading slackware64 13.1 multilib to slackware64 -current multilib Cultist Slackware 4 03-12-2011 09:04 AM
[SOLVED] Broffice not compile on Slack64(multilib or no multilib);SlackBuild afreitascs Slackware 4 06-14-2010 07:16 AM
LFS-7.0-cross-lfs-20050902-x86_64-Multilib Basel Linux From Scratch 0 09-03-2005 05:03 AM

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

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