caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Stefano Zacchiroli <zack@cs.unibo.it>
To: Inria Ocaml Mailing List <caml-list@inria.fr>
Subject: [Caml-list] [long] issue in bytecode on hppa architecture
Date: Mon, 20 Aug 2001 15:13:13 +0200	[thread overview]
Message-ID: <20010820151313.A7739@cs.unibo.it> (raw)

  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


                 reply	other threads:[~2001-08-20 13:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010820151313.A7739@cs.unibo.it \
    --to=zack@cs.unibo.it \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).