delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/05/20/04:13:16

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Authenticated: #13779288
Date: Thu, 20 May 2004 14:44:26 +0700
From: The Thanh Han <hanthethanh AT gmx DOT net>
To: djgpp AT delorie DOT com
Subject: problem with djgpp cross compiler on linux powerpc
Message-ID: <20040520074426.GA7840@monty>
Mime-Version: 1.0
User-Agent: Mutt/1.3.28i
Sender: <thanh AT monty DOT localnet>
Reply-To: djgpp AT delorie DOT com

Hi djgpp lovers,

I hope this is the right place to ask the following question. If not
please let me know.

I used to use djgpp cross compiler running on linux i386 to compile some
programs (pdftex + pdfetex) for msdos target. It worked pretty well and
provided a very convenient way to make binaries for dos without
rebooting my linux box. I tried a few other cross compilers (mingw32,
cygwin) but was most happy with djgpp.

Now I switched to linux ppc, and I would like to be able to
cross-compile for msdos-djgpp target from my linux ppc box. I followed
the instructions I found somewhere on the Internet (sorry I don't
remember the author to give him credit) and made a few minor changes to
get it compiled. The script I used + some comments is avail. at

http://vntex.sourceforge.net/private/thanh/pdftex/djgpp/build-djgppx

and all the log files during compilation is avail at

http://vntex.sourceforge.net/private/thanh/pdftex/djgpp/log.tgz

Then I was able to use that cross-compiler to compile pdftex. But when I
tested the binary on win2k, it crashed. After some trial and errors I
think that using libstdc++ caused that problem. With two minimal test
files:

======= hello-c++.cpp ===============
#include <stdio.h>

main()
{
    printf("Hello, world!\n");
    return 0;
}
=====================================

and

======= hello-c++.cpp ===============
#include <iostream>
using namespace std;

int main()
{
    cout << "Hello, world!" << endl;
    return 0;
}
=====================================

the first one run ok on win2k, while the second one crashed:

=====================================
D:\tmp>hello-c++
Exiting due to signal SIGSEGV
General Protection Fault at eip=0001a19f
eax=00000000 ebx=0003e3d8 ecx=0003e3d8 edx=0058ff80 esi=00000054 edi=00001630
ebp=0058ff58 esp=0058ff54 program=D:\TMP\HELLO-~1.EXE
cs: sel=01a7  base=017b0000  limit=0059ffff
ds: sel=01af  base=017b0000  limit=0059ffff
es: sel=01af  base=017b0000  limit=0059ffff
fs: sel=017f  base=00005300  limit=0000ffff
gs: sel=01bf  base=00000000  limit=0010ffff
ss: sel=01af  base=017b0000  limit=0059ffff
App stack: [00590000..00510000]  Exceptn stack: [000422cc..0004038c]

Call frame traceback EIPs:
  0x0001a19f
  0x0001a3b9
  0x00001668
  0x0000d298
=====================================

Can someone please give me some hints on how to fix it?

Thanks in advance,
Thanh

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019