which gcc version am I using? SOLVED

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
Antipodal
Posts: 253
Joined: Thu 26 Mar 2009, 16:52
Location: The other side of the world

which gcc version am I using? SOLVED

#1 Post by Antipodal »

It can't find /ibiblio/distributions/puppylinux/puppy-tahr/iso/tahrpup -6.0-CE/ server and I can't remember how I got the devx_tahr_6.0.5.sfs I keep in a pendrive I'm currently using with Tahrpup6.0.5.
I would like to know what is the version of the gcc I have used.
Can you please tell me if there's some way to get to know that?
Thank you in advance

Edited twice on Monday 13 Feb to improve wording, because the problem has been solved and because of a typo.
Last edited by Antipodal on Mon 13 Feb 2017, 17:51, edited 2 times in total.
Posting from a P4 3Ghz_ASUS P5G41T-M LX3_2G RAM_DVD Write desktop with no internal HDD
Saving my stuff on flash sticks and in external USB HDD

User avatar
Semme
Posts: 8399
Joined: Sun 07 Aug 2011, 20:07
Location: World_Hub

#2 Post by Semme »

Most any Linux binary responds to a "--help" switch.
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#3 Post by musher0 »

Hello Antipodal

Open a terminal and type

Code: Select all

gcc --version
It will give you the info you're looking for.

BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

belham2
Posts: 1715
Joined: Mon 15 Aug 2016, 22:47

#4 Post by belham2 »

musher0 wrote:Hello Antipodal

Open a terminal and type

Code: Select all

gcc --version
It will give you the info you're looking for.

BFN.

Hi Antipodal & Musher,

Along with Musher's "gcc" command, maybe this command will also help you too:

Code: Select all

ldd --version
as it will additionally let you know the GNU libc you are currently using. I awlays use the one Musher gave you and this one, just to make sure I am not confusing anything :wink:

Antipodal
Posts: 253
Joined: Thu 26 Mar 2009, 16:52
Location: The other side of the world

#5 Post by Antipodal »

Hello Semme, musher0 and belham2
I would like to thank you for your input.

In a chronological order

I spent a long time trying to fit "-help" into the appropriate context but
always failed. I have just discovered your advice was to
use "--help". Sorry indeed.

The same thing happened with "gcc --version". Trying to understand what I was
doing wrong I came across this article that made me discover it was my sight
and not your advice that was failing.
Using "gcc --version" the problem was solved immediately.

"ldd --version" caught me alert, with my eyeglasses, and (I thought) with the
problem solved. So I only tried it once.
But it has confused me.

Take a look at why:

Code: Select all

root# gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

root# ldd --version
ldd (Ubuntu EGLIBC 2.19-0ubuntu6.6) 2.19
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
After "gcc --version" I thought the version was 4.8.4
But after "ldd --version" I really don't know
Can you tell which is the correct answer?
4.8.4 ?
2.19 ?
Always grateful
Antipodal
Posting from a P4 3Ghz_ASUS P5G41T-M LX3_2G RAM_DVD Write desktop with no internal HDD
Saving my stuff on flash sticks and in external USB HDD

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#6 Post by jamesbond »

They are two different piece of software.

gcc outputs the version of gcc https://www.gnu.org/software/gcc/
ldd outputs the version of glibc https://www.gnu.org/software/libc/

These are 2 out of 3 most important pieces of what needs to be in "devx". The last one is "binutils" https://www.gnu.org/software/binutils/, version of which you can get by running "ld --version" (note: "LD" in small letters, with single "d").

PS: Ubuntu seems to use eglibc (http://www.eglibc.org/home) instead of gnu libc (glibc). Note that for all practical purposes eglibc is the same as glibc; in fact, eglibc has closed shop and it has merged itself with glibc.
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#7 Post by musher0 »

Hello Antipodal.

gcc --version > gives you the version of the gcc executable -- only.

ldd --version > gives you the version of the C library (aka "glibc") your
tahrPup is using : 2.19.

The two version numbers are independent. They are evolved independently
as well, by two different teams of developers.

The same is true for the binutils version number mentioned by jamesbond.

IHTH
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Antipodal
Posts: 253
Joined: Thu 26 Mar 2009, 16:52
Location: The other side of the world

#8 Post by Antipodal »

James
Your explanation has been very enlightening
Can’t find the words to thank you
Having you around at the kennels is the most of a puppy’s dream :D

Antipodal
Posts: 253
Joined: Thu 26 Mar 2009, 16:52
Location: The other side of the world

#9 Post by Antipodal »

Musher0 :o :D

I was wearing my glasses but didn't see your post. You must have written it while I was checking some things before answering James because when I arrived to the forum the last post on the thread was his.
You certainly deserve the same words as he does. :D
Best wishes. :D
Antipodal

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#10 Post by musher0 »

My pleasure!
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Post Reply