caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] [long] issue in bytecode on hppa architecture
@ 2001-08-20 13:13 Stefano Zacchiroli
  0 siblings, 0 replies; only message in thread
From: Stefano Zacchiroli @ 2001-08-20 13:13 UTC (permalink / raw)
  To: Inria Ocaml Mailing List

  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 <zack@cs.unibo.it> 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-08-20 13:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-20 13:13 [Caml-list] [long] issue in bytecode on hppa architecture Stefano Zacchiroli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).