ld: Undefined symbols on OS X when compiling with -t

Shin-Cheng Mu <[email protected]> Mon, 22 May 2006 22:28:31 +0900
Newsgroups gmane.comp.lang.haskell.nhc.bugs
Message-ID <[email protected]>
Hi,

I just installed NHC98 using Darwin Ports on a PowerPC
G4 based Mac, running OS X 10.4 with GCC 4.0. NHC works
fine without profiling options. When I turned on time
profiling, however, NHC98 appears to have problems linking:

   scm$ cat text.hs
   main = print (foldr (+) 0 [1..10000])

   scm$ hmake -nhc98 -t text
   nhc98   -t   -c  -o text.z.o text.hs
   nhc98  -t    -o text text.z.o
   /tmp/tprofusr3456.c: In function 'tprofTMInitTreeUsr':
   /tmp/tprofusr3456.c:21: warning: incompatible implicit declaration  
of built-in function 'strdup'
   /usr/bin/ld: Undefined symbols:
   _FN_NHC_46Internal_46_95apply1
   _FN_NHC_46Internal_46_95apply2
   _TMSUB_NHC_46DErrNo
   _TM_NHC_46DErrNo
   _TMSUB_NHC_46PackedString
   _TM_NHC_46PackedString
   collect2: ld returned 1 exit status

Is it a bug, or is something missing in Darwin Ports?

sincerely,
Shin-Cheng Mu