From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA03812; Mon, 20 Aug 2001 15:12:28 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA03831 for ; Mon, 20 Aug 2001 15:12:27 +0200 (MET DST) Received: from mailrelay3.inwind.it ([212.141.54.103]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f7KDCQ915463 for ; Mon, 20 Aug 2001 15:12:26 +0200 (MET DST) Received: from dalamar.krynn.it (62.98.123.214) by mailrelay3.inwind.it (5.5.029) id 3B45958F00BB5CC5 for caml-list@inria.fr; Mon, 20 Aug 2001 15:12:24 +0200 Received: from kitiara.krynn.it (kitiara.krynn.it [192.168.1.116]) by dalamar.krynn.it (8.12.0.Beta7/8.12.0.Beta7/Debian 8.12.0-1) with ESMTP id f7KDCM4B001511 for ; Mon, 20 Aug 2001 15:12:22 +0200 Received: from kitiara.krynn.it (localhost [127.0.0.1]) by localhost (8.12.0.Beta12/8.12.0.Beta12/Debian 8.12.0.Beta12) with ESMTP id f7KDDDEs007822 for ; Mon, 20 Aug 2001 15:13:13 +0200 Received: (from zack@localhost) by kitiara.krynn.it (8.12.0.Beta12/8.12.0.Beta12/Debian 8.12.0.Beta12) id f7KDDD5A007820 for caml-list@inria.fr; Mon, 20 Aug 2001 15:13:13 +0200 Date: Mon, 20 Aug 2001 15:13:13 +0200 From: Stefano Zacchiroli To: Inria Ocaml Mailing List Subject: [Caml-list] [long] issue in bytecode on hppa architecture Message-ID: <20010820151313.A7739@cs.unibo.it> Mail-Followup-To: Inria Ocaml Mailing List Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline User-Agent: Mutt/1.3.18i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I've a problem porting ocaml findlib on hppa architecture and also on m68k architecture. The problem seems (to me) related to bytecode compilation and or execution (cause no native code compiler is available at the moment). Ocaml findlib works well on my i386 linux box, and compiles well in bytecode form on hppa and m68k architecture, but on these architecture refuse to work (read: refuse to execute the first bytecode instruction!). Follows the strange behaviour and a strace report, I've marked with "<<--" two error message that seems to be reported by ocamlrun and not by the compiled executable! In the strace report I notice (look at "<<--") that after opening the ocamlfind executable a lseek is done and the file is read starting at 16 byte from the bottom, after this the interpreter die saying "no bytecode file specified". Any hint? TIA, cheers. zack@paer:~$ ls -al `which ocamlfind` -rwxr-xr-x 1 root root 150656 Jul 6 15:14 /usr/bin/ocamlfind zack@paer:~$ file `which ocamlfind` /usr/bin/ocamlfind: ELF 32-bit MSB executable, PA-RISC, version 1, dynamically linked (uses shared libs), stripped zack@paer:~$ ocamlfind No bytecode file specified. <<-- zack@paer:~$ ocamlfind --help Unknown option --help. <<-- zack@paer:~$ strace ocamlfind execve("/usr/bin/ocamlfind", ["ocamlfind"], [/* 17 vars */]) = 0 newuname({sys="Linux", node="paer", ...}) = 0 brk(0) = 0x48000 open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 idle() = 0 mmap(NULL, 33659, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40019000 close(3) = 0 open("/lib/libm.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\2\1\3\0\0\0\0\0\0\0\0\0\3\0\17\0\0\0\1\0\0\244"..., 1024) = 1024 idle() = 0 zack@paer:~$ strace ocamlfind execve("/usr/bin/ocamlfind", ["ocamlfind"], [/* 17 vars */]) = 0 newuname({sys="Linux", node="paer", ...}) = 0 brk(0) = 0x48000 open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 idle() = 0 mmap(NULL, 33659, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40019000 close(3) = 0 open("/lib/libm.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\2\1\3\0\0\0\0\0\0\0\0\0\3\0\17\0\0\0\1\0\0\244"..., 1024) = 1024 idle() = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40022000 mmap(NULL, 592524, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4002a000 mprotect(0x400a9000, 72332, PROT_NONE) = 0 mmap(0x400b8000, 12288, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x7e000) = 0x400b8000 close(3) = 0 open("/lib/libncurses.so.5", O_RDONLY) = 3 zack@paer:~$ !strace strace ocamlfind execve("/usr/bin/ocamlfind", ["ocamlfind"], [/* 17 vars */]) = 0 newuname({sys="Linux", node="paer", ...}) = 0 brk(0) = 0x48000 open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory) open("/etc/ld.so.cache", O_RDONLY) = 3 idle() = 0 mmap(NULL, 33659, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40019000 close(3) = 0 open("/lib/libm.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\2\1\3\0\0\0\0\0\0\0\0\0\3\0\17\0\0\0\1\0\0\244"..., 1024) = 1024 idle() = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40022000 mmap(NULL, 592524, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4002a000 mprotect(0x400a9000, 72332, PROT_NONE) = 0 mmap(0x400b8000, 12288, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x7e000) = 0x400b8000 close(3) = 0 open("/lib/libncurses.so.5", O_RDONLY) = 3 read(3, "\177ELF\1\2\1\3\0\0\0\0\0\0\0\0\0\3\0\17\0\0\0\1\0\1&\20"..., 1024) = 1024 idle() = 0 mmap(NULL, 395808, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x400bb000 mprotect(0x40101000, 109088, PROT_NONE) = 0 mmap(0x40110000, 36864, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x45000) = 0x40110000 mmap(0x40119000, 10784, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40119000 close(3) = 0 open("/lib/libc.so.6", O_RDONLY) = 3 read(3, "\177ELF\1\2\1\3\0\0\0\0\0\0\0\0\0\3\0\17\0\0\0\1\0\2\300"..., 1024) = 1024 idle() = 0 mmap(NULL, 1417616, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4011c000 mprotect(0x40259000, 119184, PROT_NONE) = 0 mmap(0x40268000, 45056, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x13c000) = 0x40268000 mmap(0x40273000, 12688, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40273000 close(3) = 0 munmap(0x40019000, 33659) = 0 getpid() = 13582 brk(0) = 0x48000 brk(0x48020) = 0x48020 brk(0x49000) = 0x49000 newstat("/usr/local/bin/ocamlfind", 0xbff00588) = -1 ENOENT (No such file or directory) newstat("/usr/bin/ocamlfind", {st_mode=S_IFREG|0755, st_size=150656, ...}) = 0 open("/usr/bin/ocamlfind", O_RDONLY) = 3 read(3, "\177E", 2) = 2 lseek(3, -16, SEEK_END) = 150640 read(3, "\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0", 16) = 16 <<-- close(3) = 0 write(2, "No bytecode file specified.\n", 28No bytecode file specified. ) = 28 exit(2) = ? -- Stefano "Zack" Zacchiroli ICQ# 33538863 Home Page: http://www.students.cs.unibo.it/~zacchiro Undergraduate student of Computer Science @ University of Bologna, Italy - Information wants to be Open - ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr