New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation on Ubuntu with gcc 5.2.1 #1647

Merged
merged 2 commits into from Nov 12, 2015

Conversation

Projects
None yet
5 participants
@dnadeau4
Contributor

dnadeau4 commented Oct 29, 2015

testing if "ncurses" patch works on different machines.

@dnadeau4 dnadeau4 changed the title from Fix compilatin on Ubuntu with gcc 5.2.1 to Fix compilation on Ubuntu with gcc 5.2.1 Oct 29, 2015

@@ -37,11 +37,11 @@ endif()
if(CDAT_BUILD_ESMF_ESMP)
if("${CMAKE_Fortran_COMPILER_ID}" STREQUAL GNU)
# GNU gfortran must be >= 4.3
if(${Fortran_MAJOR_VERSION} GREATER 3 AND ${Fortran_MINOR_VERSION} GREATER 2)
if(${Fortran_MAJOR_VERSION} GREATER 3 AND ${Fortran_MINOR_VERSION} GREATER 1)

This comment has been minimized.

@doutriaux1

doutriaux1 Oct 29, 2015

Member

That is odd, I thought @chaosphere2112 had made it so that we have to have less than 5, plus 4.0 would fail with this no?

This comment has been minimized.

@chaosphere2112

chaosphere2112 Oct 29, 2015

Contributor

The previous required version was 4.3, which this would match.

This comment has been minimized.

@RCHG

RCHG Oct 29, 2015

I confirm that this problem was present also in Debian (in my case in the current testing version). I have changed as explained,

CMake/cdat_modules/esmf_pkg.cmake

From

if(${Fortran_MAJOR_VERSION} GREATER 3 AND ${Fortran_MINOR_VERSION} GREATER 1)

to

if(${Fortran_MAJOR_VERSION} GREATER 4 AND ${Fortran_MINOR_VERSION} GREATER 0)

and the CMAKE seems to work.

## On APPLE need to test for -arch as well!
add_cdat_package(ESMF "" "Build ESMF" ON)
else()
message(FATAL_ERROR "[ERROR] gfortran must be 4.3 <= version < 5.0; you have ${Fortran_VERSION}")
message(FATAL_ERROR "[ERROR] gfortran must be 4.1 <= version < 5.2; you have ${Fortran_VERSION}")

This comment has been minimized.

@doutriaux1

doutriaux1 Oct 29, 2015

Member

I thought fortran 5.x was not possible?

This comment has been minimized.

@chaosphere2112

chaosphere2112 Oct 29, 2015

Contributor

I didn't personally test with 5.0 or 5.1; I can definitely state that 5.2 doesn't work, though.

This comment has been minimized.

@dnadeau4

dnadeau4 Oct 29, 2015

Contributor

ESMF was compiled with gfortran 5.2.1

  • ./lib0/Linux.gfortran.64.openmpi.default/libesmf.so
  • ./lib0/Linux.gfortran.64.openmpi.default/libesmf.a

I changed 4.3 to 4.1 due to the test above, but I debated about keeping 4.3 in the ERROR message. If somebody use gfortran 4.1 the test will pass. I don't know if ESMF will compile though, the documentation says ESMF requires gfortran 4.3 for linux

crunchy: uses gfortran 4.4.7 and I have gfortran 5.2.1, that is why I used MINOR_VERSION greater than 1.

This comment has been minimized.

@aashish24

aashish24 Oct 30, 2015

Contributor

@dnadeau4 why not keep the check for 4.3 then?

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Oct 29, 2015

I have a question about gfortran I think that needs to be cleaned up. Otherwise looks good to me.

@aashish24

This comment has been minimized.

Contributor

aashish24 commented Oct 29, 2015

@dnadeau4 the patch wouldn't break the older GCC would it?

@aashish24

This comment has been minimized.

Contributor

aashish24 commented Oct 29, 2015

Other than that, it looks good to me. 👍 thanks for pushing it.

@aashish24

This comment has been minimized.

Contributor

aashish24 commented Nov 9, 2015

@dnadeau4 are you going to update it? with CMake version LESS ...of CMake..

@dnadeau4

This comment has been minimized.

Contributor

dnadeau4 commented Nov 10, 2015

I will when I get a chance.

@dnadeau4

This comment has been minimized.

Contributor

dnadeau4 commented Nov 10, 2015

@aashish24 Done!

@dnadeau4

This comment has been minimized.

Contributor

dnadeau4 commented Nov 10, 2015

@doutriaux1 can you take a look at the CMAKE version for gfortran.

@aashish24

This comment has been minimized.

Contributor

aashish24 commented Nov 10, 2015

thanks @dnadeau4 on a quick look at it it looks good. I will have a closer look at it.

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Nov 10, 2015

@aashish24 since it's all CMake I will let you d the final merge, but it looks good.

@aashish24

This comment has been minimized.

Contributor

aashish24 commented Nov 12, 2015

LGTM 👍 thanks @dnadeau4

aashish24 added a commit that referenced this pull request Nov 12, 2015

Merge pull request #1647 from UV-CDAT/curses_update
Fix compilation on Ubuntu with gcc 5.2.1

@aashish24 aashish24 merged commit 0dc576f into master Nov 12, 2015

5 of 9 checks passed

cont-int/LLNL/Darwin-Mac1 10.10.5 (NOGUI) running 'make -j4' (Tue Nov 10 15:38:30 2015)
Details
cont-int/LLNL/Linux-crunchy RH6 (FULL) running 'ctest -j12 -D Experimental' (Tue Nov 10 15:46:43 2015)
Details
continuous-integration/kitware-buildbot/uvcdat-garant-linux-release/ Build done.
Details
cont-int/LLNL/Darwin-Mac 10.10.5 (LEAN) running 'In Queue: 9' (Tue Nov 10 15:02:59 2015)
Details
cont-int/LLNL/Darwin-Mac2 10.10.5 (FULL) running 'ctest -j4 -D Experimental' (Tue Nov 10 23:20:16 2015)
Details
cont-int/LLNL/Linux-annie Ubuntu 15.04 (FULL/MESA) running 'ctest -j15 -D Experimental' (Tue Nov 10 17:12:21 2015)
Details
cont-int/LLNL/Linux-oceanonly RH6 (MESA/NOGUI) running 'ctest -j12 -D Experimental' (Tue Nov 10 15:33:22 2015)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@aashish24 aashish24 deleted the curses_update branch Nov 12, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment