Building on Ubuntu, current Git source

Install support for openEMS

Moderators: thorsten, sebastian

Post Reply
Henkel
Posts: 7
Joined: Sun 22 Jan 2017, 22:39

Building on Ubuntu, current Git source

Post by Henkel » Thu 26 Sep 2019, 17:47

Has anyone else run into a similar error building from the current git source on Ubuntu 16.04 LTS? I am able to build 0.35 with no problem. Tried many different apt-get installs to ensure all dependencies are there. I'm thinking it might be a library alias or path issue.

I was hoping to play with some of the work done by D. Harmon - looks like he's done some very nice stuff.

https://github.com/dlharmon/pyopenems


----------excerpt from build log---------------

-- Configuring done
CMake Warning (dev) at CMakeLists.txt:135 (ADD_EXECUTABLE):
Policy CMP0028 is not set: Double colon in target name means ALIAS or
IMPORTED target. Run "cmake --help-policy CMP0028" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.

Target "AppCSXCAD" links to target "Qt5::Core" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:135 (ADD_EXECUTABLE):
Policy CMP0028 is not set: Double colon in target name means ALIAS or
IMPORTED target. Run "cmake --help-policy CMP0028" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.

Target "AppCSXCAD" links to target "Qt5::Widgets" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:135 (ADD_EXECUTABLE):
Policy CMP0028 is not set: Double colon in target name means ALIAS or
IMPORTED target. Run "cmake --help-policy CMP0028" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.

Target "AppCSXCAD" links to target "Qt5::Xml" but the target was not found.
Perhaps a find_package() call is missing for an IMPORTED target, or an
ALIAS target is missing?
This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /tmp/tmp.OgdE3OOlNQ/AppCSXCAD-prefix/src/AppCSXCAD-build
[ 75%] Performing build step for 'AppCSXCAD'
Scanning dependencies of target AppCSXCAD_automoc
[ 20%] Automatic moc for target AppCSXCAD
Generating moc_AppCSXCAD.cpp
[ 20%] Built target AppCSXCAD_automoc
Scanning dependencies of target AppCSXCAD
[ 40%] Building CXX object CMakeFiles/AppCSXCAD.dir/main.cpp.o
[ 60%] Building CXX object CMakeFiles/AppCSXCAD.dir/AppCSXCAD.cpp.o
[ 80%] Building CXX object CMakeFiles/AppCSXCAD.dir/AppCSXCAD_automoc.cpp.o
[100%] Linking CXX executable AppCSXCAD
/usr/bin/ld: cannot find -lQt5::Core
/usr/bin/ld: cannot find -lQt5::Widgets
/usr/bin/ld: cannot find -lQt5::Xml
collect2: error: ld returned 1 exit status
CMakeFiles/AppCSXCAD.dir/build.make:192: recipe for target 'AppCSXCAD' failed
make[5]: *** [AppCSXCAD] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/AppCSXCAD.dir/all' failed
make[4]: *** [CMakeFiles/AppCSXCAD.dir/all] Error 2

Henkel
Posts: 7
Joined: Sun 22 Jan 2017, 22:39

Re: Building on Ubuntu, current Git source

Post by Henkel » Fri 27 Sep 2019, 18:21

Progress-

1) saw the bug report issue with the same problem on github. Sorry for the duplication.
2) managed to compile QT5 based the directions here: https://wiki.qt.io/Install_Qt_5_on_Ubuntu. Then added the following to the AppsCad CMakeList.txt

include_directories("~/Qt5.12.0/5.12.0/gcc_64/lib") //ie: where the QT.run installed everything

This got much farther - now it's just complaining that it can't find some of the QT type defs.

Still poking at it....

-----------------------------------------------------------------------------------------



[ 60%] Building CXX object CMakeFiles/AppCSXCAD.dir/AppCSXCAD.cpp.o
In file included from /usr/include/qt4/QtGui/QtGui:203:0,
from /home/riot/software/openems/include/QCSXCAD/QVTKStructure.h:21,
from /home/riot/openEMS-Project/AppCSXCAD/AppCSXCAD.cpp:24:
/usr/include/qt4/QtGui/qbitmap.h:87:42: error: ‘QPixmapData’ was not declared in this scope
typedef QExplicitlySharedDataPointer<QPixmapData> DataPtr;
^
/usr/include/qt4/QtGui/qbitmap.h:87:53: error: template argument 1 is invalid
typedef QExplicitlySharedDataPointer<QPixmapData> DataPtr;
^
CMakeFiles/AppCSXCAD.dir/build.make:86: recipe for target 'CMakeFiles/AppCSXCAD.dir/AppCSXCAD.cpp.o' failed
make[5]: *** [CMakeFiles/AppCSXCAD.dir/AppCSXCAD.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/AppCSXCAD.dir/all' failed

Henkel
Posts: 7
Joined: Sun 22 Jan 2017, 22:39

Re: Building on Ubuntu, current Git source

Post by Henkel » Tue 01 Oct 2019, 17:56

Just followup:

I did manage to get it to fully build and install by reverting the CMakeLists for AppCSXCAD to the 0.35v version. It's still unclear why it was throwing errors because the differences are very minor. Maybe the library reference order? Or maybe should have installed vtk8 (only had 5 and 6 on this environment). I'll mess with it when I have a chance.

thorsten
Posts: 1375
Joined: Mon 27 Jun 2011, 12:26

Re: Building on Ubuntu, current Git source

Post by thorsten » Fri 04 Oct 2019, 13:43

Thanks for your efforts. I really have to get working on a v0.0.36 and adept to the latest Ubuntu version. But I'm not using Ubuntu any more, thus these problems may happen more often...

regards
Thorsten

n4es
Posts: 8
Joined: Tue 12 Jun 2018, 21:34

Re: Building on Ubuntu, current Git source

Post by n4es » Thu 10 Oct 2019, 00:21

v0.0.36 for Ubuntu would be very much appreciated. Since I upgraded to Linux Mint 19.2, I'm down. Running in Windows now... Unable to see antenna patterns in Windows. Tried fixing setup.m file per the forum, but no good.

n4es
Posts: 8
Joined: Tue 12 Jun 2018, 21:34

Re: Building on Ubuntu, current Git source

Post by n4es » Thu 10 Oct 2019, 01:52

Off topic, sorry, but I deleted everything and reinstalled in Windows and now antenna patterns are good. Thanks!

vaca_loca
Posts: 2
Joined: Fri 21 Feb 2020, 18:34

Re: Building on Ubuntu, current Git source

Post by vaca_loca » Fri 21 Feb 2020, 19:29

Henkel wrote:
Tue 01 Oct 2019, 17:56
Just followup:

I did manage to get it to fully build and install by reverting the CMakeLists for AppCSXCAD to the 0.35v version. It's still unclear why it was throwing errors because the differences are very minor. Maybe the library reference order? Or maybe should have installed vtk8 (only had 5 and 6 on this environment). I'll mess with it when I have a chance.
I was getting the same errors with not being able to find Qt::Core, etc libraries even though they are installed. Wanted to mention that using the CMakeLists.txt from the 0.35 version with the latest Git sources as of today also worked for me with Ubuntu 16.04.

Post Reply