Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.4 pre-release test failures: ocaml bindings #3258

Closed
edwintorok opened this issue Oct 12, 2008 · 13 comments
Closed

2.4 pre-release test failures: ocaml bindings #3258

edwintorok opened this issue Oct 12, 2008 · 13 comments
Labels
bugzilla Issues migrated from bugzilla

Comments

@edwintorok
Copy link
Contributor

Bugzilla Link 2886
Resolution FIXED
Resolved on Oct 23, 2008 00:54
Version unspecified
OS Linux
Depends On #3219 llvm/llvm-bugzilla-archive#2931
CC @lattner,@sunfishcode,@tlattner

Extended Description

+++ 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?

@edwintorok
Copy link
Contributor Author

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!

@llvmbot
Copy link
Collaborator

llvmbot commented Oct 14, 2008

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.

@llvmbot
Copy link
Collaborator

llvmbot commented Oct 14, 2008

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.

@edwintorok
Copy link
Contributor Author

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.

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?

@tlattner
Copy link
Contributor

Gordon - Any more thoughts on this? I'd like to get a patch in (by 19th).

@lattner
Copy link
Collaborator

lattner commented Oct 22, 2008

2.3 had ocaml bindings, so we don't have the option of just disabling them in the release, right?

@lattner
Copy link
Collaborator

lattner commented Oct 22, 2008

Edwin, also did this work for you in 2.3? Did these tests exist in 2.3?

@llvmbot
Copy link
Collaborator

llvmbot commented Oct 22, 2008

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?

@edwintorok
Copy link
Contributor Author

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.

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.

@edwintorok
Copy link
Contributor Author

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.

@lattner
Copy link
Collaborator

lattner commented Oct 22, 2008

Awesome, please wait until the release branch is updated and verify from it. Many thanks Edwin!

@tlattner
Copy link
Contributor

Merged into 2.4.

@edwintorok
Copy link
Contributor Author

mentioned in issue llvm/llvm-bugzilla-archive#2931

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
Michael137 pushed a commit to Michael137/llvm-project that referenced this issue Aug 18, 2022
[clang][deps][tooling] Cherry-pick recent dependency scanning commits
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

4 participants