• 32-bit LXC containers on 64-bit host

    From Ben Collver@bencollver@tilde.pink to alt.os.linux.slackware on Mon Jun 29 17:00:52 2026
    From Newsgroup: alt.os.linux.slackware

    I set up a 32-bit LXC container on a 64-bit host to compile 32-bit
    packages from SlackBuilds. It mostly worked out of the box, but i
    ran into a couple of gotchas because the 64-bit host kernel throws
    off some scripts.

    1) slackpkg doesn't find 32-bit packages

    # slackpkg search m4

    Looking for m4 in package list. Please wait... DONE

    No package name matches the pattern.

    Workaround:

    # ARCH=i486 slackpkg search m4

    Looking for m4 in package list. Please wait... DONE

    The list below shows all packages with name matching "m4".

    [ installed ] - m4-1.4.19-i586-1
    ...

    2) many build scripts use `uname` output to configure software

    Using the i586 GCC to target x86_64 assembly and optimizations results
    in build errors.

    Workaround:

    # mv /usr/bin/uname /usr/bin/uname.orig
    # cat >/usr/bin/uname <<__EOF__
    #!/usr/bin/bash
    /usr/bin/uname.orig $@ | sed -e 's/x86_64/i486/g'
    __EOF__
    # chmod a+rx /usr/bin/uname

    It's crude, but it worked on my machine.

    -Ben
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Sylvain Robitaille@syl@therockgarden.ca to alt.os.linux.slackware on Mon Jun 29 20:05:50 2026
    From Newsgroup: alt.os.linux.slackware

    On 2026-06-29, Ben Collver wrote:

    I set up a 32-bit LXC container on a 64-bit host to compile 32-bit
    packages from SlackBuilds. It mostly worked out of the box, but i
    ran into a couple of gotchas because the 64-bit host kernel throws
    off some scripts.

    Just a thought, perhaps for future consideration, but might you
    have had better luck with spawning a 32-bit virtual "guest" host,
    a-la libvirt/qemu/kvm?

    Doesn't ship *with* Slackware, but it does work well (at least in my
    experience on -current ... I don't recall whether I tried it on 15.0,
    but I don't think that I did).
    --
    ----------------------------------------------------------------------
    Sylvain Robitaille syl@therockgarden.ca ----------------------------------------------------------------------
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From kaukasoina3dore73js4@kaukasoina3dore73js4@sci.fi (Petri Kaukasoina) to alt.os.linux.slackware on Mon Jun 29 20:14:01 2026
    From Newsgroup: alt.os.linux.slackware

    Ben Collver <bencollver@tilde.pink> wrote:
    I set up a 32-bit LXC container on a 64-bit host to compile 32-bit
    packages from SlackBuilds. It mostly worked out of the box, but i
    ran into a couple of gotchas because the 64-bit host kernel throws
    off some scripts.

    Try command 'linux32'.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Ben Collver@bencollver@tilde.pink to alt.os.linux.slackware on Mon Jun 29 23:40:24 2026
    From Newsgroup: alt.os.linux.slackware

    On 2026-06-29, Petri Kaukasoina <kaukasoina3dore73js4@sci.fi> wrote:
    Ben Collver <bencollver@tilde.pink> wrote:
    I set up a 32-bit LXC container on a 64-bit host to compile 32-bit
    packages from SlackBuilds. It mostly worked out of the box, but i
    ran into a couple of gotchas because the 64-bit host kernel throws
    off some scripts.

    Try command 'linux32'.

    Thanks! I learned something new today.. :-)
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Ben Collver@bencollver@tilde.pink to alt.os.linux.slackware on Mon Jun 29 23:46:03 2026
    From Newsgroup: alt.os.linux.slackware

    On 2026-06-29, Sylvain Robitaille <syl@therockgarden.ca> wrote:
    Just a thought, perhaps for future consideration, but might you
    have had better luck with spawning a 32-bit virtual "guest" host,
    a-la libvirt/qemu/kvm?

    Doesn't ship *with* Slackware, but it does work well (at least in my experience on -current ... I don't recall whether I tried it on 15.0,
    but I don't think that I did).

    I am in the process of migrating away from a qemu VM to an LXC
    container. This is in reaction to the qemu project reversing
    policy on contributions from LLM. I mainly use the 32-bit environment
    to build custom packages for my own use with S15Pup (Puppy Linux) on
    32-bit hardware. So far so good!
    --- Synchronet 3.22a-Linux NewsLink 1.2