LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-16-2013, 09:36 AM   #1
aliga8er
LQ Newbie
 
Registered: Feb 2013
Posts: 17

Rep: Reputation: Disabled
Installing gcc-4.8.2 on opensuse 12.1


Hello guys!

Ok so i am trying to install gcc-4.8.2 from the terminal. Ok these are the instructions that i have followed-

cd /usr/local
unextracted gcc-4.8.2.bz2
cd gcc-4.8.2
mkdir build
cd build
../configure --prefix=/opt/gcc-4.8.2 --enable-languages=c,c++,fortran
make bootstrap

I get an error on running make bootstrap (screenshort attached). I dont know what do to about this error.

Thanking you in advance.

Regards,
Attached Thumbnails
Click image for larger version

Name:	makebootstraperror-2.png
Views:	77
Size:	255.3 KB
ID:	13982  
 
Old 11-16-2013, 10:48 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Quote:
fatal error : gnu/stubs-32.h : No such file ...
# zypper in glibc-devel-32bit
 
1 members found this post helpful.
Old 11-16-2013, 01:12 PM   #3
aliga8er
LQ Newbie
 
Registered: Feb 2013
Posts: 17

Original Poster
Rep: Reputation: Disabled
Thank you for the reply. The process proceeded further but then gave following error:

Comparing stages 2 and 3
warning: gcc/cc1-checksum.o differs
warning: gcc/cc1plus-checksum.o differs
Bootstrap comparison failure!
x86_64-unknown-linux-gnu/libgcc/_clzsi2.o differs
x86_64-unknown-linux-gnu/libgcc/_isinfd64.o differs
x86_64-unknown-linux-gnu/libgcc/_floatdixf.o differs
x86_64-unknown-linux-gnu/libgcc/bid64_noncomp.o differs
x86_64-unknown-linux-gnu/libgcc/bid_decimal_data.o differs
x86_64-unknown-linux-gnu/libgcc/_ashldi3.o differs
x86_64-unknown-linux-gnu/libgcc/_negdi2.o differs
x86_64-unknown-linux-gnu/libgcc/bid128_fma.o differs
x86_64-unknown-linux-gnu/libgcc/_umoddi3.o differs
x86_64-unknown-linux-gnu/libgcc/_ffsdi2.o differs
x86_64-unknown-linux-gnu/libgcc/_popcount_tab.o differs
x86_64-unknown-linux-gnu/libgcc/_clrsbsi2.o differs
x86_64-unknown-linux-gnu/libgcc/_powidf2.o differs
x86_64-unknown-linux-gnu/libgcc/_paritysi2.o differs
x86_64-unknown-linux-gnu/libgcc/_muldc3.o differs
x86_64-unknown-linux-gnu/libgcc/_moddi3.o differs
x86_64-unknown-linux-gnu/libgcc/_fixunsdfdi.o differs
x86_64-unknown-linux-gnu/libgcc/_absvsi2.o differs
x86_64-unknown-linux-gnu/libgcc/_clz.o differs
x86_64-unknown-linux-gnu/libgcc/_bswapsi2.o differs
x86_64-unknown-linux-gnu/libgcc/_paritydi2.o differs
x86_64-unknown-linux-gnu/libgcc/_floatdidf.o differs
x86_64-unknown-linux-gnu/libgcc/_fixunssfsi.o differs
x86_64-unknown-linux-gnu/libgcc/bid_decimal_globals.o differs
x86_64-unknown-linux-gnu/libgcc/_floatundisf.o differs
x86_64-unknown-linux-gnu/libgcc/_divdc3.o differs
x86_64-unknown-linux-gnu/libgcc/_divxc3.o differs
x86_64-unknown-linux-gnu/libgcc/_floatundidf.o differs
x86_64-unknown-linux-gnu/libgcc/_divsc3.o differs
x86_64-unknown-linux-gnu/libgcc/_udiv_w_sdiv.o differs
x86_64-unknown-linux-gnu/libgcc/_subvdi3.o differs
x86_64-unknown-linux-gnu/libgcc/_negvsi2.o differs
x86_64-unknown-linux-gnu/libgcc/_eprintf.o differs
x86_64-unknown-linux-gnu/libgcc/bid_binarydecimal.o differs
x86_64-unknown-linux-gnu/libgcc/bid_convert_data.o differs
x86_64-unknown-linux-gnu/libgcc/_trampoline.o differs
x86_64-unknown-linux-gnu/libgcc/_isinfd32.o differs
x86_64-unknown-linux-gnu/libgcc/_ctors.o differs
x86_64-unknown-linux-gnu/libgcc/_floatundixf.o differs
x86_64-unknown-linux-gnu/libgcc/__gcc_bcmp.o differs
x86_64-unknown-linux-gnu/libgcc/_udivmoddi4.o differs
x86_64-unknown-linux-gnu/libgcc/_fixunsxfdi.o differs
x86_64-unknown-linux-gnu/libgcc/_popcountdi2.o differs
x86_64-unknown-linux-gnu/libgcc/_floatdisf.o differs
x86_64-unknown-linux-gnu/libgcc/_absvdi2.o differs
x86_64-unknown-linux-gnu/libgcc/_ashrdi3.o differs
x86_64-unknown-linux-gnu/libgcc/_bswapdi2.o differs
x86_64-unknown-linux-gnu/libgcc/_ctzdi2.o differs
x86_64-unknown-linux-gnu/libgcc/_ffssi2.o differs
x86_64-unknown-linux-gnu/libgcc/_clrsbdi2.o differs
x86_64-unknown-linux-gnu/libgcc/_clzdi2.o differs
x86_64-unknown-linux-gnu/libgcc/_powixf2.o differs
x86_64-unknown-linux-gnu/libgcc/_mulsc3.o differs
x86_64-unknown-linux-gnu/libgcc/bid_from_int.o differs
x86_64-unknown-linux-gnu/libgcc/_popcountsi2.o differs
x86_64-unknown-linux-gnu/libgcc/bid128_add.o differs
x86_64-unknown-linux-gnu/libgcc/_ucmpdi2.o differs
x86_64-unknown-linux-gnu/libgcc/_fixxfdi.o differs
x86_64-unknown-linux-gnu/libgcc/_addvdi3.o differs
x86_64-unknown-linux-gnu/libgcc/_addvsi3.o differs
x86_64-unknown-linux-gnu/libgcc/bid_round.o differs
x86_64-unknown-linux-gnu/libgcc/_lshrdi3.o differs
x86_64-unknown-linux-gnu/libgcc/_divdi3.o differs
x86_64-unknown-linux-gnu/libgcc/_fixunsdfsi.o differs
x86_64-unknown-linux-gnu/libgcc/_negvdi2.o differs
x86_64-unknown-linux-gnu/libgcc/bid128_noncomp.o differs
x86_64-unknown-linux-gnu/libgcc/_ctzsi2.o differs
x86_64-unknown-linux-gnu/libgcc/_fixunssfdi.o differs
x86_64-unknown-linux-gnu/libgcc/_subvsi3.o differs
x86_64-unknown-linux-gnu/libgcc/_mulvsi3.o differs
x86_64-unknown-linux-gnu/libgcc/_isinfd128.o differs
x86_64-unknown-linux-gnu/libgcc/_fixdfdi.o differs
x86_64-unknown-linux-gnu/libgcc/bid64_add.o differs
x86_64-unknown-linux-gnu/libgcc/_udivdi3.o differs
x86_64-unknown-linux-gnu/libgcc/_clear_cache.o differs
x86_64-unknown-linux-gnu/libgcc/__main.o differs
x86_64-unknown-linux-gnu/libgcc/_cmpdi2.o differs
x86_64-unknown-linux-gnu/libgcc/_powisf2.o differs
x86_64-unknown-linux-gnu/libgcc/_fixsfdi.o differs
x86_64-unknown-linux-gnu/libgcc/_muldi3.o differs
x86_64-unknown-linux-gnu/libgcc/_mulvdi3.o differs
x86_64-unknown-linux-gnu/libgcc/_fixunsxfsi.o differs
x86_64-unknown-linux-gnu/libgcc/_mulxc3.o differs
make[2]: *** [compare] Error 1
make[2]: Leaving directory `/usr/local/gcc-4.8.2/build'
make[1]: *** [stage3-bubble] Error 2
make[1]: Leaving directory `/usr/local/gcc-4.8.2/build'
make: *** [bootstrap] Error 2
 
Old 11-16-2013, 03:25 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Building gcc-4.8.2 , Suse 12.1 - 64bits.
# zypper in gmp-devel mpfr-devel mpc-devel ppl-devel cloog-devel zlib-devel \
texinfo libtool flex bison glibc-devel-32bit

Remarks :
1) $HOME should be the preferred location for building from source.
2) "make bootstrap" is done automatically.
3) Be aware that a failed result cannot be reused : Delete all files in build/.


$ cd build-gcc482/ ( My location is /home/knudfl/build-gcc482 ).
$ ../gcc-4.8.2/configure --prefix=/opt/gcc-4.8.2 --program-suffix=48 --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++ --disable-multilib --with-system-zlib

$ make : No errors.
# make install : Provides $PREFIX/bin/ { gcc48, g++48 , etc. etc.}

-

Last edited by knudfl; 11-16-2013 at 03:47 PM.
 
1 members found this post helpful.
Old 11-17-2013, 04:45 AM   #5
aliga8er
LQ Newbie
 
Registered: Feb 2013
Posts: 17

Original Poster
Rep: Reputation: Disabled
Hello knudfl! Thanks alot! I really appreciate you help. I think it worked, I didnt get any errors, while running bootstrap. After that I ran make install and it also didnt give any errors, but the problem is when i check my gcc version, it still gives gcc 4.6.2. I dont know what to do now. Im attaching the screenshots of the output of both make bootstrap and make install. I know it is saying something about linking the libraries with the environment variable, But my question is if im building a code the requires gcc-4.8.2 how would i do that?

Thanking you.
Attached Thumbnails
Click image for larger version

Name:	make bootstrap.jpg
Views:	31
Size:	102.5 KB
ID:	13985   Click image for larger version

Name:	make install.png
Views:	29
Size:	87.8 KB
ID:	13986  
 
Old 11-17-2013, 05:46 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
# 5 .

Your system compiler is gcc-4.6.2, is supposed to stay so.

All extra compilers :
You can have as many versions as you want, installed at the same time.
And the extra's should have unique file names / location,
so that nothing conflicts with system files.

Suse 12.1 compilers :
http://download.opensuse.org/reposit...E_12.1/x86_64/
→ → gcc33 , gcc41 , gcc43 , gcc45 , gcc46-4.6.4 , gcc47.
And there is also gcc48-4.8.2 : No need to build gcc yourself.

Using an extra compiler : $ export CC=gcc48 CXX=gcc48 && <other command>,
like $ export CC=gcc48 CXX=gcc48 && ./configure
And compiling a c file : $ gcc48 file.c -o myapp


Adding the repo http://download.opensuse.org/reposit...openSUSE_12.1/ :
And all the gcc versions can be installed with zypper.

-
 
1 members found this post helpful.
Old 11-17-2013, 11:16 AM   #7
aliga8er
LQ Newbie
 
Registered: Feb 2013
Posts: 17

Original Poster
Rep: Reputation: Disabled
Thanks man! I will download it and will let you know if my problem gets solved.
 
Old 11-17-2013, 12:02 PM   #8
aliga8er
LQ Newbie
 
Registered: Feb 2013
Posts: 17

Original Poster
Rep: Reputation: Disabled
I have downloaded the repo from the link. However, I am getting the following error on two dependencies - libgomp & libgcc

file /usr/lib64/libgomp.so.1.0.0 from install of libgomp1-4.8.2+r203692-63.1.x86_64 conflicts with file from package libgomp46-4.6.2_20111026-1.1.4.x86_64

Thanking in advance!
 
Old 11-17-2013, 03:47 PM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,818

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
12.1 is a dead and unsuppoered version

please install opensuse 12.3 FIRST

gcc 4.7 is the default
with 4.8 in the OBS
http://software.opensuse.org/package/gcc48

NOTE !!! THERE ARE NO 12.1 rpm's
12.1 is unsupported

however if you must use 12.1
the "devel:gcc" repo dose have a gcc4.8.2 for 12.1
but as word of WARNING
Warning:
not many things will build yet with the NEW 4.8 compiler
and opensuse12.1 is old not many of the old 12.1 devel rpms will support using gcc4.8.2
-- you will need to do a lot of hacking to use gcc4.8.2

Opensuse 13.1 will

Last edited by John VV; 11-17-2013 at 03:50 PM.
 
Old 11-18-2013, 05:56 AM   #10
aliga8er
LQ Newbie
 
Registered: Feb 2013
Posts: 17

Original Poster
Rep: Reputation: Disabled
Hello John VV! thank you for your reply. Problem is I have build some softwares that Im working on. Installing new version of opensuse will require me to redo my work again. I will resort to that option if nothing works out.

I have downloaded gcc-4.8.2 and some of the dependencies for opensuse 12.1, but the problem im only getting following error on two dependencies, is there any way to solve this error

file /usr/lib64/libgomp.so.1.0.0 from install of libgomp1-4.8.2+r203692-63.1.x86_64 conflicts with file from package libgomp46-4.6.2_20111026-1.1.4.x86_64

Thanking you in advance
 
Old 11-18-2013, 08:36 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
# 10 .
Quote:
file /usr/lib64/libgomp.so.1.0.0 from install of libgomp1-4.8.2+r203692-63.1.x86_64
conflicts with file from package libgomp46-4.6.2_20111026-1.1.4.x86_64
Well, then stick to the "4.8.2" that you have built yourself.

$ cd /usr/bin/
# ln -s /opt/gcc-4.8.2/bin/gcc gcc48
# ln -s /opt/gcc-4.8.2/bin/g++ g++48

-
 
1 members found this post helpful.
Old 11-18-2013, 10:39 AM   #12
aliga8er
LQ Newbie
 
Registered: Feb 2013
Posts: 17

Original Poster
Rep: Reputation: Disabled
Thanx for the reply knudfl! Ok let me tell you why exactly I want use gcc48. I am building a code for a project. I got following error
-------------------------------------------------------------------------------
[ 17%] Built target xsec_headers
[ 17%] Built target _headers
[ 36%] Built target Xsec
[ 36%] Built target xseclib
[ 55%] Built target tabxsec
[ 80%] Built target Geant
[ 80%] Built target Geantlib
[ 82%] Built target micromc
[ 85%] Building CXX object geom_vec_tests/CMakeFiles/VecGeom.dir/src/TGeoBBox_v.cxx.o
cc1plus: error: unrecognized command line option ‘-std=c++11’
make[2]: *** [geom_vec_tests/CMakeFiles/VecGeom.dir/src/TGeoBBox_v.cxx.o] Error 1
make[1]: *** [geom_vec_tests/CMakeFiles/VecGeom.dir/all] Error 2
make: *** [all] Error 2
-------------------------------------------------------------------------------
So I was told to upgrade compiler your compiler to gcc4.8.2

Now, after building gcc-4.8.2 and making link to gcc48 as you told me, when i run "make" command again I get the same error. I also see that the gcc version is still 4.6.2. I am not sure whether the code is being built with gcc48 or not

Thanks in advance!
 
Old 11-18-2013, 12:20 PM   #13
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
# 12 .
Quote:
I also see that the gcc version is still 4.6.2.
Using various compilers : You will have to read and understand post #6.

And for 'cmake' the configure command is :
$ CC=gcc48 CXX=g++48 cmake ..
 
Old 11-18-2013, 12:24 PM   #14
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,818

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
gcc is not the only link in /usr/bin
there are many
also g++ might be being used and not gcc
or if you only changed gcc you might have cc and CC also as a link to gcc

use " alternatives " to set the version of gcc/g++/cpp/c++/cc/CC/ to use
or do it old school and use a shell script
--- example --
Code:
#!/bin/bash

rm /usr/bin/cpp
ln -s /usr/bin/cpp-4.7 /usr/bin/cpp
echo ln -s cpp-4.7 cpp

rm /usr/bin/c++
ln -s /usr/bin/g++-4.7 /usr/bin/c++
echo ln -s cpp-4.7 c++

rm /usr/bin/gcc
ln -s /usr/bin/gcc-4.7 /usr/bin/gcc
echo ln -s gcc-4.7 gcc

rm /usr/bin/cc
ln -s /usr/bin/gcc-4.7 /usr/bin/cc
echo ln -s gcc-4.7 cpp

rm /usr/bin/g++
ln -s /usr/bin/g++-4.7 /usr/bin/g++
echo ln -s g++-4.7 g++

rm /usr/bin/gfortran
ln -s /usr/bin/gfortran-4.7 /usr/bin/gfortran
echo ln -s gfortran-4.7 gfortran
i have the 3.4 ,4.3 and 4.7 compiler installed and use a script to set each

Last edited by John VV; 11-18-2013 at 12:28 PM.
 
Old 11-20-2013, 09:53 AM   #15
aliga8er
LQ Newbie
 
Registered: Feb 2013
Posts: 17

Original Poster
Rep: Reputation: Disabled
Ok Thanks alot my problem is solved guys. Thanx alot.
 
  


Reply

Tags
gcc482


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to use gcc-4.1.2 in opensuse 12.1 aliga8er Linux - Newbie 5 02-28-2013 02:25 PM
Installing i586-mingw32msvc-gcc on openSUSE ThatPerson Linux - Software 2 11-05-2011 04:23 PM
Installing Mingw32-gcc on openSUSE 11.4 ThatPerson SUSE / openSUSE 3 11-04-2011 04:31 PM
Installing GCC over existing gcc in Redhat linux prakasha.lunux Linux - Newbie 10 01-19-2011 09:34 PM
Installing vmware on Open Suse 11.1 - Requires original gcc 4.32 - gcc now 4.3 cyclops.matrix Linux - Software 2 08-31-2009 03:52 PM


All times are GMT -5. The time now is 02:32 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration