우분투 12.04 (32 비트) 빌드 시스템에서 ARM 호스트 용 gstreamer를 크로스 컴파일하려고합니다. 내가 설명하려고하는 것은 i686-linux-gnu GCC에서 발생하지 않습니다. 나는이 GCC를 사용하여 우분투 12.04에 컴파일 오전 :실행 파일을 링크 할 때 공유 라이브러리 종속성 찾기
> arm-linux-gnueabihf-gcc -v
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabihf-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.6/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5'
--with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6
--enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/arm-linux-gnueabihf/include/c++/4.6.3 --libdir=/usr/lib
--enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes
--enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-multilib
--disable-sjlj-exceptions --with-arch=armv7-a --with-float=hard --with-fpu=vfpv3-d16
--with-mode=thumb --disable-werror --enable-checking=release --build=i686-linux-gnu
--host=i686-linux-gnu --target=arm-linux-gnueabihf --program-prefix=arm-linux-gnueabihf-
--includedir=/usr/arm-linux-gnueabihf/include
--with-headers=/usr/arm-linux-gnueabihf/include
--with-libs=/usr/arm-linux-gnueabihf/lib
Thread model: posix
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
그리고이 신분증을 :
arm-linux-gnueabihf-ld -v GNU ld (GNU Binutils for Ubuntu) 2.22
GCC는 기본 우분투 12.04있는 PPA에서 설치되었다. 빌드 시스템은 GST-발견-1.0 실행 파일을 링크에 도달 할 때, 나는 다음과 같은 오류가 발생합니다 :
/usr/lib/gcc/arm-linux-gnueabihf/4.6/../../../../arm-linux-gnueabihf/bin/ld: warning: liborc-0.4.so.0, needed by ../gst-libs/gst/video/.libs/libgstvideo-1.0.so, not found (try using -rpath or -rpath-link)
../gst-libs/gst/video/.libs/libgstvideo-1.0.so: undefined reference to `orc_program_compile'
../gst-libs/gst/video/.libs/libgstvideo-1.0.so: undefined reference to `orc_program_set_backup_function'
../gst-libs/gst/video/.libs/libgstvideo-1.0.so: undefined reference to `orc_program_new_from_static_bytecode'
../gst-libs/gst/video/.libs/libgstvideo-1.0.so: undefined reference to `orc_program_free'
../gst-libs/gst/video/.libs/libgstvideo-1.0.so: undefined reference to `orc_once_mutex_lock'
../gst-libs/gst/video/.libs/libgstvideo-1.0.so: undefined reference to `orc_program_take_code'
../gst-libs/gst/video/.libs/libgstvideo-1.0.so: undefined reference to `orc_once_mutex_unlock'
collect2: ld returned 1 exit status
GST-발견-1.0
는 libgstvideo-1.0.so에 따라 달라집니다. libgstvideo-1.0.so (프로세스 초기에 성공적으로 빌드 된)에는 liborc-0.4.so에 대한 종속성이 있습니다. 팔 - 리눅스 - gnueabihf-readelf -a와 libgstvideo-1.0.so을 검사하는 다음 코드를 산출 :Dynamic section at offset 0x29ed8 contains 33 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libgstbase-1.0.so.0]
0x00000001 (NEEDED) Shared library: [libgstreamer-1.0.so.0]
0x00000001 (NEEDED) Shared library: [libgobject-2.0.so.0]
0x00000001 (NEEDED) Shared library: [libglib-2.0.so.0]
0x00000001 (NEEDED) Shared library: [liborc-0.4.so.0]
0x00000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x00000001 (NEEDED) Shared library: [libpthread.so.0]
0x00000001 (NEEDED) Shared library: [libc.so.6]
0x0000000e (SONAME) Library soname: [libgstvideo-1.0.so.0]
0x0000000f (RPATH) Library rpath: [/home/test/gst/gstreamer/gstreamer/libs/gst/base/.libs:/
home/test/gst/gstreamer/gstreamer/gst/.libs:/home/test/gst/gstreamer/orc/orc/.libs]
경로는 RPATH 항목이 올바른지에 liborc-0.4.so 할 수 있습니다. gst-discoverer-1.0의 링크 라인은 liborc에 직접적으로 의존하지 않기 때문에 (libgstvideo-1.0.so를 통해 간접적으로 만 의존하기 때문에) liborc에 대한 참조를 포함하지 않습니다. 내 LDFLAGS에 "-rpath-link =/home/test/gst/gstreamer/orc/orc/.libs"를 추가하려고 시도했지만 작동하지 않았습니다. 크로스 컴파일 링커가이 공유 라이브러리의 종속성을 찾을 수없는 이유에 대한 아이디어가 있습니까?