Stop! Tickets are now managed at GitHub.

Please enter new tickets, and find and edit existing tickets there:


Ticket #216 (new defect)

Opened 22 months ago

Last modified 20 months ago

Link error with libiconv on MacOS

Reported by: Ragnaroek Owned by: MtnViewMark
Priority: major Milestone:
Component: Platform Keywords:
Cc:

Description

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

Change History

Changed 21 months ago by refold

  • owner changed from dons to MtnViewMark

Changed 20 months ago by MtnViewMark

Is there something different about your compilation environment? Are you using a development package manager (like macports?) /usr/lib is the normal location for libiconv, and on my test systems it is found.

Can you provide a link to the project so I can reproduce this?

Changed 20 months ago by thorkilnaur

See also http://hackage.haskell.org/trac/ghc/ticket/4068.

Best regards Thorkil

Note: See TracTickets for help on using tickets.