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

-pack option does not work properly #4124

Closed
vicuna opened this issue Sep 27, 2006 · 3 comments

Comments

@vicuna
Copy link

commented Sep 27, 2006

Original bug ID: 4124
Reporter: necula
Status: closed (set by @xavierleroy on 2006-10-17T12:38:41Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.09.3
Category: ~DO NOT USE (was: OCaml general)
Monitored by: necula

Bug description

(This is for cygwin with ocaml 3.09.3)

I have a large project that I am trying to wrap inside a package. I use the
"-for-pack LibKettle" option on all compilations and "-pack -o libKettle.cmx" when linking.

If I look at the tmp/camlpackagexxx.s file I see lines like this:
_camlLibKettle__entry:
L100:
movl $_camlConfig_base, _camlLibKettle
movl $_camlPretty, _camlLibKettle + 4
movl $_camlInthash, _camlLibKettle + 8
movl $_camlIntmap, _camlLibKettle + 12

The labels should be _camlLibKettle__Config_base, _camlLibKettle__Pretty, etc (should be translated in the new scope). This eventually results in undefined symbols when linking.

I have tried to reproduce the problem in a simple project, and I could not (I get the correct behavior there).

Any ideas how to make progress debugging this?

Thanks,
George Necula.

@vicuna

This comment has been minimized.

Copy link
Author

commented Sep 27, 2006

Comment author: @alainfrisch

You should check that enough -I options are given (when -pack'ing) so that all the .cmx files can be found (even if you give their full path on the command line).

This requirement should really be fixed or documented!

-- Alain

@vicuna

This comment has been minimized.

Copy link
Author

commented Sep 28, 2006

Comment author: necula

Thanks Alain, that was indeed the problem. But PLEASE add a sentence to the documentation. It would have saved me a couple of hours of work.

@vicuna

This comment has been minimized.

Copy link
Author

commented Oct 17, 2006

Comment author: @xavierleroy

Improved handling of .cmx during ocamlopt -pack. The .cmx given on the command line are now honored even if they cannot be found in the search path.
Also, added better link-time reporting of other corner cases involving -for-pack
and missing .cmx files.

@vicuna vicuna closed this Oct 17, 2006

@vicuna vicuna added the bug label Mar 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.