gcc 4.7 or Red Hat Developer Toolset equivalent for Centos?

Issues related to software problems.
_ck_
Posts: 89
Joined: 2012/08/10 23:00:35

Re: gcc 4.7 or Red Hat Developer Toolset equivalent for Centos?

Post by _ck_ » 2013/02/01 09:30:59

Oh I missed the release!
So first did a yum uninstall for the devtoolset 1.0 gcc

[code]
yum --enablerepo=testing-devtools-6 remove devtoolset-1.0-gcc
[/code]

Then I had to edit the .repo file to add -1.1 to the devtoolset path

Then I was able to successfully install gcc from devtoolset-1.1 - it found an old dependency to remove and installed the new runtime
[size=56][code][size=56]
yum --enablerepo=testing-devtools-6 install devtoolset-1.1-gcc
Loaded plugins: changelog, fastestmirror
Loading mirror speeds from cached hostfile
* base: centos.mirror.lstn.net
* extras: centosmirror.quintex.com
* updates: mirrors.finalasp.com
testing-devtools-6 | 951 B 00:00
testing-devtools-6/primary | 12 kB 00:00
testing-devtools-6 40/40
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package devtoolset-1.1-gcc.x86_64 0:4.7.2-5.el6 will be installed
--> Processing Dependency: devtoolset-1.1-runtime for package: devtoolset-1.1-gcc-4.7.2-5.el6.x86_64
--> Running transaction check
---> Package devtoolset-1.0-runtime.noarch 0:1-3.el6 will be obsoleted
---> Package devtoolset-1.1-runtime.noarch 0:1-13.el6 will be obsoleting
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================
Package Arch Version Repository Size
====================================================================================================================================
Installing:
devtoolset-1.1-gcc x86_64 4.7.2-5.el6 testing-devtools-6 19 M
devtoolset-1.1-runtime noarch 1-13.el6 testing-devtools-6 1.0 M
replacing devtoolset-1.0-runtime.noarch 1-3.el6

Transaction Summary
====================================================================================================================================
Install 2 Package(s)

Total download size: 20 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): devtoolset-1.1-gcc-4.7.2-5.el6.x86_64.rpm | 19 MB 00:03
(2/2): devtoolset-1.1-runtime-1-13.el6.noarch.rpm | 1.0 MB 00:00
------------------------------------------------------------------------------------------------------------------------------------
Total 5.1 MB/s | 20 MB 00:03
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : devtoolset-1.1-runtime-1-13.el6.noarch 1/3
Installing : devtoolset-1.1-gcc-4.7.2-5.el6.x86_64 2/3
Erasing : devtoolset-1.0-runtime-1-3.el6.noarch 3/3
Verifying : devtoolset-1.1-gcc-4.7.2-5.el6.x86_64 1/3
Verifying : devtoolset-1.1-runtime-1-13.el6.noarch 2/3
Verifying : devtoolset-1.0-runtime-1-3.el6.noarch 3/3

Installed:
devtoolset-1.1-gcc.x86_64 0:4.7.2-5.el6 devtoolset-1.1-runtime.noarch 0:1-13.el6

Replaced:
devtoolset-1.0-runtime.noarch 0:1-3.el6

Complete!
[/size][/code][/size]

Let's give it a go

[b]echo "int main() { return 0; }" | /opt/centos/devtoolset-1.1/root/usr/bin/gcc -v -Q -x c - 2>&1 [/b]

[size=56][quote][size=56]
Using built-in specs.
COLLECT_GCC=/opt/centos/devtoolset-1.1/root/usr/bin/gcc
COLLECT_LTO_WRAPPER=/opt/centos/devtoolset-1.1/root/usr/libexec/gcc/x86_64-redhat-linux/4.7.2/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/opt/centos/devtoolset-1.1/root/usr --mandir=/opt/centos/devtoolset-1.1/root/usr/share/man --infodir=/opt/centos/devtoolset-1.1/root/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --disable-build-with-cxx --disable-build-poststage1-with-cxx
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,fortran,lto --enable-plugin --with-linker-hash-style=gnu
--enable-initfini-array --disable-libgcj --with-ppl --with-cloog --with-mpc=/home/centos/rpm/BUILD/gcc-4.7.2-20121015/obj-x86_64-redhat-linux/mpc-install --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.7.2 20121015 (Red Hat 4.7.2-5) (GCC)
COLLECT_GCC_OPTIONS='-v' '-Q' '-mtune=generic' '-march=x86-64'
/opt/centos/devtoolset-1.1/root/usr/libexec/gcc/x86_64-redhat-linux/4.7.2/cc1 -v - -dumpbase - -mtune=generic -march=x86-64 -auxbase - -version -o /tmp/cckiydEm.s
GNU C (GCC) version 4.7.2 20121015 (Red Hat 4.7.2-5) (x86_64-redhat-linux)
compiled by GNU C version 4.7.2 20121015 (Red Hat 4.7.2-5), GMP version 4.3.1, MPFR version 2.4.1, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/opt/centos/devtoolset-1.1/root/usr/lib/gcc/x86_64-redhat-linux/4.7.2/include-fixed"
ignoring nonexistent directory "/opt/centos/devtoolset-1.1/root/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../x86_64-redhat-linux/include"
#include "..." search starts here:
#include search starts here:
/opt/centos/devtoolset-1.1/root/usr/lib/gcc/x86_64-redhat-linux/4.7.2/include
/usr/local/include
/opt/centos/devtoolset-1.1/root/usr/include
/usr/include
End of search list.
GNU C (GCC) version 4.7.2 20121015 (Red Hat 4.7.2-5) (x86_64-redhat-linux)
compiled by GNU C version 4.7.2 20121015 (Red Hat 4.7.2-5), GMP version 4.3.1, MPFR version 2.4.1, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
options passed: -v - -mtune=generic -march=x86-64
options enabled: -fasynchronous-unwind-tables -fauto-inc-dec
-fbranch-count-reg -fcommon -fdelete-null-pointer-checks -fdwarf2-cfi-asm
-fearly-inlining -feliminate-unused-debug-types -ffunction-cse -fgcse-lm
-fgnu-runtime -fident -finline-atomics -fira-share-save-slots
-fira-share-spill-slots -fivopts -fkeep-static-consts -fleading-underscore
-fmath-errno -fmerge-debug-strings -fmove-loop-invariants -fpeephole
-fprefetch-loop-arrays -freg-struct-return -fsched-critical-path-heuristic
-fsched-dep-count-heuristic -fsched-group-heuristic -fsched-interblock
-fsched-last-insn-heuristic -fsched-rank-heuristic -fsched-spec
-fsched-spec-insn-heuristic -fsched-stalled-insns-dep -fshow-column
-fsigned-zeros -fsplit-ivs-in-unroller -fstrict-volatile-bitfields
-ftrapping-math -ftree-cselim -ftree-forwprop -ftree-loop-if-convert
-ftree-loop-im -ftree-loop-ivcanon -ftree-loop-optimize
-ftree-parallelize-loops= -ftree-phiprop -ftree-pta -ftree-reassoc
-ftree-scev-cprop -ftree-slp-vectorize -ftree-vect-loop-version
-funit-at-a-time -funwind-tables -fvar-tracking -fvar-tracking-assignments
-fvect-cost-model -fzero-initialized-in-bss -m128bit-long-double -m64
-m80387 -maccumulate-outgoing-args -malign-stringops -mfancy-math-387
-mfp-ret-in-387 -mglibc -mieee-fp -mmmx -mno-sse4 -mpush-args -mred-zone
-msse -msse2 -mtls-direct-seg-refs
Compiler executable checksum: c7b43e399052ddf7b3814270fb15f981
main
Analyzing compilation unit
Performing interprocedural optimizations
Assembling functions:
main
Execution times (seconds)
phase setup : 0.00 ( 0%) usr 0.00 ( 0%) sys 0.01 (100%) wall 1077 kB (88%) ggc
TOTAL : 0.00 0.00 0.01 1221 kB
COLLECT_GCC_OPTIONS='-v' '-Q' '-mtune=generic' '-march=x86-64'
as -v --64 -o /tmp/ccBC6DOm.o /tmp/cckiydEm.s
GNU assembler version 2.20.51.0.2 (x86_64-redhat-linux) using BFD version version 2.20.51.0.2-5.34.el6 20100205
COMPILER_PATH=/opt/centos/devtoolset-1.1/root/usr/libexec/gcc/x86_64-redhat-linux/4.7.2/:/opt/centos/devtoolset-1.1/root/usr/libexec/gcc/x86_64-redhat-linux/4.7.2/:
/opt/centos/devtoolset-1.1/root/usr/libexec/gcc/x86_64-redhat-linux/:/opt/centos/devtoolset-1.1/root/usr/lib/gcc/x86_64-redhat-linux/4.7.2/:/opt/centos/devtoolset-1.1/root/usr/lib/gcc/x86_64-redhat-linux/
LIBRARY_PATH=/opt/centos/devtoolset-1.1/root/usr/lib/gcc/x86_64-redhat-linux/4.7.2/:/opt/centos/devtoolset-1.1/root/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:
/opt/centos/devtoolset-1.1/root/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-Q' '-mtune=generic' '-march=x86-64'
/opt/centos/devtoolset-1.1/root/usr/libexec/gcc/x86_64-redhat-linux/4.7.2/collect2 --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64
-dynamic-linker /lib64/ld-linux-x86-64.so.2 /usr/lib/../lib64/crt1.o /usr/lib/../lib64/crti.o /opt/centos/devtoolset-1.1/root/usr/lib/gcc/x86_64-redhat-linux/4.7.2/crtbegin.o
-L/opt/centos/devtoolset-1.1/root/usr/lib/gcc/x86_64-redhat-linux/4.7.2 -L/opt/centos/devtoolset-1.1/root/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64
-L/opt/centos/devtoolset-1.1/root/usr/lib/gcc/x86_64-redhat-linux/4.7.2/../../.. /tmp/ccBC6DOm.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed
-lgcc_s --no-as-needed /opt/centos/devtoolset-1.1/root/usr/lib/gcc/x86_64-redhat-linux/4.7.2/crtend.o /usr/lib/../lib64/crtn.o
[/size][/quote][/size]

marcin
Posts: 2
Joined: 2013/02/07 16:44:12
Contact:

Re: gcc 4.7 or Red Hat Developer Toolset equivalent for Centos?

Post by marcin » 2013/02/07 16:57:28

I tested devtools-1.1 on CentOS 5 x86_64.
These packages saved me a lot of work, thank you!
Everything installs and works as expected.

One minor thing (I guess it's the same in RHEL): unlike gcc-gfortran 4.1, devtoolset-1.1-gcc-gfortran has no f95 link and LAPACK build system picks old gfortran through f95 as default compiler.

bzero
Posts: 1
Joined: 2013/02/22 06:53:15
Contact:

Re: gcc 4.7 or Red Hat Developer Toolset equivalent for Centos?

Post by bzero » 2013/02/22 06:55:31

Worked fine on my Centos 5 - x64

thx a lot guys !

fuzzylogic
Posts: 2
Joined: 2013/04/12 22:00:21

Re: gcc 4.7 or Red Hat Developer Toolset equivalent for Centos?

Post by fuzzylogic » 2013/04/12 22:13:34

Linux n00b here. So I was able to install the devtoolset-1.1 and enabled the toolset, and I can run gcc --version to see that gcc is working.
However, if I close the terminal and open a new one and run gcc --version it says it cannot find gcc.
Any suggestions?

User avatar
TrevorH
Forum Moderator
Posts: 29491
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: gcc 4.7 or Red Hat Developer Toolset equivalent for Centos?

Post by TrevorH » 2013/04/12 22:46:18

You run the scl command and it starts a copy of bash with the environment set up to find the correct copy of gcc. If you close the window and want another one then you have to rerun the scl command.

fuzzylogic
Posts: 2
Joined: 2013/04/12 22:00:21

Re: gcc 4.7 or Red Hat Developer Toolset equivalent for Centos?

Post by fuzzylogic » 2013/04/13 00:02:32

Thanks for the reply. I should have been more specific, what command can I run so that gcc is always available and that I don't have to run scl each time? Some other programs that I'm trying to run are giving me errors that they can't find gcc utility.

DaemonProgrammr
Posts: 78
Joined: 2011/12/12 12:49:46

Re: gcc 4.7 or Red Hat Developer Toolset equivalent for Centos?

Post by DaemonProgrammr » 2013/04/18 08:15:38

I think you can add this command to the .bashrc file in your homedirectory.
This is a script file that gets executed everytime you open a terminal. (IIRC!)

This way, you always have the gcc command.

JohnA
Posts: 2
Joined: 2013/07/23 11:36:55

Re: gcc 4.7 or Red Hat Developer Toolset equivalent for Centos?

Post by JohnA » 2013/07/23 11:46:25

[quote]
tru_tru wrote:
Hi,

initial rebuild at http://people.centos.org/tru/devtools-1.1 for CentOS 5/6 x86_64.

Please test and report so that we can push it to the main repositories.

Tru[/quote]

Hi.

Is this still the appropriate repository for installing the Developer Toolset?
I'm unaware of which repository it is pushed to.

Thank you!

User avatar
TrevorH
Forum Moderator
Posts: 29491
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: gcc 4.7 or Red Hat Developer Toolset equivalent for Centos?

Post by TrevorH » 2013/07/23 12:46:22

That URL contains a .repo file and, yes, as far as I know, that's still current.

JohnA
Posts: 2
Joined: 2013/07/23 11:36:55

Re: gcc 4.7 or Red Hat Developer Toolset equivalent for Centos?

Post by JohnA » 2013/07/23 15:56:41

[quote]
TrevorH wrote:
That URL contains a .repo file and, yes, as far as I know, that's still current.[/quote]

Thank you for the quick response!

Post Reply

Return to “CentOS 5 - Software Support”