Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 13 additions & 16 deletions build-scripts/oe/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ sed -i '/^start)$/a mkdir -p /dev/shm/network/' /etc/init.d/networking
PKGS=""
PKGS="$PKGS openssh-server openssl"
PKGS="$PKGS sed wget cvs subversion git-core coreutils unzip texi2html texinfo docbook-utils gawk python-pysqlite2 diffstat help2man make gcc build-essential g++ desktop-file-utils chrpath cpio screen bash-completion python3 iputils-ping" # OE main deps
PKGS="$PKGS guilt iasl quilt bin86 bcc libsdl1.2-dev liburi-perl genisoimage policycoreutils unzip vim sudo rpm curl libncurses5-dev libc6-dev-amd64 libelf-dev" # OpenXT-specific deps
PKGS="$PKGS guilt iasl quilt bin86 bcc libsdl1.2-dev liburi-perl genisoimage policycoreutils unzip vim sudo rpm curl libncurses5-dev libc6-dev-i386 libelf-dev" # OpenXT-specific deps
PKGS="$PKGS xorriso mtools dosfstools" # installer & efiboot.img

apt-get update
Expand All @@ -43,24 +43,24 @@ apt-get -y install $PKGS </dev/null || apt-get -y install $PKGS </dev/null
mkdir -p /tmp/ghc-prereq
cd /tmp/ghc-prereq
cat >sums <<EOF
2da6978f6a86d2292b58080314f93f5f5fea3de0f5fcae7083105c8f2cf4f27fbb6521db230c66b3e51eb289d99f575b libgmp3c2_4.3.2+dfsg-1_i386.deb
8a4e137826251e97a39347b6dcf75ae817ac608a79c29a3984ec5d4f0facf0d999c4411f85beb288f813dc3ad756a020 libgmp3-dev_4.3.2+dfsg-1_i386.deb
ed14f5864e26fe66aa683ade021d8d993168acd9561b70f06a87ff5e70668eab49efd9919892fa8e7dcc8df704eda811 libgmpxx4ldbl_4.3.2+dfsg-1_i386.deb
e16a0ebd9a78ab45675f3d2005903325329539b200b2e632878b19d544dfdb6360edbba30fd79872c29b7294c6031db8 libgmp3c2_4.3.2+dfsg-1_amd64.deb
dc6a4f88d4bf32254916c70ba77cb4b8eddfefb3164e8458a987ef8de5725262f1bb32578365db6c5df68bc735cfa1ce libgmp3-dev_4.3.2+dfsg-1_amd64.deb
eec6ce0392ed808f1526cc214a88453581c0895079dd43e844618514a31094d664181172df87980b3d9062978ff5a27f libgmpxx4ldbl_4.3.2+dfsg-1_amd64.deb
EOF
wget http://archive.debian.org/debian/pool/main/g/gmp/libgmpxx4ldbl_4.3.2+dfsg-1_i386.deb
wget http://archive.debian.org/debian/pool/main/g/gmp/libgmp3c2_4.3.2+dfsg-1_i386.deb
wget http://archive.debian.org/debian/pool/main/g/gmp/libgmp3-dev_4.3.2+dfsg-1_i386.deb
wget http://archive.debian.org/debian/pool/main/g/gmp/libgmpxx4ldbl_4.3.2+dfsg-1_amd64.deb
wget http://archive.debian.org/debian/pool/main/g/gmp/libgmp3c2_4.3.2+dfsg-1_amd64.deb
wget http://archive.debian.org/debian/pool/main/g/gmp/libgmp3-dev_4.3.2+dfsg-1_amd64.deb
sha384sum -c sums --quiet || exit 1
dpkg -i libgmpxx4ldbl_4.3.2+dfsg-1_i386.deb libgmp3c2_4.3.2+dfsg-1_i386.deb libgmp3-dev_4.3.2+dfsg-1_i386.deb
dpkg -i libgmpxx4ldbl_4.3.2+dfsg-1_amd64.deb libgmp3c2_4.3.2+dfsg-1_amd64.deb libgmp3-dev_4.3.2+dfsg-1_amd64.deb

# Install the required version of GHC
cd /tmp
cat >sums <<EOF
1cfdc92a0173b7d0aeea9e178a1990f37b9ef47d22cc463eb3d7f18c41595a0bcae9dfd26a55234291a9ae5cb4bef99a ghc-6.12.3-i386-unknown-linux-n.tar.bz2
0a803af298fb89143599406b82725744c7567be08a0a5ba18b724b0ad9d5421cc3402c7a49670d5d850a4c4cac122f98 ghc-6.12.3-x86_64-unknown-linux-n.tar.bz2
EOF
wget http://www.haskell.org/ghc/dist/6.12.3/ghc-6.12.3-i386-unknown-linux-n.tar.bz2
wget https://downloads.haskell.org/~ghc/6.12.3/ghc-6.12.3-x86_64-unknown-linux-n.tar.bz2
sha384sum -c sums --quiet || exit 1
tar jxf ghc-6.12.3-i386-unknown-linux-n.tar.bz2
tar jxf ghc-6.12.3-x86_64-unknown-linux-n.tar.bz2
cd ghc-6.12.3
./configure --prefix=/usr
make install
Expand All @@ -70,11 +70,8 @@ echo "dash dash/sh boolean false" > /tmp/preseed.txt
debconf-set-selections /tmp/preseed.txt
dpkg-reconfigure -f noninteractive dash

# Hack: Make uname report a 32bits kernel
mv /bin/uname /bin/uname.real
echo '#!/bin/bash' > /bin/uname
echo '/bin/uname.real $@ | sed "s/amd64/i686/g" | sed "s/x86_64/i686/g"' >> /bin/uname
chmod +x /bin/uname
# Add a symlink required to build some packages, like hkg-hsyslog
ln -s /lib64/ld-linux-x86-64.so.2 /lib/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have more details on this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the binaries used to build the Hackage projects were observed to look for ld-linux-x86-64.so.2 in /lib rather than /lib64.

Copy link
Author

@crogers1 crogers1 Mar 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specifically: running dist/build/System/Posix/Syslog_hsc_make failed
Syslog_hsc_make isn't called on every Hackage package, that's why it only fails for some of them. But if you ldd it, you can see how the ld-linux path is odd in an x64 container

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, thanks. I've seen that ld-linux issue before with precompiled binaries. The commit lacked details though, so I didn't know if it was the same issue.

The comment is inaccurate since the symlink is required to run (some) precompiled Haskell tools.


# Add a build user
adduser --disabled-password --gecos "" ${CONTAINER_USER}
Expand Down
2 changes: 1 addition & 1 deletion build-scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ EOF

# Create a container for the main part of the OpenXT build
[ -z $NO_OE ] && setup_container "01" "oe" \
"debian" "${DEBIAN_MIRROR}" "--arch i386 --release jessie"
"debian" "${DEBIAN_MIRROR}" "--arch amd64 --release jessie"

# Create a container for the Debian tool packages for OpenXT
[ -z $NO_DEBIAN ] && setup_container "02" "debian" \
Expand Down