-
Notifications
You must be signed in to change notification settings - Fork 989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] find_package can't find all the dependencies #15037
Comments
When link,will reports an error the x264 dynamic library is missing. /home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: warning: libx264.so.164, needed by /home/lw/.conan2/p/b/ffmped7cdc6fda969b/p/lib/libavcodec.so, not found (try using -rpath or -rpath-link)
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: warning: libx265.so.192, needed by /home/lw/.conan2/p/b/ffmped7cdc6fda969b/p/lib/libavcodec.so, not found (try using -rpath or -rpath-link) |
Hi @liwang54321 Thanks for your report.
In order to start understanding what could be failing, I'd recommend:
Another thing that could help a lot is providing a full |
Hi @memsharded #include <stdio.h>
#include <libavformat/avformat.h>
int main(int argc, char** argv)
{
printf("%d\n", avformat_version());
return 0;
} CMakeLists.txt cmake_minimum_required(VERSION 3.15.0)
project(StreamServer VERSION 0.1.0)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
find_package(ffmpeg REQUIRED)
add_executable(${PROJECT_NAME} main.c)
target_link_libraries(${PROJECT_NAME} PUBLIC
ffmpeg::ffmpeg
ffmpeg::avformat
) conan_profile_aarch64 [settings]
os=Linux
arch=armv8
compiler=gcc
compiler.cppstd=gnu17
compiler.version=11
compiler.libcxx=libstdc++11
build_type=Release
[options]
*:shared=True
[buildenv]
CC=/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-gcc
CXX=/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-g++
AR=/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-ar
AS=/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-as
NM=/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-nm
OBJCOPY=/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-objcopy
OBJDUMP=/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-objdump
READELF=/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-readelf
RANLIB=/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-ranlib
STRIP=/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-strip conan_profile_x86_64 [settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu17
compiler.libcxx=libstdc++11
compiler.version=11
os=Linux
[options]
*:shared=True conanfile.py from conan import ConanFile
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout
class DeviceDevelopConan(ConanFile):
name = "DeviceDevelop"
version = "0.1.0"
license = "GPL"
author = "lw liwang54321@gmail.com"
url = "www.github.com/device_develop"
description = "device develop control soft"
topics = ("jetson", "device")
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "fPIC": [True, False]}
default_options = {"shared": True, "fPIC": True}
generators = "CMakeDeps", "CMakeToolchain", "VirtualBuildEnv"
def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
def configure(self):
# For ffmpeg
self.options['ffmpeg'].with_vaapi = False
self.options['ffmpeg'].with_vdpau = False
self.options['ffmpeg'].with_xcb = False
self.options['ffmpeg'].with_pulse = False
self.options['ffmpeg'].with_vulkan = False
self.options['ffmpeg'].with_asm = False
self.options['ffmpeg'].with_libalsa = False
self.options['ffmpeg'].with_libfdk_aac = False
self.options['ffmpeg'].with_libmp3lame = False
self.options['ffmpeg'].with_opus = False
self.options['ffmpeg'].with_vorbis = False
self.options['ffmpeg'].postproc = False
self.options['ffmpeg'].with_openjpeg = False
self.options['ffmpeg'].with_openh264 = False
self.options['ffmpeg'].with_libiconv = False
self.options['ffmpeg'].with_zeromq = False
self.options['ffmpeg'].with_libvpx = False
self.options['ffmpeg'].with_zlib = False
self.options['ffmpeg'].with_bzip2 = False
self.options['ffmpeg'].with_lzma = False
self.options['ffmpeg'].with_freetype = False
self.options['ffmpeg'].with_libwebp = False
# macos options
# self.options['ffmpeg'].with_appkit = False
# self.options['ffmpeg'].with_videotoolbox = False
# self.options['ffmpeg'].with_avfoundation = False
# self.options['ffmpeg'].with_coreimage = False
# self.options['ffmpeg'].with_audiotoolbox = False
def source(self):
pass
def requirements(self):
self.requires("ffmpeg/6.0")
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
def package(self):
cmake = CMake(self)
cmake.install()
def package_info(self):
self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) run.sh #!/bin/bash
top_dir=$(cd $(dirname $0); pwd)
conan install . \
-pr:b ${top_dir}/conan_profile_x86_64 \
-pr:h ${top_dir}/conan_profile_aarch64 \
-of ${top_dir}/build/ \
-b missing
source ${top_dir}/build/conanbuild.sh
cmake -B ${top_dir}/build/ \
-S ${top_dir} \
-DCMAKE_TOOLCHAIN_FILE=${top_dir}/build/conan_toolchain.cmake \
-DCMAKE_INSTALL_PREFIX=${top_dir}/install \
-DCMAKE_BUILD_TYPE=Release
cmake --build ${top_dir}/build/ run logs: lw@lw:~/Workspace/conan_bug$ bash run.sh
======== Input profiles ========
Profile host:
[settings]
arch=armv8
build_type=Release
compiler=gcc
compiler.cppstd=gnu17
compiler.libcxx=libstdc++11
compiler.version=11
os=Linux
[options]
*:shared=True
[buildenv]
CC=/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-gcc
CXX=/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-g++
AR=/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-ar
AS=/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-as
NM=/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-nm
OBJCOPY=/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-objcopy
OBJDUMP=/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-objdump
READELF=/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-readelf
RANLIB=/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-ranlib
STRIP=/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-strip
Profile build:
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu17
compiler.libcxx=libstdc++11
compiler.version=11
os=Linux
[options]
*:shared=True
======== Computing dependency graph ========
Graph root
conanfile.py (DeviceDevelop/0.1.0): /home/lw/Workspace/conan_bug/conanfile.py
Requirements
ffmpeg/6.0#8f36484c635d0924617faaf35cd0b565 - Cache
libx264/cci.20220602#54f8388aa01fce20e671bfca06464c4e - Cache
libx265/3.4#60fd8f9d5a93fd2338a46a0664ddc768 - Cache
openssl/1.1.1s#3eeebc156917046ee80533dbbb8f4671 - Cache
Build requirements
meson/1.2.2#aace9dcc1db58fa42ecb5292f724092d - Cache
ninja/1.11.1#77587f8c8318662ac8e5a7867eb4be21 - Cache
pkgconf/2.0.3#f996677e96e61e6552d85e83756c328b - Cache
Resolved version ranges
openssl/[>=1.1 <4]: openssl/1.1.1s
======== Computing necessary packages ========
Requirements
ffmpeg/6.0#8f36484c635d0924617faaf35cd0b565:8e4df391b2807173bc59d0f4d807d05a7e78571f#2b355fe6fb66706c3b7c64e4cd803335 - Cache
libx264/cci.20220602#54f8388aa01fce20e671bfca06464c4e:934569590fec79d20810f52646391008973c6118#28a9d329dd4e119273b8da02d05e8c29 - Cache
libx265/3.4#60fd8f9d5a93fd2338a46a0664ddc768:ccf3385331077a615f02e0b3497877ea91d283dd#f39c8ac2a150bd63d6c1de9ce342cdab - Cache
openssl/1.1.1s#3eeebc156917046ee80533dbbb8f4671:523035fd734df98817383c07fc6ab01f1e7005aa#5ca9a6fa4043c3c52dc0ffc215a8c0d1 - Cache
Build requirements
Skipped binaries
meson/1.2.2, ninja/1.11.1, pkgconf/2.0.3
======== Installing packages ========
libx264/cci.20220602: Already installed! (1 of 4)
libx265/3.4: Already installed! (2 of 4)
openssl/1.1.1s: Already installed! (3 of 4)
ffmpeg/6.0: Already installed! (4 of 4)
WARN: deprecated: Usage of deprecated Conan 1.X features that will be removed in Conan 2.X:
WARN: deprecated: 'cpp_info.names' used in: openssl/1.1.1s, libx264/cci.20220602
WARN: deprecated: 'cpp_info.build_modules' used in: openssl/1.1.1s
======== Finalizing install (deploy, generators) ========
conanfile.py (DeviceDevelop/0.1.0): Writing generators to /home/lw/Workspace/conan_bug/build/
conanfile.py (DeviceDevelop/0.1.0): Generator 'CMakeDeps' calling 'generate()'
conanfile.py (DeviceDevelop/0.1.0): Generator 'VirtualBuildEnv' calling 'generate()'
conanfile.py (DeviceDevelop/0.1.0): Generator 'CMakeToolchain' calling 'generate()'
conanfile.py (DeviceDevelop/0.1.0): CMakeToolchain generated: conan_toolchain.cmake
conanfile.py (DeviceDevelop/0.1.0): Preset 'conan-release' added to CMakePresets.json. Invoke it manually using 'cmake --preset conan-release' if using CMake>=3.23
conanfile.py (DeviceDevelop/0.1.0): If your CMake version is not compatible with CMakePresets (<3.23) call cmake like: 'cmake <path> -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=/home/lw/Workspace/conan_bug/build/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Release'
conanfile.py (DeviceDevelop/0.1.0): CMakeToolchain generated: CMakePresets.json
conanfile.py (DeviceDevelop/0.1.0): CMakeToolchain generated: ../CMakeUserPresets.json
conanfile.py (DeviceDevelop/0.1.0): Generating aggregated env files
conanfile.py (DeviceDevelop/0.1.0): Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
Install finished successfully
-- Using Conan toolchain: /home/lw/Workspace/conan_bug/build/conan_toolchain.cmake
-- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC)
-- Conan toolchain: C++ Standard 17 with extensions ON
-- Conan toolchain: Setting BUILD_SHARED_LIBS = ON
-- Conan: Component target declared 'ffmpeg::avutil'
-- Conan: Component target declared 'ffmpeg::swscale'
-- Conan: Component target declared 'ffmpeg::swresample'
-- Conan: Component target declared 'ffmpeg::avcodec'
-- Conan: Component target declared 'ffmpeg::avformat'
-- Conan: Component target declared 'ffmpeg::avfilter'
-- Conan: Component target declared 'ffmpeg::avdevice'
-- Conan: Target declared 'ffmpeg::ffmpeg'
-- Conan: Target declared 'libx264::libx264'
-- Conan: Target declared 'libx265::libx265'
-- Conan: Component target declared 'OpenSSL::Crypto'
-- Conan: Component target declared 'OpenSSL::SSL'
-- Conan: Target declared 'openssl::openssl'
-- Conan: Including build module from '/home/lw/.conan2/p/b/opensde5a66b349c40/p/lib/cmake/conan-official-openssl-variables.cmake'
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/lw/Workspace/conan_bug/build
[ 50%] Building C object CMakeFiles/StreamServer.dir/main.c.o
[100%] Linking C executable StreamServer
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: warning: libssl.so.1.1, needed by /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so, not found (try using -rpath or -rpath-link)
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: warning: libcrypto.so.1.1, needed by /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so, not found (try using -rpath or -rpath-link)
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: warning: libx264.so.164, needed by /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavcodec.so, not found (try using -rpath or -rpath-link)
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: warning: libx265.so.192, needed by /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavcodec.so, not found (try using -rpath or -rpath-link)
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `SSL_CTX_use_certificate_chain_file@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `ERR_get_error@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BN_copy@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BN_set_word@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BN_cmp@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `SSL_CTX_use_PrivateKey_file@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `SSL_write@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `TLS_server_method@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BN_sub_word@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `SSL_CTX_free@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavcodec.so: undefined reference to `x264_param_default'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `SSL_get_error@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavcodec.so: undefined reference to `x264_param_apply_profile'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BIO_meth_set_destroy@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavcodec.so: undefined reference to `x265_api_get_192'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavcodec.so: undefined reference to `x264_encoder_headers'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BN_free@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BN_new@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BIO_meth_set_write@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `SSL_accept@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `SSL_CTX_load_verify_locations@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavcodec.so: undefined reference to `x264_param_cleanup'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BIO_meth_set_puts@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavcodec.so: undefined reference to `x264_encoder_maximum_delayed_frames'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BIO_get_data@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `SSL_set_bio@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavcodec.so: undefined reference to `x264_encoder_encode'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BIO_meth_free@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BIO_new@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BN_rand@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BN_CTX_free@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `SSL_CTX_set_verify@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `SSL_shutdown@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavcodec.so: undefined reference to `x264_encoder_reconfig'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavcodec.so: undefined reference to `x264_param_apply_fastfirstpass'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BIO_set_flags@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BIO_meth_set_ctrl@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BIO_meth_set_create@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `ERR_error_string@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `SSL_ctrl@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `TLS_client_method@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BIO_set_data@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `SSL_read@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `SSL_CTX_new@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavcodec.so: undefined reference to `x264_encoder_delayed_frames'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavcodec.so: undefined reference to `x264_param_parse'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BN_value_one@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavcodec.so: undefined reference to `x264_levels'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BIO_meth_set_read@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BIO_clear_flags@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BIO_meth_new@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `SSL_CTX_set_options@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavcodec.so: undefined reference to `x264_picture_init'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavcodec.so: undefined reference to `x264_encoder_close'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BN_CTX_new@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `SSL_free@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavcodec.so: undefined reference to `x264_param_default_preset'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BN_bin2bn@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BIO_set_init@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BN_num_bits@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BN_mod_exp@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `RAND_bytes@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BN_hex2bn@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `BN_bn2bin@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavcodec.so: undefined reference to `x264_encoder_open_164'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `SSL_connect@OPENSSL_1_1_0'
/home/lw/Workspace/StreamServer/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: /home/lw/.conan2/p/b/ffmpeec9cf0990c890/p/lib/libavformat.so: undefined reference to `SSL_new@OPENSSL_1_1_0'
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/StreamServer.dir/build.make:104: StreamServer] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/StreamServer.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2 |
I am trying things. A couple of quick notes:
|
I am trying to build first with the static libraries, to test things with the cross-compile setup, but it fails while building
Any idea of what would be different? I am not sure why the assembler is complaining about such "S" option that is not passed. Did you manage to build it without issues, directly from the recipe from ConanCenter? Is it possible that I am missing something installed in my system? |
Seems to be the issue described in #13560, in which the root cause is that Here is a workaround, not very elegant but it works: https://github.com/conan-io/conan-center-index/blob/b48d7fa9a697dbbf386b9fe16123b6197ef3bcf6/recipes/openmvg/all/conanfile.py#L119-L122 |
But why it works then when building for x86_64? if the issue was this definition, shouldn't it fail for x86_64 too? |
Yes it should, unless openssl, libx264 and libx265 for x86_64 are installed in system paths? Also in conancenter this issue is very uncommon for native builds on Linux with all shared, I don't always understand why it succeeds. |
Hi @memsharded extra_ldflags = []
args = {
"--bit-depth": self.options.bit_depth,
"--disable-cli": "",
"--disable-asm": "",
"--sbindir": None, # Not understood by configure
"--oldincludedir": None # Not understood by configure
} |
Hi @SpaceIm ✔︎ ~ find /usr -name "libx264.a*"
✔︎ ~ find /usr -name "libx264.so*"
✔︎ ~
|
And does it work if you add something like this in your conanfile https://github.com/conan-io/conan-center-index/blob/b48d7fa9a697dbbf386b9fe16123b6197ef3bcf6/recipes/openmvg/all/conanfile.py#L119-L122? |
Hi @SpaceIm default_options = {"shared": True, "fPIC": True}
# generators = "CMakeDeps", "CMakeToolchain", "VirtualBuildEnv"
def generate(self):
deps = CMakeDeps(self)
deps.generate()
tc = CMakeToolchain(self)
if self.settings.os == "Linux":
# Workaround for: https://github.com/conan-io/conan/issues/13560
libdirs_host = [l for dependency in self.dependencies.host.values() for l in dependency.cpp_info.aggregated_components().libdirs]
tc.variables["CMAKE_BUILD_RPATH"] = ";".join(libdirs_host)
tc.generate()
def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC ======== Installing packages ========
libx264/cci.20220602: Already installed! (1 of 4)
libx265/3.4: Already installed! (2 of 4)
openssl/1.1.1s: Already installed! (3 of 4)
ffmpeg/6.0: Already installed! (4 of 4)
WARN: deprecated: Usage of deprecated Conan 1.X features that will be removed in Conan 2.X:
WARN: deprecated: 'cpp_info.names' used in: openssl/1.1.1s, libx264/cci.20220602
WARN: deprecated: 'cpp_info.build_modules' used in: openssl/1.1.1s
======== Finalizing install (deploy, generators) ========
conanfile.py (DeviceDevelop/0.1.0): Calling generate()
conanfile.py (DeviceDevelop/0.1.0): Generators folder: <bound method DeviceDevelopConan.generators_folder of conanfile.py (DeviceDevelop/0.1.0)>
ERROR: Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/conan/cli/cli.py", line 272, in main
cli.run(args)
File "/usr/local/lib/python3.10/dist-packages/conan/cli/cli.py", line 172, in run
command.run(self._conan_api, args[0][1:])
File "/usr/local/lib/python3.10/dist-packages/conan/cli/command.py", line 125, in run
info = self._method(conan_api, parser, *args)
File "/usr/local/lib/python3.10/dist-packages/conan/cli/commands/install.py", line 72, in install
conan_api.install.install_consumer(deps_graph, args.generator, source_folder, output_folder,
File "/usr/local/lib/python3.10/dist-packages/conan/api/subapi/install.py", line 70, in install_consumer
write_generators(conanfile, app)
File "/usr/local/lib/python3.10/dist-packages/conans/client/generators/__init__.py", line 107, in write_generators
mkdir(new_gen_folder)
File "/usr/local/lib/python3.10/dist-packages/conans/util/files.py", line 242, in mkdir
if os.path.exists(path):
File "/usr/lib/python3.10/genericpath.py", line 19, in exists
os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not method
ERROR: stat: path should be string, bytes, os.PathLike or integer, not method
run.sh: line 11: /home/lw/Workspace/conan_bug/build/conanbuild.sh: No such file or directory
CMake Error at /usr/local/share/cmake-3.27/Modules/CMakeDetermineSystem.cmake:154 (message):
Could not find toolchain file:
/home/lw/Workspace/conan_bug/build/conan_toolchain.cmake
Call Stack (most recent call first):
CMakeLists.txt:2 (project) |
This error seems unrelated. |
hi @memsharded |
Managed to finally build the static, thanks to the hints above. |
Managed to reproduce the linking error when shared: [ 50%] Linking C executable StreamServer
/opt/pyenv/versions/3.7.13/lib/python3.7/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/StreamServer.dir/link.txt --verbose=1
/home/conan/conanws/gcc-arm/bin/aarch64-none-linux-gnu-gcc -O3 -DNDEBUG CMakeFiles/StreamServer.dir/main.c.o -o StreamServer -L/home/conan/.conan2/p/b/ffmpec543be5056794/p/lib -L/home/conan/.conan2/p/b/libx2d379ab2422306/p/lib -L/home/conan/.conan2/p/b/libx24dbac2af0d203/p/lib -L/home/conan/.conan2/p/b/opensb13e665a636e1/p/lib -L/home/conan/.conan2/p/b/zlib6ae0c63c73e7f/p/lib -Wl,-rpath,/home/conan/.conan2/p/b/ffmpec543be5056794/p/lib:/home/conan/.conan2/p/b/libx2d379ab2422306/p/lib:/home/conan/.conan2/p/b/libx24dbac2af0d203/p/lib:/home/conan/.conan2/p/b/opensb13e665a636e1/p/lib:/home/conan/.conan2/p/b/zlib6ae0c63c73e7f/p/lib /home/conan/.conan2/p/b/ffmpec543be5056794/p/lib/libavdevice.so /home/conan/.conan2/p/b/ffmpec543be5056794/p/lib/libavfilter.so /home/conan/.conan2/p/b/ffmpec543be5056794/p/lib/libavformat.so /home/conan/.conan2/p/b/ffmpec543be5056794/p/lib/libavcodec.so -lrt -lstdc++ /home/conan/.conan2/p/b/ffmpec543be5056794/p/lib/libswresample.so /home/conan/.conan2/p/b/ffmpec543be5056794/p/lib/libswscale.so /home/conan/.conan2/p/b/ffmpec543be5056794/p/lib/libavutil.so -lm -lpthread -ldl
/home/conan/conanws/gcc-arm/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: warning: libssl.so.3, needed by /home/conan/.conan2/p/b/ffmpec543be5056794/p/lib/libavformat.so, not found (try using -rpath or -rpath-link)
/home/conan/conanws/gcc-arm/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: warning: libcrypto.so.3, needed by /home/conan/.conan2/p/b/ffmpec543be5056794/p/lib/libavformat.so, not found (try using -rpath or -rpath-link)
/home/conan/conanws/gcc-arm/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: warning: libx264.so.164, needed by /home/conan/.conan2/p/b/ffmpec543be5056794/p/lib/libavcodec.so, not found (try using -rpath or -rpath-link)
/home/conan/conanws/gcc-arm/bin/../lib/gcc/aarch64-none-linux-gnu/11.2.1/../../../../aarch64-none-linux-gnu/bin/ld: warning: libx265.so.192, needed by /home/conan/.conan2/p/b/ffmpec543be5056794/p/lib/libavcodec.so, not found (try using -rpath or -rpath-link) I have verified that the libraries are there and |
Inspecting the libx264 binary:
Maybe the .so is being discarded by the linker because of the unknown architecture? |
Found that in the final link command it is failing with the |
I have managed to workaround it and make it work with: def generate(self):
tc = CMakeToolchain(self)
libs = []
for req, dep in self.dependencies.host.items():
libs.extend(dep.cpp_info.libdirs)
tc.variables["CMAKE_EXE_LINKER_FLAGS_INIT"] = "-Wl,-rpath-link,"+":".join(libs)
tc.generate() This explicitly adds the |
Well, it's similar to this workaround actually: #15037 (comment) Did you try to hardcode an |
This would be solved by the new "incubating feature", the new CMakeDeps generator in https://docs.conan.io/2/incubating.html I am closing the ticket as addressed by this new generator, but please don't hesitate to re-open or create new tickets for any further question or issue you might have. Thanks for your feedback. |
Environment details
Steps to reproduce
In the config file, compile all libraries as dynamic libraries
[settings] os=Linux arch=armv8 compiler=gcc compiler.cppstd=gnu17 compiler.version=11 compiler.libcxx=libstdc++11 build_type=Release [options] *:shared=True
build a conan package, for example ffmpeg/5.0, You can see that ffmpeg depends on x264
Using find_package in cmake depends on ffmpeg, but there is no libx264 library when link.
find_package(ffmpeg REQUIRED) target_link_libraries(${PROJECT_NAME} PUBLIC magic_enum::magic_enum spdlog::spdlog_header_only zlmediakit::zlmediakit mpp::mpp libsrtp::libsrtp openssl::openssl usrsctp::usrsctp ffmpeg::ffmpeg readerwriterqueue::readerwriterqueue )
How to solve this issue, thanks
Logs
The text was updated successfully, but these errors were encountered: