microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
23.26k stars 6.41k forks source link

[qt5-3d] build failure #27827

Closed JuntingLee closed 2 years ago

JuntingLee commented 2 years ago

Host Environment

To Reproduce

Steps to reproduce the behavior:

./vcpkg install colmap[cuda,tests]:x64-linux

Failure logs the console output

Computing installation plan...
The following packages will be built and installed:
  * cgal[core,qt]:x64-linux -> 5.5.1
    colmap[core,cuda,tests]:x64-linux -> 2022-03-14#1
  * cuda[core]:x64-linux -> 10.1#11
  * freeimage[core]:x64-linux -> 3.18.0#24
  * glew[core]:x64-linux -> 2.2.0
  * imath[core]:x64-linux -> 3.1.5
  * jxrlib[core]:x64-linux -> 2019.10.9#5
  * lcms[core]:x64-linux -> 2.14
  * libraw[core]:x64-linux -> 201903#10
  * openexr[core]:x64-linux -> 3.1.5
  * openjpeg[core]:x64-linux -> 2.5.0
  * qt5-3d[core]:x64-linux -> 5.15.7
  * qt5-script[core]:x64-linux -> 5.15.7
  * qt5-tools[core]:x64-linux -> 5.15.7
  * qt5-xmlpatterns[core]:x64-linux -> 5.15.7
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-linux...
Restored 0 package(s) from /home/mikeli/.cache/vcpkg/archives in 334.9 us. Use --debug to see more details.
Installing 1/15 qt5-3d:x64-linux...
Building qt5-3d[core]:x64-linux...
-- Using cached qt3d-everywhere-opensource-src-5.15.7.tar.xz.
-- Cleaning sources at /home/mikeli/vcpkg/buildtrees/qt5-3d/src/5.15.7-add36fcc75.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source /home/mikeli/vcpkg/downloads/qt3d-everywhere-opensource-src-5.15.7.tar.xz
-- Using source at /home/mikeli/vcpkg/buildtrees/qt5-3d/src/5.15.7-add36fcc75.clean
-- Getting CMake variables for x64-linux-dbg
-- Getting CMake variables for x64-linux-rel
-- Configuring x64-linux-rel
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:96 (message):
    Command failed: /home/mikeli/vcpkg/installed/x64-linux/tools/qt5/bin/qmake CONFIG-=debug CONFIG+=release QMAKE_CC=cc QMAKE_CXX=c++ QMAKE_AR=ar QMAKE_RANLIB=ranlib QMAKE_STRIP=strip QMAKE_NM=nm QMAKE_RC= QMAKE_MT= QMAKE_AR+=qc QMAKE_LINK=c++ QMAKE_LINK_SHLIB=c++ QMAKE_LINK_C=cc QMAKE_LINK_C_SHLIB=cc "QMAKE_CFLAGS_RELEASE+=-fPIC -O3 -DNDEBUG" "QMAKE_CXXFLAGS_RELEASE+=-fPIC -O3 -DNDEBUG" CONFIG-=shared CONFIG*=static /home/mikeli/vcpkg/buildtrees/qt5-3d/src/5.15.7-add36fcc75.clean -qtconf /home/mikeli/vcpkg/buildtrees/qt5-3d/x64-linux-rel/qt.conf -- -system-assimp "ASSIMP_LIBS=/home/mikeli/vcpkg/installed/x64-linux/lib/libassimp.a /home/mikeli/vcpkg/installed/x64-linux/lib/libpugixml.a /home/mikeli/vcpkg/installed/x64-linux/lib/libpoly2tri.a /home/mikeli/vcpkg/installed/x64-linux/lib/libjpeg.a /home/mikeli/vcpkg/installed/x64-linux/lib/libpng16.a /home/mikeli/vcpkg/installed/x64-linux/lib/libkubazip.a /home/mikeli/vcpkg/installed/x64-linux/lib/libminizip.a /home/mikeli/vcpkg/installed/x64-linux/lib/libbz2.a /home/mikeli/vcpkg/installed/x64-linux/lib/libz.a -lGL -lXxf86vm -lX11"
    Working Directory: /home/mikeli/vcpkg/buildtrees/qt5-3d/x64-linux-rel
    Error code: 3
    See logs for more information:
      /home/mikeli/vcpkg/buildtrees/qt5-3d/config-x64-linux-rel-config.log
      /home/mikeli/vcpkg/buildtrees/qt5-3d/config-x64-linux-rel-out.log
      /home/mikeli/vcpkg/buildtrees/qt5-3d/config-x64-linux-rel-err.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_configure_qmake.cmake:104 (vcpkg_execute_required_process)
  installed/x64-linux/share/qt5/qt_build_submodule.cmake:9 (vcpkg_configure_qmake)
  installed/x64-linux/share/qt5/qt_submodule_installation.cmake:9 (qt_build_submodule)
  ports/qt5-3d/portfile.cmake:53 (qt_submodule_installation)
  scripts/ports.cmake:147 (include)

