GODI-Batteries: Installation problems (yet again)

318 views Asked by At

I have asked this question before but it turns out that what I believed to be the solution is not.

The Problem

I have just started a fresh GODI installation and I am attempting to install the batteries library. I have all dependencies sorted, e.g. Camomile. I get the following error:

> ocamlfind ocamlopt -a -package camomile,num,str src/batCamomile.cmx src/batConcurrent.cmx src/batInnerWeaktbl.cmx src/batInnerIO.cmx src/batInterfaces.cmx src/batMonad.cmx src/batRef.cmx src/batValue_printer.cmx src/batEnum.cmx src/batPrintf.cmx src/batList.cmx src/batRefList.cmx src/batArg.cmx src/batBitSet.cmx src/batChar.cmx src/batReturn.cmx src/batString.cmx src/batUChar.cmx src/batUTF8.cmx src/batRope.cmx src/batUnix.cmx src/batIO.cmx src/batArray.cmx src/batBigarray.cmx src/batNumber.cmx src/batBig_int.cmx src/batStd.cmx src/batBool.cmx src/batBuffer.cmx src/batInt.cmx src/batMap.cmx src/batOption.cmx src/batPMap.cmx src/batLazyList.cmx src/batParserCo.cmx src/batVect.cmx src/batCharParser.cmx src/batFloat.cmx src/batStream.cmx src/batGenlex.cmx src/batComplex.cmx src/batDigest.cmx src/batFormat.cmx src/batGc.cmx src/batHashtbl.cmx src/batInt32.cmx src/batInt64.cmx src/batLexing.cmx src/batMarshal.cmx src/batNativeint.cmx src/batNum.cmx src/batOo.cmx src/batFile.cmx src/batPrint.cmx src/batPrintexc.cmx src/batPervasives.cmx src/batQueue.cmx src/batRandom.cmx src/batScanf.cmx src/batSet.cmx src/batStack.cmx src/batStr.cmx src/batSys.cmx src/batUnit.cmx src/batBase64.cmx src/batCharEncodings.cmx src/batDllist.cmx src/batDynArray.cmx src/batGlobal.cmx src/batSubstring.cmx src/batLogger.cmx src/batPSet.cmx src/batMultiPMap.cmx src/batOptParse.cmx src/batPair.cmx src/batUCharParser.cmx src/batPathGen.cmx src/batResult.cmx src/batSeq.cmx src/batAvlTree.cmx src/batISet.cmx src/batIMap.cmx src/batteries_config.cmx src/batteries_print.cmx src/batteries_uni.cmx src/batMutex.cmx src/batRMutex.cmx src/batteries.cmx -o src/batteries.cmxa
> ocamlfind ocamlopt -shared -linkall -package camomile,num,str -o src/batteries_uni.cmxs src/batteries_uni.cmxa
> + ocamlfind ocamlopt -shared -linkall -package camomile,num,str -o src/batteries_uni.cmxs src/batteries_uni.cmxa
> ld: warning: -read_only_relocs cannot be used with x86_64
> ld: codegen problem, can't use rel32 to external symbol _caml_negf_mask in .L101 from src/batteries_uni.a(batFloat.o)
> collect2: ld returned 1 exit status
> File "caml_startup", line 1, characters 0-1:
> Error: Error during linking
> Command exited with code 2.
> make[7]: *** [all] Error 10
> Error: Exec error: File /Users/surikator/godi/build/godi/godi-batteries/./../../mk/bsd.pkg.mk, line 1039: Command returned with non-zero exit code
> Error: Exec error: File /Users/surikator/godi/build/godi/godi-batteries/./../../mk/bsd.pkg.mk, line 1378: Command returned with non-zero exit code

### Error: Command fails with code 1: godi_console

The solution that doesn't work

In my previous question, based on this post, I toggled the GODI setting

GODI_BATTERIES_SHLIB = no

and it did finish installing batteries. But I just started a fresh installation of GODI and even with this setting, I still get the error above (which is the same I had originally).

My Settings

I am using Mac OS X version 10.6.4 on a MacBookPro (64bit) with the most recent version of GODI (rocketboost-20091222).

Ideas?

From

> ld: warning: -read_only_relocs cannot be used with x86_64

it really seems that batteries/godi is trying to do something for 32 bits when it should be doing something for 64. Is there some setting in batteries or godi where this can be changed?

From

> ld: codegen problem, can't use rel32 to external symbol _caml_negf_mask in .L101 from src/batteries_uni.a(batFloat.o)

it can be seen that the source of the problem is the library batteries_uni.a. I don't know if there's something imposing 32 bits in there? I noticed that batteries_uni.ml includes modules Int32 and Int64 for integers, but that shouldn't really be a problem, should it?

Any ideas?

Any help on this would be great!

Thanks a lot, Surikator.

1

There are 1 answers

1
Michael Ekstrand On BEST ANSWER

I did some investigation, and it turns out that there was a bug in the GODI packaging script so that the GODI_BATTERIES_SHILB option was a no-op. I have corrected this bug and released updated build scripts, so setting it to no and building Batteries after updating your GODI installation (godi_update, or "Check for new source packages" in godi_console) should successfully prevent the .cmxs files from being built and installed. I think this will allow you to build on the Mac now.

I would like to find the actual build bug and get .cmxs files working on Mac, but none of the Batteries devs have Macs (to my knowledge) so it's kinda hard.