Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.11.1 fails to link mixed C/Ocaml program which 3.11.0 can link on OS X #4860

Closed
vicuna opened this issue Sep 8, 2009 · 1 comment
Closed
Assignees

Comments

@vicuna
Copy link

vicuna commented Sep 8, 2009

Original bug ID: 4860
Reporter: @johnwhitington
Assigned to: @xavierleroy
Status: closed (set by @xavierleroy on 2009-09-13T16:51:03Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 3.11.1
Fixed in version: 3.11.2+dev
Category: ~DO NOT USE (was: OCaml general)
Duplicate of: #4841

Bug 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.

@vicuna
Copy link
Author

vicuna commented Sep 13, 2009

Comment author: @xavierleroy

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants