Problems when compiling on Ubuntu
cjustin88 opened this issue · comments
Hi,
I'm trying to compile yampl on Ubuntu 18.04 with gcc 6.2.0 as part of Ath(Simulation)Externals.
- I get the following errors when compiling:
[ 44%] Building CXX object CMakeFiles/CLHEPS.dir/Random/src/RandEngine.cc.o
size.cpp: In function 'int main(int, char**)':
size.cpp:66:5: error: 'wait' was not declared in this scope
wait();
^~~~
size.cpp:66:5: note: suggested alternative: 'main'
wait();
^~~~
main
Makefile:10: recipe for target 'size' failed
make[4]: *** [size] Error 1
[ 44%] Building CXX object CMakeFiles/CLHEP.dir/Random/src/MixMaxRng.cc.o
calls.cpp: In function 'int main()':
calls.cpp:58:5: error: 'wait' was not declared in this scope
wait();
^~~~
calls.cpp:58:5: note: suggested alternative: 'main'
wait();
^~~~
main
Makefile:10: recipe for target 'calls' failed
make[4]: *** [calls] Error 1
[ 68%] Building CXX object CMakeFiles/GeoModelKernel.dir/src/GeoPhysVol.cxx.o
dest.cpp: In function 'int main(int, char**)':
dest.cpp:58:5: error: 'wait' was not declared in this scope
wait();
^~~~
dest.cpp:58:5: note: suggested alternative: 'main'
wait();
^~~~
main
Makefile:10: recipe for target 'dest' failed
make[4]: *** [dest] Error 1
make[4]: Target 'all' not remade because of errors.
Makefile:42: recipe for target 'tests' failed
make[3]: *** [tests] Error 2
make[3]: Target 'all' not remade because of errors.
I haven't been able to locate where wait()
is from, so I just dropped it from the tests source files for now.
cp: failed to access '/home/ubuntu/build/build/AthSimulationExternals/External/yampl/CMakeFiles/yamplBuild/lib/pkgconfig/': Not a directory
Makefile:45: recipe for target 'install' failed
make[3]: *** [install] Error 1
External/yampl/CMakeFiles/yampl.dir/build.make:73: recipe for target 'src/yampl-stamp/yampl-install' failed
make[2]: *** [src/yampl-stamp/yampl-install] Error 2
make[2]: Target 'External/yampl/CMakeFiles/yampl.dir/build' not remade because of errors.
CMakeFiles/Makefile2:2575: recipe for target 'External/yampl/CMakeFiles/yampl.dir/all' failed
.../lib/pkgconfig/
does not exist. However, if I look in ../yamplBuild
, I see:
ubuntu@atlas-ubuntu:~$ ll /home/ubuntu/build/build/AthSimulationExternals/External/yampl/CMakeFiles/yamplBuild/
total 5748
drwxrwxr-x 3 ubuntu ubuntu 4096 Dec 19 08:32 ./
drwxrwxr-x 6 ubuntu ubuntu 4096 Dec 19 08:46 ../
-rwxrwxr-x 1 ubuntu ubuntu 5871280 Dec 19 08:46 lib*
drwxrwxr-x 3 ubuntu ubuntu 4096 Dec 19 08:32 {lib/
ubuntu@atlas-ubuntu:~$ ll /home/ubuntu/build/build/AthSimulationExternals/External/yampl/CMakeFiles/yamplBuild/{lib
total 12
drwxrwxr-x 3 ubuntu ubuntu 4096 Dec 19 08:32 ./
drwxrwxr-x 3 ubuntu ubuntu 4096 Dec 19 08:32 ../
drwxrwxr-x 2 ubuntu ubuntu 4096 Dec 19 08:32 pkgconfig,include}/
Did some string manipulation go wrong?!
Thanks,
Justin
The fix for 2) is to make lib/pkgconfig
and include
separately instead of using brace expansion, here:
Line 45 in 46f7a48
Regarding issue 1):
Attila put in a patch last February to drop yampl tests (and examples) from being built because of issues on Ubuntu 16.04: https://gitlab.cern.ch/atlas/atlasexternals/commit/dcb900e01f1822848b8ed64ac4027fcb0de09e79. This patch was dropped after moving to yampl 46f7a48 in https://gitlab.cern.ch/atlas/atlasexternals/commit/147d5c9d972e6d0481a18f70d0615061cbbf857c. I am using this newer version of yampl, 46f7a48, but there still seems to be an issue (on 18.04).
Hi Justin,
The attached patch should fix the issue 1) for you. I can push it into the master after the break.
Happy Holidays!