BRL-CAD / brlcad

BRL-CAD is a powerful cross-platform open source combinatorial solid modeling system
https://brlcad.org
Other
723 stars 147 forks source link

[Linux] Failed to compile: Could NOT find OpenVDB (missing: OpenVDB_LIB_COMPONENTS) #91

Open kevinsmia1939 opened 1 year ago

kevinsmia1939 commented 1 year ago

Hi,

I am trying to package BRL-CAD in Flatpak for Linux distros with OpenVDB. It failed to build as shown below. I think it just the matter of specifying the correct directory for OpenVDB and Ilmbase. but I do not know what flag I should use.

BRL-CAD rel-7-34-2 is the flags as shown.

      cflags: -Wno-error=stringop-overflow -Wno-error=format-truncation -Wno-error=inline
        -Wno-error=format-overflow -Wno-error=dangling-pointer -Wno-error=array-bounds -Wno-error=nonnull -Wno-error=maybe-uninitialized -Wno-error=alloc-size-larger-than=
      cxxflags: -Wno-error=stringop-overflow -Wno-error=format-truncation -Wno-error=inline
        -Wno-error=format-overflow -Wno-error=dangling-pointer -Wno-error=array-bounds -Wno-error=nonnull -Wno-error=maybe-uninitialized -Wno-error=alloc-size-larger-than=
      - -DBRLCAD_BUNDLED_LIBS=ON
      - -DBUILD_STATIC_LIBS:BOOL=OFF
      - -DBRLCAD_EXTRADOCS:BOOL=OFF
      - -DBUILD_TESTING:BOOL=OFF
      - -DBRLCAD_OPTIMIZED:BOOL=ON
      - -DBRLCAD_ENABLE_QT:BOOL=ON
      - -DBRLCAD_ENABLE_OPENVDB:BOOL=ON
      - -DOPENVDB_ABI_VERSION_NUMBER=10
      - -DOpenVDB_INCLUDE_DIR=/app/include
      - -DOpenVDB_LIB_COMPONENTS=/app/lib
      - -DIlmBase_INCLUDE_DIR=/app/include
***********************************************************
*        Stage 1 of 9 - Top Level Configure Options       *
***********************************************************
-- Found X11: /usr/include   
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so   
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
DEBUG;Promoting target to global: 'Qt6::moc'
DEBUG;Promoting target to global: 'Qt6::rcc'
DEBUG;Promoting target to global: 'Qt6::tracepointgen'
DEBUG;Promoting target to global: 'Qt6::tracegen'
DEBUG;Promoting target to global: 'Qt6::cmake_automoc_parser'
DEBUG;Promoting target to global: 'Qt6::qlalr'
DEBUG;Promoting target to global: 'Qt6::qtpaths'
DEBUG;Promoting target to global: 'Qt6::androiddeployqt'
DEBUG;Promoting target to global: 'Qt6::androidtestrunner'
DEBUG;Promoting target to global: 'Qt6::qmake'
DEBUG;Promoting target to global: 'Qt6::qvkgen'
DEBUG;Promoting target to global: 'Qt6::uic'
DEBUG;Promoting target to global: 'Qt6::qdbuscpp2xml'
DEBUG;Promoting target to global: 'Qt6::qdbusxml2cpp'
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.9.5") 
-- Could NOT find OpenVDB (missing: OpenVDB_LIB_COMPONENTS) (found version "10.0.1")
-- OpenVDB ABI Version: 10
CMake Error at misc/CMake/BRLCAD_Util.cmake:104 (_message):
  Could NOT find IlmBase (missing: IlmBase_LIB_COMPONENTS Half)
Call Stack (most recent call first):
  /usr/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:230 (message)
  /usr/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  misc/CMake/FindIlmBase.cmake:293 (find_package_handle_standard_args)
  misc/CMake/FindOpenVDB.cmake:317 (find_package)
  misc/CMake/BRLCAD_User_Options.cmake:308 (find_package)
  CMakeLists.txt:482 (include)

