Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006072OCamlOCaml internal build/install (Makefiles, configure)public2013-07-10 21:072013-07-17 14:01
Reportermundkur 
Assigned To 
PrioritylowSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSFreeBSDOS Version10
Product Version 
Target Version4.01.0+devFixed in Version4.01.0+dev 
Summary0006072: configure does not handle FreeBSD current (i.e. 10) correctly, leading to build failures
DescriptionOcaml does not build on FreeBSD-Current, which has version 10.0. The issue is in the configure script, which has this clause to detect shared library support:

    *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-openbsd*|*-*-netbsd*|*-*-gnu*)

This fails for freebsd-current, which reports:

$ config/gnu/config.guess
x86_64-unknown-freebsd10.0

$ uname -r
10.0-CURRENT
Steps To Reproduce'make world.opt' fails at:


../../boot/ocamlrun ../../tools/ocamlmklib -o unix -oc unix -ocamlopt '../../ocamlcompopt.sh' -linkall unix.cmx unixLabels.cmx
../../ocamlcompopt.sh -shared -o unix.cmxs -I . unix.cmxa
-o: not found
File "caml_startup", line 1:
Error: Error during linking
*** Error code 2

Stop.
make: stopped in /pool/users/pm524/build/ocaml/otherlibs/unix
Additional InformationThis may indicate a deeper bug: although configure reports (erroneously) that shared libraries are not supported, the build still tries to build one.

Configuration for the bytecode compiler:
        C compiler used........... gcc
        options for compiling..... -fno-defer-pop -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_THREAD_SAFE
        options for linking....... -lm -lcurses -pthread
        shared libraries not supported
TagsNo tags attached.
Attached Filespatch file icon config-freebsd-10.patch [^] (537 bytes) 2013-07-12 17:32 [Show Content]
patch file icon 2-config-freebsd-10.patch [^] (538 bytes) 2013-07-16 13:38 [Show Content]

- Relationships

-  Notes
(0009770)
doligez (administrator)
2013-07-12 17:27

About the "deeper bug": there are two kinds of support for dynamic linking, which are tested independently by the configure script:

1. "Dynamic loading of shared libraries" and "shared libraries are supported": this is for the byte-code interpreter to use dynamic linking to load external primitives. If you don't have that, you have to compile your byte-code executables with -custom.

2. "native dynlink": this is dynamic linking of native-code files, and production of dynamically-linkable files.

In your case, it looks like configure decided that (1) is not supported, but (2) is.
(0009771)
doligez (administrator)
2013-07-12 17:32

I propose the attached patch. Could someone test it on a machine with FreeBSD 10 ?
(0009775)
mundkur (reporter)
2013-07-12 20:04

The patch doesn't quite work, since "$target" is set to "x86_64-unknown-freebsd10.0". The following clause works:

    *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9].[0-9]|*-*-openbsd*|*-*-netbsd*|*-*-gnu*)

It might be too brittle against future breakage to be used as is, but indicates the matching needed.
(0009792)
doligez (administrator)
2013-07-16 13:39

In fact, a star was missing in my patch. The idea is to recognize any freebsd with at least two digits in its version number.

New patch uploaded.
(0009799)
doligez (administrator)
2013-07-17 14:01

I have applied my second patch in the 4.01 branch (rev 13900). Feel free to reopen this PR if there is a problem.

- Issue History
Date Modified Username Field Change
2013-07-10 21:07 mundkur New Issue
2013-07-12 17:27 doligez Note Added: 0009770
2013-07-12 17:32 doligez Note Added: 0009771
2013-07-12 17:32 doligez Status new => acknowledged
2013-07-12 17:32 doligez Target Version => 4.01.0+dev
2013-07-12 17:32 doligez File Added: config-freebsd-10.patch
2013-07-12 20:04 mundkur Note Added: 0009775
2013-07-16 13:38 doligez File Added: 2-config-freebsd-10.patch
2013-07-16 13:39 doligez Note Added: 0009792
2013-07-17 14:01 doligez Note Added: 0009799
2013-07-17 14:01 doligez Status acknowledged => resolved
2013-07-17 14:01 doligez Resolution open => fixed
2013-07-17 14:01 doligez Fixed in Version => 4.01.0+dev


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker