Error: "Two different environments were specified for target" / Syntax error: "(" unexpected

0 votes
asked Oct 31, 2017 by GaryM (940 points)
edited Oct 31, 2017 by GaryM

I am getting the following error when compiling on the old scons build system:

Chaste$ scons
scons: Reading SConscript files ...
Using hostconfig settings from python/hostconfig/
Running infrastructure tests...

scons: warning: Two different environments were specified for target /home/pgermann/Dropbox,
but they appear to have the same action: RunPyCml(target, source, env)
  File "python/infra/", line 1338, in DoComponentSConscript

scons: *** Multiple ways to build the same target were specified for: /home/pgermann/Dropbox  (from ['/home/pgermann/Dropbox (CRG)/Projects/ABM/Chaste/heart/dynamic/luo_rudy_1991_dyn.cellml'] and from ['/home/pgermann/Dropbox (CRG)/Projects/ABM/Chaste/heart/src/odes/cellml/FoxModel2002.cellml'])
File "python/infra/", line 1338, in DoComponentSConscript

and this error when compiling with the new cmake build system:

chaste-build$ make TestRunningNodeBasedSimulationsTutorial
[100%] Building CXX object cell_based/CMakeFiles/chaste_cell_based.dir/src/cell/Cell.cpp.o
[100%] Linking CXX shared library
[100%] Built target chaste_cell_based
[100%] Generating TestRunningNodeBasedSimulationsTutorial.cpp
/bin/sh: 1: Syntax error: "(" unexpected
cell_based/test/CMakeFiles/TestRunningNodeBasedSimulationsTutorial.dir/build.make:61: recipe for target 'cell_based/test/TestRunningNodeBasedSimulationsTutorial.cpp' failed
make[3]: *** [cell_based/test/TestRunningNodeBasedSimulationsTutorial.cpp] Error 2
CMakeFiles/Makefile2:15040: recipe for target 'cell_based/test/CMakeFiles/TestRunningNodeBasedSimulationsTutorial.dir/all' failed
make[2]: *** [cell_based/test/CMakeFiles/TestRunningNodeBasedSimulationsTutorial.dir/all] Error 2
CMakeFiles/Makefile2:15052: recipe for target 'cell_based/test/CMakeFiles/TestRunningNodeBasedSimulationsTutorial.dir/rule' failed
make[1]: *** [cell_based/test/CMakeFiles/TestRunningNodeBasedSimulationsTutorial.dir/rule] Error 2
Makefile:4446: recipe for target 'TestRunningNodeBasedSimulationsTutorial' failed
make: *** [TestRunningNodeBasedSimulationsTutorial] Error 2

1 Answer

0 votes
answered Oct 31, 2017 by GaryM (940 points)
Best answer

The space in the folder path

/home/pgermann/Dropbox (CRG)/Projects/ABM/Chaste

is upsetting part of the build system, removing that fixes this compilation error.

Welcome to Chaste Q&A, where you can ask questions and receive answers from other members of the community of Chaste developers and users.

See the Chaste wiki for installation instructions, guides and tutorials.