LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-30-2009, 02:38 AM   #1
tthtlc
LQ Newbie
 
Registered: Aug 2007
Posts: 18

Rep: Reputation: 2
Compiling Valgrind on an older distro


I would like to compile the latest copy of Valgrind on an older distro.

During ./configure time, it indicated that gcc must be > 3.0, so I downloaded 3.1.1 gcc and install it into /usr/local/bin. But later it indicated it require glibc > 2.2, mine is glibc 2.1.3, so is it possible that I install glibc 2.2 or later into /usr/local/xxx directory, but my application will continue to use the /usr/lib/glibc, and valgrind will use the /usr/local/lib's version of glibc?

ie, two different copies of glibc in different directories, but valgrind should be using the latest one, but my application (to be traced when passed as argument to valgrind's command line) should be using the /usr/lib's older glibc.
is this scenario possible?

appreciate very much for your advice!!!! :-) .

thanks.
 
Old 07-30-2009, 08:28 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,950

Rep: Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602Reputation: 2602
Please don't have another 'glibc' in
/usr/local/lib/
That may trash your system.

It is possible to have "alternative" glibc,
suggested location e.g /usr/local/glibc/

Are you still using Fedora 5 ?
Or ? ( Distro name and version must be told
every time a question is asked, please.)
.....

http://www.linuxquestions.org/linux/...Ask_a_Question
http://linuxsilo.net/docs/smart-questions_en.html
.....
 
Old 08-01-2009, 07:50 PM   #3
tthtlc
LQ Newbie
 
Registered: Aug 2007
Posts: 18

Original Poster
Rep: Reputation: 2
I just want to record a word of thanks to the maintainer of Callgrind (Josef.Weidendorfer@gmx.de) too, for the the most affirmative answer:

Hi,

On Thursday 30 July 2009, peter teoh wrote:
> > I came to know u are the maintainer of callgrind, correct?
> > I have a question - the valgrind i would like to run on, is the latest
> > copy of valgrind. but the OS is an older version of Mandrake.
> >
> > During ./configure time, it indicated that gcc must be > 3.0, so I
> > downloaded 3.1.1 gcc and install it into /usr/local/bin. But later it
> > indicated it require glibc > 2.2......mine is glibc 2.1.3....so is it
> > possible that I install glibc 2.2 or later into /usr/local/xxx
> > directory, but my application will continue to use the /usr/lib/glibc,
> > and valgrind will use the /usr/local/lib's version of glibc?

Valgrinds tools (memcheck, callgrind, ...) are staticly linked. So no
need for any glibc installation at runtime. However, for Valgrind tools
to work (esp. for correctness checking tools like memcheck), they have
to know the version of glibc your client program runs with, to be able
to give relevant error messages. Thus, your proposed solution does not
work: configure actually checks whether your programs are/will be linked
against glibc > 2.2.

For callgrind it may work to just comment out the check in configure(.in),
and Valgrind perhaps even compiles and Callgrind works; but do not expect
that e.g. memcheck works.

Josef

> >
> > ie, two different copies of glibc in different directories, but valgrind
> > should be using the latest one, but my application (to be traced when
> > passed as argument to valgrind's command line) should be using the
> > /usr/lib's older glibc.
> >
> > is this scenario possible?
> >
> > appreciate very much for your advice!!!! :-) .
> >
> > thanks.
> >

Last edited by tthtlc; 08-01-2009 at 07:52 PM.
 
  


Reply

Tags
gcc, glibc, valgrind


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
Live "Educational" Distro with coding & debugging tools wanted [GCC/DDD/valgrind] etc RipClaw Linux - Distributions 2 07-14-2008 01:37 PM
Best distro for older PC trademac Linux - Newbie 21 08-23-2005 10:18 AM
Probleam after compiling older kernel Gonto Suse/Novell 3 05-30-2005 02:35 PM
compiling older gcc srinis Linux - Newbie 1 04-01-2005 11:18 AM
Best distro for older pc? MuckSavage Linux - Newbie 7 08-19-2004 10:03 PM


All times are GMT -5. The time now is 08:04 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