id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
1066,MacOSX powerpc gcc 3.3/4.0 and unknown symbol `_printf$LDBLStub',gracjan-agh.edu.pl,thorkilnaur,"There are problems with linking on MacOSX 10.4.8 when selected gcc 3.3. Following session demonstrates problem:
{{{
gracjan$ sudo gcc_select 3.3
Default compiler has been set to:
gcc version 3.3 20030304 (Apple Computer, Inc. build 1819)
gracjan$ ghc --make x.hs
[1 of 1] Compiling Main             ( x.hs, x.o )
Linking x ...
ld: Undefined symbols:
_sprintf$LDBLStub
_fprintf$LDBLStub
_vfprintf$LDBLStub
gracjan$ sudo gcc_select 4.0
Default compiler has been set to:
gcc version 4.0.1 (Apple Computer, Inc. build 5363)
gracjan$ ghc --make x.hs
Linking x ...
gracjan$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.6
}}}

Linking manually with `-lSystemStubs` fixes the problem. Seems to be connected with Ticket #1018, where the solution is to only add `-lSystemStubs` when build evironment says so. Probably adding it always could be a solution.

Affected: ghc-6.6-ppc-apple-darwin.tar.gz from http://haskell.org/ghc/download_ghc_66.html, also macports:

{{{
gracjan$ port info ghc
ghc 6.6, Revision 2, lang/ghc (Variants: darwin_6, darwin_7_powerpc, darwin_8_powerpc, darwin_8_i386, noopengl)
http://www.haskell.org/ghc
Library Dependencies: readline, gmp
Runtime Dependencies: perl5.8
Platforms: darwin
}}}",bug,closed,normal,6.6.1,Compiler,6.6,wontfix,,,MacOS X,powerpc,,Easy (less than 1 hour),,,,
