#4852: cabal doesn't tell ./configure which gcc to use
----------------------------------+-----------------------------------------
    Reporter:  kazu-yamamoto      |        Owner:  igloo
        Type:  bug                |       Status:  new  
    Priority:  highest            |    Milestone:  7.0.2
   Component:  libraries (other)  |      Version:  7.1  
    Keywords:                     |     Testcase:       
   Blockedby:                     |   Difficulty:       
          Os:  Unknown/Multiple   |     Blocking:       
Architecture:  Unknown/Multiple   |      Failure:  Other
----------------------------------+-----------------------------------------

Comment(by igloo):

 It works for me on OS X 10.6.3. Note that you need to use the Cabal lib
 that comes from the 7.0 branch, and your cabal binary is probably linked
 against an older one. Mine is too, but it looks like it's so old:
 {{{
 $ cabal --version
 cabal-install version 0.8.2
 using version 1.8.0.6 of the Cabal library
 }}}
 {{{
 Warning: network.cabal: This package requires Cabal version: >=1.10
 }}}
 that cabal is building the Setup program from the network package:
 {{{
 [1 of 1] Compiling Main             ( dist/setup/setup.hs,
 dist/setup/Main.o )
 Linking ./dist/setup/setup ...
 }}}
 which therefore gets linked against the new Cabal library.

 Does that explain why it wasn't working for you? If not, do you know what
 the difference is between what I'm doing and what you were doing?

 Here's the full log:
 {{{
 $ git clone git://github.com/haskell/network.git
 Cloning into network...
 remote: Counting objects: 2272, done.
 remote: Compressing objects: 100% (1096/1096), done.
 remote: Total 2272 (delta 1341), reused 1884 (delta 1085)
 Receiving objects: 100% (2272/2272), 1.89 MiB | 115 KiB/s, done.
 Resolving deltas: 100% (1341/1341), done.
 $ cd network
 $ autoreconf
 $ cabal configure --with-
 compiler=/Users/ian/ghc/7.0-branch/val32/inplace/bin/gh
 c-stage2
 Warning: network.cabal: This package requires Cabal version: >=1.10
 Warning: network.cabal: Unknown fields: default-language (line 48),
 other-extensions (line 49)
 Fields allowed in this section:
 exposed-modules, exposed, buildable, build-tools, cpp-options,
 cc-options, ld-options, pkgconfig-depends, frameworks, c-sources,
 extensions, extra-libraries, extra-lib-dirs, includes,
 install-includes, include-dirs, hs-source-dirs, other-modules,
 ghc-prof-options, ghc-shared-options, ghc-options, hugs-options,
 nhc98-options, jhc-options
 Warning: network.cabal: Unknown fields: other-extensions (line 52)
 Fields allowed in this section:
 exposed-modules, exposed, buildable, build-tools, cpp-options,
 cc-options, ld-options, pkgconfig-depends, frameworks, c-sources,
 extensions, extra-libraries, extra-lib-dirs, includes,
 install-includes, include-dirs, hs-source-dirs, other-modules,
 ghc-prof-options, ghc-shared-options, ghc-options, hugs-options,
 nhc98-options, jhc-options
 Warning: network.cabal: Ignoring unknown section type: test-suite
 Warning: network.cabal: Ignoring unknown section type: test-suite
 Resolving dependencies...
 [1 of 1] Compiling Main             ( dist/setup/setup.hs,
 dist/setup/Main.o )
 Linking ./dist/setup/setup ...
 Configuring network-2.3.0.2...
 configure: WARNING: unrecognized options: --with-compiler, --with-gcc
 checking build system type... i386-apple-darwin10.6.0
 checking host system type... i386-apple-darwin10.6.0
 checking for gcc... gcc
 checking whether the C compiler works... yes
 checking for C compiler default output file name... a.out
 checking for suffix of executables...
 checking whether we are cross compiling... no
 checking for suffix of object files... o
 checking whether we are using the GNU C compiler... yes
 checking whether gcc accepts -g... yes
 checking for gcc option to accept ISO C89... none needed
 checking for an ANSI C-conforming const... yes
 checking how to run the C preprocessor... gcc -E
 checking for grep that handles long lines and -e... /usr/bin/grep
 checking for egrep... /usr/bin/grep -E
 checking for ANSI C header files... yes
 checking for sys/types.h... yes
 checking for sys/stat.h... yes
 checking for stdlib.h... yes
 checking for string.h... yes
 checking for memory.h... yes
 checking for strings.h... yes
 checking for inttypes.h... yes
 checking for stdint.h... yes
 checking for unistd.h... yes
 checking fcntl.h usability... yes
 checking fcntl.h presence... yes
 checking for fcntl.h... yes
 checking limits.h usability... yes
 checking limits.h presence... yes
 checking for limits.h... yes
 checking for stdlib.h... (cached) yes
 checking for sys/types.h... (cached) yes
 checking for unistd.h... (cached) yes
 checking winsock2.h usability... no
 checking winsock2.h presence... no
 checking for winsock2.h... no
 checking ws2tcpip.h usability... no
 checking ws2tcpip.h presence... no
 checking for ws2tcpip.h... no
 checking wspiapi.h usability... no
 checking wspiapi.h presence... no
 checking for wspiapi.h... no
 checking arpa/inet.h usability... yes
 checking arpa/inet.h presence... yes
 checking for arpa/inet.h... yes
 checking netdb.h usability... yes
 checking netdb.h presence... yes
 checking for netdb.h... yes
 checking netinet/in.h usability... yes
 checking netinet/in.h presence... yes
 checking for netinet/in.h... yes
 checking netinet/tcp.h usability... yes
 checking netinet/tcp.h presence... yes
 checking for netinet/tcp.h... yes
 checking sys/socket.h usability... yes
 checking sys/socket.h presence... yes
 checking for sys/socket.h... yes
 checking sys/uio.h usability... yes
 checking sys/uio.h presence... yes
 checking for sys/uio.h... yes
 checking sys/un.h usability... yes
 checking sys/un.h presence... yes
 checking for sys/un.h... yes
 checking for readlink... yes
 checking for symlink... yes
 checking for struct msghdr.msg_control... yes
 checking for struct msghdr.msg_accrights... no
 checking for struct sockaddr.sa_len... yes
 checking for in_addr_t in netinet/in.h... yes
 checking for SO_PEERCRED and struct ucred in sys/socket.h... no
 checking for _head_libws2_32_a in -lws2_32... no
 checking for getaddrinfo... yes
 checking for gai_strerror... yes
 checking whether AI_ADDRCONFIG is declared... yes
 checking whether AI_ALL is declared... yes
 checking whether AI_NUMERICSERV is declared... no
 checking whether AI_V4MAPPED is declared... yes
 checking for sendfile in sys/sendfile.h... no
 checking for sendfile in sys/socket.h... yes
 checking for gethostent... yes
 configure: creating ./config.status
 config.status: creating network.buildinfo
 config.status: creating include/HsNetworkConfig.h
 configure: WARNING: unrecognized options: --with-compiler, --with-gcc
 $ cabal build
 Warning: network.cabal: This package requires Cabal version: >=1.10
 Warning: network.cabal: Unknown fields: default-language (line 48),
 other-extensions (line 49)
 Fields allowed in this section:
 exposed-modules, exposed, buildable, build-tools, cpp-options,
 cc-options, ld-options, pkgconfig-depends, frameworks, c-sources,
 extensions, extra-libraries, extra-lib-dirs, includes,
 install-includes, include-dirs, hs-source-dirs, other-modules,
 ghc-prof-options, ghc-shared-options, ghc-options, hugs-options,
 nhc98-options, jhc-options
 Warning: network.cabal: Unknown fields: other-extensions (line 52)
 Fields allowed in this section:
 exposed-modules, exposed, buildable, build-tools, cpp-options,
 cc-options, ld-options, pkgconfig-depends, frameworks, c-sources,
 extensions, extra-libraries, extra-lib-dirs, includes,
 install-includes, include-dirs, hs-source-dirs, other-modules,
 ghc-prof-options, ghc-shared-options, ghc-options, hugs-options,
 nhc98-options, jhc-options
 Warning: network.cabal: Ignoring unknown section type: test-suite
 Warning: network.cabal: Ignoring unknown section type: test-suite
 Preprocessing library network-2.3.0.2...
 Preprocessing test suites for network-2.3.0.2...
 Building network-2.3.0.2...
 [1 of 8] Compiling Network.URI      ( Network/URI.hs,
 dist/build/Network/URI.o )
 [2 of 8] Compiling Network.Socket.ByteString.IOVec (
 dist/build/Network/Socket/B
 yteString/IOVec.hs, dist/build/Network/Socket/ByteString/IOVec.o )
 [3 of 8] Compiling Network.Socket.Internal (
 dist/build/Network/Socket/Internal.
 hs, dist/build/Network/Socket/Internal.o )
 [4 of 8] Compiling Network.Socket.ByteString.MsgHdr (
 dist/build/Network/Socket/
 ByteString/MsgHdr.hs, dist/build/Network/Socket/ByteString/MsgHdr.o )
 [5 of 8] Compiling Network.Socket.ByteString.Internal (
 Network/Socket/ByteStrin
 g/Internal.hs, dist/build/Network/Socket/ByteString/Internal.o )
 [6 of 8] Compiling Network.Socket   ( dist/build/Network/Socket.hs,
 dist/build/N
 etwork/Socket.o )
 [7 of 8] Compiling Network.BSD      ( dist/build/Network/BSD.hs,
 dist/build/Netw
 ork/BSD.o )
 [8 of 8] Compiling Network          ( Network.hs, dist/build/Network.o )
 Registering network-2.3.0.2...
 $ /Users/ian/ghc/7.0-branch/val32/inplace/bin/ghc-stage2 --info
  [("Project name","The Glorious Glasgow Haskell Compilation System")
  ,("Project version","7.0.1.20110201")
  ,("Booter version","7.0.1")
  ,("Stage","2")
  ,("Build platform","i386-apple-darwin")
  ,("Host platform","i386-apple-darwin")
  ,("Target platform","i386-apple-darwin")
  ,("Have interpreter","YES")
  ,("Object splitting","NO")
  ,("Have native code generator","YES")
  ,("Have llvm code generator","YES")
  ,("Support SMP","YES")
  ,("Unregisterised","NO")
  ,("Tables next to code","YES")
  ,("RTS ways","l debug  thr thr_debug thr_l   dyn debug_dyn thr_dyn
 thr_debug_dy
 n")
  ,("Leading underscore","YES")
  ,("Debug on","False")
  ,("LibDir","/Users/ian/ghc/7.0-branch/val32/inplace/lib")
  ,("Global Package
 DB","/Users/ian/ghc/7.0-branch/val32/inplace/lib/package.conf
 .d")
  ,("C compiler
 flags","[\"-march=i686\",\"-m32\",\"-isysroot\",\"/Developer/SDKs
 /MacOSX10.5.sdk\",\"-mmacosx-version-min=10.5\",\"-fno-stack-
 protector\"]")
  ,("Gcc Linker
 flags","[\"-march=i686\",\"-m32\",\"-isysroot\",\"/Developer/SDKs
 /MacOSX10.5.sdk\",\"-mmacosx-version-min=10.5\"]")
  ,("Ld Linker
 flags","[\"-arch\",\"i386\",\"-macosx_version_min\",\"10.5\"]")
  ]
 $ /Users/ian/ghc/7.0-branch/val32/inplace/bin/ghc-stage2 +RTS --info
  [("GHC RTS", "YES")
  ,("GHC version", "7.0.1.20110201")
  ,("RTS way", "rts_thr")
  ,("Build platform", "i386-apple-darwin")
  ,("Build architecture", "i386")
  ,("Build OS", "darwin")
  ,("Build vendor", "apple")
  ,("Host platform", "i386-apple-darwin")
  ,("Host architecture", "i386")
  ,("Host OS", "darwin")
  ,("Host vendor", "apple")
  ,("Target platform", "i386-apple-darwin")
  ,("Target architecture", "i386")
  ,("Target OS", "darwin")
  ,("Target vendor", "apple")
  ,("Word size", "32")
  ,("Compiler unregisterised", "NO")
  ,("Tables next to code", "YES")
  ]
 $ cabal --version
 cabal-install version 0.8.2
 using version 1.8.0.6 of the Cabal library
 $ gcc --version
 i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646)
 Copyright (C) 2007 Free Software Foundation, Inc.
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
 PURPOSE.

 $
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4852#comment:19>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to