config-x64-linux-rel-config.log:

Command line: -system-assimp 'ASSIMP_LIBS=/home/mikeli/vcpkg/installed/x64-linux/lib/libassimp.a /home/mikeli/vcpkg/installed/x64-linux/lib/libpugixml.a /home/mikeli/vcpkg/installed/x64-linux/lib/libpoly2tri.a /home/mikeli/vcpkg/installed/x64-linux/lib/libjpeg.a /home/mikeli/vcpkg/installed/x64-linux/lib/libpng16.a /home/mikeli/vcpkg/installed/x64-linux/lib/libkubazip.a /home/mikeli/vcpkg/installed/x64-linux/lib/libminizip.a /home/mikeli/vcpkg/installed/x64-linux/lib/libbz2.a /home/mikeli/vcpkg/installed/x64-linux/lib/libz.a -lGL -lXxf86vm -lX11'
Global lib dirs: [/home/mikeli/vcpkg/installed/x64-linux/lib /home/mikeli/vcpkg/installed/x64-linux/lib/manual-link] [/usr/lib/gcc/x86_64-linux-gnu/9 /usr/lib/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib]
Global inc dirs: [/home/mikeli/vcpkg/installed/x64-linux/include/qt5/../ /home/mikeli/vcpkg/installed/x64-linux/include/qt5] [/usr/include/c++/9 /usr/include/x86_64-linux-gnu/c++/9 /usr/include/c++/9/backward /usr/lib/gcc/x86_64-linux-gnu/9/include /usr/local/include /usr/include/x86_64-linux-gnu /usr/include]
looking for library assimp
Trying source 0 (type pkgConfig) of library assimp ...
+ /bin/pkg-config --exists --silence-errors assimp '>' 3.3.1
+ /bin/pkg-config --modversion assimp '>' 3.3.1
> 5.2.5
+ /bin/pkg-config --libs-only-L assimp '>' 3.3.1
> -L/home/mikeli/vcpkg/installed/x64-linux/lib/pkgconfig/../../lib
+ /bin/pkg-config --libs-only-l assimp '>' 3.3.1
> -llibassimp -lstdc++
+ /bin/pkg-config --cflags assimp '>' 3.3.1
> -I/home/mikeli/vcpkg/installed/x64-linux/lib/pkgconfig/../../include
+ cd /home/mikeli/vcpkg/buildtrees/qt5-3d/x64-linux-rel/config.tests/assimp && /home/mikeli/vcpkg/installed/x64-linux/tools/qt5/bin/qmake -qtconf /home/mikeli/vcpkg/buildtrees/qt5-3d/x64-linux-rel/qt.conf "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static warn_off console single_arch" 'QMAKE_LIBDIR += /home/mikeli/vcpkg/installed/x64-linux/lib /home/mikeli/vcpkg/installed/x64-linux/lib/manual-link' 'INCLUDEPATH += /home/mikeli/vcpkg/installed/x64-linux/include/qt5/../ /home/mikeli/vcpkg/installed/x64-linux/include/qt5' 'QMAKE_USE += assimp' 'QMAKE_LIBS_ASSIMP = -L/home/mikeli/vcpkg/installed/x64-linux/lib/pkgconfig/../../lib -llibassimp -lstdc++' 'QMAKE_INCDIR_ASSIMP = /home/mikeli/vcpkg/installed/x64-linux/lib/pkgconfig/../../include' /home/mikeli/vcpkg/buildtrees/qt5-3d/src/5.15.7-add36fcc75.clean/config.tests/assimp
> Info: creating stash file /home/mikeli/vcpkg/buildtrees/qt5-3d/x64-linux-rel/config.tests/.qmake.stash
+ cd /home/mikeli/vcpkg/buildtrees/qt5-3d/x64-linux-rel/config.tests/assimp && MAKEFLAGS= make
> g++ -c -pipe -O2 -w -fPIC  -I/home/mikeli/vcpkg/buildtrees/qt5-3d/src/5.15.7-add36fcc75.clean/config.tests/assimp -I. -I/home/mikeli/vcpkg/installed/x64-linux/include -I/home/mikeli/vcpkg/installed/x64-linux/include/qt5 -I/home/mikeli/vcpkg/installed/x64-linux/include -I/home/mikeli/vcpkg/installed/x64-linux/tools/qt5/mkspecs/linux-g++ -o main.o /home/mikeli/vcpkg/buildtrees/qt5-3d/src/5.15.7-add36fcc75.clean/config.tests/assimp/main.cpp
> g++ -Wl,-O1 -o assimp main.o   -L/home/mikeli/vcpkg/installed/x64-linux/lib -L/home/mikeli/vcpkg/installed/x64-linux/lib/manual-link -L/home/mikeli/vcpkg/installed/x64-linux/lib/pkgconfig/../../lib -llibassimp -lstdc++   
> /usr/bin/ld: cannot find -llibassimp
> collect2: error: ld returned 1 exit status
> make: *** [Makefile:67: assimp] Error 1
 => source failed verification.
Trying source 1 (type inline) of library assimp ...
+ cd /home/mikeli/vcpkg/buildtrees/qt5-3d/x64-linux-rel/config.tests/assimp && /home/mikeli/vcpkg/installed/x64-linux/tools/qt5/bin/qmake -qtconf /home/mikeli/vcpkg/buildtrees/qt5-3d/x64-linux-rel/qt.conf "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static warn_off console single_arch" 'QMAKE_LIBDIR += /home/mikeli/vcpkg/installed/x64-linux/lib /home/mikeli/vcpkg/installed/x64-linux/lib/manual-link' 'INCLUDEPATH += /home/mikeli/vcpkg/installed/x64-linux/include/qt5/../ /home/mikeli/vcpkg/installed/x64-linux/include/qt5' 'QMAKE_USE += assimp' 'QMAKE_LIBS_ASSIMP = /home/mikeli/vcpkg/installed/x64-linux/lib/libassimp.a /home/mikeli/vcpkg/installed/x64-linux/lib/libpugixml.a /home/mikeli/vcpkg/installed/x64-linux/lib/libpoly2tri.a /home/mikeli/vcpkg/installed/x64-linux/lib/libjpeg.a /home/mikeli/vcpkg/installed/x64-linux/lib/libpng16.a /home/mikeli/vcpkg/installed/x64-linux/lib/libkubazip.a /home/mikeli/vcpkg/installed/x64-linux/lib/libminizip.a /home/mikeli/vcpkg/installed/x64-linux/lib/libbz2.a /home/mikeli/vcpkg/installed/x64-linux/lib/libz.a -lGL -lXxf86vm -lX11' /home/mikeli/vcpkg/buildtrees/qt5-3d/src/5.15.7-add36fcc75.clean/config.tests/assimp
+ cd /home/mikeli/vcpkg/buildtrees/qt5-3d/x64-linux-rel/config.tests/assimp && MAKEFLAGS= make clean && MAKEFLAGS= make
> rm -f main.o
> rm -f *~ core *.core
> g++ -c -pipe -O2 -w -fPIC  -I/home/mikeli/vcpkg/buildtrees/qt5-3d/src/5.15.7-add36fcc75.clean/config.tests/assimp -I. -I/home/mikeli/vcpkg/installed/x64-linux/include -I/home/mikeli/vcpkg/installed/x64-linux/include/qt5 -I/home/mikeli/vcpkg/installed/x64-linux/tools/qt5/mkspecs/linux-g++ -o main.o /home/mikeli/vcpkg/buildtrees/qt5-3d/src/5.15.7-add36fcc75.clean/config.tests/assimp/main.cpp
> g++ -Wl,-O1 -o assimp main.o   -L/home/mikeli/vcpkg/installed/x64-linux/lib -L/home/mikeli/vcpkg/installed/x64-linux/lib/manual-link /home/mikeli/vcpkg/installed/x64-linux/lib/libassimp.a /home/mikeli/vcpkg/installed/x64-linux/lib/libpugixml.a /home/mikeli/vcpkg/installed/x64-linux/lib/libpoly2tri.a /home/mikeli/vcpkg/installed/x64-linux/lib/libjpeg.a /home/mikeli/vcpkg/installed/x64-linux/lib/libpng16.a /home/mikeli/vcpkg/installed/x64-linux/lib/libkubazip.a /home/mikeli/vcpkg/installed/x64-linux/lib/libminizip.a /home/mikeli/vcpkg/installed/x64-linux/lib/libbz2.a /home/mikeli/vcpkg/installed/x64-linux/lib/libz.a -lGL -lXxf86vm -lX11   
> /usr/bin/ld: cannot find -lXxf86vm
> collect2: error: ld returned 1 exit status
> make: *** [Makefile:67: assimp] Error 1
 => source failed verification.
test config.qt3d_core.libraries.assimp FAILED
looking for library fbx
Trying source 0 (type fbx) of library fbx ...
+ cd /home/mikeli/vcpkg/buildtrees/qt5-3d/x64-linux-rel/config.tests/fbx && /home/mikeli/vcpkg/installed/x64-linux/tools/qt5/bin/qmake -qtconf /home/mikeli/vcpkg/buildtrees/qt5-3d/x64-linux-rel/qt.conf "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += static warn_off console single_arch" 'QMAKE_LIBDIR += /home/mikeli/vcpkg/installed/x64-linux/lib /home/mikeli/vcpkg/installed/x64-linux/lib/manual-link' 'INCLUDEPATH += /home/mikeli/vcpkg/installed/x64-linux/include/qt5/../ /home/mikeli/vcpkg/installed/x64-linux/include/qt5' 'QMAKE_USE += fbx' 'QMAKE_LIBS_FBX = -lfbxsdk' /home/mikeli/vcpkg/buildtrees/qt5-3d/src/5.15.7-add36fcc75.clean/config.tests/fbx
+ cd /home/mikeli/vcpkg/buildtrees/qt5-3d/x64-linux-rel/config.tests/fbx && MAKEFLAGS= make
> g++ -c -pipe -O2 -w -fPIC  -I/home/mikeli/vcpkg/buildtrees/qt5-3d/src/5.15.7-add36fcc75.clean/config.tests/fbx -I. -I/home/mikeli/vcpkg/installed/x64-linux/include -I/home/mikeli/vcpkg/installed/x64-linux/include/qt5 -I/home/mikeli/vcpkg/installed/x64-linux/tools/qt5/mkspecs/linux-g++ -o main.o /home/mikeli/vcpkg/buildtrees/qt5-3d/src/5.15.7-add36fcc75.clean/config.tests/fbx/main.cpp
> /home/mikeli/vcpkg/buildtrees/qt5-3d/src/5.15.7-add36fcc75.clean/config.tests/fbx/main.cpp:29:10: fatal error: fbxsdk.h: No such file or directory
>    29 | #include <fbxsdk.h>
>       |          ^~~~~~~~~~
> compilation terminated.
> make: *** [Makefile:381: main.o] Error 1
 => source failed verification.
test config.qt3d_geometryloaders.libraries.fbx FAILED

config-x64-linux-rel-out.log:

Info: creating stash file /home/mikeli/vcpkg/buildtrees/qt5-3d/x64-linux-rel/.qmake.stash
Info: creating cache file /home/mikeli/vcpkg/buildtrees/qt5-3d/x64-linux-rel/.qmake.cache

config-x64-linux-rel-err.log:

Running configuration tests...
Checking for Assimp... no
Checking for Autodesk FBX... no
Done running configuration tests.

Configure summary:

Qt 3D:
  Assimp ................................. yes
  System Assimp .......................... no
  Output Qt3D GL traces .................. no
  Use SSE2 instructions .................. yes
  Use AVX2 instructions .................. no
  Aspects:
    Render aspect ........................ yes
    Input aspect ......................... yes
    Logic aspect ......................... yes
    Animation aspect ..................... yes
    Extras aspect ........................ yes
Qt 3D Renderers:
  OpenGL Renderer ........................ yes
  RHI Renderer ........................... no
Qt 3D GeometryLoaders:
  Autodesk FBX ........................... no

ERROR: Feature 'system-assimp' was enabled, but the pre-condition 'features.assimp && libs.assimp' failed.

Check config.log for details.

Additional context

I use vcpkg to install colmap but qt5-3d can't be installed correctly

Neumann-A commented 2 years ago

Relevant error: Feature 'system-assimp' was enabled, but the pre-condition 'features.assimp && libs.assimp' failed.

> g++ -Wl,-O1 -o assimp main.o   -L/home/mikeli/vcpkg/installed/x64-linux/lib -L/home/mikeli/vcpkg/installed/x64-linux/lib/manual-link -L/home/mikeli/vcpkg/installed/x64-linux/lib/pkgconfig/../../lib -llibassimp -lstdc++   
> /usr/bin/ld: cannot find -llibassimp

together with /home/mikeli/vcpkg/installed/x64-linux/lib/libassimp.a Makes not that much sense. But also

> g++ -Wl,-O1 -o assimp main.o   -L/home/mikeli/vcpkg/installed/x64-linux/lib -L/home/mikeli/vcpkg/installed/x64-linux/lib/manual-link /home/mikeli/vcpkg/installed/x64-linux/lib/libassimp.a /home/mikeli/vcpkg/installed/x64-linux/lib/libpugixml.a /home/mikeli/vcpkg/installed/x64-linux/lib/libpoly2tri.a /home/mikeli/vcpkg/installed/x64-linux/lib/libjpeg.a /home/mikeli/vcpkg/installed/x64-linux/lib/libpng16.a /home/mikeli/vcpkg/installed/x64-linux/lib/libkubazip.a /home/mikeli/vcpkg/installed/x64-linux/lib/libminizip.a /home/mikeli/vcpkg/installed/x64-linux/lib/libbz2.a /home/mikeli/vcpkg/installed/x64-linux/lib/libz.a -lGL -lXxf86vm -lX11   
> /usr/bin/ld: cannot find -lXxf86vm

indicates a missing system dependency on libXxf86vm. So try installing libxxf86vm-dev

JuntingLee commented 2 years ago

Relevant error: Feature 'system-assimp' was enabled, but the pre-condition 'features.assimp && libs.assimp' failed.

> g++ -Wl,-O1 -o assimp main.o   -L/home/mikeli/vcpkg/installed/x64-linux/lib -L/home/mikeli/vcpkg/installed/x64-linux/lib/manual-link -L/home/mikeli/vcpkg/installed/x64-linux/lib/pkgconfig/../../lib -llibassimp -lstdc++   
> /usr/bin/ld: cannot find -llibassimp

together with /home/mikeli/vcpkg/installed/x64-linux/lib/libassimp.a Makes not that much sense. But also

> g++ -Wl,-O1 -o assimp main.o   -L/home/mikeli/vcpkg/installed/x64-linux/lib -L/home/mikeli/vcpkg/installed/x64-linux/lib/manual-link /home/mikeli/vcpkg/installed/x64-linux/lib/libassimp.a /home/mikeli/vcpkg/installed/x64-linux/lib/libpugixml.a /home/mikeli/vcpkg/installed/x64-linux/lib/libpoly2tri.a /home/mikeli/vcpkg/installed/x64-linux/lib/libjpeg.a /home/mikeli/vcpkg/installed/x64-linux/lib/libpng16.a /home/mikeli/vcpkg/installed/x64-linux/lib/libkubazip.a /home/mikeli/vcpkg/installed/x64-linux/lib/libminizip.a /home/mikeli/vcpkg/installed/x64-linux/lib/libbz2.a /home/mikeli/vcpkg/installed/x64-linux/lib/libz.a -lGL -lXxf86vm -lX11   
> /usr/bin/ld: cannot find -lXxf86vm

indicates a missing system dependency on libXxf86vm. So try installing libxxf86vm-dev

@Neumann-A Thanks a lot, it works!