LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 09-06-2002, 04:48 AM   #1
tundra
Member
 
Registered: Jun 2002
Location: Koom Valley
Distribution: rh8
Posts: 528

Rep: Reputation: 31
gcc upgrade


was trying this on my rh box using rpm and got into trouble when it came to upgrading the glibc stuff (glibc-common, glibc etc etc).

there's plenty of stuff that depend on glibc. i couldn't get it to upgrade through "rpm -U". "rpm -e" gave me dependencies problems so i forced it with "rpm -e --nodeps". i was able to install the new gcc after that and the compiler worked. but uh, the rest of the stuff that depended on the previous glibc stuff were broken. interestingly, my /etc/ld.so.conf was also wiped clean...

i'm wondering... what's the workaround to this?

is compiling by hand easier?
i've always wondered: how do u compile a new compiler? sounds rather recursive...
 
Old 09-06-2002, 07:47 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
there is a *reason* for dependencies of course... that's the whole point of it. you can't expect things to work if you deny the dependencies. it's not a quick fix, it's a great way to break a system though.

1) remove the newly installed package.

2) reinstall it WITH ALL the dependencies.
 
Old 09-06-2002, 12:22 PM   #3
tundra
Member
 
Registered: Jun 2002
Location: Koom Valley
Distribution: rh8
Posts: 528

Original Poster
Rep: Reputation: 31
yea i know that. however, i couldn't remove the old glibc stuff nor upgrade it with rpm without doing what i did.

hm. reinstall with all the dependencies as in? does the man pages have some details on this? if not, what's the command like?
 
Old 09-06-2002, 05:01 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
you know what happens when a dependency fails don't you? you get the name of a package or file that is missing. so go to rpmfind.net and get the package that is missing.... it may take a while, but it's the way it's done
 
Old 09-06-2002, 07:15 PM   #5
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
has anyone complied gcc3.2 packages? I downloaded the core package source( c complier and libraries ) along with the g++ package source. Both bz2balls exploded to the directory gcc-3.2 and a single make command built both the core and g++. gcc is fine, but g++ somehow cant find the standard c++ libraries eventhough they are where they should be. so trying to complie and link a c++ hello world program, it says

/tmp/ccAoTsBq.o: In function `main':
/tmp/ccAoTsBq.o(.text+0x13): undefined reference to `cout'
/tmp/ccAoTsBq.o(.text+0x20): undefined reference to `ostream:perator<<(char const*)'
collect2: ld returned 1 exit status

the follwing is the output of g++ -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2/specs
Configured with: ../gcc-3.2/configure --prefix=/usr --exec-prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --with-gxx-include-dir=/usr/include/g++-3
Thread model: posix
gcc version 3.2


Does anyone know what's happening here?
 
Old 09-06-2002, 07:19 PM   #6
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
oh, maybe I should mention this. I tried to complie the prog with g++ and link it separately.

ld: warning: cannot find entry symbol _start; defaulting to 08048074
hello.o: In function `main':
hello.o(.text+0x13): undefined reference to `cout'
hello.o(.text+0x20): undefined reference to `ostream:perator<<(char const*)'
hello.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'

I read somewhere that this could be caused by 'mixing' complier versions. Any ideas, folks?
 
Old 09-06-2002, 10:47 PM   #7
tundra
Member
 
Registered: Jun 2002
Location: Koom Valley
Distribution: rh8
Posts: 528

Original Poster
Rep: Reputation: 31
Quote:
Originally posted by acid_kewpie
you know what happens when a dependency fails don't you? you get the name of a package or file that is missing. so go to rpmfind.net and get the package that is missing.... it may take a while, but it's the way it's done
oh, ya i know this one. i thought you had some other quick workaround to it.
well, thanks. think i know what u mean. but wow, like u said, it's gonna take a while.

nxny: i think besides the gcc package, there should be a cpp package that you need to upgrade as well. have u done that yet?
hm, i'm not sure of any other way (maybe someone can knows a better way), but try a simple C program and see if u can compile and link it. if u can, then most likely u need to get the compatible version of the cpp package (can't remember the version offhand)
 
Old 09-07-2002, 10:45 PM   #8
rverlander
Member
 
Registered: May 2002
Distribution: A few
Posts: 488

Rep: Reputation: 30
Quote:
Originally posted by nxny
has anyone complied gcc3.2 packages?
Yes me and I didn't get errors.

I used:

./configure
make
make install
cd ..
rm -rf gcc-3.2
 
Old 09-08-2002, 02:48 AM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
rm -rf gcc-3.2

so how are you meant to remove the package if you felt like it?
 
Old 09-08-2002, 03:09 AM   #10
rverlander
Member
 
Registered: May 2002
Distribution: A few
Posts: 488

Rep: Reputation: 30
you can't remove it, but the source build dir is ~500mb
 
Old 09-08-2002, 03:11 AM   #11
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
i suppose that's to be conceded... but also you could make clean it and tar it back up again.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
upgrade GCC aleppos Linux - Newbie 1 08-08-2005 09:18 PM
how to upgrade gcc on redhat 9 kira Linux - Software 0 12-28-2004 12:16 AM
ld cannot find qt-mt after gcc upgrade liam_p Linux - Software 6 07-02-2004 08:59 AM
gcc Upgrade (RH 7.3) ejfuente Linux - Newbie 1 10-21-2003 09:37 AM
upgrade gcc-c++ 2.96 to 3.2.1 pika Linux - Software 4 12-13-2002 08:44 AM


All times are GMT -5. The time now is 07:51 AM.

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