LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-30-2002, 08:01 AM   #1
Korshun
LQ Newbie
 
Registered: Apr 2002
Location: Sydney, Australia
Distribution: Fedora Core 6
Posts: 27

Rep: Reputation: 15
Compilation problem... need help


Hi all...

I'm a first year software eng. student and we've just started coding at uni... just some basic stuff. We compile our code on the uni computers and when we get home, we can download the compiled stuff thru ftp... I can run the downloaded program without any problems, but when I try to compile it myself (at home), I get errors in the form of

--- very long list of errors...

TuringWrapper.o: In function `r12P_entry':
TuringWrapper.o(.text+0x6d): undefined reference to `stg_gc_enter_1'
TuringWrapper.o: In function `r12Z_entry':
TuringWrapper.o(.text+0xf5): undefined reference to `stg_gc_enter_1'
TuringWrapper.o: In function `s133_entry':
TuringWrapper.o(.text+0x15d): undefined reference to `stg_gc_enter_1'
TuringWrapper.o: In function `s13h_entry':
TuringWrapper.o(.text+0x1a5): undefined reference to `stg_gc_enter_1'
TuringWrapper.o: In function `r131_entry':
TuringWrapper.o(.text+0x1ee): undefined reference to `stg_update_PAP'
TuringWrapper.o: In function `r131_fast1':
TuringWrapper.o(.text+0x208): undefined reference to `stg_chk_1'
TuringWrapper.o: In function `s13p_entry':
TuringWrapper.o(.text+0x2a1): undefined reference to `stg_gc_enter_1'
TuringWrapper.o: In function `s13D_entry':
TuringWrapper.o(.text+0x2dd): undefined reference to `stg_gc_enter_1'
TuringWrapper.o: In function `s144_entry':
TuringWrapper.o(.text+0x325): undefined reference to `stg_gc_enter_1'
TuringWrapper.o: In function `s14E_1_alt':
TuringWrapper.o(.text+0x365): undefined reference to `stg_gc_enter_1'
TuringWrapper.o: In function `s142_entry':
TuringWrapper.o(.text+0x395): undefined reference to `stg_gc_enter_1'
TuringWrapper.o(.text+0x3d5): more undefined references to `stg_gc_enter_1' follow
TuringWrapper.o: In function `s14D_entry':
TuringWrapper.o(.text+0x41d): undefined reference to `stg_update_PAP'
TuringWrapper.o: In function `s14D_fast1':
TuringWrapper.o(.text+0x42a): undefined reference to `stg_gc_enter_1'
TuringWrapper.o: In function `s14C_entry':
TuringWrapper.o(.text+0x469): undefined reference to `stg_update_PAP'
TuringWrapper.o: In function `s14C_fast1':
TuringWrapper.o(.text+0x47e): undefined reference to `stg_gc_enter_1'
TuringWrapper.o: In function `s13X_entry':
TuringWrapper.o(.text+0x4c1): undefined reference to `stg_gc_enter_1'
TuringWrapper.o: In function `s13Z_entry':
TuringWrapper.o(.text+0x515): undefined reference to `stg_gc_enter_1'
TuringWrapper.o: In function `s14B_entry':
TuringWrapper.o(.text+0x55d): undefined reference to `stg_update_PAP'
TuringWrapper.o: In function `s14B_fast1':
TuringWrapper.o(.text+0x572): undefined reference to `stg_gc_enter_1'
TuringWrapper.o: In function `s13T_entry':
TuringWrapper.o(.text+0x5c1): undefined reference to `stg_gc_enter_1'
TuringWrapper.o: In function `s13V_entry':
TuringWrapper.o(.text+0x615): undefined reference to `stg_gc_enter_1'
TuringWrapper.o: In function `s14A_entry':
TuringWrapper.o(.text+0x65d): undefined reference to `stg_update_PAP'
TuringWrapper.o: In function `s14A_fast1':
TuringWrapper.o(.text+0x672): undefined reference to `stg_gc_enter_1'
TuringWrapper.o: In function `s13R_entry':
TuringWrapper.o(.text+0x6c9): undefined reference to `stg_gc_enter_1'
TuringWrapper.o: In function `s14x_entry':
TuringWrapper.o(.text+0x715): undefined reference to `stg_update_PAP'
TuringWrapper.o: In function `s14x_fast1':
TuringWrapper.o(.text+0x72a): undefined reference to `stg_gc_enter_1'
TuringWrapper.o: In function `s13z_entry':
TuringWrapper.o(.text+0x7a5): undefined reference to `stg_gc_enter_1'
TuringWrapper.o: In function `s13B_entry':
TuringWrapper.o(.text+0x81d): undefined reference to `stg_gc_enter_1'
TuringWrapper.o: In function `s14w_entry':
TuringWrapper.o(.text+0x865): undefined reference to `stg_update_PAP'
TuringWrapper.o: In function `s14w_fast1':
TuringWrapper.o(.text+0x87a): undefined reference to `stg_gc_enter_1'
TuringWrapper.o: In function `s14s_ret':
TuringWrapper.o(.text+0x8d1): undefined reference to `stg_gc_enter_1'
TuringWrapper.o: In function `Main_main_entry':
TuringWrapper.o(.text+0x915): undefined reference to `stg_gc_enter_1'
collect2: ld returned 1 exit status

---

TuringWrapper.o is a file we use during compilation. The compiler is use is ghc (www.haskell.org/ghc), version 5.02.3. I am using Red Hat 7.2 at home, and the commands I am entering are exactly the same thing I would have done at uni:

ghc -o turingTest TuringTest.hs TuringWrapper.o

where turingTest is the output file, TuringTest.hs is input1, TuringWrapper.o is input 2, yadda yadda...

Funny thing is, I put Mandrake 8.0 on this very same machine a few days ago, and everything worked... the program compiled and ran properly. I didn't like Mandrake (OK, I confess, I had only one CD so I ran into some problems) so I put Red Hat 7.2 back on, and it won't compile. So... any ideas?

Would really appreciate some feedback on this, if this ends up working I'll end up spending a lot less time at the labs and a lot more time at home, where I would rather be

Thanks in advance.
Michael.
 
Old 05-01-2002, 03:43 AM   #2
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
I've never used the GHC compiler. But usually when it gives you messages like undefined reference then it means you are missing some kind of library. Usually you can tell it to add a certain library by adding it to the command line when compiling. Might want to read up the GHC documentation on how to get that done.
 
Old 05-07-2002, 01:33 PM   #3
Hano
Member
 
Registered: Sep 2001
Location: Venezuela, Caracas
Distribution: RedHat 9.0
Posts: 196

Rep: Reputation: 30
You have to satisfy the exact libraries requirements of TuringWrapper.o

Hano
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
C++ Compilation problem with G++ nelnel Programming 6 07-06-2005 10:58 PM
Compilation Problem jonty_11 Programming 4 03-24-2005 10:45 PM
wine compilation problem anubis26 Linux - Software 2 01-25-2005 04:46 PM
kernel compilation problem vishamr2000 Linux - Newbie 2 08-22-2004 05:35 AM
c compilation problem edreddy Programming 5 06-02-2004 01:37 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration