Willibald Krenn
Hello!
Today I tried to run a 'Hello world' console-only program that I did in Kylix on SuSE 8.0(?). Unfortunately it did not run on SuSE 9.0 AMD64 because Kylix uses a function that includes following call:
IconvContext := iconv_open(nl_langinfo(_NL_CTYPE_CODESET_NAME), 'UNICODELITTLE');
The problem here is, that IconvContext is always -1, which leads to a runtime error in Kylix based applications.
This should work without problems. Can you send me the static program, privatly? If this fails, you have a glibc problem...
The constants are defined as LC_CTYPE = 0; _NL_CTYPE_CODESET_NAME = LC_CTYPE shl 16 + 14; libc = 'libc.so.6';
The functions map to function nl_langinfo(item: integer): pchar; cdecl; external libc name 'nl_langinfo'; and function iconv_open(ToCode: PChar; FromCode: PChar): Integer; cdecl; external libc name 'iconv_open';
I hope the linker knows that a 32bit program needs the 32bit library, if not specified otherwise... But I guess that works, because of
Yes, that should work - and does indeed.
ldd Project2 /lib/libNoVersion.so.1 => /lib/libNoVersion.so.1 (0x40017000) libpthread.so.0 => /lib/libpthread.so.0 (0x40030000) libdl.so.2 => /lib/libdl.so.2 (0x40083000) libc.so.6 => /lib/libc.so.6 (0x40086000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
A program using libs build against glibc 2.0, that's ancient...
Any ideas what's going on here?
Run strace on it and check what it does. Run ltrace and look at it...
"strace -cfirvx -o dccstrace ./dcc" just gives % time seconds usecs/call calls errors syscall 100.00 0.000000 0 total
When starting the IDE with strace, I get the following messages (The 64-bit process is probably due to a 'source' command in the start-script.) strace -cfirvx -o delphistrace ./startdelphi [ Process PID=10678 runs in 32 bit mode. ] [ Process PID=10657 runs in 64 bit mode. ] ./startdelphi: line 26: 10678 Speicherzugriffsfehler /home/willi/kylix3/bin/ delphi $*
Actually there are syscalls that returned errors in the logfile. However, I don't know if that helps - because on my 32bit SuSE Linux there are errors too, and Kylix runs fine..
P.S.: I can not find the ltrace32 tool mentioned in the documentation on my system or on the DVD.
It might be on the ftp server only, I'll check next week,
Thanks.
BTW: DDD has problems debugging 32bit executables and there is no ddd32 available.
No, there're isn't a ddd32 yet - but grab yourself the i586 package of ddd and install the file... Andreas -- Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj SuSE Linux AG, Maxfeldstr. 5, 90409 Nürnberg, Germany GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126