[gs-devel] ghostscript crosscompiling: segfault in binaries compiled with 64bit host system

Luotao Fu l.fu at pengutronix.de
Wed Jan 2 05:57:07 PST 2008


Hi list, I use a 64-bit system as host system to crosscompile gs for a 32bit arm
system.  (using toolchains we build with our own toolchain building mechanism:
http://www.pengutronix.de/oselas/toolchain/index_de.html) The compilation went
well with some modfications (as mentioned in my previous mail). However the
binary quits with a segfault on the arm system. I did a quick trace with gdb:
.....
Program received signal SIGSEGV, Segmentation fault.
0x000d86c0 in gc_objects_clear_marks ()
(gdb)
(gdb) bt
#0  0x000d86c0 in gc_objects_clear_marks ()
#1  0x000d9150 in gs_gc_reclaim ()
#2  0x00159fd4 in context_reclaim ()
#3  0x000b7adc in ireclaim ()
#4  0x000b3760 in interp_reclaim ()
#5  0x000ab32c in gs_main_finit ()
#6  0x0003f2c8 in main ()

I did some quick search on this in google and got nothing usable. Seemed that
some distros got similar problems, but I could not find any further fix reports.

After some searching and trying I recompiled gs on a 32bit host machine and it
worked eventually perfectly. Seemed that gs generates stuffs during compiling,
which depends on the architecture of the host system. I suppose things like size
of objects on variables in memory might have been defined during compiletime, as
an effect of which I got my segfault while using binaries compiled. Since gs is
a quite complex software I'm not very sure where I should start searching.

Any hints? Is this problem already known or even fixed some where?

My toolchain contains gcc 4.1.2 and glibc 2.5. The source package of my
toolchain can be obtained here:
http://www.pengutronix.de/oselas/toolchain/download/OSELAS.Toolchain-1.1.1.tar.bz2

Thanx for any hints

cheers
Luotao Fu
-- 
   Dipl.-Ing. Luotao Fu | Phone: +49-5121-206917-3
Pengutronix - Linux Solutions for Science and Industry
Entwicklungszentrum Nord     http://www.pengutronix.de

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://ghostscript.com/pipermail/gs-devel/attachments/20080102/70be72d3/attachment.pgp


More information about the gs-devel mailing list