Building on OS X

25 views
Skip to first unread message

Tom Davies

unread,
Mar 15, 2018, 1:06:05 AM3/15/18
to codeworld-discuss
While I think developing in a Linux VM makes most sense, I am trying to build Codeworld on OS X just for fun.

The first obvious error I get is:

src/CodeWorld/Message.hs:16:8: error:
    Failed to load interface for ‘Prelude’
    Perhaps you haven't installed the "js_p" libraries for package ‘base-4.9.0.0’?
    Use -v to see a list of the files searched for.

Does that have an obvious cause?

Log context:

RUNNING: cabal_install --ghcjs ./codeworld-prediction ./codeworld-error-sanitizer ./codeworld-api ./codeworld-base ./codeworld-game-api QuickCheck
Warning: --root-cmd is no longer supported, see
https://github.com/haskell/cabal/issues/3353 (if you didn't type --root-cmd,
comment out root-cmd in your ~/.cabal/config file)
Warning: the --global flag is deprecated -- it is generally considered a bad
idea to install packages into the global store
Resolving dependencies...
Downloading MonadRandom-0.5.1...
Downloading cereal-0.5.5.0...
Configuring codeworld-error-sanitizer-0.1.0.0...
Configuring codeworld-game-api-0.2.0.0...
Configuring codeworld-prediction-0.1...
Configuring tf-random-0.5...
Downloading ghcjs-dom-jsffi-0.8.0.0...
Configuring MonadRandom-0.5.1...
Configuring cereal-0.5.5.0...
Building codeworld-error-sanitizer-0.1.0.0...
Building codeworld-prediction-0.1...
Building tf-random-0.5...
Building codeworld-game-api-0.2.0.0...
Building MonadRandom-0.5.1...
Building cereal-0.5.5.0...
Failed to install codeworld-game-api-0.2.0.0
Build log ( /Users/tdavies/.cabal/logs/ghcjs-0.2.1/codeworld-game-api-0.2.0.0-5UO98ffcLFcDrhWXfeeglb.log ):
cabal: Entering directory './codeworld-game-api'
Configuring codeworld-game-api-0.2.0.0...
Preprocessing library for codeworld-game-api-0.2.0.0..
Building library for codeworld-game-api-0.2.0.0..
[1 of 1] Compiling CodeWorld.Message ( src/CodeWorld/Message.hs, dist/build/CodeWorld/Message.js_o )
[1 of 1] Compiling CodeWorld.Message ( src/CodeWorld/Message.hs, dist/build/CodeWorld/Message.js_p_o )

src/CodeWorld/Message.hs:16:8: error:
    Failed to load interface for ‘Prelude’
    Perhaps you haven't installed the "js_p" libraries for package ‘base-4.9.0.0’?
    Use -v to see a list of the files searched for.

src/CodeWorld/Message.hs:18:1: error:
    Failed to load interface for ‘Data.ByteString’
    Perhaps you haven't installed the "js_p" libraries for package ‘bytestring-0.10.8.1’?
    Use -v to see a list of the files searched for.

src/CodeWorld/Message.hs:19:1: error:
    Failed to load interface for ‘Data.Text’
    Perhaps you haven't installed the "js_p" libraries for package ‘text-1.2.2.1’?
    Use -v to see a list of the files searched for.

Chris Smith

unread,
Mar 15, 2018, 3:28:58 PM3/15/18
to codeworl...@googlegroups.com
Thanks for the report, Tom.  I'm not sure what's changed.  The problem is that the build script is trying to install profiling versions of the libraries, but we bootstrap GHCJS without profiling versions.

Can you try modifying base.sh to add "--disable-library-profiling" to the definition of the cabal_install macro?

--
You received this message because you are subscribed to the Google Groups "codeworld-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codeworld-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to codeworld-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codeworld-discuss/267086ab-9c04-4e79-be63-fb14ffb4bc01%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tom Davies

unread,
Mar 15, 2018, 11:01:52 PM3/15/18
to codeworld-discuss
That fixed the problem -- I'll open a PR (when I can remember not to commit with my work email!)

When I run the logo example on OS X I get some errors -- but it runs correctly:

Line 30, Column 48: error: Missing parentheses in function application

Line 42, Column 31: error: Missing parentheses in function application

Line 43, Column 31: error: Missing parentheses in function application

Reply all
Reply to author
Forward
0 new messages