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

Le nouveau -pack a besoin des .cmi #3827

Closed
vicuna opened this issue Oct 31, 2005 · 3 comments
Closed

Le nouveau -pack a besoin des .cmi #3827

vicuna opened this issue Oct 31, 2005 · 3 comments
Assignees
Labels

Comments

@vicuna
Copy link

vicuna commented Oct 31, 2005

Original bug ID: 3827
Reporter: administrator
Assigned to: @lefessan
Status: closed (set by @xavierleroy on 2013-08-31T10:44:22Z)
Resolution: fixed
Priority: normal
Severity: minor
Fixed in version: 3.11.2
Category: ~DO NOT USE (was: OCaml general)
Monitored by: @alainfrisch

Bug description

Hello,

J'ai l'impression que le nouveau mécanisme pour -pack a besoin de
pouvoir trouver les .cmi (au moment du -pack), sinon le link échoue:

buzet ~/tmp/pack $ cat a/a.ml
let x = 2
buzet ~/tmp/pack $ cat a/a.mli
val x : int
buzet ~/tmp/pack $ ocamlopt -c a/a.mli
buzet ~/tmp/pack $ ocamlopt -c -I a/ -for-pack Apack a/a.ml
buzet ~/tmp/pack $ ocamlopt -o apack.cmx -pack a/a.cmx
buzet ~/tmp/pack $ ocamlopt -o foo apack.cmx
apack.o: In function camlApack__code_begin': : undefined reference to camlA'
collect2: ld returned 1 exit status
Error during linking

Avant, ça marchait même si les .cmi n'étaient pas disponibles.
Est-ce normal / documenté ?

-- Alain

@vicuna
Copy link
Author

vicuna commented Dec 11, 2005

Comment author: @alainfrisch

En fait le problème est plus général. La fonction Compilenv.symbol_for_global
ne se plaint pas lorsque le .cmx n'est pas trouvé, et se comporte comme l'identité dans ce cas. Or le .cmx est maintenant indispensable: c'est lui qui permet
de calculer le vrai nom des symboles. À mon avis, il faudrait décreter que les .cmx sont nécessaires.

Pour le problème spécifique de -pack, on dispose des chemins complets vers les .cmx; ne faudrait-il pas utiliser cette information plutôt que de chercher à retrouver les .cmx dans les répertoires donnés par -I ?

@vicuna
Copy link
Author

vicuna commented Apr 14, 2006

Comment author: ertai

Je suis d'accord avec Alain.

@vicuna
Copy link
Author

vicuna commented Jan 17, 2012

Comment author: @lefessan

This bug seems fixed since version 3.11.2. I will close it if nobody complains.

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

No branches or pull requests

2 participants