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

ocamlopt assumes ar command exists #5478

Closed
vicuna opened this issue Jan 14, 2012 · 4 comments

Comments

Projects
None yet
2 participants
@vicuna
Copy link

commented Jan 14, 2012

Original bug ID: 5478
Reporter: @dra27
Assigned to: @alainfrisch
Status: closed (set by @xavierleroy on 2013-08-31T10:44:16Z)
Resolution: fixed
Priority: normal
Severity: major
Platform: Windows (i686-w64-mingw32)
OS: Windows
OS Version: 7 x86
Version: 3.12.1
Category: ~DO NOT USE (was: OCaml general)
Has duplicate: #5179

Bug description

utils/config.ml abstracts the ranlib command but doesn't abstract the ar command - its invocation is embedded in utils/ccomp.ml.

When building the MinGW port using the mingw64-i686-gcc-core (with its own binutils package), the ar command is named i686-w64-mingw32-ar so ocamlopt fails when building static libraries (meaning that make -f Makefile.nt opt fails in OCaml's build process).

Steps to reproduce

Install ActiveTcl as normal, configure Cygwin with setup.exe ... --packages=make,mingw64-i686-gcc-core, configure OCaml 3.12.1 (with relevant patches to config/Makefile.mingw from trunk) for a MinGW build and then attempt make -f Makefile.nt world opt

Additional information

ocaml-3.12.1-Build.patch configures the ocaml-3.12.1 source tree for newer Cygwin builds based on commits already in trunk

File attachments

@vicuna

This comment has been minimized.

Copy link
Author

commented Jan 14, 2012

Comment author: @dra27

The attached patch adds Config.ar to tools/Config.ml (patched in Config.mlp and Config.mlbuild) based on the value ARCMD determined by configure.
configure is patched simply to write ar to Makefile
The three Windows ports Makefile's in config/ are updated to specify ARCMD with the correct toolchain prefix (the extra parameter will also need to go into the new config/Makefile.mingw64)

@vicuna

This comment has been minimized.

Copy link
Author

commented Jan 14, 2012

Comment author: @xavierleroy

Same issue as reported in #5179, I believe. I promised not to maintain the MinGW64 port, but I agree with the intent of the patch and encourage other Caml developer to review it and apply it.

@vicuna

This comment has been minimized.

Copy link
Author

commented Jan 14, 2012

Comment author: @dra27

I don't think this is a duplicate (it's not fixed by those patches, either - although my patch is against 3.12.1, I checked trunk before raising the bug). It's the strange naming of the compiler package: this issue is with the 32-bit MinGW port (the name of the compiler confusingly contains w64, but it doesn't actually mean Win64!).

This is related to the deprecation of gcc -mno-cygwin.

R11300 in trunk contained several fixes towards this (with reference to PR5179) but it doesn't include this fix for ar within ocamlopt.

@vicuna

This comment has been minimized.

Copy link
Author

commented Jan 16, 2012

Comment author: @alainfrisch

David, thanks for the patch. I've applied it to the trunk.

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