LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-29-2007, 07:35 PM   #1
fsa
LQ Newbie
 
Registered: Apr 2007
Posts: 3

Rep: Reputation: 0
gcc make fails with undefined reference to `gcc_gettext_width'


Hello,

I'm trying to build gcc-4.1.2 on Fedora Core 4. (Yes, I know, it's old but I'm locked to this version, unfortunately.)

My problem is that make fails with the following message:

Code:
cp/call.o: In function `print_z_candidates':
../.././gcc/cp/call.c:2464: undefined reference to `gcc_gettext_width'
collect2: ld returned 1 exit status
make[2]: *** [cc1plus-dummy] Error 1
make[2]: Leaving directory `/root/src/gcc-4.1.2/host-i686-pc-linux-gnu/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/root/src/gcc-4.1.2'
make: *** [all] Error 2
I have no idea what to do, any ideas?

-fsa
 
Old 04-29-2007, 09:56 PM   #2
studioj
Member
 
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
you didn't give us any details but i think the problem is doing it in /root directory

also doesn't look like you have a proper "build" directory outside of gcc

you need to say what you intend to do with this compiler, what is current compiler before we can give further instructions.
 
Old 04-29-2007, 10:26 PM   #3
fsa
LQ Newbie
 
Registered: Apr 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by studioj
you didn't give us any details but i think the problem is doing it in /root directory
Moved the sources to /home/fsa/src and tried again, same error though.

Quote:
Originally Posted by studioj
also doesn't look like you have a proper "build" directory outside of gcc
A proper build directory? I'm not sure what you mean...

Quote:
Originally Posted by studioj
you need to say what you intend to do with this compiler, what is current compiler before we can give further instructions.
Okay, what I'm trying to do is building php-5.2.1 from source - I did the usual ./configure followed by make but then I got this error:

Code:
Configuring libtool
checking build system type... i686-pc-linux-gnu
checking for ld used by gcc... /usr/local/bin/ld
checking if the linker (/usr/local/bin/ld) is GNU ld... yes
checking for /usr/local/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/local/bin/nm -B
checking how to recognise dependent libraries... pass_all
checking for object suffix... o
checking for executable suffix... no
checking for c++... no
checking for g++... no
checking for gcc... gcc
checking whether the C++ compiler (gcc   ) works... no
configure: error: installation or configuration problem: C++ compiler cannot create executables.
So, I investigated and it looks like I don't have libstdc++ installed on my system. Yum actually says I have libstdc++-4.0.2, but I'm unable to find it on my system - no sign of neither c++ or g++. So I figured I'd just build libstdc++ from source to get it and that's when I ran into the aforementioned problem. I've spent more than five hours trying to solve this so any help/clues would be much appreciated.

-fsa
 
Old 04-30-2007, 02:25 AM   #4
studioj
Member
 
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
the package you need is caled something like gcc-c++-4.0.2-x.fc4.xxx.rpm like that
http://rpmfind.net/linux/rpm2html/se...submit=Search+...
 
Old 04-30-2007, 06:01 AM   #5
fsa
LQ Newbie
 
Registered: Apr 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by studioj
the package you need is caled something like gcc-c++-4.0.2-x.fc4.xxx.rpm like that
http://rpmfind.net/linux/rpm2html/se...submit=Search+...
That did it! Thank you so much!
 
  


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
gcc linking: undefined reference to just about everything shabbychef Programming 7 09-09-2005 08:42 PM
gcc ld error. Undefined reference redness Linux - Software 4 02-08-2005 02:01 AM
Undefined Reference errors during make. sheenak Programming 5 05-14-2004 06:14 AM
Undefined reference error using gcc with Redhat Linux 9.0 armesk Programming 2 08-28-2003 06:42 AM
make error/ undefined reference apljdi Linux - Newbie 1 10-29-2002 01:10 PM


All times are GMT -5. The time now is 04:43 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration