LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Using C compiler on Linux (https://www.linuxquestions.org/questions/linux-newbie-8/using-c-compiler-on-linux-215896/)

penguin4 08-10-2004 04:20 PM

komakino; thank you with proper english lanuage and usage. enjoyed that
yes i did. enlightening elucidating.

hopbalt 08-10-2004 04:21 PM

Quote:

Originally posted by Komakino
No, I said you couldn't just add the kernel version to the distro to get the distro version (like you gave the example red hat 2.4 because uname returned the kernel version as 2.4). A specific distro release would have a specific kernel version, but that would require more research than simply adding the numbers together.
OK I see what u mean.

Quote:

I think I'll leave this discussion now, perhaps I'm having a bad evening but I just seem to be confusing people.
umm no please dont it was my mistake I just wasnt reading your post very carefully.

Tinkster 08-10-2004 04:22 PM

Quote:

Originally posted by Komakino
Perhaps it's the way I phrased it, but it wasn't my intention to be pedantic along the lines you've interpreted this - I was trying to make the distinction between the versioning for the kernel and what is versioning for a specific distro, and trying to give a little background thereabouts.
Hehe ... it wasn't even you I was talking at mate, it was 320mb :)

Don't worry ;)



Cheers,
Tink

hopbalt 08-10-2004 04:29 PM

Quote:

Originally posted by proudclod
Yes, it looks like a slightly changed version of redhat 9, running a kernel with multiprocessor support compiled in, and XFS filesystem support.

I'd recommend installing a fresh install of a distro (Fedora 2, or whatever you want) and starting from fresh :)

Do you know what the specs are for the system? If not then these commands might help:

cat /proc/cpuinfo (processor info)
free (total memory in KB)
/sbin/lspci (graphics card and other pci cards)

OK I ran the first command and was pleasantly surprised to discover that it has 4 processors inside! I never bothered to crack open the case, I was just looking at software so far.

There are 4 Intel Xeon processors running at 2.66 GHz! I'm ready to do some amazing mathematical number crunching on this bad boy! :D

It has 2 GB of memory and a bunch of PCI thats over my head.

This reminds me, does the rpm version that I download have to be for i686 or will i386 work too? I'm having trouble finding the i686 versions of the rpms.

Tinkster 08-10-2004 04:39 PM

Quote:

Originally posted by hopbalt
This reminds me, does the rpm version that I download have to be for i686 or will i386 work too? I'm having trouble finding the i686 versions of the rpms.
i386 is the smallest common denominator and will
work if the files in the RPM have been compiled
against the same version(s) of required libraries...



Cheers,
Tink

P.S.: Nice box, btw ;)


hopbalt 08-11-2004 08:28 AM

OK I am going to try and install with rpm the package gcc momentarily....

do I have to be root to do this or will a regular user work?

hopbalt 08-11-2004 08:36 AM

I am using the following website as guide for install:

http://unclean.org/howto/gcchowto.html

It has 5 different files listed there:

gcc-2.96-69.i386.rpm
binutils-2.10.0.18-1.i386.rpm
cpp-2.96-69.i386.rpm
glibc-devel-2.1.92-14.i386.rpm
kernel-headers-2.4.0-0.26.i386.rpm


I was unable to find those EXACT files, but the ones I found on the RedHat website are:

gcc-3.2.2-5.i386.rpm
binutils-2.13.90.0.18-9.i386.rpm
cpp-3.2.2-5.i386.rpm
glibc-devel-2.3.2-11.9.i386.rpm
kernel-headers-2.4.9-34.i386.rpm

I had to mix and match different RedHat versions, because I couldnt find the all the files for a single version. I think I have RedHat 7.1, and some of htese files are for RedHat .

All of my files are i386, even though I'm on an i686 machine, I coudnt find the i686 files for all these items so I just used i386 instead.

rjlee 08-11-2004 11:43 AM

Quote:

kernel-headers-2.4.9-34.i386.rpm
This is dangerous ground; your kernel version is version 2.4.20-20 but your headers are version 2.4.9-34; this may cause linker problems later on down the line.

I'm surprised someone managed to update the kernel to a version that's hard to find without a C compiler; have you tried this:?
Code:

locate cc

hopbalt 08-11-2004 02:58 PM

Quote:

Originally posted by rjlee
This is dangerous ground; your kernel version is version 2.4.20-20 but your headers are version 2.4.9-34; this may cause linker problems later on down the line.

I'm surprised someone managed to update the kernel to a version that's hard to find without a C compiler; have you tried this:?
Code:

locate cc

OK I used that command and it just spit out about 100 files, all located in the /export/home/service/cclass directory.

What does this mean?

I tried man cc and it said no manual entry for cc

When you say that the kernel header is dangerous, does that mean it will just cause problems for the compiling/linking of files, or will it totally screw up and destroy the whole system?

Tinkster 08-11-2004 03:05 PM

Quote:

When you say that the kernel header is dangerous, does that mean it will just cause problems for the compiling/linking of files, or will it totally screw up and destroy the whole system?
It means that the headers are way older than the actually
running kernel, and that things compiled against the old
headers may not work properly (they just as well may,
though, the kernel interface doesn't change too often).


Quote:

What does this mean?

I tried man cc and it said no manual entry for cc
cc is often an alias for gcc or symlink to gcc.
cc is the traditional name of the c-compiler on unix
installations ....

locate probably wasn't the best choice (by itself) to
see whether it's there, a whereis cc or which cc would
have been better.

[edit]
One silly question: you wouldn't happen to be able to
get a hold of the CD's that the machine was installed with? :)
[/edit]


Cheers,
Tink

hopbalt 08-11-2004 03:17 PM

Update:

I ran into some problems. :cry:

Ok I found out that I already have the following 2 things installed on the system:

cpp-2.96-113 (C preprocessor)
glibc-2.2.5-44.src.rpm (I think this is a header file install for glibc-devel?)

Anyways, the files that get installed on top of those (glibc-devel and gcc) apparently arent compatible with cpp and glibc.

I tried to rpm the newer cpp and glibc files, but it gives me the following message:

cpp-2.96-113 is already installed and is a newer version.

Can I somehow force the install of the older cpp-2.96-112.7.1 file?

I didnt realize all these numbers had to match exactly.

Also, the glibc file doesnt match with any of the glibc-devel files I have.

Can you uninstall with rpm and start from scratch with the files I have? would that cause too many problems?

Tinkster 08-11-2004 03:28 PM

Again: I can't emphasise enough that if you have an
RPM based system you shouldn't try to force different
levels of software into one install. If you force an install
of glibc that doesn't match your system you may well
end up having to re-install (even that could be fixed, but
I wouldn't want to talk a newbie through the process :})


Try to a) get a hold
of the installation CDs (safest method) or b) find rpms
on the net that match your installation.

http://rpmfind.net/linux/rpm2html/search.php

Use deadrat, errrh, redhat-7.3 in the System field.



Cheers,
Tink

hopbalt 08-11-2004 04:12 PM

Quote:

Originally posted by Tinkster
Again: I can't emphasise enough that if you have an
RPM based system you shouldn't try to force different
levels of software into one install. If you force an install
of glibc that doesn't match your system you may well
end up having to re-install (even that could be fixed, but
I wouldn't want to talk a newbie through the process :})


Try to a) get a hold
of the installation CDs (safest method) or b) find rpms
on the net that match your installation.

http://rpmfind.net/linux/rpm2html/search.php

Use deadrat, errrh, redhat-7.3 in the System field.



Cheers,
Tink

OK I found some files that match my current installation.

glibc-2.2.5-44.src.rpm (already installed)
cpp 2.96-113 (already installed)
kernel-headers-2.4.9-34.i386.rpm (already installed, but may have to find a new one)

glibc-devel-2.2.5-44.i386.rpm (not yet installed)
gcc-2.96-113.i386.rpm (not yet installed)

I know that gcc is dependent on both cpp AND glibc-devel, but curiously, its impossible to match the gcc version with both glibc AND cpp because those numbers dont overlap. I'm going with the cpp number and hope thats right.

I noticed on that website glibc has like 5 or 6 files. I hope I dont have to install all of them, my machine didnt say anything about the others it just said it required glibc-devel, not glibc-common, or glibc-debug, or the rest of them.

hopbalt 08-11-2004 09:04 PM

Would having a kernel header installation that didnt match the kernel version cause the computer to hang or screw up during a reboot?

I'm scared to reboot the machine. :newbie:

If you use the rpm -e (uninstall) function, does it go back to the previous kernel header that was installed? Or would I have to go back and find the original kernel-headers file and install it again?

Tinkster 08-11-2004 09:33 PM

Quote:

Originally posted by hopbalt
Would having a kernel header installation that didnt match the kernel version cause the computer to hang or screw up during a reboot?
No, it wouldn't - headers are only used during
development.

Quote:

If you use the rpm -e (uninstall) function, does it go back to the previous kernel header that was installed? Or would I have to go back and find the original kernel-headers file and install it again?
The latter - rpm doesn't store old versions
for a roll-back.


Cheers,
Tink


All times are GMT -5. The time now is 03:00 PM.