eglibc中的__lxstat64在哪里?

时间:2016-02-29 07:10:50

标签: g++ eglibc

当我尝试在Ubuntu Trusty上构建Plasma5时,我遇到了与eglibc 2.19相关的问题。

/usr/lib/x86_64-linux-gnu/libc_nonshared.a(lstat64.oS): In function ``lstat64': (.text+0xc): undefined reference to ``__lxstat64'

我不知道如何解决这个问题。感谢。

修改

附加-v到g ++和ld,得到: COLLECT_GCC=/etc/alternatives/g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.3.0-3ubuntu1~14.04' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=gcc4-compatible --disable-libstdcxx-dual-abi --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 5.3.0 20151204 (Ubuntu 5.3.0-3ubuntu1~14.04) COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/ LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-v' '-fPIC' '-pipe' '-D' 'QT_STRICT_ITERATORS' '-D' 'QURL_NO_CAST_FROM_STRING' '-D' 'QT_NO_HTTP' '-D' 'QT_NO_FTP' '-Wformat=1' '-Werror=format-security' '-Werror=return-type' '-Wno-variadic-macros' '-Wlogical-op' '-Wmissing-include-dirs' '-std=c++11' '-std=c++11' '-fno-exceptions' '-Wall' '-Wextra' '-Wcast-align' '-Wchar-subscripts' '-Wformat-security' '-Wno-long-long' '-Wpointer-arith' '-Wundef' '-Wnon-virtual-dtor' '-Woverloaded-virtual' '-Werror=return-type' '-Wpedantic' '-g' '-shared' '-o' 'baloosearch.so' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/cc8S8VVK.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -shared -z relro -o baloosearch.so /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. -v --no-undefined --fatal-warnings --enable-new-dtags -soname baloosearch.so CMakeFiles/kio_baloosearch.dir/kio_search.cpp.o CMakeFiles/kio_baloosearch.dir/kio_baloosearch_automoc.cpp.o /opt/kde/install/lib/x86_64-linux-gnu/libKF5KIOCore.so.5.20.0 /opt/kde/install/lib/x86_64-linux-gnu/libKF5I18n.so.5.20.0 ../../lib/libKF5Baloo.so.5.20.0 /opt/kde/install/lib/x86_64-linux-gnu/libKF5Service.so.5.20.0 /opt/kde/install/lib/x86_64-linux-gnu/libKF5FileMetaData.so.5.20.0 /opt/kde/install/lib/x86_64-linux-gnu/libKF5I18n.so.5.20.0 /opt/kde/install/lib/x86_64-linux-gnu/libKF5ConfigCore.so.5.20.0 /opt/kde/install/lib/x86_64-linux-gnu/libKF5CoreAddons.so.5.20.0 /opt/Qt5.5.1/5.5/gcc_64/lib/libQt5Core.so.5.5.1 -rpath /opt/kde/install/lib/x86_64-linux-gnu:/opt/kde/build/baloo/src/lib:/opt/Qt5.5.1/5.5/gcc_64/lib:/opt/kde/build/baloo/src/engine: -rpath-link /opt/Qt5.5.1/5.5/gcc_64/lib:/opt/kde/install/lib/x86_64-linux-gnu:/opt/kde/build/baloo/src/engine -lstdc++ -lm -lgcc_s -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/5/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o collect2 version 5.3.0 20151204 /usr/bin/ld -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/cc8S8VVK.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -shared -z relro -o baloosearch.so /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. -v --no-undefined --fatal-warnings --enable-new-dtags -soname baloosearch.so CMakeFiles/kio_baloosearch.dir/kio_search.cpp.o CMakeFiles/kio_baloosearch.dir/kio_baloosearch_automoc.cpp.o /opt/kde/install/lib/x86_64-linux-gnu/libKF5KIOCore.so.5.20.0 /opt/kde/install/lib/x86_64-linux-gnu/libKF5I18n.so.5.20.0 ../../lib/libKF5Baloo.so.5.20.0 /opt/kde/install/lib/x86_64-linux-gnu/libKF5Service.so.5.20.0 /opt/kde/install/lib/x86_64-linux-gnu/libKF5FileMetaData.so.5.20.0 /opt/kde/install/lib/x86_64-linux-gnu/libKF5I18n.so.5.20.0 /opt/kde/install/lib/x86_64-linux-gnu/libKF5ConfigCore.so.5.20.0 /opt/kde/install/lib/x86_64-linux-gnu/libKF5CoreAddons.so.5.20.0 /opt/Qt5.5.1/5.5/gcc_64/lib/libQt5Core.so.5.5.1 -rpath /opt/kde/install/lib/x86_64-linux-gnu:/opt/kde/build/baloo/src/lib:/opt/Qt5.5.1/5.5/gcc_64/lib:/opt/kde/build/baloo/src/engine: -rpath-link /opt/Qt5.5.1/5.5/gcc_64/lib:/opt/kde/install/lib/x86_64-linux-gnu:/opt/kde/build/baloo/src/engine -lstdc++ -lm -lgcc_s -lc -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/5/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o GNU ld (GNU Binutils for Ubuntu) 2.24 /usr/lib/x86_64-linux-gnu/libc_nonshared.a(lstat64.oS): In function `lstat64': (.text+0xc): undefined reference to `__lxstat64' collect2: error: ld returned 1 exit status

1 个答案:

答案 0 :(得分:1)

我遇到了同样的问题,试图做同样的事情。我不知道这是否是一个很好的解决方案,但我找到了三种方法来解决这个问题。

  • 运行编译命令并添加 " /usr/lib/x86_64-linux-gnu/libc_nonshared.a"对它
  • 运行编译命令并添加" -lc"对它
  • 如果您使用kdesrc-build,那么最佳解决方案是将选项添加到.kdesrc-buildrc中的baloo模块中,如下所示:

    options baloo 
        cmake-options -DCMAKE_CXX_FLAGS="-lc" 
    end options
    

在一些篮球和障碍之后,我能够在Ubuntu 14.04上构建和运行Plasma 5,并且可能会写一个如何做到这一点的指南。