Skip to content
This repository has been archived by the owner on Sep 19, 2018. It is now read-only.

js-build-style example #14

Open
mattfair opened this issue Feb 23, 2015 · 3 comments
Open

js-build-style example #14

mattfair opened this issue Feb 23, 2015 · 3 comments

Comments

@mattfair
Copy link

Trying to get the js-build-style working, when running setup.sh get the following error:

fatal: repository 'https://github.com/warrenharris/ounit/' not found

To fix this, you could change this to:

darcs get http://darcs.ocamlcore.org/repos/ounit

When I compile using jenga -progress examples I get:

clang: error: linker command failed with exit code 1 (use -v to see invocation)
- exit packages/core/lib core_config.mlh, 330ms, code 0
!!JengaRoot.ml : no .ml OR .mli for oUnit in packages/ounit
*** jenga: ERROR: packages/ounit/oUnit.pack-order: User-code raised exception
*** jenga: (Failure"no .ml OR .mli for oUnit in packages/ounit")
*** jenga: 108/169 targets are up to date
*** jenga: failed (#1, 2.558s, heap(Kb)= 15713/208640, major=1, stat=3371, digest=114, ls=201, db-save=1)
*** jenga: todo: 0 (108 / 169) !1 ~60 j=0+0 con=107 save=0 act=53, finished
*** jenga: ERROR: (summary) packages/ounit/oUnit.pack-order: User-code raised exception
*** jenga: (Failure"no .ml OR .mli for oUnit in packages/ounit")
*** jenga: build finished; not in polling mode so quitting
*** jenga: Quit; exit_code = 1

If I move x-files/ounit/jbuild to x-files/ounit/src/jbuild it seems to find the .ml files and get a little further in the compile process, but still seems to have a problem loading up lib module files like for oUnit2.

clang: error: linker command failed with exit code 1 (use -v to see invocation)
- exit packages/core/lib core_config.mlh, 333ms, code 0
*** jenga: ERROR: packages/ounit/src/oUnit2.cmi: No rule or source for: packages/ounit/src/oUnit2.cmi
*** jenga: 112/175 targets are up to date
*** jenga: failed (#1, 2.571s, heap(Kb)= 15724/208640, major=1, stat=3492, digest=118, ls=204, db-save=1)
*** jenga: todo: 0 (112 / 175) !1 ~62 j=0+0 con=111 save=0 act=57, finished
*** jenga: ERROR: (summary) packages/ounit/src/oUnit2.cmi: No rule or source for: packages/ounit/src/oUnit2.cmi
*** jenga: build finished; not in polling mode so quitting
*** jenga: Quit; exit_code = 1

To fix this, the x-files/ounit/src/jbuild file if I list each of the modules in the ounit/src directory in the (modules (list (....))), but it also works if I just remove the line (modules (list (oUnit))) with the exception of oUnitLoggerHTMLData.ml which is suppose to be a generated file from the myocamlbuild.ml file in the ounit package directory.

So my question is, how was this handled this file generation in the past or currently in other people's builds? If I manually build it from the command line, let the myocamlbuild.ml generate packages/ounit/_build/src/oUnitLoggerHTMLData.ml and copy it to x-files/ounit/src a clean build seems to works fine as it puts the missing file in the correct directory when setup.sh is run, but obviously this isn't an ideal solution. The ideal would to properly generate the file through Jenga.

As part of getting oUnit to compile I also had to set (extra_disabled_warnings (32 27 9 28 39 33))

@ghost
Copy link

ghost commented Feb 24, 2015

I'm not surprised that this is broken. It was done as a proof of concept at some point but we haven't maintained it to follow external packages evolution. It might have been that oUnit was the only module at the time js-build-style was written.

mattfair added a commit to mattfair/jenga that referenced this issue Feb 25, 2015
@mattfair
Copy link
Author

mattfair commented May 7, 2015

If you are interested, the js-build-style example fully builds using these changes:

1789e0a
0f76233
51fb083
6e74f6a
1eca8f3

Changes:

  • Updated the jbuild files to make sure they compile the dependencies for the current version in the repositories.
  • Updated the oUnit repository in setup.sh

Also to note for others who may see this and try to build it, it only compiles under linux.

@jordwalke
Copy link

Thank you for getting this example working @mattfair. I recall having trouble with it in the past.

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

No branches or pull requests

2 participants