View Issue Details

IDProjectCategoryView StatusLast Update
0002233OpenFOAMPatchpublic2016-09-04 21:08
Reporterwyldckat Assigned Tohenry  
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.

  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:


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: - 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.



2016-09-03 21:38



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:

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


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

  this linker was not configured to use sysroots


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