LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   FC3: GCC broken? (https://www.linuxquestions.org/questions/fedora-35/fc3-gcc-broken-280675/)

Jorenko 01-21-2005 07:26 PM

FC3: GCC broken?
 
I've been having some soundcard problems that ultimately came to my having to install ALSA in stand alone mode. However, ALSA's autoconf wan't able to get good output from GCC, and neither am I:

Code:

[jorenko@skylark /var/tmp/alsa]$ ./configure --with-cards=audigyls --with-sequencer=yes
checking for gcc... gcc
checking for C compiler default output... configure: error: C compiler cannot create executables
See `config.log' for more details.
make all-deps
make[1]: Entering directory `/var/tmp/alsa-driver-1.0.8rc2'
make[1]: Nothing to be done for `all-deps'.
make[1]: Leaving directory `/var/tmp/alsa-driver-1.0.8rc2'

And here's my test:

Code:

[jorenko@skylark ~]$ cat hello.c
int main()
{
        printf("Hello World!\n");
        return 0;
}
[jorenko@skylark ~]$ gcc hello.c
/usr/bin/ld: unrecognized option '--as-needed'
/usr/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status
[jorenko@skylark ~]$ gcc -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)


A little background on the system:

It was originally FC2 about 4 months ago. There were some GCC problems then, too, and I tried a few different ways of reinstalling it manually, none of which worked. Once my soundcard problems arose, in addition to my gcc problems, FC3 had been released, so I updated to it. Yum says GCC is up to date and nothing else seems to be broken. Any suggestions?

Thanks in advance.

omega13a 01-21-2005 09:39 PM

I had a problem like that a few months ago. What I did was reinstall GCC. Download all the GCC RPMs and run this command as the root user for each of the rpms:
rpm -Uhv --force location_of_rpm

Jorenko 01-22-2005 11:36 AM

I tried your suggestion with the following RPMs, in this order:

libgcc-3.4.2-6.fc3.i386.rpm
gcc-3.4.2-6.fc3.i386.rpm
gcc-java-3.4.2-6.fc3.i386.rpm
gcc-c++-3.4.2-6.fc3.i386.rpm
gcc-gnat-3.4.2-6.fc3.i386.rpm

I am still receiving the ld error message when I try to compile hello.c. For the record, I can gcc -c hello.c to get hello.o, but then gcc hello.o returns the same ld error.

Also, g++ works just fine on a similar hello.cpp.


Also, I'm curious, how easy is it to retain my data without making an external backup if I want to do a clean reinstall of FC3?

omega13a 01-22-2005 12:02 PM

There is one way but I can't garintee it will work. You can do what I told you to do with the GCC RPMS for all the RPMS on the Fedora Core CDs. :(

cswor 01-23-2005 10:26 PM

you can save your data if you ask for don't format when you are creating partitions in the install process. select the pre-existing partitions, edit each one, name it as it was in the previous install (/, /home, etc.), and tell it not to format. it will leave any data you may have placed on the system intact.

equinox 01-24-2005 08:16 AM

Code:

[michael@rizon ~]$ cat /etc/fedora-release
Fedora Core release 3 (Heidelberg)
[michael@rizon ~]$

Code:

[michael@rizon ~]$ cat hello.c
/* simple hello world program */

#include <stdio.h>

main()
{
        printf("Hello, World!\n");
}

Code:

[michael@rizon ~]$ gcc -o hello hello.c
[michael@rizon ~]$

Code:

[michael@rizon ~]$ ./hello
Hello, World!
[michael@rizon ~]$

all fine on my up to date box ;-)


All times are GMT -5. The time now is 09:37 AM.