snoyberg / purescript-halogen-onetimepad

Work with one time pads from a web page, mostly to teach me PureScript/Halogen
6 stars 1 forks source link

Could not build with recent version of stack (2.1.3 or 2.3.1) #1

Open ezoerner opened 4 years ago

ezoerner commented 4 years ago

After updating the stack.yaml to a format compatible with stack 1.11+, still get this error when trying to build:

Stack looks for packages in the directories configured in
the 'packages' and 'extra-deps' fields defined in your stack.yaml
The current entry points to <.elided.>/purescript-halogen-onetimepad/,
but no .cabal or package.yaml file could be found there.
snoyberg commented 4 years ago

Thanks for filing this, I've pushed an update. Can you see if that resolves the issue for you?

ezoerner commented 4 years ago

It gets farther but having a build issue now unable to build happy on macOS Catalina:

happy               > Preprocessing executable 'happy' for happy-1.19.5...
happy               > dyld: Library not loaded: @rpath/mtl-2.2.1-BLKBelFsPB3BoFeSWSOYj6/libHSmtl-2.2.1-BLKBelFsPB3BoFeSWSOYj6-ghc8.0.2.dylib
happy               >   Referenced from: ~/Library/Containers/com.haskellformac.Haskell.basic/Data/Library/Application Support/lib/ghc/bin/happy
happy               >   Reason: image not found

(I'm not going to worry about too much if it doesn't build on macOS)

Also, it looks like you unintentionally checked in the stack.yaml.lock file.

snoyberg commented 4 years ago

The lock file is intentional. On older snapshots, you need a copy of happy to bootstrap itself. You can install with a later snapshot with

stack install --resolver lts-16.0 happy 
ezoerner commented 4 years ago

Ok, I got past happy with stack install --resolver lts-16.0 happy, then ran into the same error with alex, so tried stack install --resolver lts-16.0 alex, which got me past alex, then ran into a problem with profunctors:

profunctors        > <command line>: can't load .so/.DLL for: ~/.stack/snapshots/x86_64-osx/1b2bcd312ff04ff833f45f602b201dbf9507ea71301634c2860ded324bf253d7/8.0.2/lib/x86_64-osx-ghc-8.0.2/libHSbase-orphans-0.5.4-ABoxiBf7nXc7Qqh66CgYc9-ghc8.0.2.dylib (dlopen(~/.stack/snapshots/x86_64-osx/1b2bcd312ff04ff833f45f602b201dbf9507ea71301634c2860ded324bf253d7/8.0.2/lib/x86_64-osx-ghc-8.0.2/libHSbase-orphans-0.5.4-ABoxiBf7nXc7Qqh66CgYc9-ghc8.0.2.dylib, 5): REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB has segment 2 which is not a writable segment (__LINKEDIT) in ~/.stack/snapshots/x86_64-osx/1b2bcd312ff04ff833f45f602b201dbf9507ea71301634c2860ded324bf253d7/8.0.2/lib/x86_64-osx-ghc-8.0.2/libHSbase-orphans-0.5.4-ABoxiBf7nXc7Qqh66CgYc9-ghc8.0.2.dylib)

Would this build go more smoothly if updated to a more recent snapshot?

snoyberg commented 4 years ago

You can certainly give it a shot

ezoerner commented 4 years ago

I tried a couple more recent snapshots but ran into unsolvable builds, put in some limited effort to solve it, but when I kept running into more problems I decided to move on. Thanks for your quick responses— however it's not really important enough for me personally to put in further effort.