melowntech / vts-tools

VTS tool suite.
BSD 2-Clause "Simplified" License
12 stars 3 forks source link

Build issue on Focal #9

Open AriemX opened 2 years ago

AriemX commented 2 years ago

Hi,

Recently, I have troubles building an in house docker image (based on ubuntu focal). Any vts related sources I try to build is failing with a similar error :

`

[ 6/31] RUN cd vts-tools/tools && make -j4 && make install:

9 0.715 * Building in build

9 1.016 -- The C compiler identification is GNU 9.3.0

9 1.192 -- The CXX compiler identification is GNU 9.3.0

9 1.213 -- Check for working C compiler: /usr/bin/cc

9 1.325 -- Check for working C compiler: /usr/bin/cc -- works

9 1.329 -- Detecting C compiler ABI info

9 1.440 -- Detecting C compiler ABI info - done

9 1.465 -- Detecting C compile features

9 1.466 -- Detecting C compile features - done

9 1.474 -- Check for working CXX compiler: /usr/bin/c++

9 1.587 -- Check for working CXX compiler: /usr/bin/c++ -- works

9 1.588 -- Detecting CXX compiler ABI info

9 1.719 -- Detecting CXX compiler ABI info - done

9 1.737 -- Detecting CXX compile features

9 1.739 -- Detecting CXX compile features - done

9 1.743 -- Configuring build system on Linux machine

9 1.745 -- Using /usr/bin/python3 as buildsys python.

9 1.761 -- Release mode: Compiling with debug symbols by default. To disable set the BUILDSYS_RELEASE_NDEBUG variable.

9 1.765 -- using /vts-tools/tools/buildsys/cmake/tools/file2cpp/file2cpp as file2cpp

9 1.766 -- using /vts-tools/tools/buildsys/cmake/tools/sqlite32cpp/sqlite32db as sqlite32db

9 1.768 -- using /vts-tools/tools/buildsys/cmake/tools/py2cpp/py2pyc as py2pyc

9 1.769 -- using /vts-tools/tools/buildsys/cmake/tools/pathstrip/pathstrip as pathstrip

9 1.775 -- using /vts-tools/tools/buildsys/cmake/tools/py-runnable/py-runnable as py-runnable

9 1.776 -- using /vts-tools/tools/buildsys/cmake/tools/compile-pyc/compile-pyc as compile-pyc

9 1.776 -- Setting up project , version .

9 1.777 -- *** Defaulting to Release build type.

9 1.777 -- Enabled C++14 for C++ (GNU)

9 1.777 -- Enabled C11 for C (GNU)

9 1.783 -- Looking for pthread.h

9 1.908 -- Looking for pthread.h - found

9 1.909 -- Performing Test CMAKE_HAVE_LIBC_PTHREAD

9 2.017 -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed

9 2.017 -- Looking for pthread_create in pthreads

9 2.106 -- Looking for pthread_create in pthreads - not found

9 2.107 -- Looking for pthread_create in pthread

9 2.213 -- Looking for pthread_create in pthread - found

9 2.225 -- Found Threads: TRUE

9 2.619 -- Found OpenMP_C: -fopenmp (found version "4.5")

9 2.752 -- Found OpenMP_CXX: -fopenmp (found version "4.5")

9 2.754 -- Found OpenMP: TRUE (found version "4.5")

9 2.756 -- Found OpenMP.

9 2.835 -- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.46") found components: thread program_options filesystem system date_time serialization regex chrono iostreams

9 2.871 -- Found OpenCV: /usr (found version "4.2.0")

9 2.884 -- Found GDAL: /usr/lib/libgdal.so (found version "3.4.0")

9 2.897 -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")

9 3.016 CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):

9 3.016 Could NOT find Proj (missing: PROJ_INCLUDE_DIRS)

9 3.016 Call Stack (most recent call first):

9 3.016 /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)

9 3.016 buildsys/cmake/Modules/FindProj.cmake:29 (find_package_handle_standard_args)

9 3.016 CMakeLists.txt:29 (find_package)

9 3.016

9 3.016

9 3.017 -- Configuring incomplete, errors occurred!

9 3.017 See also "/vts-tools/tools/build/CMakeFiles/CMakeOutput.log".

9 3.017 See also "/vts-tools/tools/build/CMakeFiles/CMakeError.log".

9 3.030 make: *** [Makefile:23: all] Error 1

`

proj is installed using the package manager. Until now, everything was fine.

Any Idea on how to fix this ?

AriemX commented 2 years ago

Well,

Here is the culprit for anyone having this issue : add-apt-repository ppa:ubuntugis/ubuntugis-unstable

I just had to remove it...

vaclavblazek commented 2 years ago

Oh, yeah, too new SW.

a180285 commented 2 years ago

Hi @AriemX , can you help share dockerfile for building? I'm also meet some build issues. Thanks very much

AriemX commented 2 years ago

Here is the vts related part of my own docker image. I don't share the whole image here as the rest is specific to my use case and will not be usefull to anyone.

`FROM ubuntu:focal

EXPOSE 3060 EXPOSE 3070 EXPOSE 8100

RUN apt update &&\ DEBIAN_FRONTEND=noninteractive apt-get -yq install g++ git curl cmake software-properties-common &&\ apt upgrade -yq &&\ curl -sL https://deb.nodesource.com/setup_15.x -o nodesource_setup.sh &&\ apt update && \ apt install \ libboost-dev \ libboost-thread-dev \ libboost-program-options-dev \ libboost-filesystem-dev \ libboost-regex-dev \ libboost-iostreams-dev\ libboost-python-dev \ libopencv-dev libopencv-core-dev libopencv-highgui-dev \ libopencv-photo-dev libopencv-imgproc-dev libeigen3-dev libgdal-dev \ libproj-dev proj-bin libgeographic-dev libjsoncpp-dev \ libprotobuf-dev protobuf-compiler libprocps-dev libmagic-dev gawk sqlite3 gdal-bin unzip libmarkdown2-dev libassimp-dev libtinyxml2-dev libfftw3-dev nodejs npm jq -y &&\ apt-get clean -y

RUN npm install -g pm2 &&\ npm install togs

RUN git clone --recursive https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh.git &&\ git clone --recursive --depth 1 --branch debian/1.99 https://github.com/Melown/vts-tools.git &&\ git clone --recursive --depth 1 --branch debian/1.36 https://github.com/Melown/vts-vtsd.git &&\ git clone --recursive --depth 1 --branch debian/1.76 https://github.com/melowntech/vts-mapproxy.git &&\ git clone --recursive --depth 1 --branch debian/1.26 https://github.com/Melown/vts-registry.git

RUN cd OpenMesh \ && mkdir build \ && cd build \ && cmake .. \ && make -j4 \ && make install

RUN cd vts-tools/tools \ && make -j4 \ && make install

RUN cd vts-vtsd/vtsd \ && make -j4 \ && make install

RUN cd vts-mapproxy/mapproxy \ && make -j4 \ && make install

RUN cd vts-registry/registry \ && make -j4 \ && make install`

I know it's not fully optimized. It may be relevent to move all the git cloning part outside of the image depending on your CI/CD pipeline. I just don't had the time to do yet.

Hope it works for you !

a180285 commented 2 years ago

Hi @AriemX, it's very useful. And thank you again.