-- Configuring incomplete, errors occurred!

The PREFIX is /app in Flatpak file system hierarchy

Here is where OpenVDB and the Half are.

/app/bin/vdb_print
/app/include/openvdb/openvdb.h
/app/lib/libopenvdb.so.10.0.1
/app/lib/debug/bin/vdb_print.debug
/app/lib/debug/lib/libopenvdb.so.10.0.1.debug
/app/lib/debug/source/openvdb/openvdb/openvdb/openvdb.cc
/app/lib/debug/source/openvdb/openvdb/openvdb/openvdb.h
/app/include/OpenEXR/half.h
/app/include/OpenEXR/halfExport.h
/app/include/OpenEXR/halfFunction.h
/app/include/OpenEXR/halfLimits.h
/app/include/openvdb/math/Half.h
/app/include/openvdb/math/HalfLimits.h
/app/lib/debug/source/openEXR/IlmBase/Half/half.cpp
/app/lib/debug/source/openEXR/IlmBase/Half/half.h
/app/lib/debug/source/openEXR/IlmBase/Half/halfFunction.h
/app/lib/debug/source/openEXR/IlmBase/Half/halfLimits.h
/app/lib/debug/source/openvdb/openvdb/openvdb/math/Half.cc
/app/lib/debug/source/openvdb/openvdb/openvdb/math/Half.h

Here is where IlmBase are.

/app/include/OpenEXR/IlmBaseConfig.h
/app/include/OpenEXR/IlmThread.h
/app/include/OpenEXR/IlmThreadExport.h
/app/include/OpenEXR/IlmThreadForward.h
/app/include/OpenEXR/IlmThreadMutex.h
/app/include/OpenEXR/IlmThreadNamespace.h
/app/include/OpenEXR/IlmThreadPool.h
/app/include/OpenEXR/IlmThreadSemaphore.h
/app/lib/cmake/IlmBase/IlmBaseConfig.cmake
/app/lib/cmake/IlmBase/IlmBaseConfigVersion.cmake
/app/lib/cmake/IlmBase/IlmBaseTargets-release.cmake
/app/lib/cmake/IlmBase/IlmBaseTargets.cmake
/app/lib/debug/source/openEXR/IlmBase/IlmThread/IlmThread.cpp
/app/lib/debug/source/openEXR/IlmBase/IlmThread/IlmThread.h
/app/lib/debug/source/openEXR/IlmBase/IlmThread/IlmThreadMutex.h
/app/lib/debug/source/openEXR/IlmBase/IlmThread/IlmThreadMutexPosix.cpp
/app/lib/debug/source/openEXR/IlmBase/IlmThread/IlmThreadMutexWin32.cpp
/app/lib/debug/source/openEXR/IlmBase/IlmThread/IlmThreadNamespace.h
/app/lib/debug/source/openEXR/IlmBase/IlmThread/IlmThreadPool.cpp
/app/lib/debug/source/openEXR/IlmBase/IlmThread/IlmThreadPool.h
/app/lib/debug/source/openEXR/IlmBase/IlmThread/IlmThreadSemaphore.h
/app/lib/debug/source/openEXR/IlmBase/IlmThread/IlmThreadSemaphorePosix.cpp
/app/lib/debug/source/openEXR/IlmBase/IlmThread/IlmThreadSemaphorePosixCompat.cpp
/app/lib/debug/source/openEXR/IlmBase/IlmThread/IlmThreadWin32.cpp
/app/lib/pkgconfig/IlmBase.pc

OpenVDB 10.0.1 is build with flag as shown. -DOPENVDB_CORE_STATIC:BOOL=OFF

OpenEXR v2.5.8 is build with the default flags.

cmake version 3.26.4 gcc (GCC) 12.2.0

openSUSE Tumbleweed KDE flatpak-builder 1.2.3