Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4271300
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T07:25:24+00:00 2026-05-21T07:25:24+00:00

Just trying to compile some trivial Haskell, but its not finding the c runtimes,

  • 0

Just trying to compile some trivial Haskell, but its not finding the c runtimes, despite the fact that they’re right there:

$ cat hello_world.hs
main = putStrLn "hello, world"

$ ghc --make hello_world
[1 of 1] Compiling Main             ( hello_world.hs, hello_world.o )
Linking hello_world ...
ld: library not found for -lcrt1.10.5.o
collect2: ld returned 1 exit status

$ file /usr/lib/crt1.10.5.o 
/usr/lib/crt1.10.5.o: Mach-O universal binary with 3 architectures
/usr/lib/crt1.10.5.o (for architecture x86_64): Mach-O 64-bit object x86_64
/usr/lib/crt1.10.5.o (for architecture i386):   Mach-O object i386
/usr/lib/crt1.10.5.o (for architecture ppc7400):    Mach-O object ppc

$ uname -a
Darwin Nyx.local 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.0.2

I installed from http://hackage.haskell.org/platform/mac.html


Verbose dump:

$ ghc -v --make hello_world
Glasgow Haskell Compiler, Version 7.0.2, for Haskell 98, stage 2 booted by GHC version 6.12.3
Using binary package database: /Library/Frameworks/GHC.framework/Versions/7.0.2-i386/usr/lib/ghc-7.0.2/package.conf.d/package.cache
Using binary package database: /Users/Anm/.ghc/i386-darwin-7.0.2/package.conf.d/package.cache
wired-in package ghc-prim mapped to ghc-prim-0.2.0.0-6bf7b03ebc9c668817e4379b6796c0c2
wired-in package integer-gmp mapped to integer-gmp-0.2.0.3-91607778cf3ae8f3948a50062b4f8479
wired-in package base mapped to base-4.3.1.0-93953b308d1897309792406495cf356b
wired-in package rts mapped to builtin_rts
wired-in package template-haskell mapped to template-haskell-2.5.0.0-5134a59c0456de4c2a07cc56fa258728
wired-in package dph-seq not found.
wired-in package dph-par not found.
Hsc static flags: -static
*** Chasing dependencies:
Chasing modules from: *hello_world.hs
Stable obj: [Main]
Stable BCO: []
Ready for upsweep
  [NONREC
      ModSummary {
         ms_hs_date = Thu Mar 31 18:11:40 PDT 2011
         ms_mod = main:Main,
         ms_imps = [import Prelude]
         ms_srcimps = []
      }]
compile: input file hello_world.hs
Created temporary directory: /var/folders/UE/UEH-SvA7E-GPjyBwX5XrfU+++TI/-Tmp-/ghc13751_0
*** Checking old interface for main:Main:
[1 of 1] Skipping  Main             ( hello_world.hs, hello_world.o )
*** Deleting temp files:
Deleting: /var/folders/UE/UEH-SvA7E-GPjyBwX5XrfU+++TI/-Tmp-/ghc13751_0/ghc13751_0.s
Warning: deleting non-existent /var/folders/UE/UEH-SvA7E-GPjyBwX5XrfU+++TI/-Tmp-/ghc13751_0/ghc13751_0.s
Upsweep completely successful.
*** Deleting temp files:
Deleting: 
link: linkables are ...
LinkableM (Thu Mar 31 18:11:51 PDT 2011) main:Main
   [DotO hello_world.o]
Linking hello_world ...
*** Linker:
/Developer/usr/bin/gcc -v -o hello_world -march=i686 -m32 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -fno-stack-protector -DDONT_WANT_WIN32_DLL_SUPPORT hello_world.o -L/Library/Frameworks/GHC.framework/Versions/7.0.2-i386/usr/lib/ghc-7.0.2/base-4.3.1.0 -L/Library/Frameworks/GHC.framework/Versions/7.0.2-i386/usr/lib/ghc-7.0.2/integer-gmp-0.2.0.3 -L/Library/Frameworks/GHC.framework/Versions/7.0.2-i386/usr/lib/ghc-7.0.2/ghc-prim-0.2.0.0 -L/Library/Frameworks/GHC.framework/Versions/7.0.2-i386/usr/lib/ghc-7.0.2 -lHSrtsmain -lHSbase-4.3.1.0 -liconv -lHSinteger-gmp-0.2.0.3 -lHSghc-prim-0.2.0.0 -lHSrts -lm -ldl -u _ghczmprim_GHCziTypes_Izh_static_info -u _ghczmprim_GHCziTypes_Czh_static_info -u _ghczmprim_GHCziTypes_Fzh_static_info -u _ghczmprim_GHCziTypes_Dzh_static_info -u _base_GHCziPtr_Ptr_static_info -u _base_GHCziWord_Wzh_static_info -u _base_GHCziInt_I8zh_static_info -u _base_GHCziInt_I16zh_static_info -u _base_GHCziInt_I32zh_static_info -u _base_GHCziInt_I64zh_static_info -u _base_GHCziWord_W8zh_static_info -u _base_GHCziWord_W16zh_static_info -u _base_GHCziWord_W32zh_static_info -u _base_GHCziWord_W64zh_static_info -u _base_GHCziStable_StablePtr_static_info -u _ghczmprim_GHCziTypes_Izh_con_info -u _ghczmprim_GHCziTypes_Czh_con_info -u _ghczmprim_GHCziTypes_Fzh_con_info -u _ghczmprim_GHCziTypes_Dzh_con_info -u _base_GHCziPtr_Ptr_con_info -u _base_GHCziPtr_FunPtr_con_info -u _base_GHCziStable_StablePtr_con_info -u _ghczmprim_GHCziBool_False_closure -u _ghczmprim_GHCziBool_True_closure -u _base_GHCziPack_unpackCString_closure -u _base_GHCziIOziException_stackOverflow_closure -u _base_GHCziIOziException_heapOverflow_closure -u _base_ControlziExceptionziBase_nonTermination_closure -u _base_GHCziIOziException_blockedIndefinitelyOnMVar_closure -u _base_GHCziIOziException_blockedIndefinitelyOnSTM_closure -u _base_ControlziExceptionziBase_nestedAtomically_closure -u _base_GHCziWeak_runFinalizzerBatch_closure -u _base_GHCziTopHandler_runIO_closure -u _base_GHCziTopHandler_runNonIO_closure -u _base_GHCziConcziIO_ensureIOManagerIsRunning_closure -u _base_GHCziConcziSync_runSparks_closure -u _base_GHCziConcziSignal_runHandlers_closure -Wl,-search_paths_first -read_only_relocs warning -lHSffi
Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5666.3~123/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5666) (dot 3)
 /Developer/usr/bin/../libexec/gcc/i686-apple-darwin10/4.2.1/collect2 -dynamic -arch i386 -macosx_version_min 10.5 -read_only_relocs warning -syslibroot /Developer/SDKs/MacOSX10.5.sdk -weak_reference_mismatches non-weak -u _ghczmprim_GHCziTypes_Izh_static_info -u _ghczmprim_GHCziTypes_Czh_static_info -u _ghczmprim_GHCziTypes_Fzh_static_info -u _ghczmprim_GHCziTypes_Dzh_static_info -u _base_GHCziPtr_Ptr_static_info -u _base_GHCziWord_Wzh_static_info -u _base_GHCziInt_I8zh_static_info -u _base_GHCziInt_I16zh_static_info -u _base_GHCziInt_I32zh_static_info -u _base_GHCziInt_I64zh_static_info -u _base_GHCziWord_W8zh_static_info -u _base_GHCziWord_W16zh_static_info -u _base_GHCziWord_W32zh_static_info -u _base_GHCziWord_W64zh_static_info -u _base_GHCziStable_StablePtr_static_info -u _ghczmprim_GHCziTypes_Izh_con_info -u _ghczmprim_GHCziTypes_Czh_con_info -u _ghczmprim_GHCziTypes_Fzh_con_info -u _ghczmprim_GHCziTypes_Dzh_con_info -u _base_GHCziPtr_Ptr_con_info -u _base_GHCziPtr_FunPtr_con_info -u _base_GHCziStable_StablePtr_con_info -u _ghczmprim_GHCziBool_False_closure -u _ghczmprim_GHCziBool_True_closure -u _base_GHCziPack_unpackCString_closure -u _base_GHCziIOziException_stackOverflow_closure -u _base_GHCziIOziException_heapOverflow_closure -u _base_ControlziExceptionziBase_nonTermination_closure -u _base_GHCziIOziException_blockedIndefinitelyOnMVar_closure -u _base_GHCziIOziException_blockedIndefinitelyOnSTM_closure -u _base_ControlziExceptionziBase_nestedAtomically_closure -u _base_GHCziWeak_runFinalizzerBatch_closure -u _base_GHCziTopHandler_runIO_closure -u _base_GHCziTopHandler_runNonIO_closure -u _base_GHCziConcziIO_ensureIOManagerIsRunning_closure -u _base_GHCziConcziSync_runSparks_closure -u _base_GHCziConcziSignal_runHandlers_closure -o hello_world -lcrt1.10.5.o -L/Library/Frameworks/GHC.framework/Versions/7.0.2-i386/usr/lib/ghc-7.0.2/base-4.3.1.0 -L/Library/Frameworks/GHC.framework/Versions/7.0.2-i386/usr/lib/ghc-7.0.2/integer-gmp-0.2.0.3 -L/Library/Frameworks/GHC.framework/Versions/7.0.2-i386/usr/lib/ghc-7.0.2/ghc-prim-0.2.0.0 -L/Library/Frameworks/GHC.framework/Versions/7.0.2-i386/usr/lib/ghc-7.0.2 -L/Developer/usr/bin/../lib/gcc/i686-apple-darwin10/4.2.1 -L/Developer/usr/bin/../lib/gcc -L/usr/lib/gcc/i686-apple-darwin10/4.2.1 -L/usr/lib/gcc/i686-apple-darwin10/4.2.1 -L/Developer/usr/bin/../lib/gcc/i686-apple-darwin10/4.2.1/../../../i686-apple-darwin10/4.2.1 -L/Developer/usr/bin/../lib/gcc/i686-apple-darwin10/4.2.1/../../.. hello_world.o -lHSrtsmain -lHSbase-4.3.1.0 -liconv -lHSinteger-gmp-0.2.0.3 -lHSghc-prim-0.2.0.0 -lHSrts -lm -ldl -search_paths_first -lHSffi -lgcc_s.10.5 -lgcc -lSystem
ld: library not found for -lcrt1.10.5.o
collect2: ld returned 1 exit status
*** Deleting temp files:
Deleting: 
*** Deleting temp dirs:
Deleting: /var/folders/UE/UEH-SvA7E-GPjyBwX5XrfU+++TI/-Tmp-/ghc13751_0

Okay… /usr/lib/gcc/i686-apple-darwin10/4.2.1/ is on the implicit library path, but…

$ ls /usr/lib/gcc/i686-apple-darwin10/4.2.1/
crt3.o      include     libcc_kext.a    libgcc_eh.a libgcov.a   libgomp.spec    x86_64
finclude    install-tools   libgcc.a    libgcc_static.a libgomp.a   libstdc++.dylib
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T07:25:25+00:00Added an answer on May 21, 2026 at 7:25 am

    GHC 7.0.3 fixes the issues on Mac, and the easiest way to get that version (short of waiting for the next Haskell Platform release) is to install the Homebrew version of Haskell Package.

    $ brew install haskell-platform
    ==> Downloading http://www.haskell.org/ghc/dist/7.0.3/ghc-7.0.3-i386-apple-darwin.tar.bz2
    

    I no longer need any of the hacks described here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having some issues trying to Compile a DLL, but I just can't see
So I'm trying to get some code that is written for gcc to compile
I'm trying to compile some code I found on GitHub https://github.com/tapio/Wendy I'm just trying
I'm trying to compile some software I've been writing in Linux that uses some
I'm trying to compile some code in MonoTouch but I'm getting an error: 'type
I am just trying to compile some simple example code I typed in from
I have just hit a confusing problem when trying to compile some code using
I'm trying to compile some code (not mine) and I run into errors. I
This is the error I'm getting when trying to compile some code that uses
I am just trying to write a small web page that can parse some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.