+++ This bug was initially created as a clone of Bug #2847 +++ Some of these affect the 2.4 pre-release. This bug is for the .ml test failures (all of them fail) FAIL: /home/edwin/llvm2.4/llvm-2.4/test/Bindings/Ocaml/analysis.ml Failed with unknown error (or has stderr output) at line 1 while running: /usr/bin/ocamlc.opt -cc g++ -I /home/edwin/llvm2.4/llvm-2.4/Release//lib/ocaml -warn-error A llvm.cma llvm_analysis.cma /home/edwin/llvm2.4/llvm-2.4/test/Bindings/Ocaml/analysis.ml -o analysis.ml.tmp /tmp/camlprim60e068.c:914: warning: deprecated conversion from string constant to ‘char*’ /tmp/camlprim60e068.c:914: warning: deprecated conversion from string constant to ‘char*’ /tmp/camlprim60e068.c:914: warning: deprecated conversion from string constant to ‘char*’ /tmp/camlprim60e068.c:914: warning: deprecated conversion from string constant to ‘char*’ /tmp/camlprim60e068.c:914: warning: deprecated conversion from string constant to ‘char*’ /tmp/camlprim60e068.c:914: warning: deprecated conversion from string constant to ‘char* ... $ ocamlc.opt -v The Objective Caml compiler, version 3.10.2 Standard library directory: /usr/lib/ocaml/3.10.2 The test fails due to those warnings being output, otherwise the exitcode of that command is 0. Those warnings are an ocaml issue, but the test shouldn't fail due to them. Thoughts?
On TOT I now get this: Failed with posix(ENOENT,no such file or directory) at line 1 while running: /usr/bin/ocamlc. opt -cc g++ -I /home/edwin/llvm-svn/llvm/Release//lib/ocaml -warn-error A llvm.cma llvm_bitreader.cma llvm_bitwriter.cma /home/edwin/llvm-svn/llvm/test/Bindings/Ocaml/bitreader.ml -o bitreader.ml.tmp couldn't execute "/usr/bin/ocamlc.": no such file or directory Notice the space between "ocamlc. opt", it is not supposed to be there, the program is called ocamlc.opt!
The former is a bug in ocaml. Try upgrading to the latest from Inria; I think it's been fixed in more recent revisions. If that doesn't work, it might be possible to suppress the warnings by passing some extra -ccopt's to ocamlc. The "ocaml .opt" problem is mysterious to me. First, check 'head config.log' to make sure you didn't misconfigure those by hand. Second, try modifying autoconf/configure.ac as below, regenerating, and seeing whether it results in improvement: DJ_AC_PATH_TCLSH AC_PATH_PROG(ZIP, [zip]) AC_PATH_PROGS(OCAMLC, [ocamlc.opt ocamlc]) -AC_PATH_PROGS(OCAMLOPT, [ocamlopt]) -AC_PATH_PROGS(OCAMLDEP, [ocamldep]) -AC_PATH_PROGS(OCAMLDOC, [ocamldoc]) +AC_PATH_PROGS(OCAMLOPT, [ocamlopt.opt ocamlopt]) +AC_PATH_PROGS(OCAMLDEP, [ocamldep.opt ocamldep]) +AC_PATH_PROGS(OCAMLDOC, [ocamldoc.opt ocamldoc]) dnl Determine if the linker supports the -R option. That's the only point we look for .opt executables. I can't see how the above would introduce white space prior to the period, though. If it works after that change, we'll patch accordingly.
My pseudo-patch is of course reversed. It should read: DJ_AC_PATH_TCLSH AC_PATH_PROG(ZIP, [zip]) AC_PATH_PROGS(OCAMLC, [ocamlc.opt ocamlc]) -AC_PATH_PROGS(OCAMLOPT, [ocamlopt.opt ocamlopt]) -AC_PATH_PROGS(OCAMLDEP, [ocamldep.opt ocamldep]) -AC_PATH_PROGS(OCAMLDOC, [ocamldoc.opt ocamldoc]) +AC_PATH_PROGS(OCAMLOPT, [ocamlopt]) +AC_PATH_PROGS(OCAMLDEP, [ocamldep]) +AC_PATH_PROGS(OCAMLDOC, [ocamldoc]) dnl Determine if the linker supports the -R option.
(In reply to comment #3) > My pseudo-patch is of course reversed. It should read: > > DJ_AC_PATH_TCLSH > AC_PATH_PROG(ZIP, [zip]) > AC_PATH_PROGS(OCAMLC, [ocamlc.opt ocamlc]) > -AC_PATH_PROGS(OCAMLOPT, [ocamlopt.opt ocamlopt]) > -AC_PATH_PROGS(OCAMLDEP, [ocamldep.opt ocamldep]) > -AC_PATH_PROGS(OCAMLDOC, [ocamldoc.opt ocamldoc]) > +AC_PATH_PROGS(OCAMLOPT, [ocamlopt]) > +AC_PATH_PROGS(OCAMLDEP, [ocamldep]) > +AC_PATH_PROGS(OCAMLDOC, [ocamldoc]) > > dnl Determine if the linker supports the -R option. > I tried applying that to configure.ac, but then I got all the wrong versions of autoconf/aclocal/libtool. I tried to upgrade the scripts with autoupdate, but then configure complained that it cannot find LLVM_PERL or something, so I gave up on that. So I hacked configure, and removed ocamlopt.opt, which is what should have happened if I would have had the correct autoconf versions. Could you apply the configure.ac patch, and regenerate configure please? Now the failure message is back to the initial one. (In reply to comment #2) > The former is a bug in ocaml. Try upgrading to the latest from Inria; I think > it's been fixed in more recent revisions. If that doesn't work, it might be > possible to suppress the warnings by passing some extra -ccopt's to ocamlc. I have the latest: "The most recent version of Objective Caml is 3.10.2. It was released on 2008-02-29. " $ ocamlc -v The Objective Caml compiler, version 3.10.2 Standard library directory: /usr/lib/ocaml/3.10.2 > > The "ocaml .opt" problem is mysterious to me. First, check 'head config.log' to > make sure you didn't misconfigure those by hand. I have these: ac_cv_path_OCAMLC=/usr/bin/ocamlc.opt ac_cv_path_OCAMLDEP=/usr/bin/ocamldep.opt ac_cv_path_OCAMLDOC=/usr/bin/ocamldoc.opt ac_cv_path_OCAMLOPT=/usr/bin/ocamlopt.opt maybe it is dejagnu not handling the . correctly, but then why does it work for you?
Gordon - Any more thoughts on this? I'd like to get a patch in (by 19th).
2.3 had ocaml bindings, so we don't have the option of just disabling them in the release, right?
Edwin, also did this work for you in 2.3? Did these tests exist in 2.3?
Remove the .opt executables from configure.ac. http://llvm.org/viewvc/llvm-project?rev=57975&view=rev Regenerate configure. http://llvm.org/viewvc/llvm-project?rev=57976&view=rev Redirect stderr from ocamlc to /dev/null. http://llvm.org/viewvc/llvm-project?rev=57977&view=rev Edwin, can you please check whether these resolve your issues?
(In reply to comment #8) > Remove the .opt executables from configure.ac. > http://llvm.org/viewvc/llvm-project?rev=57975&view=rev > > Regenerate configure. > http://llvm.org/viewvc/llvm-project?rev=57976&view=rev > > Redirect stderr from ocamlc to /dev/null. > http://llvm.org/viewvc/llvm-project?rev=57977&view=rev > > Edwin, can you please check whether these resolve your issues? > I assume you mean commits 57974, 57975, 57976. (yours numbers are off by one!). Note that 57974 has to be manually applied because it conflicts on the 2.4 release branch, same for 57975 (I've regenerated configure myself). [blame me, I've commited the solaris patch to trunk] The latest release branch doesn't build for me (Bug 2931), once that is fixed I'll try this again. (In reply to comment #7) > Edwin, also did this work for you in 2.3? Did these tests exist in 2.3? > Yes it worked in 2.3. I had those warnings, but the checks didn't fail because of them.
(In reply to comment #9) > The latest release branch doesn't build for me (Bug 2931), once that is fixed > I'll try this again. I've to SVN r57297 (just a random release in the past), and applied your patch. Make check works on the Ocaml bindings now, thanks! Should I close this bug or wait till the patch is merged to the prerelease branch.
Awesome, please wait until the release branch is updated and verify from it. Many thanks Edwin!
Merged into 2.4.