[haskell-platform] #216: Link error with libiconv on MacOS

haskell-platform haskell-platform at projects.haskell.org
Mon Dec 10 20:14:17 GMT 2012


#216: Link error with libiconv on MacOS
-----------------------+----------------------------------------------------
 Reporter:  Ragnaroek  |       Owner:  dons
     Type:  defect     |      Status:  new 
 Priority:  major      |   Milestone:      
Component:  Platform   |    Keywords:      
-----------------------+----------------------------------------------------
 Compiling a small program results in this error message:

 [1 of 2] Compiling TestHelper       ( testsuite/tests/TestHelper.hs,
 dist/build/test-played-tracks/test-played-tracks-tmp/TestHelper.o )
 [2 of 2] Compiling Main             ( testsuite/tests/TestPlayedTracks.hs,
 dist/build/test-played-tracks/test-played-tracks-tmp/Main.o )
 Linking dist/build/test-played-tracks/test-played-tracks ...
 Undefined symbols for architecture x86_64:
   "_iconv", referenced from:
       _hs_iconv in libHSbase-4.5.1.0.a(iconv.o)
      (maybe you meant:
 _base_GHCziIOziEncodingziIconv_iconvEncoding8_closure,
 _base_GHCziIOziEncodingziIconv_iconvEncoding5_info ,
 _base_GHCziIOziEncodingziIconv_iconvEncoding10_closure ,
 _base_GHCziIOziEncodingziIconv_iconvEncodingzuloc1_closure ,
 _base_GHCziIOziEncodingziIconv_iconvEncoding7_closure ,
 _base_GHCziIOziEncodingziIconv_iconvEncoding6_info , _hs_iconv_open ,
 _base_GHCziIOziEncodingziIconv_iconvEncoding6_closure ,
 _base_GHCziIOziEncodingziIconv_iconvEncoding7_info ,
 _base_GHCziIOziEncodingziIconv_iconvEncoding5_closure ,
 _base_GHCziIOziEncodingziIconv_iconvEncoding8_info ,
 _base_GHCziIOziEncodingziIconv_iconvEncoding4_closure ,
 _base_GHCziIOziEncodingziIconv_iconvEncoding9_info ,
 _base_GHCziIOziEncodingziIconv_iconvEncoding3_closure ,
 _base_GHCziIOziEncodingziIconv_iconvEncoding2_info ,
 _base_GHCziIOziEncodingziIconv_iconvEncoding2_closure , _hs_iconv ,
 _base_GHCziIOziEncodingziIconv_iconvEncoding3_info ,
 _base_GHCziIOziEncodingziIconv_iconvEncoding10_info ,
 _base_GHCziIOziEncodingziIconv_iconvEncodingzuloc_closure ,
 _base_GHCziIOziEncodingziIconv_iconvEncodingzuloc_info ,
 _base_GHCziIOziEncodingziIconv_iconvEncoding9_closure , _hs_iconv_close ,
 _base_GHCziIOziEncodingziIconv_iconvEncodingzuloc1_info )
   "_iconv_close", referenced from:
       _hs_iconv_close in libHSbase-4.5.1.0.a(iconv.o)
      (maybe you meant: _hs_iconv_close)
   "_iconv_open", referenced from:
       _hs_iconv_open in libHSbase-4.5.1.0.a(iconv.o)
      (maybe you meant: _hs_iconv_open)
   "_locale_charset", referenced from:
       _localeEncoding in libHSbase-4.5.1.0.a(PrelIOUtils.o)
 ld: symbol(s) not found for architecture x86_64
 collect2: ld returned 1 exit status

 It seems that ghc is looking in the wrong directory for libiconv.
 By specifying --extra-lib-dirs=/usr/lib compilation works.

 The MacOS Version is 10.8.2

-- 
Ticket URL: <http://trac.haskell.org/haskell-platform/ticket/216>
haskell-platform <http://trac.haskell.org/haskell-platform>
The Haskell Platform: a comprehensive and robust collection of Haskell libraries


More information about the Haskell-platform mailing list