Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005943OCamlOCamlbuild (the tool)public2013-03-12 12:332014-08-20 09:50
Reporteris 
Assigned To 
PriorityhighSeverityfeatureReproducibilityalways
StatusacknowledgedResolutionopen 
PlatformanyOSanyOS Versionany
Product Version4.00.1 
Target Versionafter-4.02.0Fixed in Version 
Summary0005943: ocamlmklib always adds -L (absolute) directories also the run-time linker path.
Descriptionocamlmklib contains this snippet:

    else if starts_with s "-L" then
     (c_Lopts := s :: !c_Lopts;
      let l = chop_prefix s "-L" in
      if not (Filename.is_relative l) then rpath := l :: !rpath)

This results in absolute paths always added to the run-time-path. This is wrong in any build environment where the object directory is accessed through an absolute path; when using -R, the wrong path is added along the right one.

Contrary, ELF linker tools always require explicit specification of the run-time path, even when the same.

I suggest removing
      let l = chop_prefix s "-L" in
      if not (Filename.is_relative l) then rpath := l :: !rpath)

If this behaviour is deemed necessary for backwards compatibility, the new one should at least be selectable by a global option to ocamlmklib.


Tagspatch
Attached Files? file icon patch-tools_ocamlmklib [^] (1,975 bytes) 2013-03-13 14:48 [Show Content]

- Relationships

-  Notes
(0008965)
is (reporter)
2013-03-13 09:22

remove those two lines and the ( before c_Lopts :=, of course.

- Issue History
Date Modified Username Field Change
2013-03-12 12:33 is New Issue
2013-03-13 09:22 is Note Added: 0008965
2013-03-13 14:48 is File Added: patch-tools_ocamlmklib
2013-06-19 20:34 doligez Status new => acknowledged
2013-06-19 20:34 doligez Target Version => 4.01.0+dev
2013-08-19 16:05 doligez Priority normal => high
2013-08-19 16:05 doligez Target Version 4.01.0+dev => 4.01.1+dev
2013-12-16 14:30 doligez Tag Attached: patch
2014-05-25 20:24 doligez Target Version 4.01.1+dev => 4.02.0+dev
2014-08-20 09:50 shinwell Target Version 4.02.0+dev => after-4.02.0


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker