Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005478OCamlOCaml generalpublic2012-01-14 18:302013-08-31 12:44
Reporterdra 
Assigned Tofrisch 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformWindows (i686-w64-mingw32)OSWindowsOS Version7 x86
Product Version3.12.1 
Target VersionFixed in Version 
Summary0005478: ocamlopt assumes ar command exists
Descriptionutils/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 ReproduceInstall 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 Informationocaml-3.12.1-Build.patch configures the ocaml-3.12.1 source tree for newer Cygwin builds based on commits already in trunk
TagsNo tags attached.
Attached Filespatch file icon ocaml-3.12.1-Build.patch [^] (3,261 bytes) 2012-01-14 18:30 [Show Content]
patch file icon ocaml-3.12.1-PR5478.patch [^] (5,601 bytes) 2012-01-14 18:30 [Show Content]

- Relationships
has duplicate 0005179closed Port OCaml to mingw-w64 to have 64bit OCaml without MSVC Toolchain 

-  Notes
(0006677)
dra (reporter)
2012-01-14 18:35

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)
(0006680)
xleroy (administrator)
2012-01-14 19:49

Same issue as reported in PR#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.
(0006685)
dra (reporter)
2012-01-14 21:39

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.
(0006687)
frisch (developer)
2012-01-16 10:15

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

- Issue History
Date Modified Username Field Change
2012-01-14 18:30 dra New Issue
2012-01-14 18:30 dra File Added: ocaml-3.12.1-Build.patch
2012-01-14 18:30 dra File Added: ocaml-3.12.1-PR5478.patch
2012-01-14 18:35 dra Note Added: 0006677
2012-01-14 19:45 xleroy Relationship added has duplicate 0005179
2012-01-14 19:49 xleroy Note Added: 0006680
2012-01-14 19:49 xleroy Status new => acknowledged
2012-01-14 21:39 dra Note Added: 0006685
2012-01-16 09:44 frisch Assigned To => frisch
2012-01-16 09:44 frisch Status acknowledged => assigned
2012-01-16 10:15 frisch Note Added: 0006687
2012-01-16 10:15 frisch Status assigned => resolved
2012-01-16 10:15 frisch Resolution open => fixed
2013-08-31 12:44 xleroy Status resolved => closed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker