LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   strange GCC-4.4.2 problem (https://www.linuxquestions.org/questions/linux-software-2/strange-gcc-4-4-2-problem-769477/)

getasif 11-16-2009 12:24 PM

strange GCC-4.4.2 problem
 
Dear Friends i just completed installing GCC-4.4.2 ,since i wasnt able to upgrade my kernel-2.6.18(RHEL 5) to the latest 2.6.31....so i followed blindly the instructions for installing GCC on the site linuxfromscratch.com .....though i think i got some errors i was able to install GCC-.. and i think only C was installed as i am able to compile the C++ programs not the .c ones...and heres the output for the command #gcc -v and #g++ -v

[root@localhost 4.4.2]# gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.4.2/configure --target= --prefix=/tools --disable-nls --disable-shared --disable-multilib --disable-decimal-float --disable-threads --disable-libmudflap --disable-libssp --disable-libgomp --enable-languages=c
Thread model: single
gcc version 4.4.2 (GCC)
[root@localhost 4.4.2]# gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.4.2/configure --target= --prefix=/tools --disable-nls --disable-shared --disable-multilib --disable-decimal-float --disable-threads --disable-libmudflap --disable-libssp --disable-libgomp --enable-languages=c
Thread model: single
gcc version 4.4.2 (GCC)
[root@localhost 4.4.2]# g++ -v
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux
Thread model: posix
gcc version 4.1.1 20070105 (Red Hat 4.1.1-52)
[root@localhost 4.4.2]#


so please can someone help me with this issue,and how can i change the THREAD MODEL to POSIX,i changed the directory to compile the kernel source files..and typed in the command #make xconfig.....and this gave me many errors,which i didnt get before upgrading from GCC-4.1.1 to GCC-4.4.2....also i am not able to compile a normal C file.....please help
thanking you all in anticipation

regards asif

knudfl 11-16-2009 02:53 PM

LFS 6.5 : Book § 5.5.1 , gcc 4.4.1 , pass 1.
http://www.linuxfromscratch.org/lfs/...gcc-pass1.html

LFS 6.5 : Book § 5.10.1 , gcc 4.4.1 , pass 2.
http://www.linuxfromscratch.org/lfs/...gcc-pass2.html

LFS 6.5 : Book § 6.15.1 , gcc 4.4.1 , "pass 3".
http://www.linuxfromscratch.org/lfs/...ter06/gcc.html
.....
.....

There is, may be, a slight possibility to build gcc-4.4.2 on Fedora 12
( release next week ) from the development package gcc-4.4.2-7.fc12.src.rpm,
which is meant to be used in Fedora 13 , June 2010. Binutils 2.19.51 is required,
I think. The necessary 21 patches are included :
http://download.fedora.redhat.com/pu...7.fc12.src.rpm
.. Please read the file ' gcc.spec ' ..
.....

getasif 11-18-2009 02:39 AM

hello knudfl,i did succeed in installing the GCC-4.2.2,by making the default compiler gcc34(using command #export CC=gcc34 )...but i have a query regarding the output of the following command

# gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ./configure
Thread model: posix
gcc version 4.4.2 (GCC)

# cc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.4.2/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-languages=c,c++,objc,obj-c++,java,fortran
Thread model: posix
gcc version 4.4.2 (GCC)

# g++ -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.4.2/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-languages=c,c++,objc,obj-c++,java,fortran
Thread model: posix
gcc version 4.4.2 (GCC)


i installed just without any parameters passed to ./configure..then make and then make install,moreover i installed GCC-CORE-4.4.2 and then used the command export CC=GCC34 again to reinstall the GCC-4.4.2 using this command

../gcc-4.4.2/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-languages=c,c++,objc,obj-c++,java,fortran

now is it ok ..as to what i have done??i was able to make most of the commands for installation of the new kernel-2.6.31.6,but i am not able to get into the kernel successfully,"kernel panic" !!! ,i hope this isnt bcoz the way i have installed the new GCC-4.4.2

and also please help me in installing the patches given by u thru in the link http://download.fedora.redhat.com/pu...7.fc12.src.rpm ..
...please help me regarding this

knudfl 11-19-2009 05:53 AM

Kernel-2.6.31.6 is not supposed to compile with gcc-4.4.2 . ?

Gcc-4.4.2 will probably be ready for use in april > Ubuntu 10.04.

? ? Did you run the tests, LFS § 6.15.1 : make -k check
Quote:

Important

In this section, the test suite for GCC is considered critical.
Do not skip it under any circumstance.
Running make with gcc one time isn't enough.
Hence the three sections gcc in LFS.
It is compiled with itself multible times, and doing all
is important.
Pass 2 uses gcc4.x from pass 1, pass 3' uses the pass 2 gcc4.x .
.....
Example using ' patch ' :
Copy all patches into gcc-4.4.2/
cd gcc-4.4.2/
' patch -p1 < "name-of-patch-file" '
like ' patch -p1 < 10-fix-this.diff '
.....

And I hope, that your old kernel is still present,
so you can boot into that.
.....


All times are GMT -5. The time now is 12:25 AM.