[GHC] #9421: magic number mismatch when installing 32bit on 64bit machine
GHC
ghc-devs at haskell.org
Sat Aug 30 19:44:03 UTC 2014
#9421: magic number mismatch when installing 32bit on 64bit machine
-------------------------------------+-------------------------------------
Reporter: | Owner:
MikolajKonarski | Status: new
Type: bug | Milestone:
Priority: normal | Version: 7.8.3
Component: Compiler | Keywords:
Resolution: | Architecture: x86_64 (amd64)
Operating System: Linux | Difficulty: Unknown
Type of failure: Installing | Blocked By:
GHC failed | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Comment (by MikolajKonarski):
I've worked around the gtk problems by replacing ghc with
{{{
ghc-7.8.3 -optc-m32 -opta-m32 -optl-m32 $@
}}}
and by setting up the following symlinks (installing both i386 and amd64
versions of gtk dev libs is not supported on my Ubuntu):
{{{
sudo ln -s /lib/i386-linux-gnu/libglib-2.0.so.0 /usr/lib/i386-linux-
gnu/libglib-2.0.so
sudo ln -s /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 /usr/lib/i386
-linux-gnu/libgobject-2.0.so
sudo ln -s /usr/lib/i386-linux-gnu/libgio-2.0.so.0 /usr/lib/i386-linux-
gnu/libgio-2.0.so
sudo ln -s /usr/lib/i386-linux-gnu/libcairo.so.2 /usr/lib/i386-linux-
gnu/libcairo.so
sudo ln -s /usr/lib/i386-linux-gnu/libpango-1.0.so.0 /usr/lib/i386-linux-
gnu/libpango-1.0.so
sudo ln -s /usr/lib/i386-linux-gnu/libpangocairo-1.0.so.0 /usr/lib/i386
-linux-gnu/libpangocairo-1.0.so
sudo ln -s /usr/lib/i386-linux-gnu/libgthread-2.0.so.0 /usr/lib/i386
-linux-gnu/libgthread-2.0.so
sudo ln -s /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0 /usr/lib/i386
-linux-gnu/libgtk-x11-2.0.so
sudo ln -s /usr/lib/i386-linux-gnu/libgdk-x11-2.0.so.0 /usr/lib/i386
-linux-gnu/libgdk-x11-2.0.so
sudo ln -s /usr/lib/i386-linux-gnu/libatk-1.0.so.0 /usr/lib/i386-linux-
gnu/libatk-1.0.so
sudo ln -s /usr/lib/i386-linux-gnu/libpangoft2-1.0.so.0 /usr/lib/i386
-linux-gnu/libpangoft2-1.0.so
sudo ln -s /usr/lib/i386-linux-gnu/libgdk_pixbuf-2.0.so.0 /usr/lib/i386
-linux-gnu/libgdk_pixbuf-2.0.so
sudo ln -s /usr/lib/i386-linux-gnu/libfreetype.so.6 /usr/lib/i386-linux-
gnu/libfreetype.so
sudo ln -s /usr/lib/i386-linux-gnu/libfontconfig.so.1 /usr/lib/i386
-linux-gnu/libfontconfig.so
sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-
gnu/libX11.so
}}}
The GTK calls in the generated binary work great and the binary is
reported as
{{{
ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically
linked (uses shared libs), for GNU/Linux 2.6.24,
BuildID[sha1]=0x46cf78948f9bad6f6beed815d6c0f71679830324, stripped
}}}
However, there is an unrelated problem: whenever compressions is required
the binary crashes with
{{{
user error (Codec.Compression.Zlib: incompatible zlib version)
}}}
The ldd utility reports
{{{
libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xf7025000)
}}}
recompiling zlib package with zlib1g-dev:i386 or without and with various
hacky symlinks doesn't help.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9421#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list