From f2c78f484b1ba37f94fa338910730456184f7cdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?DUBUS=20L=C3=A9o=20243615?= Date: Wed, 1 Oct 2025 13:59:02 +0200 Subject: [PATCH 1/3] build: :bug: fix missing so files in python libs --- src/python/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt index d90d85b..2f92b83 100644 --- a/src/python/CMakeLists.txt +++ b/src/python/CMakeLists.txt @@ -110,4 +110,11 @@ if(PIP_EXECUTABLE AND BUILD_WHEEL) install(CODE "execute_process(COMMAND ${PIP_EXECUTABLE} wheel ${CMAKE_CURRENT_SOURCE_DIR} -w ${CMAKE_INSTALL_PREFIX}/dist --no-deps)") endif() -# add_custom_command() \ No newline at end of file +# On Linux plateforms: +# Copy west shared libs to python/librir_west/libs with links, at it is not properly done by cmake install +if(UNIX AND NOT APPLE) + install(CODE "execute_process(COMMAND cp --verbose -a ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libtools.so.${CMAKE_PROJECT_VERSION} ${CMAKE_INSTALL_PREFIX}/python/librir/libs/)") + install(CODE "execute_process(COMMAND cp --verbose -a ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libgeometry.so.${CMAKE_PROJECT_VERSION} ${CMAKE_INSTALL_PREFIX}/python/librir/libs/)") + install(CODE "execute_process(COMMAND cp --verbose -a ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libsignal_processing.so.${CMAKE_PROJECT_VERSION} ${CMAKE_INSTALL_PREFIX}/python/librir/libs/)") + install(CODE "execute_process(COMMAND cp --verbose -a ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libvideo_io.so.${CMAKE_PROJECT_VERSION} ${CMAKE_INSTALL_PREFIX}/python/librir/libs/)") +endif() \ No newline at end of file From 966361cd2732ed41d513f16ddae908653f9f0645 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?DUBUS=20L=C3=A9o=20243615?= Date: Wed, 1 Oct 2025 13:59:28 +0200 Subject: [PATCH 2/3] chore: :see_no_evil: add src/cpp/rir_config.h to .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 1cebe8c..6d903a6 100644 --- a/.gitignore +++ b/.gitignore @@ -187,4 +187,5 @@ src/python/setup.py src/python/pyproject.toml src/python/README.md src/python/librir/libs -install \ No newline at end of file +install +src/cpp/rir_config.h \ No newline at end of file From 56343bc6127896edee6ddc3167146c3313f490d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?DUBUS=20L=C3=A9o=20243615?= Date: Fri, 3 Oct 2025 14:38:50 +0200 Subject: [PATCH 3/3] build: :fix: finally fixed $ORIGIN linkage in so file --- extra/ffmpeg/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extra/ffmpeg/CMakeLists.txt b/extra/ffmpeg/CMakeLists.txt index 6cc534f..7938049 100644 --- a/extra/ffmpeg/CMakeLists.txt +++ b/extra/ffmpeg/CMakeLists.txt @@ -164,7 +164,9 @@ set(FFMPEG_CONFIGURE_CMD export LD_LIBRARY_PATH=${3RD_64_INSTALL_DIR}/lib:$ENV{LD_LIBRARY_PATH} && export PKG_CONFIG_PATH=${3RD_64_INSTALL_DIR}/lib/pkgconfig:$ENV{PKG_CONFIG_PATH} && export OPENSSL_LIBS="-L/usr/lib64 -llibeay32 -lssleay32 -llibcrypto -luser32 -lgdi32 -lwsock32 -lws2_32" && - ./configure --arch=native --enable-asm --disable-libvpx --disable-libaom --disable-static --enable-shared --enable-libx264 --enable-libkvazaar --extra-cflags=-DKVZ_STATIC_LIB --enable-gpl --enable-rpath --enable-pic --disable-debug) + export LDSOFLAGS="-Wl,-rpath,\\\$$\\$$$$ORIGIN" && # This monstruosity is due to makefile substitions in ffmpeg configure + # export LDEXEFLAGS=-Wl,-rpath,\''$$ORIGIN/../lib'\' && + ./configure --arch=native --enable-asm --disable-libvpx --disable-libaom --disable-static --enable-shared --enable-libx264 --enable-libkvazaar --extra-cflags=-DKVZ_STATIC_LIB --enable-gpl --enable-pic --disable-debug) ExternalProject_Add(ffmpeg SOURCE_DIR ${CMAKE_BINARY_DIR}/_deps/ffmpeg-src @@ -200,6 +202,7 @@ set(FFMPEG_SHARED_LIBRARIES) foreach(component version IN ZIP_LISTS REQUIRED_FFMPEG_COMPONENTS FFMPEG_SHARED_LIBRARIES_VERSIONS) add_library("FFMPEG::lib${component}" SHARED IMPORTED GLOBAL) + set_target_properties("FFMPEG::lib${component}" PROPERTIES INSTALL_RPATH "$ORIGIN") add_dependencies("FFMPEG::lib${component}" ffmpeg) set(${component}_LIBRARY_NAME lib${component}.so)