Open buster opened 9 years ago
Oh ! That's perfect ! We need someone to check and add/replace conversion like i32 as c_int
on 32 bit computer everywhere there's warning. Could you do that please ?
Hmm. Didn't expect this to not have been tested at all. Checking 32-bit stuff on a 64-bit system should be pretty easy, just make a 32-bit chroot. Too bad travis doesn't provide this...
A 32-bit chroot ?
Oh.. you might not be running Linux?.. My bad haha.
Problem is that compiling rgtk on that netbook takes around 45 minutes or something like that, chroot on a beefier machine seems to be the better option
In case anyone finds it useful, a 32-bit chroot is as simple as [UPDATED]
DIR=ubuntu32
RELEASE=vivid
mkdir $DIR
sudo debootstrap --arch i386 $RELEASE $DIR http://archive.ubuntu.com/ubuntu/
sudo mount -t proc proc $DIR/proc
sudo mount -t devtmpfs dev $DIR/dev
sudo setarch i386 chroot $DIR /bin/bash
This will also allow to test with various GTK versions.
@gkoz: I'm under linux and I didn't know that, thanks for the tip !
@GuillaumeGomez
Uh... actually rustc dies on me in this setup... even when I add setarch i386
. So maybe not as simple as I thought.
That was just laziness though, when running a system in a chroot you need to mount /proc
and /dev
:)
Hum... I was going to use a linux live usb to test 32-bit (taht's how I was doing before) but I'll give a try to your solution.
So the more correct way to start the chroot would be
DIR=ubuntu32
sudo mount -t proc proc $DIR/proc
sudo mount -t devtmpfs dev $DIR/dev
sudo setarch i386 chroot $DIR /bin/bash
And if you're going to use a recent version of Ubuntu, your kernel better not be too old...
As I want to be able to compile this Rust binding for GTK+ on ARMv7, which is also a 32-bit architecture, I am currently working on a patch that fixes this particular issue.
Also, to set up a 32-bit chroot, do the following:
Download a rootfs for the distribution you want to use:
mkdir chroot32
debootstrap --arch=i386 --foreign jessie chroot32 http://http.debian.net/debian
chroot chroot32 /debootstrap/debootstrap --second-stage
mkdir chroot32
wget -O - http://distfiles.gentoo.org/releases/x86/autobuilds/$(wget -O - http://distfiles.gentoo.org/releases/x86/autobuilds/latest-stage-i686.txt 2>/dev/null | tail -n1 | tr ' ' '\n' | head -n1) | tar xvjp -C chroot32
wget -O - http://distfiles.gentoo.org/releases/snapshots/current/portage-latest.tar.bz2 | tar xjp -C chroot32/usr/
mkdir chroot32
wget -O - http://cdimage.ubuntu.com/ubuntu-core/releases/14.10/release/ubuntu-core-14.10-core-i386.tar.gz | tar xvzp -C chroot32
mount -t proc none chroot32/proc
for i in {dev,sys,tmp}; do mount -o bind /$i chroot32/$i; done
cp /etc/resolv.conf chroot32/etc/resolv.conf
chroot chroot32 /bin/bash
Note: you can also save this as a shell script.
Simply type exit
. You can save the following shell script to clean it all up:
for i in {dev,proc,sys,tmp}; do umount chroot32/$i; done
Hi,
i just wanted to compile my program on i386 (Atom based netbook) but the steps show the following errors. I guess this is due to the netbook being 32bit? Or could this be something different?