haskell / primitive

This package provides various primitive memory-related operations.
Other
114 stars 58 forks source link

failed to install primitive-0.5.3.0 (14.04LTS, ghc-7.8.2, clang-3.4) #8

Closed DragonLi closed 8 years ago

DragonLi commented 10 years ago

My system is ubuntu 14.04LTS, using ghc-7.8.2 with clang-3.4, the error message with the verbosity flag -v3 is:

Searching for ghc in path.
Found ghc at /home/liyongji/ghcinst/bin/ghc
("/home/liyongji/ghcinst/bin/ghc",["--numeric-version"])
/home/liyongji/ghcinst/bin/ghc is version 7.8.2
looking for tool ghc-pkg near compiler in /home/liyongji/ghcinst/bin
found ghc-pkg in /home/liyongji/ghcinst/bin/ghc-pkg
("/home/liyongji/ghcinst/bin/ghc-pkg",["--version"])
/home/liyongji/ghcinst/bin/ghc-pkg is version 7.8.2
("/home/liyongji/ghcinst/bin/ghc",["--supported-languages"])
("/home/liyongji/ghcinst/bin/ghc",["--info"])
Reading installed packages...
("/home/liyongji/ghcinst/bin/ghc-pkg",["dump","--global","-v0"])
("/home/liyongji/ghcinst/bin/ghc-pkg",["dump","--user","-v0"])
("/home/liyongji/ghcinst/bin/ghc",["--print-libdir"])
Reading available packages...
Choosing modular solver.
Resolving dependencies...
targets: primitive
constraints: 
  base installed
  ghc-prim installed
  integer-gmp installed
  template-haskell installed
  stanzas primitive 
preferences: 
  HSlippyMap <0.1.0.0 || >0.1.0.0 && <1.0 || >1.0 && <1.2 || >1.2 && <1.4 || >1.4 && <1.6 || >1.6 && <1.8 || >1.8 && <2.0 || >2.0 && <2.1 || >2.1
  Hs2lib <0.5.7 || >0.5.7 && <0.5.8 || >0.5.8
  Spock >0.4.2.3
  Win32-services <0.2 || >0.2 && <0.2.1 || >0.2.1 && <0.2.2 || >0.2.2 && <0.2.2.1 || >0.2.2.1
  aeson <0.7.0.0 || >0.7.0.0 && <0.7.0.1 || >0.7.0.1 && <0.7.0.2 || >0.7.0.2 && <0.7.0.3 || >0.7.0.3 && <0.7.0.5 || >0.7.0.5
  apiary <0.4.3.1 || >0.4.3.1 && <0.6.0.0 || >0.6.0.0
  apiary-cookie <0.4.3.1 || >0.4.3.1
  apiary-persistent <0.4.3.1 || >0.4.3.1
  apiary-websockets <0.4.3.1 || >0.4.3.1
  atomic-primops <0.1.0.0 || >0.1.0.0 && <0.1.0.2 || >0.1.0.2 && <0.2.2 || >0.2.2 && <0.2.2.1 || >0.2.2.1 && <0.3 || >0.3 && <0.4 || >0.4 && <0.5 || >0.5
  base-compat >=0.4.2
  base32-bytestring <0.2.0.0 || >0.2.0.0 && <0.2.0.1 || >0.2.0.1
  bencoding <0.2.1.0 || >0.2.1.0
  binary-conduit <1.2.1.1 || >1.2.1.1
  bindings-DSL <1.0.18 || >1.0.18
  blas >=0.7.6
  bugzilla <0.1.0.0 || >0.1.0.0
  cereal-plus <0.3.0 || >0.3.0
  clafer <0.3.5 || >0.3.5
  claferIG <0.3.5 || >0.3.5
  claferwiki <0.3.5 || >0.3.5
  conduit-extra <0.1.0 || >0.1.0 && <0.1.1 || >0.1.1 && <0.1.2 || >0.1.2 && <0.1.3 || >0.1.3 && <0.1.4 || >0.1.4 && <0.1.5 || >0.1.5 && <0.1.6 || >0.1.6 && <0.1.7 || >0.1.7 && <1.0.0 || >1.0.0
  cubical <0.1.1 || >0.1.1
  depends <0.0.0 || >0.0.0
  diagrams-builder <0.5.0.11 || >0.5.0.11
  diagrams-gtk <1.0.1.1 || >1.0.1.1
  equational-reasoning <0.2.0.1 || >0.2.0.1
  esqueleto <1.4.1.1 || >1.4.1.1
  extensible-effects <1.5.0 || >1.5.0 && <1.6.0 || >1.6.0
  free-game <0.2.0.0 || >0.2.0.0 && <0.9 || >0.9 && <0.9.2 || >0.9.2
  haskakafka <0.2.0.0 || >0.2.0.0
  haskell-awk <1.0 || >1.0
  hasktags <0.68.3 || >0.68.3 && <0.68.4 || >0.68.4 && <0.68.5 || >0.68.5
  hcltest <0.1 || >0.1 && <0.2 || >0.2
  helm <0.1.0 || >0.1.0 && <0.2.0 || >0.2.0 && <0.3.0 || >0.3.0 && <0.3.1 || >0.3.1 && <0.4 || >0.4
  heroku <0.1.1 || >0.1.1
  hmemdb <0.1.0.0 || >0.1.0.0 && <0.1.0.1 || >0.1.0.1 && <0.1.0.2 || >0.1.0.2 && <0.1.0.3 || >0.1.0.3 && <0.1.0.4 || >0.1.0.4 && <0.1.0.5 || >0.1.0.5 && <0.2.0.0 || >0.2.0.0 && <0.2.0.1 || >0.2.0.1 && <0.2.0.2 || >0.2.0.2 && <0.2.0.3 || >0.2.0.3 && <0.2.0.4 || >0.2.0.4 && <0.3.0.0 || >0.3.0.0 && <0.3.0.1 || >0.3.0.1 && <0.3.1.0 || >0.3.1.0 && <0.3.1.1 || >0.3.1.1
  hs-carbon <0.0.0.2 || >0.0.0.2 && <0.0.0.3 || >0.0.0.3
  hspec >=1.8.1
  hspec-discover ==0.2.0
  hspec-expectations <0.4.0 || >0.4.0
  ihaskell <0.2.0.0 || >0.2.0.0 && <0.2.0.1 || >0.2.0.1 && <0.2.0.2 || >0.2.0.2 && <0.2.0.3 || >0.2.0.3 && <0.2.0.4 || >0.2.0.4 && <0.2.0.5 || >0.2.0.5 && <0.3.0.0 || >0.3.0.0
  imagemagick >=0.0.2
  inspection-proxy <0.1.0.0 || >0.1.0.0 && <0.1.0.1 || >0.1.0.1
  leankit-api <0.1 || >0.1 && <0.2 || >0.2 && <0.3 || >0.3
  lvish <1.0 || >1.0 && <1.0.0.2 || >1.0.0.2
  markup-preview <0.1.0.0 || >0.1.0.0 && <0.2 || >0.2
  mongodb-queue <0.4 || >0.4
  network-msg <0.1 || >0.1 && <0.2 || >0.2
  persistent <1.2.3.1 || >1.2.3.1
  persistent-mongoDB <1.3.0 || >1.3.0 && <1.3.1 || >1.3.1
  pipes-cereal-plus <0.3.0 || >0.3.0
  pipes-p2p <0.1 || >0.1 && <0.2 || >0.2
  pipes-p2p-examples <0.1 || >0.1 && <0.2 || >0.2
  pipes-parse <3.0.0 || >3.0.0
  postgresql-orm <0.2 || >0.2 && <0.2.1 || >0.2.1
  ref <0.1.0.0 || >0.1.0.0
  rest-gen <0.12 || >0.12
  shadower >=0.1.0.4
  shelly <1.5 || >1.5 && <1.5.3 || >1.5.3
  sized-vector <1.3.1.0 || >1.3.1.0
  snap-utils <0.1.0 || >0.1.0 && <0.1.1 || >0.1.1
  soap >0.2.1
  stripe <0.3.0.1 || >0.3.0.1
  tasty-rerun >=1.1.0
  texmath <0.6.5.1 || >0.6.5.1
  thorn >=0.1.0.3
  thyme <0.3.5.0 || >0.3.5.0
  transformers <0.4.0.0 || >0.4.0.0
  twitter-conduit <0.0.1 || >0.0.1 && <0.0.2 || >0.0.2
  unsafely <0.1.0.0 || >0.1.0.0
  vector <0.10.9.3 || >0.10.9.3
  vector-instances <0.0.1 || >0.0.1 && <0.0.2 || >0.0.2 && <0.0.2.1 || >0.0.2.1 && <0.1.0 || >0.1.0 && <0.1.0.1 || >0.1.0.1
  yocto >=1
  zip-archive <0.2.3 || >0.2.3 && <0.2.3.1 || >0.2.3.1
strategy: PreferLatestForSelected
[__0] trying: primitive-0.5.3.0 (user goal)
[__1] trying: base-4.7.0.0/installed-018... (dependency of primitive-0.5.3.0)
[__2] trying: rts-1.0/installedbuil... (dependency of base-4.7.0.0/installed-018...)
[__3] trying: integer-gmp-0.5.1.0/installed-dc4... (dependency of base-4.7.0.0/installed-018...)
[__4] next goal: ghc-prim (dependency of primitive-0.5.3.0)
[__4] trying: ghc-prim-0.3.1.0/installed-948...
[__5] done
Ready to install primitive-0.5.3.0
Waiting for install task to finish...
Extracting
/home/liyongji/.cabal/packages/hackage.haskell.org/primitive/0.5.3.0/primitive-0.5.3.0.tar.gz
to /tmp/primitive-0.5.3.0-11928...
Updating primitive.cabal with the latest revision from the index.
Using internal setup method with build-type Simple and args:
["configure","--verbose=3","--ghc","--prefix=/home/liyongji/.cabal","--bindir=/home/liyongji/.cabal/bin","--libdir=/home/liyongji/.cabal/lib","--libsubdir=x86_64-linux-ghc-7.8.2/primitive-0.5.3.0","--libexecdir=/home/liyongji/.cabal/libexec","--datadir=/home/liyongji/.cabal/share","--datasubdir=x86_64-linux-ghc-7.8.2/primitive-0.5.3.0","--docdir=/home/liyongji/.cabal/share/doc/x86_64-linux-ghc-7.8.2/primitive-0.5.3.0","--htmldir=/home/liyongji/.cabal/share/doc/x86_64-linux-ghc-7.8.2/primitive-0.5.3.0/html","--haddockdir=/home/liyongji/.cabal/share/doc/x86_64-linux-ghc-7.8.2/primitive-0.5.3.0/html","--sysconfdir=/home/liyongji/.cabal/etc","--user","--extra-prog-path=/home/liyongji/.cabal/bin","--dependency=ghc-prim=ghc-prim-0.3.1.0-948744e1f99cc8bcc7c7d3ba60c7c2d8","--dependency=base=base-4.7.0.0-018311399e3b6350d5be3a16b144df9b","--disable-tests","--exact-configuration","--disable-benchmarks"]
Configuring primitive-0.5.3.0...
creating dist
Searching for ghc in path.
Found ghc at /home/liyongji/ghcinst/bin/ghc
("/home/liyongji/ghcinst/bin/ghc",["--numeric-version"])
/home/liyongji/ghcinst/bin/ghc is version 7.8.2
looking for tool ghc-pkg near compiler in /home/liyongji/ghcinst/bin
found ghc-pkg in /home/liyongji/ghcinst/bin/ghc-pkg
("/home/liyongji/ghcinst/bin/ghc-pkg",["--version"])
/home/liyongji/ghcinst/bin/ghc-pkg is version 7.8.2
("/home/liyongji/ghcinst/bin/ghc",["--supported-languages"])
("/home/liyongji/ghcinst/bin/ghc",["--info"])
Reading installed packages...
("/home/liyongji/ghcinst/bin/ghc-pkg",["dump","--global","-v0"])
("/home/liyongji/ghcinst/bin/ghc-pkg",["dump","--user","-v0"])
("/home/liyongji/ghcinst/bin/ghc",["--print-libdir"])
Dependency base ==4.7.0.0: using base-4.7.0.0
Dependency ghc-prim ==0.3.1.0: using ghc-prim-0.3.1.0
Searching for alex in path.
Cannot find alex on the path
Searching for ar in path.
Found ar at /usr/bin/ar
Searching for c2hs in path.
Cannot find c2hs on the path
Searching for cpphs in path.
Found cpphs at /home/liyongji/.cabal/bin/cpphs
("/home/liyongji/.cabal/bin/cpphs",["--version"])
/home/liyongji/.cabal/bin/cpphs is version 1.18.4
Searching for ffihugs in path.
Cannot find ffihugs on the path
Searching for gcc in path.
Cannot find gcc on the path
Searching for greencard in path.
Cannot find greencard on the path
Searching for haddock in path.
Found haddock at /home/liyongji/ghcinst/bin/haddock
("/home/liyongji/ghcinst/bin/haddock",["--version"])
/home/liyongji/ghcinst/bin/haddock is version 2.14.2
Searching for happy in path.
Cannot find happy on the path
Searching for hmake in path.
Cannot find hmake on the path
Searching for hpc in path.
Found hpc at /home/liyongji/ghcinst/bin/hpc
("/home/liyongji/ghcinst/bin/hpc",["version"])
/home/liyongji/ghcinst/bin/hpc is version 0.67
looking for tool hsc2hs near compiler in /home/liyongji/ghcinst/bin
found hsc2hs in /home/liyongji/ghcinst/bin/hsc2hs
("/home/liyongji/ghcinst/bin/hsc2hs",["--version"])
/home/liyongji/ghcinst/bin/hsc2hs is version 0.67
Searching for HsColour in path.
Cannot find HsColour on the path
Searching for hugs in path.
Cannot find hugs on the path
Searching for jhc in path.
Cannot find jhc on the path
Searching for ld in path.
Found ld at /usr/bin/ld
Environment: [("BROWSER","opera-browser"),("CLUTTER_IM_MODULE","xim"),("DBUS_SESSION_BUS_ADDRESS","unix:abstract=/tmp/dbus-FhqdePX3ON"),("DEFAULTS_PATH","/usr/share/gconf/Lubuntu.default.path"),("DESKTOP_SESSION","Lubuntu"),("DISPLAY",":0"),("GDMSESSION","Lubuntu"),("GDM_LANG","zh_CN"),("GTK_IM_MODULE","ibus"),("HOME","/home/liyongji"),("IM_CONFIG_PHASE","1"),("JOB","dbus"),("LANG","zh_CN.UTF-8"),("LANGUAGE","zh_CN:en"),("LC_ADDRESS","zh_CN.UTF-8"),("LC_IDENTIFICATION","zh_CN.UTF-8"),("LC_MEASUREMENT","zh_CN.UTF-8"),("LC_MONETARY","zh_CN.UTF-8"),("LC_NAME","zh_CN.UTF-8"),("LC_NUMERIC","zh_CN.UTF-8"),("LC_PAPER","zh_CN.UTF-8"),("LC_TELEPHONE","zh_CN.UTF-8"),("LC_TIME","zh_CN.UTF-8"),("LOGNAME","liyongji"),("MANDATORY_PATH","/usr/share/gconf/Lubuntu.mandatory.path"),("PAPERSIZE","a4"),("PATH","/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/liyongji/.cabal/bin:/home/liyongji/.local/bin:/home/liyongji/ghcinst/bin:/home/liyongji/.cabal/bin"),("PWD","/home/liyongji"),("QT4_IM_MODULE","xim"),("QT_IM_MODULE","xim"),("SAL_USE_VCLPLUGIN","gtk"),("SCHROOT_ALIAS_NAME","amd64N"),("SCHROOT_CHROOT_NAME","amd64N"),("SCHROOT_COMMAND","/bin/bash"),("SCHROOT_GID","1000"),("SCHROOT_GROUP","liyongji"),("SCHROOT_SESSION_ID","amd64N-1168b076-4382-4f6f-851f-90ebf54b176d"),("SCHROOT_UID","1000"),("SCHROOT_USER","liyongji"),("SELINUX_INIT","YES"),("SESSION","Lubuntu"),("SESSIONTYPE","lxsession"),("SHELL","/bin/bash"),("SHLVL","2"),("SSH_AGENT_LAUNCHER","upstart"),("SSH_AGENT_PID","3116"),("SSH_AUTH_SOCK","/tmp/ssh-xCvBhDPqTQLY/agent.3113"),("TERM","xterm"),("TEXTDOMAIN","im-config"),("TEXTDOMAINDIR","/usr/share/locale/"),("UPSTART_EVENTS","started xsession"),("UPSTART_JOB","lxsession"),("UPSTART_SESSION","unix:abstract=/com/ubuntu/upstart-session/1000/3050"),("USER","liyongji"),("XAUTHORITY","/home/liyongji/.Xauthority"),("XDG_CONFIG_DIRS","/etc/xdg/lubuntu:/etc/xdg/xdg-Lubuntu:/usr/share/upstart/xdg:/etc/xdg"),("XDG_CONFIG_HOME","/home/liyongji/.config"),("XDG_CURRENT_DESKTOP","LXDE"),("XDG_DATA_DIRS","/etc/xdg/lubuntu:/usr/local/share:/usr/share:/usr/share/gdm:/var/lib/menu-xdg:/usr/share/Lubuntu:/usr/local/share/:/usr/share/"),("XDG_GREETER_DATA_DIR","/var/lib/lightdm-data/liyongji"),("XDG_MENU_PREFIX","lxde-"),("XDG_RUNTIME_DIR","/run/user/1000"),("XDG_SEAT","seat0"),("XDG_SEAT_PATH","/org/freedesktop/DisplayManager/Seat0"),("XDG_SESSION_COOKIE","f724886da050c31efb67c6975192c162-1402408005.268909-594657486"),("XDG_SESSION_ID","c2"),("XDG_SESSION_PATH","/org/freedesktop/DisplayManager/Session0"),("XDG_VTNR","7"),("XMODIFIERS","@im=ibus"),("_","/home/liyongji/.cabal/bin/cabal"),("_LXSESSION_PID","3158")]
("/home/liyongji/ghcinst/bin/ghc",["-c","/tmp/11928.c","-o","/tmp/11928.o"])
("/usr/bin/ld",["-x","-r","/tmp/11928.o","-o","/tmp/11929.o"])
Searching for lhc in path.
Cannot find lhc on the path
Searching for lhc-pkg in path.
Cannot find lhc-pkg on the path
Searching for nhc98 in path.
Cannot find nhc98 on the path
Searching for pkg-config in path.
Cannot find pkg-config on the path
Searching for strip in path.
Found strip at /usr/bin/strip
Searching for tar in path.
Found tar at /bin/tar
Searching for uhc in path.
Cannot find uhc on the path
Using Cabal-1.21.0.0 compiled by ghc-7.8
Using compiler: ghc-7.8.2
Using install prefix: /home/liyongji/.cabal
Binaries installed in: /home/liyongji/.cabal/bin
Libraries installed in:
/home/liyongji/.cabal/lib/x86_64-linux-ghc-7.8.2/primitive-0.5.3.0
Private binaries installed in: /home/liyongji/.cabal/libexec
Data files installed in:
/home/liyongji/.cabal/share/x86_64-linux-ghc-7.8.2/primitive-0.5.3.0
Documentation installed in:
/home/liyongji/.cabal/share/doc/x86_64-linux-ghc-7.8.2/primitive-0.5.3.0
Configuration files installed in: /home/liyongji/.cabal/etc
No alex found
Using ar found on system at: /usr/bin/ar
No c2hs found
Using cpphs version 1.18.4 found on system at: /home/liyongji/.cabal/bin/cpphs
No ffihugs found
No gcc found
Using ghc version 7.8.2 found on system at: /home/liyongji/ghcinst/bin/ghc
Using ghc-pkg version 7.8.2 found on system at:
/home/liyongji/ghcinst/bin/ghc-pkg
No greencard found
Using haddock version 2.14.2 found on system at:
/home/liyongji/ghcinst/bin/haddock
No happy found
Using haskell-suite found on system at: haskell-suite-dummy-location
Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
No hmake found
Using hpc version 0.67 found on system at: /home/liyongji/ghcinst/bin/hpc
Using hsc2hs version 0.67 found on system at:
/home/liyongji/ghcinst/bin/hsc2hs
No hscolour found
No hugs found
No jhc found
Using ld found on system at: /usr/bin/ld
No lhc found
No lhc-pkg found
No nhc98 found
No pkg-config found
Using strip found on system at: /usr/bin/strip
Using tar found on system at: /bin/tar
No uhc found
cabal: Missing dependency on a foreign library:
* Missing (or bad) header file: primitive-memops.h
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
If the header file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
Failed to install primitive-0.5.3.0
World file is already up to date.
cabal: Error: some packages failed to install:
primitive-0.5.3.0 failed during the configure step. The exception was:
ExitFailure 1
hvr commented 10 years ago

This seems to be clang-specific, as building primitive-0.5.3.0 on 14.04LTS with ghc built against gcc definitely works.

jcf42b commented 10 years ago

[solved] for me the problem was that there was no c compiler installed on my Amazon Linux server 'sudo yum install gcc' then reran 'cabal install' & it completed successfully

The error message is not crystal clear for this issue. I eventually figured it out by trying to compile the primitive-memops.c file & found I did not have a c compiler installed. I did already have ghc 7.6.3 installed & running

I encountered this problem when installing http://www.haskellcraft.com/craft3e/Start.html (Simon Thompson's Haskell Craft book source code). Frustrated me for several hours. There were lots of hits on this question but nothing that was an answer. I had checked the files & used the -v3 flag & tried specifying the --extra-include-files directives.

My linux environment is an Amazon EC2 instance based on an Amazon linux AMI. My haskell environment is: ghc 7.6.3 (obtained as distribution from justhub, not git)

obscaenvs commented 10 years ago

Just about the same problem here, on FreeBSD 10.0. It's using clang, of course, but I do have gcc installed and in the path.

* Missing (or bad) header file: primitive-memops.h
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
If the header file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
World file is already up to date.

From what I can see, the file primitive-memops.h is not missing, so where do I go from here? I cannot find how the C compiler is called, i.e. what name is used by the cabal-install process?

hvr commented 10 years ago

@obscaenvs try running cabal install -v3 that should dump out where cabal and ghc are looking for gcc

obscaenvs commented 10 years ago

I wiped a few old libs and reinstalled; that did the trick :)