Created attachment 761044 [details] emerge --info '=sci-libs/flann-1.9.1-r4::gentoo' * Package: sci-libs/flann-1.9.1-r4 * Repository: gentoo * Maintainer: sci@gentoo.org * USE: abi_x86_64 amd64 elibc_glibc kernel_linux octave openmp userland_GNU * FEATURES: network-sandbox preserve-libs sandbox splitdebug userpriv usersandbox >>> Unpacking source... >>> Unpacking flann-1.9.1.tar.gz to /gentoo/tmp/portage/sci-libs/flann-1.9.1-r4/work >>> Source unpacked in /gentoo/tmp/portage/sci-libs/flann-1.9.1-r4/work >>> Preparing source in /gentoo/tmp/portage/sci-libs/flann-1.9.1-r4/work/flann-1.9.1 ... * Source directory (CMAKE_USE_DIR): "/gentoo/tmp/portage/sci-libs/flann-1.9.1-r4/work/flann-1.9.1" * Build directory (BUILD_DIR): "/gentoo/tmp/portage/sci-libs/flann-1.9.1-r4/work/flann-1.9.1_build" * Applying flann-1.9.1-cmake-3.11.patch ... [ ok ] * Applying flann-1.9.1-cmake-3.11-1.patch ... [ ok ] * Applying flann-1.9.1-cuda-9.patch ... [ ok ] * Applying flann-1.9.1-system-lz4.patch ... patching file CMakeLists.txt patching file cmake/flann.pc.in patching file examples/CMakeLists.txt Hunk #2 succeeded at 15 with fuzz 1. patching file src/cpp/CMakeLists.txt patching file src/cpp/flann/util/serialization.h [ ok ] * Applying flann-1.9.1-system-lz4-pkgconfig.patch ... [ ok ] * Hardcoded definition(s) removed in CMakeLists.txt: * set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Build type" FORCE) >>> Source prepared. >>> Configuring source in /gentoo/tmp/portage/sci-libs/flann-1.9.1-r4/work/flann-1.9.1 ... * Source directory (CMAKE_USE_DIR): "/gentoo/tmp/portage/sci-libs/flann-1.9.1-r4/work/flann-1.9.1" * Build directory (BUILD_DIR): "/gentoo/tmp/portage/sci-libs/flann-1.9.1-r4/work/flann-1.9.1_build" cmake -C /gentoo/tmp/portage/sci-libs/flann-1.9.1-r4/work/flann-1.9.1_build/gentoo_common_config.cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_C_BINDINGS=ON -DBUILD_PYTHON_BINDINGS=OFF -DPYTHON_EXECUTABLE= -DBUILD_CUDA_LIB=no -DBUILD_EXAMPLES=no -DBUILD_DOC=no -DBUILD_TESTS=OFF -DBUILD_MATLAB_BINDINGS=yes -DUSE_MPI=no -DUSE_OPENMP=yes -DCMAKE_BUILD_TYPE=Gentoo -DCMAKE_TOOLCHAIN_FILE=/gentoo/tmp/portage/sci-libs/flann-1.9.1-r4/work/flann-1.9.1_build/gentoo_toolchain.cmake /gentoo/tmp/portage/sci-libs/flann-1.9.1-r4/work/flann-1.9.1 loading initial cache file /gentoo/tmp/portage/sci-libs/flann-1.9.1-r4/work/flann-1.9.1_build/gentoo_common_config.cmake -- The C compiler identification is GNU 11.2.1 -- The CXX compiler identification is GNU 11.2.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/x86_64-pc-linux-gnu-gcc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/x86_64-pc-linux-gnu-g++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) -- Found HDF5: hdf5-shared (found version "1.12.1") -- Found GTest: /usr/lib64/cmake/GTest/GTestConfig.cmake (found version "1.11.0") -- Found OpenMP_C: -fopenmp (found version "4.5") -- Found OpenMP_CXX: -fopenmp (found version "4.5") -- Found OpenMP: TRUE (found version "4.5") -- Found PkgConfig: /usr/bin/x86_64-pc-linux-gnu-pkg-config (found version "1.8.0") -- Checking for module 'liblz4' -- Found liblz4, version 1.9.3 CMake Error at src/matlab/CMakeLists.txt:19 (get_property): The LOCATION property may not be read from target "flann_s". Use the target name directly with add_custom_command, or use the generator expression $<TARGET_FILE>, as appropriate. CMake Error at src/matlab/CMakeLists.txt:20 (get_filename_component): get_filename_component called with incorrect number of arguments -- Configuring incomplete, errors occurred! See also "/gentoo/tmp/portage/sci-libs/flann-1.9.1-r4/work/flann-1.9.1_build/CMakeFiles/CMakeOutput.log". * ERROR: sci-libs/flann-1.9.1-r4::gentoo failed (configure phase): * cmake failed * * Call stack: * ebuild.sh, line 127: Called src_configure * environment, line 2225: Called cmake_src_configure * environment, line 966: Called die * The specific snippet of code: * "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed"; * * If you need support, post the output of `emerge --info '=sci-libs/flann-1.9.1-r4::gentoo'`, * the complete build log and the output of `emerge -pqv '=sci-libs/flann-1.9.1-r4::gentoo'`. * The complete build log is located at '/var/log/portage/sci-libs:flann-1.9.1-r4:20220102-005117.log.gz'. * The ebuild environment file is located at '/gentoo/tmp/portage/sci-libs/flann-1.9.1-r4/temp/environment'. * Working directory: '/gentoo/tmp/portage/sci-libs/flann-1.9.1-r4/work/flann-1.9.1_build' * S: '/gentoo/tmp/portage/sci-libs/flann-1.9.1-r4/work/flann-1.9.1'
Out of interest, do you need USE=octave for this package? It's really on life support and I'm considering masking that USE flag rather than applying yet another heap of patches. Possible that something from https://github.com/flann-lib/flann/pull/343 could help though.
(In reply to Sam James from comment #1) > Out of interest, do you need USE=octave for this package? Nope. > It's really on life support and I'm considering masking that USE flag rather > than applying yet another heap of patches. That's fine by me. > Possible that something from > https://github.com/flann-lib/flann/pull/343 could help though.
(In reply to Sam James from comment #1) > Out of interest, do you need USE=octave for this package? > > It's really on life support and I'm considering masking that USE flag rather > than applying yet another heap of patches. Possible that something from > https://github.com/flann-lib/flann/pull/343 could help though. Could you reconsider? it's just a simple cmake issue; a proposed pathch is following.
Created attachment 765220 [details, diff] flann-1.9.1-fix-matlab-cmake.patch
(In reply to Fat-Zer from comment #3) > (In reply to Sam James from comment #1) > > Out of interest, do you need USE=octave for this package? > > > > It's really on life support and I'm considering masking that USE flag rather > > than applying yet another heap of patches. Possible that something from > > https://github.com/flann-lib/flann/pull/343 could help though. > > Could you reconsider? it's just a simple cmake issue; a proposed pathch is > following. There's a huge heap of patches and I'd rather not add another one, but I guess fine if it's useful to you. Please provide a git am-able patch with GCO sign off I can apply to gentoo.git directly.
The patch actually clobbers with the sed'ing inside the ebuild (patches are applied after `sed`). Would you like me to incorporate it into the patch? ------------------- sed command from the ebuild for reference: ------------------- sed -i \ -e 's/--mex//' \ -e 's/\.mex/\.oct/' \ -e '/FILES/s/${MEX_FILE}//' \ -e 's:share/flann/octave:share/octave/site/m:' \ -e "/CUSTOM_TARGET/a\INSTALL(FILES \${MEX_FILE} DESTINATION libexec/octave/site/oct/${CHOST})" \ src/matlab/CMakeLists.txt || die
Created attachment 765275 [details, diff] A simple patch
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e0b5dc2646707633bf113215c122a8f045476b1 commit 7e0b5dc2646707633bf113215c122a8f045476b1 Author: Alexander Golubev <fatzer2@gmail.com> AuthorDate: 2022-02-16 22:05:23 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-02-18 03:05:14 +0000 sci-libs/flann: revbump to fix MATLAB support + Avoid sed'ing cmake files + Install octave files to a more opropriate locationa Bug: https://bugs.gentoo.org/830424 Signed-off-by: Alexander Golubev <fatzer2@gmail.com> Signed-off-by: Sam James <sam@gentoo.org> ...uild-oct-rather-than-mex-files-for-octave.patch | 81 ++++++++++++++++++++ sci-libs/flann/flann-1.9.1-r5.ebuild | 88 ++++++++++++++++++++++ 2 files changed, 169 insertions(+)