LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to use gcc-4.1.2 in opensuse 12.1 (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-use-gcc-4-1-2-in-opensuse-12-1-a-4175451925/)

aliga8er 02-27-2013 10:50 AM

how to use gcc-4.1.2 in opensuse 12.1
 
Hello

I am trying to compile shore-mt storage manager on opensuse 12.1. The problem is when i try to compile it with updated version of gcc i.e. 4.6 its gives an error that this version has optimizer bugs use gcc ver 4.1.2.
Ok then I downloaded repository of gcc-4.1.2 from the following link
http://download.opensuse.org/repositories/ and used "zypper in packagename.rpm" command, but when i tried to compile it gave me an error that "no acceptable c compiler found in $path".
Eventhough I can see gcc-4.1 directory in /usr/bin. but gcc -v does not work

Any suggestions?

knudfl 02-27-2013 11:23 AM

Welcome to LQ.

# zypper in gcc-c++ : Then you have a working gcc version 4.7.x.
Other default : # zypper in gcc33-c++

gcc version 4.1.2 ftp://ftp5.gwdg.de/pub/opensuse/repo...cc/SLE-10_SDK/
> gcc41-c++ . Depends on : cpp41 libmudflap41 gcc41 libstdc++41-devel

$ gcc -v : Please do : gcc-4.1 -v


-

knudfl 02-27-2013 12:15 PM

Suse 12.1, x86_64 : shore-sm-6.0.2.

cd <Directory with cpp41-4.1.2_20070115-32.1.x86_64.rpm
gcc41-4.1.2_20070115-32.1.x86_64.rpm
gcc41-c++-4.1.2_20070115-32.1.x86_64.rpm
libmudflap41-4.1.2_20070115-32.1.x86_64.rpm
libstdc++41-devel-4.1.2_20070115-32.1.x86_64.rpm>

# rpm -Uvh * : OK, g++-4.1 works.

$ cd shore-sm-6.0.2/ && export CC=gcc-4.1 CXX=g++-4.1 && ./configure
$ make : No errors.

-

John VV 02-27-2013 09:01 PM

for 12.1 USE the opensuse BUILD SERVICE!!!!!
http://software.opensuse.org/121/en
there are versions there

DO NOT use random rpms from old versions of suse !
yes they might work but...

search for gcc41
http://software.opensuse.org/search?...upported=false


gcc 4.1 for opensuse 12.1
http://software.opensuse.org/package/gcc41
-- click on "show other versions" if your 12.1 install is not auto detected

aliga8er 02-28-2013 04:52 AM

Thank you for the prompt reply and for the help knudfl & John VV :D

Its compiling without giving errors now, but the problem now is during compilation it gets stuck. I think the problem is that I am working on virtualOS of opensuse. Eventhough my hardware configuration is ok (core-i5 2nd gen, 4gb memory).

Thank you once again. I will ask for your help if the problem persists.

John VV 02-28-2013 01:25 PM

well you can build the source
but there is already a built version in the OBS
mind you i have never liked "one click "

i install the repo that programs are in
this one is " devel:gcc"
use the yast "install and remove programs" and in the gui add the repo
http://download.opensuse.org/reposit...openSUSE_12.1/
or
in yast2 use the Software Repo GUI


All times are GMT -5. The time now is 06:38 AM.