Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 543422 - sys-devel/llvm-3.6.0[ocaml] fails during configure: --enable-bindings=ocaml specified, but ctypes is not installed
Summary: sys-devel/llvm-3.6.0[ocaml] fails during configure: --enable-bindings=ocaml s...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords:
Depends on: 543604
Blocks:
  Show dependency tree
 
Reported: 2015-03-15 15:50 UTC by jannis
Modified: 2015-08-06 12:18 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,14.64 KB, text/x-log)
2015-03-15 15:50 UTC, jannis
Details
emerge --info (einfo,25.12 KB, text/plain)
2015-03-15 15:51 UTC, jannis
Details
build.log if ocaml-ctypes is installed (xz compressed) (build.log.xz,114.09 KB, application/x-xz)
2015-03-16 19:31 UTC, jannis
Details
Patch to support ocaml-ctypes-0.4.0 (llvm-3.6.0-ocaml-ctypes-0.4.0.patch,1.74 KB, patch)
2015-03-17 12:05 UTC, Bernard Cafarelli
Details | Diff
Patch to llvm-3.6.0.ebuild (llvm-3.6.0.ebuild.patch,1.60 KB, patch)
2015-03-30 15:45 UTC, Bernard Cafarelli
Details | Diff
The modified ebuild patch (llvm-3.6.0_new.ebuild.patch,1.09 KB, patch)
2015-05-20 12:34 UTC, Juergen Rose
Details | Diff
llvm-3.6.1.ebuild which works for me, if ocaml-ctypes is not instlled (llvm-3.6.1.ebuild,15.17 KB, text/plain)
2015-06-09 11:28 UTC, Juergen Rose
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jannis 2015-03-15 15:50:21 UTC
Relevant part of output is:
...
checking for ocamlfind... /usr/bin/ocamlfind
...
configure: WARNING: --enable-bindings=ocaml specified, but ctypes is not installed
configure: WARNING: --enable-bindings=ocaml specified, but OUnit 2 is not installed. Tests will not run
configure: error: Prequisites for bindings not satisfied. Fix them or use configure --disable-bindings.

With -ocaml it configures and builds fine

Reproducible: Always
Comment 1 jannis 2015-03-15 15:50:50 UTC
Created attachment 398988 [details]
build.log
Comment 2 jannis 2015-03-15 15:51:14 UTC
Created attachment 398990 [details]
emerge --info
Comment 3 jannis 2015-03-15 15:53:52 UTC
dev-lang/ocaml is installed in version 4.01.0 from official tree with USE="X latex ncurses ocamlopt tk -emacs -xemacs". I'll try with version 3.* to see if it makes a difference
Comment 4 David Kredba 2015-03-16 12:51:32 UTC
In addition llvm-3.6 package have to depend on dev-ml/findlib:

configure: WARNING: --enable-bindings=ocaml specified, but ocamlfind not found. Try configure OCAMLFIND=/path/to/ocamlfind
configure: WARNING: --enable-bindings=ocaml specified, but ctypes is not installed
configure: WARNING: --enable-bindings=ocaml specified, but OUnit 2 is not installed. Tests will not run
Comment 5 Bernard Cafarelli gentoo-dev 2015-03-16 16:12:50 UTC
Thanks for the report! It looks like a few things changed in ocaml bindings since the rc where I tested with USE=ocaml :/

Adding dev-ml/ounit and dev-ml/findlib to dependencies is easy, but I can not find ctypes, is it this one?
https://github.com/ocamllabs/ocaml-ctypes/releases

Cc'ing ml folks for opinion on this potentially new package to add in tree
Comment 6 Alexis Ballier gentoo-dev 2015-03-16 16:41:05 UTC
added dev-ml/ocaml-ctypes-0.4.0 ;  please test
Comment 7 Bernard Cafarelli gentoo-dev 2015-03-16 18:16:30 UTC
(In reply to Alexis Ballier from comment #6)
> added dev-ml/ocaml-ctypes-0.4.0 ;  please test

configure ran to the end, thanks for the speedy add!I did not have time to check the entire compilation process though

Also, I have not committed the new deps yet, as they will require some ppc/arm keywording

For those that want to test in the meantime, the packages to add:
dev-ml/findlib
dev-ml/ocaml-ctypes
dev-ml/ounit
Comment 8 jannis 2015-03-16 19:29:35 UTC
Hey all,
thanks for the quick reaction and the ebuild. I emerged dev-ml/ocaml-ctypes and dev-ml/ounit (findlib was already installed) and retried. While the configuration phase shows no problems, the compilation fails at a later stage.
Comment 9 jannis 2015-03-16 19:31:39 UTC
Created attachment 399052 [details]
build.log if ocaml-ctypes is installed (xz compressed)

relevant part:

File "/var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src-abi_x86_64.amd64/bindings/ocaml/executionengine/Release/llvm_executionengine.ml", line 54, characters 28-77:
Error: This expression has type nativeint
       but an expression was expected of type int64
Comment 10 David Kredba 2015-03-16 19:37:13 UTC
As stated at

http://llvm.org/releases/3.6.0/docs/ReleaseNotes.html

it needs OCaml >=4.00.0, ocamlfind, ctypes >=0.3.0 <0.4 and OUnit 2,
so it seems to me that ctypes 0.4 release is too fresh for it.
Comment 11 David Kredba 2015-03-16 19:47:08 UTC
I am trying to build it with ctypes v. 0.3.4 now.
Comment 12 David Kredba 2015-03-16 21:12:34 UTC
It built and installed fine with =dev-ml/ocaml-ctypes-0.3.4.
Comment 13 Alexis Ballier gentoo-dev 2015-03-17 07:41:17 UTC
(In reply to David Kredba from comment #10)
> As stated at
> 
> http://llvm.org/releases/3.6.0/docs/ReleaseNotes.html
> 
> it needs OCaml >=4.00.0, ocamlfind, ctypes >=0.3.0 <0.4 and OUnit 2,
> so it seems to me that ctypes 0.4 release is too fresh for it.

yeah so it need porting to ctypes 0.4; no point in supporting legacy packages that were never in tree
Comment 14 Bernard Cafarelli gentoo-dev 2015-03-17 09:49:29 UTC
Indeed, this is probably caused by:
* Use nativeint to represent pointers
in https://github.com/ocamllabs/ocaml-ctypes/blob/master/CHANGES.md

This looks cleaner, I have a one-liner patch that seems to fix this. Testing compilation, then I'll add it here
Comment 15 Bernard Cafarelli gentoo-dev 2015-03-17 12:05:47 UTC
Created attachment 399102 [details, diff]
Patch to support ocaml-ctypes-0.4.0

Not really a one-liner in the end, but all it does is changing int64 to nativeint. If you use ocaml bindings actively, can you check they work fine in 3.6.0?

I'll commit it once the new dependencies are keyworded (blocker to this bug)
Comment 16 Juergen Rose 2015-03-30 15:25:00 UTC
(In reply to Bernard Cafarelli from comment #15)
> Created attachment 399102 [details, diff] [details, diff]
> Patch to support ocaml-ctypes-0.4.0
> 
> Not really a one-liner in the end, but all it does is changing int64 to
> nativeint. If you use ocaml bindings actively, can you check they work fine
> in 3.6.0?
> 
> I'll commit it once the new dependencies are keyworded (blocker to this bug)

I tried to use the patch(In reply to Bernard Cafarelli from comment #15)
> Created attachment 399102 [details, diff] [details, diff]
> Patch to support ocaml-ctypes-0.4.0
> 
> Not really a one-liner in the end, but all it does is changing int64 to
> nativeint. If you use ocaml bindings actively, can you check they work fine
> in 3.6.0?
> 
> I'll commit it once the new dependencies are keyworded (blocker to this bug)

The patch does not help here:

>>> Emerging (1 of 1) sys-devel/llvm-3.6.0::local
 * llvm-3.6.0.src.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                                                             [ ok ]
 * compiler-rt-3.6.0.src.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                                                      [ ok ]
 * cfe-3.6.0.src.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                                                              [ ok ]
 * clang-tools-extra-3.6.0.src.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                                                                                                [ ok ]
 * Checking for at least 2400 MiB disk space at "/var/tmp/portage/sys-devel/llvm-3.6.0/temp" ...                                                                                                          [ ok ]
 * Trying to build a C++11 test program ...                                                                                                                                                               [ ok ]
>>> Unpacking source...
>>> Unpacking llvm-3.6.0.src.tar.xz to /var/tmp/portage/sys-devel/llvm-3.6.0/work
>>> Unpacking compiler-rt-3.6.0.src.tar.xz to /var/tmp/portage/sys-devel/llvm-3.6.0/work
>>> Unpacking cfe-3.6.0.src.tar.xz to /var/tmp/portage/sys-devel/llvm-3.6.0/work
>>> Unpacking clang-tools-extra-3.6.0.src.tar.xz to /var/tmp/portage/sys-devel/llvm-3.6.0/work
>>> Source unpacked in /var/tmp/portage/sys-devel/llvm-3.6.0/work
>>> Preparing source in /var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src ...
 * Applying llvm-3.2-nodoctargz.patch ...                                                                                                                                                                 [ ok ]
 * Applying llvm-3.5-gcc-4.9.patch ...                                                                                                                                                                    [ ok ]
 * Applying llvm-3.6-gentoo-install.patch ...                                                                                                                                                             [ ok ]
 * Applying clang-3.5-gentoo-runtime-gcc-detection-v3.patch ...                                                                                                                                           [ ok ]
 * Applying clang-3.6-gentoo-install.patch ...                                                                                                                                                            [ ok ]
 * Applying clang-3.4-darwin_prefix-include-paths.patch ...                                                                                                                                               [ ok ]
 * Adjusting to prefix /
 *   InitHeaderSearch.cpp ...                                                                                                                                                                             [ ok ]
 * Fixing install dirs
 * Applying llvm-3.6.0-ocaml-ctypes-0.4.0.patch ...                                                                                                                                                       [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src ...
 * abi_x86_32.x86: running multilib-minimal_abi_src_configure
...
checking for GCC atomic builtins... yes
checking for 32-bit userspace on 64-bit system... no
checking for __dso_handle... yes
configure: WARNING: --enable-bindings=ocaml specified, but ctypes is not installed
configure: WARNING: --enable-bindings=ocaml specified, but OUnit 2 is not installed. Tests will not run
configure: error: Prequisites for bindings not satisfied. Fix them or use configure --disable-bindings.

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/sys-devel/llvm-3.6.0/work/llvm-3.6.0.src-abi_x86_64.amd64/config.log
 * ERROR: sys-devel/llvm-3.6.0::local failed (configure phase):
 *   econf failed



'USE=-ocaml emerge -v1 llvm' works.
Comment 17 Bernard Cafarelli gentoo-dev 2015-03-30 15:45:46 UTC
Created attachment 400176 [details, diff]
Patch to llvm-3.6.0.ebuild

Yes, you also need to manually install the missing dependencies:
* dev-ml/findlib
* dev-ml/ocaml-ctypes
and optionally dev-ml/ounit for tests

Or update the ebuild with this patch, to automate it
Comment 18 Juergen Rose 2015-05-20 12:32:59 UTC
(In reply to Bernard Cafarelli from comment #17)
> Created attachment 400176 [details, diff] [details, diff]
> Patch to llvm-3.6.0.ebuild
> 
> Yes, you also need to manually install the missing dependencies:
> * dev-ml/findlib
> * dev-ml/ocaml-ctypes
> and optionally dev-ml/ounit for tests
> 
> Or update the ebuild with this patch, to automate it

Your patch fails here with:

root@gepard:/usr/local/portage/llvm(18)# patch < /home_caiman/rose/Txt/Patches/llvm-3.6.0.ebuild.patch 
patching file llvm-3.6.0.ebuild
Reversed (or previously applied) patch detected!  Assume -R? [n]  
Apply anyway? [n] 
Skipping patch.
4 out of 4 hunks ignored -- saving rejects to file llvm-3.6.0.ebuild.rej
root@gepard:/usr/local/portage/llvm(19)# rm llvm-3.6.0.ebuild.rej


I modified your patch a little bit, now it works:

root@gepard:/usr/local/portage/llvm(21)# patch < /home_caiman/rose/Txt/Patches/llvm-3.6.0_new.ebuild.patch 
patching file llvm-3.6.0.ebuild
Comment 19 Juergen Rose 2015-05-20 12:34:28 UTC
Created attachment 403672 [details, diff]
The modified ebuild patch
Comment 20 Juergen Rose 2015-06-01 17:22:44 UTC
Now I get the same error with llvm-3.6.1:

...
checking for __dso_handle... yes
configure: WARNING: --enable-bindings=ocaml specified, but ctypes is not installed
configure: WARNING: --enable-bindings=ocaml specified, but OUnit 2 is not installed. Tests will not run
configure: error: Prequisites for bindings not satisfied. Fix them or use configure --disable-bindings.
Comment 21 Juergen Rose 2015-06-09 10:18:25 UTC
I hit the error at the next system.
Comment 22 Juergen Rose 2015-06-09 11:28:56 UTC
Created attachment 404816 [details]
llvm-3.6.1.ebuild which works for me, if ocaml-ctypes is not instlled
Comment 23 Juergen Rose 2015-06-09 11:30:00 UTC
(In reply to Bernard Cafarelli from comment #17)
> Created attachment 400176 [details, diff] [details, diff]
> Patch to llvm-3.6.0.ebuild
> 
> Yes, you also need to manually install the missing dependencies:
> * dev-ml/findlib
> * dev-ml/ocaml-ctypes
> and optionally dev-ml/ounit for tests
> 
> Or update the ebuild with this patch, to automate it

@Bernard Cafarelli

Can these patches not add to default portage tree?
Comment 24 Bernard Cafarelli gentoo-dev 2015-06-09 15:41:58 UTC
(In reply to Juergen Rose from comment #23)
> @Bernard Cafarelli
> 
> Can these patches not add to default portage tree?

The patch is already applied in 3.6.1 :)
So for now you just need to install the mising deps as listed in comment #17 (findlib, ocaml-ctypes, and optionnaly ounit)
I can not add these dependencies in the ebuild yet, as they lack some keywords (that's blocker bug #543604)
Comment 25 Juergen Rose 2015-07-28 11:20:38 UTC
Now I get the same error with llvm-3.6.2.
Comment 26 Bernard Cafarelli gentoo-dev 2015-08-06 12:18:28 UTC
I masked the USE-flag on missing arches (sparc and powerpc), so I could finally add the dependencies, thanks everyone!