[Clfs-support] [lfs-dev] lfs-multilib question

Roger Koehler roger.o.koehler at gmail.com
Sat Sep 9 09:06:50 PDT 2017


On Fri, Sep 8, 2017 at 11:38 PM, Nathan Coulson <conathan at gmail.com> wrote:
> On 8 September 2017 at 06:19, Roger Koehler <roger.o.koehler at gmail.com> wrote:
>> On Thu, Sep 7, 2017 at 9:52 PM, Ken Moffat <zarniwhoop at ntlworld.com> wrote:
>>> On Fri, Sep 08, 2017 at 02:12:05PM +1100, evanation wrote:
>>>> Can I recompile other libraries as needed, but not in the installation process?
>>>>
>>>> 2017-09-08 13:10 GMT+11:00 James B <jamesbond3142 at gmail.com>:
>>>> > On Fri, 8 Sep 2017 11:50:00 +1100
>>>> > evanation <evanation.ru at gmail.com> wrote:
>>>> >
>>>> >> to get a multilib, is it enough in chapter 5 and in chapter 6 to
>>>> >> compile glibc-32bit and glibc-64bit?
>>>> >
>>>> > No.
>>>> >
>>>> > In addition to glibc, almost all other libraries in both chapters needs to be build in 32/64 version.
>>>> > You may instead check CLFS: http://clfs.org/view/sysvinit/x86_64/ (this is for x86-64 platform, there are similar guides for other platform too).
>>>> >
>>>
>>> It's a long time since I built multilib - I compile everything from
>>> source, I have no need for 32-bit x86.  But my memory says "Maybe
>>> you can build other libaries 32-bit - as needed - after booting."
>>>
>>> It all depends on what you want to do with the system - CLFS will
>>> give you a system where you can compile 32-bit as well as 64-bit.
>>> If all you want to do is run some 32-bit binary (statically linked
>>> so that it doesn't need more than libc) then just building glibc as
>>> 32-bit might work.
>>>
>>> OTOH, it might not - if you want to do it, you can test it and find
>>> out.  A quick test (trying to compile a mickey-mouse program with
>>> gcc -m32) on x86_64 failed because I lack the 32-bit stubs which I
>>> think come from glibc.  But for at least a couple of years we (LFS)
>>> have had to build libstdc++ to get everything working, so I suspect
>>> that all the toolchain (binutils, gcc, glibc, and the extra libs
>>> added into the pass1 gcc build) will need to be built as both 32-bit
>>> and 64-bit.  I'm assuming sysvinit - for systemd you probably also
>>> need 32-bit versions of whatever libraries that requires, and their
>>> dependencies.
>>>
>>> Summary: I can't personally see the point of multilib (so much extra
>>> to build, then for everything in BLFS you need to specify -m32 or
>>> -m64, and --libdir when it is not lib), but you will get more
>>> reliable results from following the CLFS build - or more learning
>>> experiences by trying to simplify it :)
>>
>> The compelling reason for me is so that I can run applications that
>> depend on 32-bit Microsoft libraries that can be emulated by wine when
>> properly (with the 32-bit libraries) installed.
>>
>> I don't have a lot of extra time, so I've been hoping that someone on
>> one of these lists will publish an easy, step by step (in the LFS
>> tradition) guide on how to do it.
>>
>> I like LFS/BLFS because of how up-to-date (thanks Bruce, et al) and
>> especially how easy jhalfs (thanks Pierre, et al) makes it to build a
>> complete, working, system (as long as you don't mind quickly
>> inspecting and editing some of the scripts that are generated, the
>> majority of which just work as is).
>>
>> I like how the jhalfs tools include a simple way to keep the system up
>> to date by simply running "make update" in blfs_root and now includes
>> the LFS book.
>>
>> It would be really great if there were a simple add on to LFS/BLFS
>> that you could select in jhalfs to add the necessary 32-bit libraries
>> to build wine. (I have been frustrated trying to follow CLFS, and
>> would like to just add to an existing 64-bit LFS/BLFS system.)
>>
>> Great works guys.
>>
> I had a similar desire for some basic multilib 32bit support myself,
> and documented my setup at http://www.nathancoulson.com/proj_lfs.php

This is a great start! Any ambitions to update it? Since LFS 8.0, the
/lib and /usr/lib are now all 64-bit (used to be /lib64 and
/usr/lib64), so since "the time of this writing" on your web page, the
book has moved "primarily" to 64-bit (as opposed to "primarely
designed to work on 32bit x86 processors"). I think it would be great
to add a wine section to BLFS that includes adding the /lib32 and
/usr/lib32 directories.



More information about the Clfs-support mailing list