Hi Gabriel.

Thanks for the advice.  It seems like the Ocaml interpreter installed on my
system was using "flexdll" instead of gcc to do the linking, and "flexdll"
did not understand the "-g" flag.  Based on advice provided here (
http://caml.inria.fr/mantis/view.php?id=4645), the option was supposed to be
"-link -g" and not just -g; "-link -g" sends the command "-g" to gcc.

My fix was to change the following portion in "Makefile.ocaml":

ifdef CAML_NOOPT
 ifdef WIN32
   COMPILE_FLAGS    += -ccopt /Zi -ccopt /Od
   LINK_FLAGS       += -ccopt /Zi -ccopt /Od
 else
   COMPILE_FLAGS    += -g -ccopt -g
   ifdef MINGW
     LINK_FLAGS       += -g
   else
     LINK_FLAGS       += -g -ccopt -g
   endif
 endif
else

to

ifdef CAML_NOOPT
 ifdef WIN32
   COMPILE_FLAGS    += -ccopt /Zi -ccopt /Od
   LINK_FLAGS       += -ccopt /Zi -ccopt /Od
 else
   COMPILE_FLAGS    += -g -ccopt -g
   ifdef MINGW
     LINK_FLAGS       += -g
   else
     LINK_FLAGS       += -g -ccopt *"-link -g"*
   endif
 endif
else

with the changes emboldened (the quotation marks are important).  However, I
am not sure what else I have to modify to ensure that this particular change
is only used when "flexdll" is used to link on a system, as opposed to when
gcc is used, because gcc does not understand the "-link -g" command line
option.  (I'm new to Makefiles.)

However, I have run into another problem.  I get the following error
message:

Linking bytecode obj/x86_WIN32/cilly.byte.exe
+ flexlink -chain cygwin -merge-manifest -exe -o
'obj/x86_WIN32/cilly.byte.exe'   '-L/usr/lib/ocaml' -link -g
'/tmp/camlprimd53f80.c' '-lcamlstr' '-lunix' '-lunix' '-lstr'
'obj/x86_WIN32/perfcount.o' '-lcamlrun' -I'/usr/lib/ocaml' -lm  -lcurses
-lpthread
** Fatal error: Cannot find file "libstr"
File "_none_", line 1, characters 0-1:
Error: Error while building custom runtime system
make: *** [obj/x86_WIN32/cilly.byte.exe] Error 2

Any suggestions?

Thanks,
Jon.

On 2 January 2011 06:09, Gabriel Kerneis <kern...@pps.jussieu.fr> wrote:

> On Sun, Jan 02, 2011 at 05:01:10AM -0800, Jonathan Kotker wrote:
> > It seems like flexlink is being given an option that it does not
> understand,
> > but I am not able to trace where this command is coming from so I can
> modify
> > this option.  Could you provide any suggestions for a fix?  FWIW, I'm
> using
> > the Ocaml 3.12 interpreter.
>
> Have a look at the Makefile in the ocamlutil directory.
>
> If you find what is going wrong, could you please send a patch on this
> list?  Many thanks in advance.
>
> Best regards,
> --
> Gabriel Kerneis
>
------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
CIL-users mailing list
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users

Reply via email to