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
ocamlc does not fully take into consideration -o parameter #5890
Comments
Comment author: kosik ocamlopt has a similar (surprising) property |
Comment author: @damiendoligez I personally don't find this surprising at all, but this is related to a feature wish I seem to remember, for a "-odir" option to specify in what directory to put the generated files that are not specified with -o and thus have an implicit file name. |
Comment author: @damiendoligez This PR suggests putting auxiliary files in the same directory as the -o file. The -odir option seems safer and easier to use. |
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
Yes, the issue is still there and really needs to be fixed.
|
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
It's being addressed, but bugs have been discovered recently, see e.g.
#9960 (comment)
Will try submit a PR for the problems described there, sorry for having
introduced them in the first place.
|
I am closing this issue because, as reported above, I think it is fixed in OCaml 4.13.0. |
Original bug ID: 5890
Reporter: kosik
Assigned to: @shindere
Status: assigned (set by @damiendoligez on 2017-03-24T12:06:38Z)
Resolution: open
Priority: normal
Severity: feature
Version: 3.12.1
Category: compiler driver
Has duplicate: #7573
Related to: #6191 #6475
Monitored by: @hcarty
Bug description
When one tries to build an Ocaml library directly from multiple ml-files this way:
ocamlc -a -o library.cma foo.ml bar.ml baz.ml
things work fine. Essential *.cmi and *.cmo files are created in the same place as library.cma target.
However, when one tries to specify non-current output directory:
ocamlc -a -o /tmp/library.cma foo.ml bar.ml baz.ml
then *.cmo and *.cmi files are created in the current directory and only library.cma file is created in the designated /tmp directory.
While the manual page does not explicitly make any promises in this regard, the current behavior is surprising. It does not seem probably that user would want object files to be generated in one directory and resulting library in a different directory.
The text was updated successfully, but these errors were encountered: