I wiped and reinstalled the Haskell platform (Haskell.org: cabal, stack, ghc), but now no addon package will install properly. Cabal always end with ExitFailure1. Probably because not being able to find a dependency. Most of the times however it is the main package it cannot resolve for some reason.
Any experience with that phenomenon?
Local stack build
-- While building custom Setup.hs for package json-lesson-0.1.0.0 using:
/Users/administrator/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.3 --builddir=.stack-work/dist/x86_64-osx/Cabal-2.2.0.1 configure --with-ghc=/Users/administrator/.stack/programs/x86_64-osx/ghc-8.4.3/bin/ghc --with-ghc-pkg=/Users/administrator/.stack/programs/x86_64-osx/ghc-8.4.3/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/Users/administrator/.stack/snapshots/x86_64-osx/lts-12.5/8.4.3/pkgdb --package-db=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/pkgdb --libdir=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/lib --bindir=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/bin --datadir=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/share --libexecdir=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/libexec --sysconfdir=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/etc --docdir=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/doc/json-lesson-0.1.0.0 --htmldir=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/doc/json-lesson-0.1.0.0 --haddockdir=/Users/administrator/Desktop/Haskell/json-lesson/.stack-work/install/x86_64-osx/lts-12.5/8.4.3/doc/json-lesson-0.1.0.0 --dependency=aeson=aeson-1.3.1.1-v8c5j6KkT8PoXkOVjikF --dependency=base=base-4.11.1.0 --dependency=bytestring=bytestring-0.10.8.2 --dependency=text=text-1.2.3.0
Process exited with code: ExitFailure 1
Using cabal install:
MacBook-2:Haskell administrator$ cabal install aeson
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Resolving dependencies...
Downloading base-compat-0.10.4...
Downloading dlist-0.8.0.4...
Configuring dlist-0.8.0.4...
Downloading tagged-0.8.6...
Downloading th-abstraction-0.2.8.0...
Configuring tagged-0.8.6...
Configuring base-compat-0.10.4...
Configuring th-abstraction-0.2.8.0...
Building dlist-0.8.0.4...
Building tagged-0.8.6...
Building base-compat-0.10.4...
Building th-abstraction-0.2.8.0...
Installed dlist-0.8.0.4
Downloading time-locale-compat-0.1.1.4...
Configuring time-locale-compat-0.1.1.4...
Building time-locale-compat-0.1.1.4...
Installed tagged-0.8.6
Downloading uuid-types-1.0.3...
Configuring uuid-types-1.0.3...
Installed time-locale-compat-0.1.1.4
Building uuid-types-1.0.3...
Failed to install uuid-types-1.0.3
Build log ( /Users/administrator/.cabal/logs/ghc-8.4.3/uuid-types-1.0.3-tE9Bfk2PgXDUPgbtamBdI.log ):
cabal: Entering directory '/var/folders/81/50s00bl11pv7fn8dw4n0w03m0000gn/T/cabal-tmp-5513/uuid-types-1.0.3'
Configuring uuid-types-1.0.3...
clang: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
Preprocessing library for uuid-types-1.0.3..
Building library for uuid-types-1.0.3..
<command line>: cannot satisfy -package-id hashable-1.2.7.0-3hrKWzET808E40baaqgc23
(use -v for more information)
cabal: Leaving directory '/var/folders/81/50s00bl11pv7fn8dw4n0w03m0000gn/T/cabal-tmp-5513/uuid-types-1.0.3'
Installed th-abstraction-0.2.8.0
Installed base-compat-0.10.4
Updating documentation index
/Users/administrator/Library/Haskell/share/doc/x86_64-osx-ghc-8.4.3/index.html
cabal: Error: some packages failed to install:
aeson-1.4.0.0-64eUw61rbC49Aocs9eETca depends on aeson-1.4.0.0 which failed to
install.
uuid-types-1.0.3-tE9Bfk2PgXDUPgbtamBdI failed during the building phase. The
exception was:
ExitFailure 1
Solution to the broken package issues with Cabal: in OSX there's a 'Frameworks' directory. This holds a Haskell-framework, that you need to delete, otherwise ghc stays active in the background and package building by cabal will fail. In general you need to delete the (hidden) .cabal, .stack and .ghc directories, as well the Haskell framework in 'Frameworks'. There are also two (!) Haskell directories in ~/Library and ~/User/Library you'd better delete.
Stumbled across this when looking for the Rails framework. Thank you all for contributing with possible solutions!
Related
I am trying to install LightGBM GPU version on Windows systems (I am using Anaconda on Windows for Python). I followed the installation guide from the beginning.
I have succefully completed the first two tasks:
Install the appropriate OpenCL SDK
Install MinGW
However, I encountered error after this command for Boost Compilation:
b2 install --build_dir="C:\boost\boost-build" --prefix="C:\boost\boost-build" toolset=gcc --with=filesystem,system threading=multi --layout=system release
The Error Message are as followed:
error: Name clash for 'libboost_atomic.a'
error:
error: Tried to build the target twice, with property sets having
error: these incompatible properties:
error:
error: - 64
error: - 32
error:
error: Please make sure to have consistent requirements for these
error: properties everywhere in your project, especially for install
error: targets.
Please share me any suggestions on how should I rectify the problem?
I can't get haskell's stack to work on my Mac.
I installed haskell by:
brew cask install haskell-platform
Which is specified here: https://www.haskell.org/platform/mac.html#osx-homebrewcask
I've also tried installing via the downloadable package at the same site.
I do the following commands:
stack new my-project
cd my-project
stack setup
stack build
stack exec my-project-exe
Per the documentation here:
https://docs.haskellstack.org/en/stable/README/#quick-start-guide
And I immediately see this:
[1] 43017 killed stack exec my-project-exe
I've also tried many other ways of installing haskell. I've actually been able to get something compiled and executed just using cabal, but I can't then get hlint, hindent, or ghc-mod to work, they all return a similar message to the one above. I'd love to be able to work with HaskForce in IntelliJ on my Mac, but I've never had luck getting haskell to work.
System Specs
macOS 10.12.6 (16G29) (Sierra)
Fresh uninstall/reinstall of XCode (accepted terms)
brew as package manager
Here's a gif of what happens as well: https://imgur.com/gallery/afYym7m
UPDATE
I blew away all stuff related to ghc, stack, and cabal and then installed this way
https://haskell-lang.org/get-started
Writing the little HelloWorld.hs script worked fine and showed Hello, World
However, doing
stack new someproj
cd someproj
stack build
Resulted in this:
➜ someproj stack build
[1 of 2] Compiling Main ( /Users/trevord2/.stack/setup-exe-src/setup-mPHDZzAJ.hs, /Users/trevord2/.stack/setup-exe-src/setup-mPHDZzAJ.o )
[2 of 2] Compiling StackSetupShim ( /Users/trevord2/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /Users/trevord2/.stack/setup-exe-src/setup-shim-mPHDZzAJ.o )
Linking /Users/trevord2/.stack/setup-exe-cache/x86_64-osx/tmp-Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 ...
someproj-0.1.0.0: configure (lib + exe)
Configuring someproj-0.1.0.0...
someproj-0.1.0.0: build (lib + exe)
Preprocessing library someproj-0.1.0.0...
[1 of 1] Compiling Lib ( src/Lib.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Lib.o )
Preprocessing executable 'someproj-exe' for someproj-0.1.0.0...
[1 of 1] Compiling Main ( app/Main.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/someproj-exe/someproj-exe-tmp/Main.o )
Linking .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/someproj-exe/someproj-exe ...
ld: warning: ignoring file /Users/trevord2/someproj/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/libHSsomeproj-0.1.0.0-6corWoTDCA69pE1sqNF8Id.a, file was built for archive which is not the architecture being linked (x86_64): /Users/trevord2/someproj/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/libHSsomeproj-0.1.0.0-6corWoTDCA69pE1sqNF8Id.a
Undefined symbols for architecture x86_64:
"_someprojzm0zi1zi0zi0zm6corWoTDCA69pE1sqNF8Id_Lib_someFunc1_closure", referenced from:
_Main_main1_info in Main.o
_S39Z_srt in Main.o
"_someprojzm0zi1zi0zi0zm6corWoTDCA69pE1sqNF8Id_Lib_someFunc1_info", referenced from:
_Main_main_info in Main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
`gcc' failed in phase `Linker'. (Exit code: 1)
-- While building package someproj-0.1.0.0 using:
/Users/trevord2/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.24.2.0 build lib:someproj exe:someproj-exe --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure 1
Which I've seen before and was actually one of my initial problems
UPDATE 2: Created GitHub Issue
Here's the issue: https://github.com/commercialhaskell/stack/issues/3487
After talking with folks on #haskell IRC they recommended I create an issue as this is very peculiar behaviour from what I understand. I'll try make sure whatever we find out here is pushed up there too.
I am using OSx, attempting to install a haskell package 'SDL-mixer' via 'cabal install SDL-mixer'. I get the following error:
$ cabal install SDL-mixerResolving dependencies...
Configuring SDL-mixer-0.6.2.0...
Failed to install SDL-mixer-0.6.2.0
Build log ( /Users/matthewherzl/.cabal/logs/SDL-mixer-0.6.2.0.log ):
cabal: Entering directory '/var/folders/v7/gzwp_4j12gd_3d2pt2cl52yr0000gn/T/cabal-tmp-7633/SDL-mixer-0.6.2.0'
[1 of 1] Compiling Main ( /var/folders/v7/gzwp_4j12gd_3d2pt2cl52yr0000gn/T/cabal-tmp-7633/SDL-mixer-0.6.2.0/dist/setup/setup.hs, /var/folders/v7/gzwp_4j12gd_3d2pt2cl52yr0000gn/T/cabal-tmp-7633/SDL-mixer-0.6.2.0/dist/setup/Main.o )
Linking /var/folders/v7/gzwp_4j12gd_3d2pt2cl52yr0000gn/T/cabal-tmp-7633/SDL-mixer-0.6.2.0/dist/setup/setup ...
Configuring SDL-mixer-0.6.2.0...
configure: WARNING: unrecognized options: --with-compiler
checking for sdl-config... /usr/local/bin/sdl-config
checking for gcc... /usr/bin/clang
checking whether the C compiler works... no
configure: error: in `/private/var/folders/v7/gzwp_4j12gd_3d2pt2cl52yr0000gn/T/cabal-tmp-7633/SDL-mixer-0.6.2.0':
configure: error: C compiler cannot create executables
See `config.log' for more details.
cabal: Leaving directory '/var/folders/v7/gzwp_4j12gd_3d2pt2cl52yr0000gn/T/cabal-tmp-7633/SDL-mixer-0.6.2.0'
cabal: Error: some packages failed to install:
SDL-mixer-0.6.2.0 failed during the configure step. The exception was:
ExitFailure 77
Other questions pose similar errors, but I have not found a solution that works for my case.
Some things I've tried:
validated that gcc is present on my machine, and works to successfully compile a c program.
restarted my machine
removed and reinstalled xcode
uninstalled and reinstalled gcc
installed clang
attempted to install in sandbox
I get the same error in each case.
It seems there is something I need to change in my OS setup; any ideas on how to fix?
I don't understand the error because it appears to be requiring a version of the same package that I'm trying to install.
$ cabal install gtk-mac-integration
Resolving dependencies...
[1 of 2] Compiling SetupWrapper ( /var/folders/cU/cUDMo9+9Gl817+j+h1DAvk+++TI/-Tmp-/gtk-mac-integration-0.1.0.46479/gtk-mac-integration-0.1.0.4/SetupWrapper.hs, /var/folders/cU/cUDMo9+9Gl817+j+h1DAvk+++TI/-Tmp-/gtk-mac-integration-0.1.0.46479/gtk-mac-integration-0.1.0.4/dist/setup/SetupWrapper.o )
[2 of 2] Compiling Main ( /var/folders/cU/cUDMo9+9Gl817+j+h1DAvk+++TI/-Tmp-/gtk-mac-integration-0.1.0.46479/gtk-mac-integration-0.1.0.4/Setup.hs, /var/folders/cU/cUDMo9+9Gl817+j+h1DAvk+++TI/-Tmp-/gtk-mac-integration-0.1.0.46479/gtk-mac-integration-0.1.0.4/dist/setup/Main.o )
Linking /var/folders/cU/cUDMo9+9Gl817+j+h1DAvk+++TI/-Tmp-/gtk-mac-integration-0.1.0.46479/gtk-mac-integration-0.1.0.4/dist/setup/setup ...
[1 of 2] Compiling Gtk2HsSetup ( Gtk2HsSetup.hs, dist/setup-wrapper/Gtk2HsSetup.o )
[2 of 2] Compiling Main ( SetupMain.hs, dist/setup-wrapper/Main.o )
Linking dist/setup-wrapper/setup ...
Configuring gtk-mac-integration-0.1.0.4...
setup: The pkg-config package gtk-mac-integration version >=0.9.6 is required
but it could not be found.
cabal: Error: some packages failed to install:
gtk-mac-integration-0.1.0.4 failed during the configure step. The exception
was:
ExitFailure 1
It doesn't want the Haskell package gtk-mac-integration, it wants the system package gtk-mac-integration. That is, the Haskell package you're trying to install is just a binding to the gtk-mac-integration library (which I think is bundled with GTK+); you'll have to install it separately before you can install the Haskell package.
If you already have GTK+ installed, then the problem is that the pkg-config tool Cabal uses to find external library dependencies can't find the corresponding .pc files for the library. I don't know how to fix that, though; at least not without more details.
I am trying to build boost on cygwin but I cannot find a way to get bjam to start the compilation. May be I am missing something. Can someone give me a clue? FYI: I got following error message.
$ bjam --without-python --without-serialization toolset=gcc-android4.4.3 link=s
tatic runtime-link=static target-os=linux --stagedir=android
warning: mismatched versions of Boost.Build engine and core
warning: Boost.Build engine (bjam) is 03.1.18
warning: Boost.Build core (at /cygdrive/c/progra~1/android/android-ndk-r6b/sourc
es/boost/tools/build/v2) is 2011.04-svn
/cygdrive/c/progra~1/android/android-ndk-r6b/sources/boost/tools/build/v2/util/p
ath.jam:476: in path.makedirs
rule MAKEDIR unknown in module path.
/cygdrive/c/progra~1/android/android-ndk-r6b/sources/boost/tools/build/v2/build/
configure.jam:190: in configure.set-log-file
/cygdrive/c/progra~1/android/android-ndk-r6b/sources/boost/tools/build/v2/build-
system.jam:725: in load
/cygdrive/c/progra~1/android/android-ndk-r6b/sources/boost/tools/build/v2/kernel
/modules.jam:283: in import
/cygdrive/c/progra~1/android/android-ndk-r6b/sources/boost/tools/build/v2/kernel
/bootstrap.jam:142: in boost-build
/cygdrive/c/progra~1/android/android-ndk-r6b/sources/boost/boost-build.jam:17: i
n module scope
UPDATE: this was a problem of old bjam.exe placed in one of my system path. After using right bjam, the problem went away.