From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id B200E7F30A for ; Wed, 27 Feb 2013 17:24:07 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of oliver@first.in-berlin.de) identity=pra; client-ip=192.109.42.8; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="oliver@first.in-berlin.de"; x-sender="oliver@first.in-berlin.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of oliver@first.in-berlin.de) identity=mailfrom; client-ip=192.109.42.8; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="oliver@first.in-berlin.de"; x-sender="oliver@first.in-berlin.de"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@einhorn.in-berlin.de) identity=helo; client-ip=192.109.42.8; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="oliver@first.in-berlin.de"; x-sender="postmaster@einhorn.in-berlin.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApQKAH8yLlHAbSoIe2dsb2JhbABFhk+2LYUYAnsWDgEBFiYEI4JJBHYRAgUhAhEFGIhXBAidYY5VkmAVgQ6NNIJxMmEDjjKIDoEfkR6BNw X-IPAS-Result: ApQKAH8yLlHAbSoIe2dsb2JhbABFhk+2LYUYAnsWDgEBFiYEI4JJBHYRAgUhAhEFGIhXBAidYY5VkmAVgQ6NNIJxMmEDjjKIDoEfkR6BNw X-IronPort-AV: E=Sophos;i="4.84,747,1355094000"; d="scan'208";a="3652844" Received: from einhorn.in-berlin.de ([192.109.42.8]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 27 Feb 2013 17:24:06 +0100 X-Envelope-From: oliver@first.in-berlin.de X-Envelope-To: Received: from first (e178002249.adsl.alicedsl.de [85.178.2.249]) (authenticated bits=0) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id r1RGO5Zn013943 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Wed, 27 Feb 2013 17:24:05 +0100 Received: by first (Postfix, from userid 1000) id 2204B15400E6; Wed, 27 Feb 2013 17:24:04 +0100 (CET) Date: Wed, 27 Feb 2013 17:24:05 +0100 From: oliver To: caml-list@inria.fr Message-ID: <20130227162405.GA6223@siouxsie> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 Subject: [Caml-list] OCamlMakefile, file, ocamljobinfo, opam, ocamlbrew -> something does not fit together 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