From: oliver <oliver@first.in-berlin.de>
To: caml-list@inria.fr
Subject: [Caml-list] OCamlMakefile, file, ocamljobinfo, opam, ocamlbrew -> something does not fit together
Date: Wed, 27 Feb 2013 17:24:05 +0100 [thread overview]
Message-ID: <20130227162405.GA6223@siouxsie> (raw)
Hello,
when using the Linux-Install, together with OCamlMakefile,
and I set the target to be a byteocde-file, 'file'
reports me, that it is a bytecode file.
Using opam, the same project compiled anew, and 'file' asked again on this,
it answers, that an ELF executable has been created.
Involved tools:
ocaml 3.11.2
OCamlMakefile
opam -> ocaml 4.00.1
older Ubuntu-install (which was the reason to chose opam for easy usage of ocaml 4.00.1)
Details for both compilations see below:
Building the code with OCaml-installation from the Linux-dsitribution:
----------------------------------------------------------------------
################################################################################################
################################################################################################
################################################################################################
oliver@siouxsie:~/Programmierung/ANY-DL/any-dl$ make clean
rm -f any-dl any-dl.top cli.cmi parsetreetypes.cmi scriptparser.cmi scriptlexer.cmi parsers.cmi network.cmi main.cmi cli.cmo parsetreetypes.cmo scriptparser.cmo scriptlexer.cmo parsers.cmo network.cmo main.cmo cli.cmx parsetreetypes.cmx scriptparser.cmx scriptlexer.cmx parsers.cmx network.cmx main.cmx cli.asm parsetreetypes.asm scriptparser.asm scriptlexer.asm parsers.asm network.asm main.asm cli.s parsetreetypes.s scriptparser.s scriptlexer.s parsers.s network.s main.s cli.o parsetreetypes.o scriptparser.o scriptlexer.o parsers.o network.o main.o scriptlexer.ml scriptparser.mli scriptparser.ml any-dl.cma any-dl.cmxa any-dl.a any-dl.cmi any-dl.cmo any-dl.cmi any-dl.cmx any-dl.o cli.annot parsetreetypes.annot scriptparser.annot scriptlexer.annot parsers.annot network.annot main.annot .cmi .cmo .cmx .o dllany-dl_stubs.so
rm -rf ._bcdi ._ncdi ._d
oliver@siouxsie:~/Programmierung/ANY-DL/any-dl$ make
ocamllex scriptlexer.mll
59 states, 586 transitions, table size 2698 bytes
ocamlyacc -v scriptparser.mly
make[1]: Entering directory `/home/oliver/Programmierung/ANY-DL/any-dl'
ocamlfind ocamldep scriptparser.mli > ._bcdi/scriptparser.di
ocamlfind ocamldep scriptparser.ml > ._d/scriptparser.d
ocamlfind ocamldep scriptlexer.ml > ._d/scriptlexer.d
ocamlfind ocamldep main.ml > ._d/main.d
ocamlfind ocamldep network.ml > ._d/network.d
ocamlfind ocamldep parsers.ml > ._d/parsers.d
ocamlfind ocamldep parsetreetypes.ml > ._d/parsetreetypes.d
ocamlfind ocamldep cli.ml > ._d/cli.d
make[1]: Leaving directory `/home/oliver/Programmierung/ANY-DL/any-dl'
make[1]: Entering directory `/home/oliver/Programmierung/ANY-DL/any-dl'
ocamlfind ocamlc -package pcre,netstring,netsys,netclient,curl,xml-light -c cli.ml
ocamlfind ocamlc -package pcre,netstring,netsys,netclient,curl,xml-light -c parsetreetypes.ml
File "parsetreetypes.ml", line 89, characters 28-1359:
Warning P: this pattern-matching is not exhaustive.
Here is an example of a value that is not matched:
(Show_tags|Title_extract)
ocamlfind ocamlc -package pcre,netstring,netsys,netclient,curl,xml-light -c scriptparser.mli
ocamlfind ocamlc -package pcre,netstring,netsys,netclient,curl,xml-light -c scriptparser.ml
ocamlfind ocamlc -package pcre,netstring,netsys,netclient,curl,xml-light -c scriptlexer.ml
ocamlfind ocamlc -package pcre,netstring,netsys,netclient,curl,xml-light -c parsers.ml
File "parsers.ml", line 57, characters 10-14:
Warning Y: unused variable base.
ocamlfind ocamlc -package pcre,netstring,netsys,netclient,curl,xml-light -c network.ml
ocamlfind ocamlc -package pcre,netstring,netsys,netclient,curl,xml-light -c main.ml
File "main.ml", line 307, characters 78-89:
Warning Y: unused variable max_col_idx.
File "main.ml", line 306, characters 78-89:
Warning Y: unused variable max_row_idx.
File "main.ml", line 561, characters 55-803:
Warning S: this expression should have type unit.
File "main.ml", line 118, characters 8-9:
Warning U: this match case is unused.
ocamlfind ocamlc \
-package pcre,netstring,netsys,netclient,curl,xml-light -linkpkg \
-o any-dl \
cli.cmo parsetreetypes.cmo scriptparser.cmo scriptlexer.cmo parsers.cmo network.cmo main.cmo
make[1]: Leaving directory `/home/oliver/Programmierung/ANY-DL/any-dl'
oliver@siouxsie:~/Programmierung/ANY-DL/any-dl$ which file
/usr/bin/file
oliver@siouxsie:~/Programmierung/ANY-DL/any-dl$ file ./any-dl
./any-dl: a /usr/bin/ocamlrun script text executable
oliver@siouxsie:~/Programmierung/ANY-DL/any-dl$ which ocamlobjinfo
/usr/bin/ocamlobjinfo
oliver@siouxsie:~/Programmierung/ANY-DL/any-dl$ ocamlobjinfo ./any-dl
File ./any-dl
Not an object file
oliver@siouxsie:~/Programmierung/ANY-DL/any-dl$ ocamlc -v
The Objective Caml compiler, version 3.11.2
Standard library directory: /usr/lib/ocaml
oliver@siouxsie:~/Programmierung/ANY-DL/any-dl$ uname -a
Linux siouxsie 2.6.32-45-generic #104-Ubuntu SMP Tue Feb 19 21:20:09 UTC 2013 x86_64 GNU/Linux
oliver@siouxsie:~/Programmierung/ANY-DL/any-dl$ ls -l ./any-dl
-rwx------ 1 oliver oliver 532296 2013-02-27 17:16 ./any-dl
oliver@siouxsie:~/Programmierung/ANY-DL/any-dl$
################################################################################################
################################################################################################
################################################################################################
Building from within opam (ocamlbrew-install)
---------------------------------------------
################################################################################################
################################################################################################
################################################################################################
oliver@siouxsie:~/Programmierung/ANY-DL/any-dl$
oliver@siouxsie:~/Programmierung/ANY-DL/any-dl$ cd
oliver@siouxsie:~$ source ocamlbrew/ocaml-4.00.1/etc/ocamlbrew.bashrc
oliver@siouxsie:~$ cd Programmierung/ANY-DL/any-dl
oliver@siouxsie:~/Programmierung/ANY-DL/any-dl$ make clean
rm -f any-dl any-dl.top cli.cmi parsetreetypes.cmi scriptparser.cmi scriptlexer.cmi parsers.cmi network.cmi main.cmi cli.cmo parsetreetypes.cmo scriptparser.cmo scriptlexer.cmo parsers.cmo network.cmo main.cmo cli.cmx parsetreetypes.cmx scriptparser.cmx scriptlexer.cmx parsers.cmx network.cmx main.cmx cli.asm parsetreetypes.asm scriptparser.asm scriptlexer.asm parsers.asm network.asm main.asm cli.s parsetreetypes.s scriptparser.s scriptlexer.s parsers.s network.s main.s cli.o parsetreetypes.o scriptparser.o scriptlexer.o parsers.o network.o main.o scriptlexer.ml scriptparser.mli scriptparser.ml any-dl.cma any-dl.cmxa any-dl.a any-dl.cmi any-dl.cmo any-dl.cmi any-dl.cmx any-dl.o cli.annot parsetreetypes.annot scriptparser.annot scriptlexer.annot parsers.annot network.annot main.annot .cmi .cmo .cmx .o dllany-dl_stubs.so
rm -rf ._bcdi ._ncdi ._d
oliver@siouxsie:~/Programmierung/ANY-DL/any-dl$ make
ocamllex scriptlexer.mll
59 states, 586 transitions, table size 2698 bytes
ocamlyacc -v scriptparser.mly
make[1]: Entering directory `/home/oliver/Programmierung/ANY-DL/any-dl'
ocamlfind ocamldep scriptparser.mli > ._bcdi/scriptparser.di
ocamlfind ocamldep scriptparser.ml > ._d/scriptparser.d
ocamlfind ocamldep scriptlexer.ml > ._d/scriptlexer.d
ocamlfind ocamldep main.ml > ._d/main.d
ocamlfind ocamldep network.ml > ._d/network.d
ocamlfind ocamldep parsers.ml > ._d/parsers.d
ocamlfind ocamldep parsetreetypes.ml > ._d/parsetreetypes.d
ocamlfind ocamldep cli.ml > ._d/cli.d
make[1]: Leaving directory `/home/oliver/Programmierung/ANY-DL/any-dl'
make[1]: Entering directory `/home/oliver/Programmierung/ANY-DL/any-dl'
ocamlfind ocamlc -package pcre,netstring,netsys,netclient,curl,xml-light -c cli.ml
ocamlfind ocamlc -package pcre,netstring,netsys,netclient,curl,xml-light -c parsetreetypes.ml
File "parsetreetypes.ml", line 91, characters 20-21:
Warning 28: wildcard pattern given as argument to a constant constructor
File "parsetreetypes.ml", line 92, characters 20-21:
Warning 28: wildcard pattern given as argument to a constant constructor
File "parsetreetypes.ml", line 94, characters 20-21:
Warning 28: wildcard pattern given as argument to a constant constructor
File "parsetreetypes.ml", line 105, characters 20-21:
Warning 28: wildcard pattern given as argument to a constant constructor
File "parsetreetypes.ml", line 112, characters 20-21:
Warning 28: wildcard pattern given as argument to a constant constructor
File "parsetreetypes.ml", line 117, characters 20-21:
Warning 28: wildcard pattern given as argument to a constant constructor
File "parsetreetypes.ml", line 118, characters 20-21:
Warning 28: wildcard pattern given as argument to a constant constructor
File "parsetreetypes.ml", line 120, characters 20-21:
Warning 28: wildcard pattern given as argument to a constant constructor
File "parsetreetypes.ml", line 121, characters 20-21:
Warning 28: wildcard pattern given as argument to a constant constructor
File "parsetreetypes.ml", line 122, characters 20-21:
Warning 28: wildcard pattern given as argument to a constant constructor
File "parsetreetypes.ml", line 89, characters 28-1359:
Warning 8: this pattern-matching is not exhaustive.
Here is an example of a value that is not matched:
(Title_extract|Show_tags)
ocamlfind ocamlc -package pcre,netstring,netsys,netclient,curl,xml-light -c scriptparser.mli
ocamlfind ocamlc -package pcre,netstring,netsys,netclient,curl,xml-light -c scriptparser.ml
ocamlfind ocamlc -package pcre,netstring,netsys,netclient,curl,xml-light -c scriptlexer.ml
ocamlfind ocamlc -package pcre,netstring,netsys,netclient,curl,xml-light -c parsers.ml
File "parsers.ml", line 57, characters 10-14:
Warning 26: unused variable base.
ocamlfind ocamlc -package pcre,netstring,netsys,netclient,curl,xml-light -c network.ml
ocamlfind ocamlc -package pcre,netstring,netsys,netclient,curl,xml-light -c main.ml
File "main.ml", line 561, characters 55-803:
Warning 10: this expression should have type unit.
File "main.ml", line 118, characters 8-9:
Warning 11: this match case is unused.
File "main.ml", line 306, characters 78-89:
Warning 26: unused variable max_row_idx.
File "main.ml", line 307, characters 78-89:
Warning 26: unused variable max_col_idx.
ocamlfind ocamlc \
-package pcre,netstring,netsys,netclient,curl,xml-light -linkpkg \
-o any-dl \
cli.cmo parsetreetypes.cmo scriptparser.cmo scriptlexer.cmo parsers.cmo network.cmo main.cmo
make[1]: Leaving directory `/home/oliver/Programmierung/ANY-DL/any-dl'
oliver@siouxsie:~/Programmierung/ANY-DL/any-dl$ which file
/usr/bin/file
oliver@siouxsie:~/Programmierung/ANY-DL/any-dl$ file ./any-dl
./any-dl: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped
oliver@siouxsie:~/Programmierung/ANY-DL/any-dl$ which ocamlobjinfo
/home/oliver/ocamlbrew/ocaml-4.00.1/.opam/4.00.1/bin/ocamlobjinfo
oliver@siouxsie:~/Programmierung/ANY-DL/any-dl$ ocamlobjinfo ./any-dl
File ./any-dl
Imported units:
df8ee7bad361cb537d09e4bb18955092 Nethtml_scanner
2d117bc31abe3f739088533c71268158 Netsockaddr
2693889a299a12395f3d4a288142de6d Char
7190d7c40e63fe697d97f79fe473bdfc Netdb
6ec9ee0b4d14b6d1f8c2003f9d9711af Weak
6794e4dd1f7bce43eb0c78ccc07079ce Netstring_pcre
a278de7977c4e90a76c017b399cb4957 Netsys
a28bf8306752816019fc1d1e4e4f0f23 XmlParser
db19aeb2a8d7e9bd0f4c54d51c6a433e Filename
4d5efba91ec70acd7b184fd4b277708c Array
###### [ SNIP ] #################################################################################
2304379281517541c7f89e4cf0427091 Scriptparser
98878e7dee7e27c5eecdba6876512f1b Dtd
98878e7dee7e27c5eecdba6876512f1b Dtd
0d5ecd8dffcffac43aec2ebe427d3bde Int64
fedf84da3d313aea51e03bb7d7c99a3b Pcre
15180b63f2c77ba4bc762b7271674af8 Netsys_posix
15180b63f2c77ba4bc762b7271674af8 Netsys_posix
Primitives used:
helper_curl_easy_init
helper_curl_easy_duphandle
helper_curl_easy_setopt
helper_curl_easy_perform
helper_curl_easy_cleanup
helper_curl_easy_getinfo
helper_curl_global_init
helper_curl_global_cleanup
helper_curl_escape
###### [ SNIP ] #################################################################################
caml_weak_set
caml_weak_create
caml_register_named_value
caml_terminfo_resume
###### [ SNIP ] #################################################################################
caml_ml_open_descriptor_in
caml_nativeint_of_string
caml_nativeint_format
caml_nativeint_compare
caml_nativeint_to_int32
caml_nativeint_of_int32
caml_nativeint_to_float
caml_nativeint_of_float
caml_nativeint_to_int
caml_nativeint_of_int
caml_nativeint_shift_right_unsigned
caml_nativeint_shift_right
caml_nativeint_shift_left
###### [ SNIP ] #################################################################################
caml_array_unsafe_set_addr
caml_array_unsafe_get
caml_array_unsafe_get_float
caml_array_set
caml_array_set_float
caml_array_set_addr
caml_array_get
caml_array_get_float
caml_array_get_addr
caml_update_dummy
caml_alloc_dummy_float
caml_alloc_dummy
oliver@siouxsie:~/Programmierung/ANY-DL/any-dl$ ocamlc -v
The OCaml compiler, version 4.00.1
Standard library directory: /home/oliver/ocamlbrew/ocaml-4.00.1/.opam/4.00.1/lib/ocaml
oliver@siouxsie:~/Programmierung/ANY-DL/any-dl$ uname -a
Linux siouxsie 2.6.32-45-generic #104-Ubuntu SMP Tue Feb 19 21:20:09 UTC 2013 x86_64 GNU/Linux
oliver@siouxsie:~/Programmierung/ANY-DL/any-dl$ ls -l ./any-dl
-rwx------ 1 oliver oliver 1105629 2013-02-27 17:08 ./any-dl
oliver@siouxsie:~/Programmierung/ANY-DL/any-dl$
################################################################################################
################################################################################################
################################################################################################
################################################################################################
oliver@siouxsie:~/Programmierung/ANY-DL/any-dl$ grep all Makefile
#all: native-code
all: byte-code
#all: debug-code
oliver@siouxsie:~/Programmierung/ANY-DL/any-dl$
################################################################################################
Something does not fit together here...
Any ideas?
This was discussed here:
https://github.com/OCamlPro/opam-repository/issues/451
The issue was closed already, but IMHO the problem is not solved.
Ciao,
Oliver
next reply other threads:[~2013-02-27 16:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-27 16:24 oliver [this message]
2013-02-27 16:26 ` oliver
2013-02-27 16:32 ` oliver
2013-02-27 16:40 ` oliver
2013-02-27 19:31 ` oliver
2013-02-27 20:39 ` Török Edwin
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=20130227162405.GA6223@siouxsie \
--to=oliver@first.in-berlin.de \
--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