View Issue Details

IDProjectCategoryView StatusLast Update
0002233OpenFOAMPatchpublic2016-09-04 21:08
ReporterwyldckatAssigned Tohenry 
PrioritylowSeverityminorReproducibilitysometimes
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSUbuntuOS Version12.04
Product Versiondev 
Fixed in Versiondev 
Summary0002233: When using a custom GCC stack with binutils included, sometimes CMake will fail to configure the PV*Readers
DescriptionIn the scripts "applications/utilities/postProcessing/graphics/PV*Readers/Allwmake", it's already accounted for setting "CXX" is "WM_CXX" is set.

Nonetheless, today I managed to trigger a situation where CMake is trying to use "/usr/bin/cc" to configure the builds, which resulted in it failing to build with an error associated to an incompatible "ld" build.
Using:

  export CC="$WM_CC"

will solve the problem, given that CMake will instead use the correct custom build of the GCC stack.

Attached is the package "PVReaders_Allwmake_set_CC.tar.gz" that provides the respective updates for the following files:

  applications/utilities/postProcessing/graphics/PV3Readers/Allwmake
  applications/utilities/postProcessing/graphics/PVReaders/Allwmake

The change is this:

- # ensure CMake gets the correct C++ compiler
+ # ensure CMake gets the correct C/C++ compilers
+ [ -n "$WM_CC" ] && export CC="$WM_CC"
         [ -n "$WM_CXX" ] && export CXX="$WM_CXX"

i.e. following the same strategy already used for the C++ compiler.
Additional InformationI managed to trigger this today while testing the detailed instructions I'm updating here: http://openfoamwiki.net/index.php/Installation/Linux/OpenFOAM-dev/Ubuntu#Ubuntu_12.04 - namely for building OpenFOAM-dev on Ubuntu 12.04 with a custom build of GCC 4.8.5, given that OpenFOAM-dev is now using features from the C++11 standard that require GCC 4.8 and newer.
TagsNo tags attached.

Activities

wyldckat

2016-09-03 21:38

updater  

PVReaders_Allwmake_set_CC.tar.gz (652 bytes)

wyldckat

2016-09-03 21:38

updater   ~0006814

Due to a bug in MantisBT, here are the steps to reproduce the error and the respective error message:

1. Using a custom build of GCC 4.8.5 + binutils, as detailed here: http://openfoamwiki.net/index.php/Installation/Linux/OpenFOAM-dev/Ubuntu#Ubuntu_12.04

2. While "applications/utilities/postProcessing/graphics/PVReaders/Allwmake" was running, it stopped when CMake was configuring "PVblockMeshReader", giving the following error (partial output):

 /usr/bin/cc -o CMakeFiles/cmTryCompileExec150723330.dir/testCCompiler.c.o
  -c
  /home/ofuser/OpenFOAM/OpenFOAM-dev/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/PVblockMeshReader/Make/linux64Gcc48DPInt32Opt/CMakeFiles/CMakeTmp/testCCompiler.c

[...]

  /usr/bin/cc CMakeFiles/cmTryCompileExec150723330.dir/testCCompiler.c.o -o
  cmTryCompileExec150723330 -rdynamic

  /home/ofuser/OpenFOAM/ThirdParty-dev/platforms/linux64/gcc-4.8.5/bin/ld:
  this linker was not configured to use sysroots

henry

2016-09-04 21:07

manager   ~0006820

Resolved by commit 3eacfb7621444e126ce9e1530b6eaf1abf41e2ba

Issue History

Date Modified Username Field Change
2016-09-03 21:38 wyldckat New Issue
2016-09-03 21:38 wyldckat Status new => assigned
2016-09-03 21:38 wyldckat Assigned To => henry
2016-09-03 21:38 wyldckat File Added: PVReaders_Allwmake_set_CC.tar.gz
2016-09-03 21:38 wyldckat Note Added: 0006814
2016-09-04 21:07 henry Note Added: 0006820
2016-09-04 21:07 henry Status assigned => resolved
2016-09-04 21:07 henry Fixed in Version => dev
2016-09-04 21:07 henry Resolution open => fixed