Version française
Home     About     Download     Resources     Contact us    
Browse thread
Strange compilation problem
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Matthieu Dubuget <matthieu.dubuget@g...>
Subject: Re: Strange compilation problem
Here are some more infos. I increased flexlink.exe verbosity.
First, the failing log, then the working one, and at last a diff of both.

>  ocamlfind opt -o test.exe -linkpkg -package miniscan test.ml -cclib
-v -cclib -v -cclib -v
> ** Use cygpath: true
> ** Search path:
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/miniscan
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/traite
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/okenveloppe
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/okfft
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/dsn153
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/log
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/tics
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/num
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/ojson
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/mtsvrac
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/miniscan
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/traite
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/okenveloppe
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/okfft
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/dsn153
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/log
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/tics
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/num
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/ojson
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/mtsvrac
> C:/cygwin/home/matt/ocamlmgw/lib
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/miniscan
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/traite
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/okenveloppe
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/okfft
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/dsn153
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/log
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/tics
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/num
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/ojson
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/mtsvrac
> /lib/mingw
> /lib
> /lib/w32api
> /usr/lib/gcc/i686-pc-mingw32/3.4.4
> ** Default libraries:
> crt2.o
> -lmingw32
> -lgcc
> -lmoldname
> -lmingwex
> -lmsvcrt
> -luser32
> -lkernel32
> -ladvapi32
> -lshell32
> ** open: C:/cygwin/lib/mingw/crt2.o
> ** Fatal error: Cannot find file "libmingw32"
> File "caml_startup", line 1, characters 0-1:
> Error: Error during linking

And the working one:

> ocamlfind opt -linkpkg -package
mtsvrac,ojson,log,dsn153,okenveloppe,traite
-I                                                                              
c:/cygwin/home/matt/ocamlmgw/lib/site-lib/miniscan mini.cmxa test.ml -o
test.ex                                                                             
e -cclib -v -cclib -v
> ** Use cygpath: true
> ** Search path:
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/traite
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/okenveloppe
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/okfft
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/dsn153
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/log
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/tics
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/num
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/ojson
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/mtsvrac
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/traite
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/okenveloppe
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/okfft
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/dsn153
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/log
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/tics
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/num
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/ojson
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/mtsvrac
> C:/cygwin/home/matt/ocamlmgw/lib
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/traite
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/okenveloppe
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/okfft
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/dsn153
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/log
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/tics
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/num
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/ojson
> C:/cygwin/home/matt/ocamlmgw/lib/site-lib/mtsvrac
> c:/cygwin/home/matt/ocamlmgw/lib/site-lib/miniscan
> /lib/mingw
> /lib
> /lib/w32api
> /usr/lib/gcc/i686-pc-mingw32/3.4.4
> ** Default libraries:
> crt2.o
> -lmingw32
> -lgcc
> -lmoldname
> -lmingwex
> -lmsvcrt
> -luser32
> -lkernel32
> -ladvapi32
> -lshell32
> ** open: C:/cygwin/lib/mingw/crt2.o
> ** open: C:/cygwin/lib/mingw/libmingw32.a
> ** open: C:/cygwin/lib/gcc/i686-pc-mingw32/3.4.4/libgcc.a
> ** open: C:/cygwin/lib/mingw/libmoldname.a
> ** open: C:/cygwin/lib/mingw/libmingwex.a
> ** open: C:/cygwin/lib/mingw/libmsvcrt.a
> ** open: C:/cygwin/lib/w32api/libuser32.a
> ** open: C:/cygwin/lib/w32api/libkernel32.a
> ** open: C:/cygwin/lib/w32api/libadvapi32.a
> ** open: C:/cygwin/lib/w32api/libshell32.a
> + gcc -mno-cygwin -mconsole  -L.
-I"C:/cygwin/home/matt/ocamlmgw/lib/site-lib/tr

(gcc command truncated)


Following is a diff output of both.


*** c:/DOCUME~1/matt/LOCALS~1/Temp/ediff3236JTj    Wed Feb 11 12:59:13 2009
--- c:/DOCUME~1/matt/LOCALS~1/Temp/ediff3236Wdp    Wed Feb 11 12:59:13 2009
***************
*** 1,7 ****
! >  ocamlfind opt -o test.exe -linkpkg -package miniscan test.ml -cclib
-v -cclib -v -cclib -v
  > ** Use cygpath: true
  > ** Search path:
- > C:/cygwin/home/matt/ocamlmgw/lib/site-lib/miniscan
  > C:/cygwin/home/matt/ocamlmgw/lib/site-lib/traite
  > C:/cygwin/home/matt/ocamlmgw/lib/site-lib/okenveloppe
  > C:/cygwin/home/matt/ocamlmgw/lib/site-lib/okfft
--- 1,6 ----
! > ocamlfind opt -linkpkg -package
mtsvrac,ojson,log,dsn153,okenveloppe,traite
-I                                                                              
c:/cygwin/home/matt/ocamlmgw/lib/site-lib/miniscan mini.cmxa test.ml -o
test.exe -cclib -v -cclib -v
  > ** Use cygpath: true
  > ** Search path:
  > C:/cygwin/home/matt/ocamlmgw/lib/site-lib/traite
  > C:/cygwin/home/matt/ocamlmgw/lib/site-lib/okenveloppe
  > C:/cygwin/home/matt/ocamlmgw/lib/site-lib/okfft
***************
*** 11,17 ****
  > C:/cygwin/home/matt/ocamlmgw/lib/site-lib/num
  > C:/cygwin/home/matt/ocamlmgw/lib/site-lib/ojson
  > C:/cygwin/home/matt/ocamlmgw/lib/site-lib/mtsvrac
- > C:/cygwin/home/matt/ocamlmgw/lib/site-lib/miniscan
  > C:/cygwin/home/matt/ocamlmgw/lib/site-lib/traite
  > C:/cygwin/home/matt/ocamlmgw/lib/site-lib/okenveloppe
  > C:/cygwin/home/matt/ocamlmgw/lib/site-lib/okfft
--- 10,15 ----
***************
*** 22,28 ****
  > C:/cygwin/home/matt/ocamlmgw/lib/site-lib/ojson
  > C:/cygwin/home/matt/ocamlmgw/lib/site-lib/mtsvrac
  > C:/cygwin/home/matt/ocamlmgw/lib
- > C:/cygwin/home/matt/ocamlmgw/lib/site-lib/miniscan
  > C:/cygwin/home/matt/ocamlmgw/lib/site-lib/traite
  > C:/cygwin/home/matt/ocamlmgw/lib/site-lib/okenveloppe
  > C:/cygwin/home/matt/ocamlmgw/lib/site-lib/okfft
--- 20,25 ----
***************
*** 32,37 ****
--- 29,35 ----
  > C:/cygwin/home/matt/ocamlmgw/lib/site-lib/num
  > C:/cygwin/home/matt/ocamlmgw/lib/site-lib/ojson
  > C:/cygwin/home/matt/ocamlmgw/lib/site-lib/mtsvrac
+ > c:/cygwin/home/matt/ocamlmgw/lib/site-lib/miniscan
  > /lib/mingw
  > /lib
  > /lib/w32api
***************
*** 48,52 ****
  > -ladvapi32
  > -lshell32
  > ** open: C:/cygwin/lib/mingw/crt2.o
! > ** Fatal error: Cannot find file "libmingw32"
! > File "caml_startup", line 1, characters 0-1:
--- 46,58 ----
  > -ladvapi32
  > -lshell32
  > ** open: C:/cygwin/lib/mingw/crt2.o
! > ** open: C:/cygwin/lib/mingw/libmingw32.a
! > ** open: C:/cygwin/lib/gcc/i686-pc-mingw32/3.4.4/libgcc.a
! > ** open: C:/cygwin/lib/mingw/libmoldname.a
! > ** open: C:/cygwin/lib/mingw/libmingwex.a
! > ** open: C:/cygwin/lib/mingw/libmsvcrt.a
! > ** open: C:/cygwin/lib/w32api/libuser32.a
! > ** open: C:/cygwin/lib/w32api/libkernel32.a
! > ** open: C:/cygwin/lib/w32api/libadvapi32.a
! > ** open: C:/cygwin/lib/w32api/libshell32.a
! > + gcc -mno-cygwin -mconsole  -L.
-I"C:/cygwin/home/matt/ocamlmgw/lib/site-lib/tr

Thanks

Salutations

Matt