Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004860OCamlOCaml generalpublic2009-09-08 14:192009-09-13 18:51
Reporterjohnwhitington 
Assigned Toxleroy 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version3.11.1 
Target VersionFixed in Version3.11.2+dev 
Summary0004860: 3.11.1 fails to link mixed C/Ocaml program which 3.11.0 can link on OS X
Description[Is this a regression related to Bug 4690? The errors reported on the coq thread which gave rise to that bug suggest it might be.]

The error concerns the linking of a main-program-in-c ocaml native / c mixed program where -output-obj has been used.

The proximate error is:

feast:trunk john$ make -f cpdflibmake test
cc -c cpdflibc-test.c -o cpdflibc-test.o; \
        cc -L'/usr/local/lib/ocaml' -lunix -lbigarray -lstr -lz -o test cpdflibc-test.o zlibstubs.o cpdflib.a
Undefined symbols:
  "_caml_apply2", referenced from:
      _caml_callback2_exn in cpdflib.a(amd64.o)
  "_caml_apply3", referenced from:
      _caml_callback3_exn in cpdflib.a(amd64.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status

The same build works fine with 3.11.0.

In both cases, the -cc "gcc -m64" build of OCaml was done.

I'm using gcc 4.2 (Xcode 3.2) on OS X Snow Leopard 10.6.

Here's the full compilation log:

http://www.coherentpdf.com/compile-311.txt [^]

Thanks in advance.
TagsNo tags attached.
Attached Files

- Relationships
duplicate of 0004841closedxleroy Cannot make callbacks from C code when using the -output-obj option under Mac OS X 

-  Notes
(0005079)
xleroy (administrator)
2009-09-13 18:51

Fixed in 3.11 bugfix CVS branch (by not emitting .private_extern declarations if -output-obj is active). Will go in 3.11.2.

- Issue History
Date Modified Username Field Change
2009-09-08 14:19 johnwhitington New Issue
2009-09-13 18:40 xleroy Status new => assigned
2009-09-13 18:40 xleroy Assigned To => xleroy
2009-09-13 18:42 xleroy Relationship added duplicate of 0004841
2009-09-13 18:51 xleroy Note Added: 0005079
2009-09-13 18:51 xleroy Status assigned => closed
2009-09-13 18:51 xleroy Resolution open => fixed
2009-09-13 18:51 xleroy Fixed in Version => 3.11.2+dev


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker