Closed smanders closed 4 years ago
First, some questions:
C4ISR_Builds/externpro/cmake
?If you're using externpro 18.08.4 made available on hera C4ISR_Builds/externpro
please be aware that this was built on CentOS 6. And currently we don't build VANTAGE on CentOS 7, so using a CentOS 6 build of externpro to build something on CentOS 7 is not really a supported scenario.
You state that
The main issue seems to be that when cmake starts to build the project is queries for the wxwidgets library from usr/share/cmake rather than from /opt/extern/extern pro ….
However, you need to realize that what you're seeing is the Call Stack and the calls to /usr/share/cmake
is when the externpro use script calls find_package(wxWidgets REQUIRED ${wx_libs})
here https://github.com/smanders/externpro/blob/18.08.4/projects/use/usexp-wxwidgets-config.cmake#L43
Even though we no longer use wxWidgets_LIBRARIES
from cmake's FindwxWidgets.cmake, that's what is failing for you. And I suspect it's the same issue that I used to get around with a cmake patch: https://github.com/smanders/externpro/issues/156#issuecomment-352126168
Once we stopped using wxWidgets_LIBRARIES
I stopped applying the patch to newer versions of cmake (and I generally try to avoid patching cmake now because too many developers weren't installing the patched version of cmake)
And the version of externpro seems to work for a project I have
$ {smanders@lin-compile2} ~/src/Cmdr/_bld
02/21 13:59:20 > cmake ..
-- The C compiler identification is GNU 7.3.1
-- The CXX compiler identification is GNU 7.3.1
-- Check for working C compiler: /opt/rh/devtoolset-7/root/usr/bin/cc
-- Check for working C compiler: /opt/rh/devtoolset-7/root/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /opt/rh/devtoolset-7/root/usr/bin/c++
-- Check for working CXX compiler: /opt/rh/devtoolset-7/root/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found externpro: /home/smanders/extern/externpro-18.08.4-gcc731-64-Linux
-- Found internpro: /opt/extern/internpro-18.09.1-gcc731-64-Linux
-- Performing Test has_c_fPIC
-- Performing Test has_c_fPIC - Success
-- Performing Test has_c_msse3
-- Performing Test has_c_msse3 - Success
-- Performing Test has_c_StrongSP
-- Performing Test has_c_StrongSP - Success
-- Performing Test has_cxx14
-- Performing Test has_cxx14 - Success
-- Performing Test has_cxx_fPIC
-- Performing Test has_cxx_fPIC - Success
-- Performing Test has_cxx_msse3
-- Performing Test has_cxx_msse3 - Success
-- Performing Test has_cxx_StrongSP
-- Performing Test has_cxx_StrongSP - Success
-- Performing Test has_Wall
-- Performing Test has_Wall - Success
-- Performing Test has_Wno_maybe_uninitialized
-- Performing Test has_Wno_maybe_uninitialized - Success
-- Performing Test has_Wextra
-- Performing Test has_Wextra - Success
-- Performing Test has_cast_align
-- Performing Test has_cast_align - Success
-- Performing Test has_pedantic
-- Performing Test has_pedantic - Success
-- Performing Test has_Wformat
-- Performing Test has_Wformat - Success
-- Performing Test has_Wfloat_equal
-- Performing Test has_Wfloat_equal - Success
-- Performing Test has_nounkprag
-- Performing Test has_nounkprag - Success
-- Performing Test has_psabi
-- Performing Test has_psabi - Success
-- Performing Test has_Og
-- Performing Test has_Og - Success
-- Performing Test has_Werror
-- Performing Test has_Werror - Success
-- Performing Test has_c_Werror
-- Performing Test has_c_Werror - Success
-- Performing Test has_visibility
-- Performing Test has_visibility - Success
-- Performing Test has_exclude
-- Performing Test has_exclude - Success
-- Unclassified build, repo not accessible: /mnt/gitRepo/isr.git
-- Found Git: /opt/rh/git19/root/usr/bin/git (found version "1.9.4")
-- Found zlib: 1.2.8 [externpro]
-- Found bzip2: 1.0.6 [externpro]
-- Looking for pow in m
-- Looking for pow in m - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Looking for shm_open in rt
-- Looking for shm_open in rt - found
-- Found boost: 1.63.0 [externpro]
-- Found Threads: TRUE
-- Found PROTOBUF: /home/smanders/extern/externpro-18.08.4-gcc731-64-Linux/lib/libprotobuf_3.0.0-beta-1.a
-- Found protobuf: 3.0.0-beta-1 [externpro]
-- Found wxWidgets: -L/home/smanders/extern/externpro-18.08.4-gcc731-64-Linux/lib;-pthread;;;/home/smanders/extern/externpro-18.08.4-gcc731-64-Linux/lib/libwx_gtk2u_aui-3.1.a;/home/smanders/extern/externpro-18.08.4-gcc731-64-Linux/lib/libwx_gtk2u_propgrid-3.1.a;/home/smanders/extern/externpro-18.08.4-gcc731-64-Linux/lib/libwx_gtk2u_richtext-3.1.a;/home/smanders/extern/externpro-18.08.4-gcc731-64-Linux/lib/libwx_gtk2u_gl-3.1.a;/home/smanders/extern/externpro-18.08.4-gcc731-64-Linux/lib/libwx_baseu_net-3.1.a;/home/smanders/extern/externpro-18.08.4-gcc731-64-Linux/lib/libwx_gtk2u_html-3.1.a;/home/smanders/extern/externpro-18.08.4-gcc731-64-Linux/lib/libwx_gtk2u_adv-3.1.a;/home/smanders/extern/externpro-18.08.4-gcc731-64-Linux/lib/libwx_gtk2u_core-3.1.a;/home/smanders/extern/externpro-18.08.4-gcc731-64-Linux/lib/libwx_baseu_xml-3.1.a;/home/smanders/extern/externpro-18.08.4-gcc731-64-Linux/lib/libwx_baseu-3.1.a;-lGL;-lGLU;-pthread;-lX11;-lXxf86vm;-lSM;-pthread;-lgtk-x11-2.0;-lgdk-x11-2.0;-latk-1.0;-lgio-2.0;-lpangoft2-1.0;-lpangocairo-1.0;-lgdk_pixbuf-2.0;-lcairo;-lpango-1.0;-lfreetype;-lfontconfig;-lgobject-2.0;-lgmodule-2.0;-lgthread-2.0;-lrt;-lglib-2.0;-lwxregexu-3.1;-lwxexpat-3.1;-lwxtiff-3.1;-lwxjpeg-3.1;-lwxpng-3.1;-lwxzlib-3.1;-ldl;-lm (found version "3.1.0")
-- Found GTK2_GTK: /usr/lib64/libgtk-x11-2.0.so
-- Looking for XGetWindowAttributes in X11
-- Looking for XGetWindowAttributes in X11 - found
-- Looking for XF86VidModeGetAllModeLines in Xxf86vm
-- Looking for XF86VidModeGetAllModeLines in Xxf86vm - found
-- Looking for SmcOpenConnection in SM
-- Looking for SmcOpenConnection in SM - found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Looking for dlclose in dl
-- Looking for dlclose in dl - found
-- Looking for pow in m
-- Looking for pow in m - not found
-- Found wxwidgets: 3.1 [externpro]
-- Found palam: _v130_b63 [internpro]
-- Looking for ifaddrs.h
-- Looking for ifaddrs.h - found
-- Found wxinclude: 1.0 [externpro]
-- Found geotrans: 2.4.2 [externpro]
-- Found lua: 5.2.3 [externpro]
-- Found openssl: 1.0.2a [externpro]
-- Found wxx: 31 [externpro]
-- Found libssh2: 1.5.0 [externpro]
-- Found cares: 1.10.0 [externpro]
-- Found curl: 7.42.1 [externpro]
-- Found rapidxml: 1.13 [externpro]
-- Performing Test has_permissive
-- Performing Test has_permissive - Success
-- Found eigen: 3.2.7 [externpro]
-- Found fftw: 3.3.3 [externpro]
-- Found shapelib: 1.2.10 [externpro]
-- Found geotiff: 1.2.4 [externpro]
-- Found jasper: 1.900.1 [externpro]
-- Found jpegxp: 17.08 [externpro]
-- Found jxrlib: 15.08 [externpro]
-- Found kakadu: 6.1.1 [internpro]
-- Found clangformat: 3.9.0 [externpro]
-- Configuring done
-- Generating done
-- Build files have been written to: /home/smanders/src/Cmdr/_bld
First, some questions:
C4ISR_Builds/externpro/cmake
?Hi Scott, Thanks for helping my with this.
In answer to your questions, I used and installed the cmake found in hera/c4isr_builds/extern/cmake
I also used the extern pro from the same hera directory. 18.08.4.gcc731.
Do you think I should try with a Centos6 installation?
If you look at the output from a successful run of cmake (above) and look at the entire Found wxWidgets
line (which comes from cmake's FindwxWidgets.cmake) you'll see that the wxWidgets_LIBRARIES
is the thing that's reported
-- Found wxWidgets: -L/home/smanders/extern/externpro-18.08.4-gcc731-64-Linux/lib;-pthread ...
and if you scroll to the end of this line you'll see libraries such as:
-lGL;-lGLU;-pthread;-lX11;-lXxf86vm;-lSM;-pthread;-lgtk-x11-2.0;-lgdk-x11-2.0;-latk-1.0;-lgio-2.0;-lpangoft2-1.0;-lpangocairo-1.0;-lgdk_pixbuf-2.0;-lcairo;-lpango-1.0;-lfreetype;-lfontconfig;-lgobject-2.0;-lgmodule-2.0;-lgthread-2.0;-lrt;-lglib-2.0
and I'm suspecting that perhaps these libraries aren't found on your "clean installation of centos 7"...
if you were to have built externpro yourself you would have seen that the cmake in wx.cmake looks for these packages https://github.com/smanders/externpro/blob/18.08.4/projects/wx.cmake#L26-L71
so perhaps the best thing would be to use externpro to discover dependencies that aren't on your system
$ git clone git://github.com/smanders/externpro.git
$ cd externpro/
$ git checkout 18.08.4
$ cd ..
$ mkdir bld
$ cd bld
$ cmake -DXP_STEP=build ../externpro
but also note that there's at least one required package that isn't yet detected https://github.com/smanders/externpro/blob/18.08.4/projects/wx.cmake#L27-L28
also note that GTK3 isn't available on CentOS 6, so if you continue to use the pre-built (for VANTAGE use) externpro you should not install GTK3 because the pre-built for CentOS 6 version of externpro was built with GTK2
the txt file in the root of an externpro installation records some of the details of the externpro build (note that they were built with GTK2 and that externpro 18.11.1 also records the linux distribution):
$ cat /opt/extern/externpro-18.08.4-gcc731-64-Linux/externpro_18.08.4-gcc731-64.txt
18.08.4-gcc731-64
Linux lin-compile2 2.6.32-696.28.1.el6.x86_64 #1 SMP Wed May 9 23:09:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
gtk2 version: 2.24.23
$ cat /opt/extern/externpro-18.11.1-gcc731-64-Linux/externpro_18.11.1-gcc731-64.txt
18.11.1-gcc731-64
Linux lin-compile2 2.6.32-754.6.3.el6.x86_64 #1 SMP Tue Oct 9 17:27:49 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
lsb_release Description: CentOS release 6.10 (Final)
gtk2 version: 2.24.23
please confirm if my suspicion is correct that you don't have wx-required development packages installed
if these wx-required development packages are installed then we can consider modifying the installed /usr/share/cmake-3.12/Modules/FindwxWidgets.cmake
, uncommenting the DBG_MSG_V
macro so we can see why it's not finding the wxWidgets libraries...
report: once wx-required development packages were installed all was well
developer reported the following CentOS dependency list
yum update kernel -y
yum update -y && yum upgrade -y
yum install -y epel-release
yum install -y centos-release-scl
yum-config-manager --enable rhel-server-rhscl-7-rpms
yum install -y yum-utils
yum install -y scl-utils
yum install -y devtoolset-7-gcc*
yum install -y devtoolset-7
yum install -y rh-python36
yum install -y rh-python36-numpy
yum install -y cmake3 wxGTK-devel wxBase3 cifs-utils rpm-build mesa-libGL-devel wget p7zip rkhunter nmap freetype fontconfig libX11 libX11-devel libXrender libxkbcommon-x11 dbus-x11 mesa-dri-drivers telnet ncurses-devel libSM-devel unixODBC-devel alsa-lib.i686 alsa-lib-devel
dbus-uuidgen > /var/lib/dbus/machine-id
ln -s /usr/bin/cmake3 /usr/bin/cmake
scl enable devtoolset-7 bash
I may add detecting and reporting of wx depedencies to the use script
projects/wx.cmake
https://github.com/smanders/externpro/blob/19.06.1/projects/wx.cmake#L26-L71projects/use/usexp-wxwidgets-config.cmake
https://github.com/smanders/externpro/blob/19.06.1/projects/use/usexp-wxwidgets-config.cmakenow that buildpro creates the official docker images used for building externpro for various distributions of linux
I'm less inclined to add a bunch of smarts to externpro that would have to take into account all the different distributions and their various package managers to detect and report dependencies
buildpro solves this issue IMHO
-- Found zlib: 1.2.8 [externpro] -- Found bzip2: 1.0.6 [externpro] -- Looking for pow in m -- Looking for pow in m - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Looking for shm_open in rt -- Looking for shm_open in rt - found -- Found boost: 1.63.0 [externpro] -- Found Threads: TRUE -- Found PROTOBUF: /opt/extern/externpro-18.08.4-gcc731-64-Linux/lib/libprotobuf_3.0.0-beta-1.a -- Found protobuf: 3.0.0-beta-1 [externpro] CMake Error at /usr/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES) Call Stack (most recent call first): /usr/share/cmake-3.12/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake-3.12/Modules/FindwxWidgets.cmake:963 (find_package_handle_standard_args) /opt/extern/externpro-18.08.4-gcc731-64-Linux/share/cmake/usexp-wxwidgets-config.cmake:43 (find_package) /opt/extern/externpro-18.08.4-gcc731-64-Linux/share/cmake/xpfunmac.cmake:1074 (find_package) /opt/extern/internpro-18.09.1-gcc731-64-Linux/share/cmake/usexp-palam-config.cmake:55 (xpFindPkg) /opt/extern/externpro-18.08.4-gcc731-64-Linux/share/cmake/xpfunmac.cmake:1074 (find_package) /opt/extern/externpro-18.08.4-gcc731-64-Linux/share/cmake/xpfunmac.cmake:1154 (xpFindPkg) VantageShared/IncludesINC/Includes/Test/CMakeLists.txt:28 (xpTargetExtern)
-- Configuring incomplete, errors occurred! See also "/home/bmichaelis/TrialByFire/builds/CMakeFiles/CMakeOutput.log". See also "/home/bmichaelis/TrialByFire/builds/CMakeFiles/CMakeError.log".