Opened 4 years ago

Closed 22 months ago

#7011 closed bug (worksforme)

32bit GHC 7.4.2 cannot compile integer-gmp on OS X 10.8

Reported by: chak Owned by:
Priority: normal Milestone: 7.10.1
Component: Core Libraries Version: 7.5
Keywords: Mountain Lion Cc: pho@…, george.colpitts@…, core-libraries-committee@…
Operating System: MacOS X Architecture: x86
Type of failure: Building GHC failed Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

If I use the 32bit version of GHC 7.4.2 (OS X installer from the GHC downloads page) on OS X 10.8 DP4 with Xcode 4.5 DP, the compilation of package integer-gmp (from the Git repo) fails. Specifically, the GMP files seem to be compiled for the wrong architecture and hence the linker complains — log file attached.

This problem may well also present on earlier version of OS X as well. (I haven't used the 32bit version for a while.)

Attachments (1)

gmp-7.4.2.txt (229.1 KB) - added by chak 4 years ago.
linker error messages

Download all attachments as: .zip

Change History (13)

Changed 4 years ago by chak

linker error messages

comment:1 Changed 4 years ago by PHO

  • Cc pho@… added

comment:2 Changed 4 years ago by igloo

  • difficulty set to Unknown
  • Milestone set to 7.8.1
  • Priority changed from normal to high

If I follow correctly, you are building GHC when this happens?

It works for me with (I think) older versions of OS X and XCode.

comment:3 Changed 3 years ago by George

  • Status changed from new to infoneeded

Is this still a problem with Xcode 5 on Mountain Lion or OS X Mavericks? If it is still a problem is it a problem with both the 32 and 64 bit versions of Haskell?

comment:4 Changed 3 years ago by George

  • Status changed from infoneeded to new

build of GHC head fails on Mavericks with gcc 4.8:

...
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .libs/libgmp.a(mp_clz_tab.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .libs/libgmp.a(obprintf.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .libs/libgmp.a(obvprintf.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .libs/libgmp.a(obprntffuns.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .libs/libgmp.a(repl-vsnprintf.o) has no symbols
libtool: link: ranlib .libs/libgmp.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .libs/libgmp.a(mp_clz_tab.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .libs/libgmp.a(obprintf.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .libs/libgmp.a(obvprintf.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .libs/libgmp.a(obprntffuns.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: .libs/libgmp.a(repl-vsnprintf.o) has no symbols
libtool: link: rm -fr .libs/libgmp.lax
libtool: link: ( cd ".libs" && rm -f "libgmp.la" && cp -p "../libgmp.la" "libgmp.la" )
cp libraries/integer-gmp/gmp/gmpbuild/gmp.h libraries/integer-gmp/gmp/
cp libraries/integer-gmp/gmp/gmpbuild/.libs/libgmp.a libraries/integer-gmp/gmp/
inplace/bin/mkdirhier libraries/integer-gmp/gmp/objs
cd libraries/integer-gmp/gmp/objs && /usr/bin/ar x ../libgmp.a
ranlib libraries/integer-gmp/gmp/libgmp.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libraries/integer-gmp/gmp/libgmp.a(mp_clz_tab.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libraries/integer-gmp/gmp/libgmp.a(obprintf.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libraries/integer-gmp/gmp/libgmp.a(obvprintf.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libraries/integer-gmp/gmp/libgmp.a(obprntffuns.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libraries/integer-gmp/gmp/libgmp.a(repl-vsnprintf.o) has no symbols
make: *** [all] Error 2
Last edited 3 years ago by hvr (previous) (diff)

comment:5 Changed 3 years ago by George

  • Cc george.colpitts@… added

comment:6 Changed 3 years ago by carter

did you try making sure the gcc in your path points to a real gcc too?

comment:7 Changed 3 years ago by George

yes I did:

$ gcc --version
gcc-4.8 (GCC) 4.8.2

I'm basically following the instructions here: http://d.hatena.ne.jp/kazu-yamamoto/20131028/1382921924

When I use integer-simple instead it fails with

"inplace/bin/ghc-stage2" -hisuf hi -osuf  o -hcsuf hc -static  -H64m -O0 -fasm    -package-name vector-0.10.9.1 -hide-all-packages -i -ilibraries/vector/. -ilibraries/vector/dist-install/build -ilibraries/vector/dist-install/build/autogen -Ilibraries/vector/dist-install/build -Ilibraries/vector/dist-install/build/autogen -Ilibraries/vector/include -Ilibraries/vector/internal   -optP-DVECTOR_BOUNDS_CHECKS -optP-include -optPlibraries/vector/dist-install/build/autogen/cabal_macros.h -package base-4.7.0.0 -package deepseq-1.3.0.2 -package ghc-prim-0.3.1.0 -package primitive-0.5.2.0 -O2 -XHaskell98 -XCPP -XDeriveDataTypeable -O -fasm  -no-user-package-db -rtsopts      -odir libraries/vector/dist-install/build -hidir libraries/vector/dist-install/build -stubdir libraries/vector/dist-install/build  -dynamic-too -c libraries/vector/./Data/Vector/Fusion/Stream/Monadic.hs -o libraries/vector/dist-install/build/Data/Vector/Fusion/Stream/Monadic.o -dyno libraries/vector/dist-install/build/Data/Vector/Fusion/Stream/Monadic.dyn_o
Loading package ghc-prim ... linking ... done.
Loading package integer-simple ... linking ... done.
Loading package base ... <command line>: can't load .so/.DLL for: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/lib/libiconv.dylib (dlopen(/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/lib/libiconv.dylib, 9): no suitable image found.  Did find:
	/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/lib/libiconv.dylib: mach-o, but wrong filetype)
make[1]: {{{***}}} [libraries/vector/dist-install/build/Data/Vector/Fusion/Stream/Monadic.o] Error 1
make:  {{{***}}} [all] Error 2
Last edited 3 years ago by hvr (previous) (diff)

comment:8 Changed 3 years ago by George

  • Status changed from new to infoneeded

issue with integer-gmp on Mavericks with Xcode 5 is ticket #8497 so this ticket is specifically for what the subject says: 32bit GHC 7.4.2 cannot compile integer-gmp on OS X 10.8 which brings us back to my earlier question above: is this a problem with the 64 bit versions of ghc 7.4.2 on 10.8? with either the 32 bit or 64 bit version of ghc 7.6.3 on 10.8?

Last edited 3 years ago by hvr (previous) (diff)

comment:9 Changed 2 years ago by thoughtpolice

  • Milestone 7.8.3 deleted
  • Priority changed from high to normal

comment:10 Changed 2 years ago by thoughtpolice

  • Milestone set to 7.10.1

Moving to 7.10.1.

comment:11 Changed 2 years ago by thoughtpolice

  • Component changed from libraries (other) to Core Libraries

Moving over to new owning component 'Core Libraries'.

comment:12 Changed 22 months ago by thomie

  • Cc core-libraries-committee@… added
  • Resolution set to worksforme
  • Status changed from infoneeded to closed
  • Type of failure changed from None/Unknown to Building GHC failed

With #9281, integer-gmp is obsolete. Please open a new ticket if there are any problems compiling integer-gmp2 on OS X.

Note: See TracTickets for help on using tickets.