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

Cannot finish building "make bootstrap" #7054

Closed
vicuna opened this issue Nov 20, 2015 · 7 comments
Closed

Cannot finish building "make bootstrap" #7054

vicuna opened this issue Nov 20, 2015 · 7 comments

Comments

@vicuna
Copy link

vicuna commented Nov 20, 2015

Original bug ID: 7054
Reporter: RichN
Assigned to: @xavierleroy
Status: closed (set by @xavierleroy on 2017-02-16T14:16:44Z)
Resolution: fixed
Priority: low
Severity: minor
OS: NetBSD
OS Version: 7.0
Fixed in version: 4.03.0+dev / +beta1
Category: configure and build/install

Bug description

I'm trying to add support to OCaml for NetBSD/arm. I'm building the latest git sources on a RaspberryPi running NetBSD 7.0. I can do this successfully:

$ ./configure
$ gmake world

('gmake' is GnuMake on NetBSD)

Then I try to confirm it built correctly by running:

$ gmake bootstrap

But it fails with:

File "_none_", line 1:
Error: Error while linking ../parsing/location.cmo:
Reference to undefined global `Terminfo'
Makefile.shared:87: recipe for target 'ocamldebug' failed
gmake[3]: *** [ocamldebug] Error 2
gmake[3]: Leaving directory '/home/rich/ocaml/debugger'
Makefile:685: recipe for target 'ocamldebugger' failed

Reading the INSTALL file a little closer, it mentions that systems need to specify their GnuMake with an environment variable:

$ export GNUMAKE=gmake

If I do this, then the original build fails, too, with the same error. If I undefine GNUMAKE and rebuild, it succeeds (however, the "make bootstrap" still fails in the same spot.)

Steps to reproduce

This may be very specific to the platform. On my RaspberryPi, it happens every time I try to build OCaml. I can give access to the machine, if someone wants to take a closer look.

Additional information

Minor configure changes were made so that the build system recognizes NetBSD/arm platforms. Nothing was done to the build system with regards to the ocamldebugger (where the error seems to have occurred.) A complete set of diffs is available (there aren't many.)

@vicuna
Copy link
Author

vicuna commented Nov 20, 2015

Comment author: @gasche

This sounds like an issue caused by
https://github.com/ocaml/ocaml/pull/207/commits

You may want to retry building and bootstraping the git index before this PR was merged, for example at the just-before commit
3211f63

Otherwise, below is a diff that could maybe solve your issue -- tell me if it does and I'll commit it upstream.

(Once you get something working, feel free to propose a patch to fix the build system for NetBSD/arm, here as a "git format-patch" output or as a github pull request, as your prefer.)

diff --git a/debugger/Makefile.shared b/debugger/Makefile.shared
index 88405a4..f07dd6c 100644
--- a/debugger/Makefile.shared
+++ b/debugger/Makefile.shared
@@ -30,8 +30,9 @@ INCLUDES=\

OTHEROBJS=
$(UNIXDIR)/unix.cma \

  • ../utils/misc.cmo ../utils/config.cmo ../utils/tbl.cmo \
  • ../utils/clflags.cmo ../utils/consistbl.cmo ../utils/warnings.cmo \
  • ../utils/config.cmo ../utils/tbl.cmo \
  • ../utils/clflags.cmo ../utils/misc.cmo ../utils/terminfo.cmo \
  • ../utils/consistbl.cmo ../utils/warnings.cmo
    ../parsing/location.cmo ../parsing/longident.cmo ../parsing/docstrings.cmo
    ../parsing/ast_helper.cmo ../parsing/ast_mapper.cmo
    ../parsing/attr_helper.cmo \

@vicuna
Copy link
Author

vicuna commented Nov 20, 2015

Comment author: @mshinwell

I thought Xavier had already committed a fix for this on trunk?

@vicuna
Copy link
Author

vicuna commented Nov 20, 2015

Comment author: @xavierleroy

Yes, I ran into this issue yesterday and committed a fix, e896e90

Could you please "git pull" and try again?

@vicuna
Copy link
Author

vicuna commented Nov 20, 2015

Comment author: @gasche

xleroy > note that utils/misc.ml now depends on Clflags, so your fix seems incomplete in theory. In practice the dependency is only on the name of constant constructors, so I guess that somehow never generates a hard linking dependency.

@vicuna
Copy link
Author

vicuna commented Nov 20, 2015

Comment author: @xavierleroy

gasche > feel free to commit your fix (with clflags before misc) on top of mine.

@vicuna
Copy link
Author

vicuna commented Nov 20, 2015

Comment author: RichN

I probably should have based my work off a more stable branch, but I wanted to minimize the diffs when I eventually make the pull-request. Thanks for pointing out the problem. I'm rebuilding everything with the latest source. If it succeeds, I'll close out this issue.

@vicuna
Copy link
Author

vicuna commented Nov 20, 2015

Comment author: RichN

gmake compare
gmake[1]: Entering directory '/home/rich/ocaml'
Fixpoint reached, bootstrap succeeded.

Excellent! This issue can be closed out. Now I'm off to "make opt".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants