LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 04-17-2017, 06:00 AM   #1
drrahul
Member
 
Registered: Apr 2017
Posts: 36

Rep: Reputation: Disabled
Compiler C++11


I am trying to install GROMACS on my workstation (centOS 6.3)

[root@mqml build]# cmake .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON
CMake Error at cmake/gmxTestCXX11.cmake:113 (message):
This version of GROMACS requires a C++11 compiler. Please use a newer
compiler or use the GROMACS 5.1.x release. See the installation guide for
details.
Call Stack (most recent call first):
CMakeLists.txt:164 (gmx_test_cxx11)


-- Configuring incomplete, errors occurred!
See also "/gromacs-2016.1/CMakeFiles/CMakeOutput.log".
See also "/gromacs-2016.1/CMakeFiles/CMakeError.log".
[root@mqml build]# how do I install C++11 ?
 
Old 04-17-2017, 07:48 AM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,908

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
I think you will need to update your CentOS to get the newer compiler.

You can try using/setting the compile option to "-std=c11", but you better check that your version supports the standard.

If I do a "gcc -std=c11" (with no source), I get an error about their being no source, but if I use some random string instead of "c11" I get a "unrecognized command line option..." instead.

That should let you find out if c11 is supported by your current compiler.
 
Old 04-17-2017, 10:23 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
There are extra later compilers avilable for CentOS 6 : 'devtoolset-4'.
But they use the system gcc-4.4.7 libs :
{/lib64/libgcc*, /usr/lib64/libstdc++*}, i.e. no C++11 support.


You can use "gcc53-c++-5.3.0-1.el6.x86_64.rpm" : Has internal libs ...
/ / /gcc53/lib64/{libgcc_s.so.1, libstdc++.so.6 -> libstdc++.so.6.0.21}
Download link https://drive.google.com/file/d/0B7S...ew?usp=sharing
Provides /usr/bin/{gcc53, g++53} → → $ CC=gcc53 CXX=g++53 cmake ..


By the way, I got no C++11 text when testing gromacs-5.1.4 with gcc-4.4.7 :
Code:
cd build/ && cmake ..  -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON
.
.
-- gcc 4.4.7 detected, using -O3, will apply workaround for optimization bug (disable with GMX_DISABLE_GCC44_BUG_WORKAROUND)
. 
.

Last edited by knudfl; 04-17-2017 at 10:32 AM.
 
Old 04-17-2017, 12:23 PM   #4
drrahul
Member
 
Registered: Apr 2017
Posts: 36

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jpollard View Post
I think you will need to update your CentOS to get the newer compiler.

You can try using/setting the compile option to "-std=c11", but you better check that your version supports the standard.

If I do a "gcc -std=c11" (with no source), I get an error about their being no source, but if I use some random string instead of "c11" I get a "unrecognized command line option..." instead.

That should let you find out if c11 is supported by your current compiler.

Can you give me the full command?
 
Old 04-17-2017, 12:24 PM   #5
drrahul
Member
 
Registered: Apr 2017
Posts: 36

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
There are extra later compilers avilable for CentOS 6 : 'devtoolset-4'.
But they use the system gcc-4.4.7 libs :
{/lib64/libgcc*, /usr/lib64/libstdc++*}, i.e. no C++11 support.


You can use "gcc53-c++-5.3.0-1.el6.x86_64.rpm" : Has internal libs ...
/ / /gcc53/lib64/{libgcc_s.so.1, libstdc++.so.6 -> libstdc++.so.6.0.21}
Download link https://drive.google.com/file/d/0B7S...ew?usp=sharing
Provides /usr/bin/{gcc53, g++53} → → $ CC=gcc53 CXX=g++53 cmake ..


By the way, I got no C++11 text when testing gromacs-5.1.4 with gcc-4.4.7 :
Code:
cd build/ && cmake ..  -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON
.
.
-- gcc 4.4.7 detected, using -O3, will apply workaround for optimization bug (disable with GMX_DISABLE_GCC44_BUG_WORKAROUND)
. 
.

It is only for versions above 2016.1. How to upgrade to devtoolset 4.0?
Can I have the command?
 
Old 04-17-2017, 02:32 PM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #5.

All "devtoolsets" are using old files = {/lib64/libgcc*, /usr/lib64/libstdc++*}.

No C++11 support.

The 'gcc53-c++-5.3.0-1.el6.x86_64.rpm' (48.7MB) was built here, 'July 2016'.
Works very well with gromacs-2016.3 :
Code:
-- The C compiler identification is GNU 5.3.0
-- The CXX compiler identification is GNU 5.3.0
-- Check for working C compiler: /usr/bin/gcc53
-- Check for working C compiler: /usr/bin/gcc53 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++53
-- Check for working CXX compiler: /usr/bin/g++53 -- works
-- Performing Test CXXFLAG_STD_CXX0X - Success
-- Performing Test CXX11_SUPPORTED - Success
-- Performing Test CXX11_STDLIB_PRESENT - Success

Last edited by knudfl; 04-17-2017 at 03:09 PM.
 
1 members found this post helpful.
Old 04-18-2017, 03:51 AM   #7
drrahul
Member
 
Registered: Apr 2017
Posts: 36

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Re #5.

All "devtoolsets" are using old files = {/lib64/libgcc*, /usr/lib64/libstdc++*}.

No C++11 support.

The 'gcc53-c++-5.3.0-1.el6.x86_64.rpm' (48.7MB) was built here, 'July 2016'.
Works very well with gromacs-2016.3 :
Code:
-- The C compiler identification is GNU 5.3.0
-- The CXX compiler identification is GNU 5.3.0
-- Check for working C compiler: /usr/bin/gcc53
-- Check for working C compiler: /usr/bin/gcc53 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++53
-- Check for working CXX compiler: /usr/bin/g++53 -- works
-- Performing Test CXXFLAG_STD_CXX0X - Success
-- Performing Test CXX11_SUPPORTED - Success
-- Performing Test CXX11_STDLIB_PRESENT - Success

Can you please explain in detail about installing the package?
 
Old 04-18-2017, 04:16 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #7.

@drrahul, please do not quote entire posts. A "one word reference" will do.

Installing a package downloaded to Downloads/ :
Code:
cd Downloads/
# yum install ./gcc53-c++-5.3.0-1.el6.x86_64.rpm
 
Old 04-18-2017, 04:37 AM   #9
drrahul
Member
 
Registered: Apr 2017
Posts: 36

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Re #7.
getting the folowing error.

[root@mqml Downloads]# yum install ./gcc53-c++-5.3.0-1.el6.x86_64.rpm
Loaded plugins: aliases, changelog, fastestmirror, kabi, presto, refresh-
: packagekit, security, tmprepo, verify, versionlock
Loading support for CentOS kernel ABI
Setting up Install Process
Examining ./gcc53-c++-5.3.0-1.el6.x86_64.rpm: gcc53-c++-5.3.0-1.el6.x86_64
./gcc53-c++-5.3.0-1.el6.x86_64.rpm: does not update installed package.
Error: Nothing to do
 
Old 04-18-2017, 09:45 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,520

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #9.

Which other package by name 'gcc53-c++' could be present ? May be you already had installed it ?

Please check with : rpm -qa | grep gcc53



-

Last edited by knudfl; 04-18-2017 at 09:48 AM.
 
  


Reply

Tags
gcc-5.3, gromacs


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
[SOLVED] [Question] How to compile a gcc compiler for another machine which got no c compiler on it shone27 Linux - Newbie 9 09-28-2011 07:32 PM
Can you build a C Compiler without an existing C compiler? (Chicken and the egg?) chutsu Linux - Software 6 12-14-2010 08:57 PM
checking for C compiler default output... configure: error: C compiler cannot create clubbing80s Linux - Software 3 07-05-2010 08:17 PM
checking for C compiler default output... configure: error: C compiler cannot create fiorejm Linux - Software 6 11-12-2009 12:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:53 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
Open Source Consulting | Domain Registration