私は Ubuntu を初めて使用し、Amazon EC2 クラウドで Ubuntu を実行しています。
cppunit
Ubuntuボックス(i386
および)でコンパイルしようとしていますが、amd64
リンクしませんlibdl
g++ -g -O2 -o .libs/DllPlugInTester DllPlugInTester.o CommandLineParser.o -ldl ../../src/cppunit/.libs/libcppunit.so -lm -Wl,--rpath -Wl,/home/ubuntu/cppunit/lib
../../src/cppunit/.libs/libcppunit.so: undefined reference to `dlsym'
../../src/cppunit/.libs/libcppunit.so: undefined reference to `dlopen'
../../src/cppunit/.libs/libcppunit.so: undefined reference to `dlclose'
libdl.so
現在、次の場所に存在し、正しいものとして理解できません。
ubuntu@domU-12-31-39-0A-98-1A:~/cppunit$ ls /lib/i386-linux-gnu/libdl*
/lib/i386-linux-gnu/libdl-2.15.so /lib/i386-linux-gnu/libdl.so.2
しかしwhereis
、何もありません:
ubuntu@domU-12-31-39-0A-98-1A:~/cppunit$ whereis libdl
libdl:
libc6
インストールされています:
ubuntu@domU-12-31-39-0A-98-1A:~/cppunit$ sudo apt-get install libc6
Reading package lists... Done
Building dependency tree
Reading state information... Done
libc6 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
では、なぜビルドが見つからないのでしょうか?
uname -r
は_3.2.0-25-virtual
Fedora の「通常」 whereis
は次のようになります。
[matt cppunit] whereis libdl
libdl: /lib/libdl.so /usr/lib/libdl.so /lib64/libdl.so /usr/lib64/libdl.so
何か案は?
編集:私/etc/ld.so.conf.d/*.conf
は賢明なようです:
ubuntu@domU-12-31-39-0A-98-1A:~$ cat /etc/ld.so.conf.d/*.conf
/usr/lib/i386-linux-gnu/mesa
# Multiarch support
/lib/i386-linux-gnu
/usr/lib/i386-linux-gnu
/lib/i686-linux-gnu
/usr/lib/i686-linux-gnu
# libc default configuration
/usr/local/lib
# This directive teaches ldconfig to search in nosegneg subdirectories
# and cache the DSOs there with extra bit 1 set in their hwcap match
# fields. In Xen guest kernels, the vDSO tells the dynamic linker to
# search in nosegneg subdirectories and to match this extra hwcap bit
# in the ld.so.cache file.
hwcap 1 nosegneg