【问题标题】:Problem in building Oce - problem : /usr/bin/ld : can not find -lXi构建 Ice 的问题 - 问题:/usr/bin/ld:找不到 -lXi
【发布时间】:2021-05-16 13:08:39
【问题描述】:

我正在尝试在 ubuntu 18.04 下安装 Oce。 当我尝试构建时,首先当我运行“cmake”时一切正常,

-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Info. Detecting doxygen
-- Found Doxygen: /usr/bin/doxygen (found suitable version "1.8.13", minimum required is "1.8.4") found components:  doxygen 
-- Info. Doxygen is found and can be used
-- Info. Overview building is turned on
-- Info: TCL is used by OCCT
-- Found Tclsh: /usr/bin/tclsh (found version "8.6") 
-- Info: TCL version isn't found
-- Info: TK is used by OCCT
-- Info: TK version isn't found
-- Info: Freetype is used by OCCT
-- Found Freetype: /usr/lib/x86_64-linux-gnu/libfreetype.so (found version "2.8.1") 
-- Info: TKIVtk and TKIVtkDraw toolkits excluded due to VTK usage is disabled
-- Info: The directories of 3rdparty headers: 
    /usr/include/tcl
    /usr/include/freetype2
-- Info: The directories of 3rdparty libraries: 
    /usr/lib/x86_64-linux-gnu
-- 
Info: (16:40:22) Start collecting all OCCT header files into /scratch/rsayoud/Documents/Software_Packages/oce_folder/build/oce-last/inc ...
-- Info: (16:40:22) Compare FILES with files in package directories...
-- Info: (16:40:28) Create header-links in inc folder...
-- Info: (16:40:29) Checking headers in inc folder...
-- Info: (16:40:30) End the collecting
-- Info: (16:40:30) OCCT toolkits processed
-- Info: (16:40:30) OCCT configuration files prepared
-- Configuring done
-- Generating done
-- Build files have been written to: /scratch/rsayoud/Documents/Software_Packages/oce_folder/build/oce-last

然后当我运行 'make' 时,它开始正常,直到 17% 我认为某些文件存在链接问题,

[ 17%] Building CXX object src/TKService/CMakeFiles/TKService.dir/__/Font/Font_SystemFont.cxx.o
[ 17%] Building CXX object src/TKService/CMakeFiles/TKService.dir/__/Font/Font_TextFormatter.cxx.o
[ 17%] Linking CXX shared library ../../lin64/gcc/lib/libTKG3d.so
[ 17%] Built target TKG3d
Scanning dependencies of target TKGeomBase
[ 17%] Linking CXX shared library ../../lin64/gcc/lib/libTKService.so
/usr/bin/ld : cannot find -lXi
collect2: error: ld returned 1 exit status
src/TKService/CMakeFiles/TKService.dir/build.make:2568: recipe for target 'lin64/gcc/lib/libTKService.so.7.6.0' failed
make[2]: *** [lin64/gcc/lib/libTKService.so.7.6.0] Error 1
CMakeFiles/Makefile2:1188: recipe for target 'src/TKService/CMakeFiles/TKService.dir/all' failed
make[1]: *** [src/TKService/CMakeFiles/TKService.dir/all] Error 2

关于如何解决这个问题的任何想法? 提前谢谢你。

【问题讨论】:

    标签: ubuntu gcc makefile


    【解决方案1】:

    您可能缺少提供libXi.so 库的包。你可以通过apt-file找到你需要的包,即:

    $ apt-file search libXi.so
    libxi-dev: /usr/lib/x86_64-linux-gnu/libXi.so
    

    在这种情况下,安装 libxi-dev 包应该可以解决问题。

    【讨论】:

    • 是的,确切地说,缺少的东西,我今天早上用你建议的库 libxi-dev 修复它。非常感谢:)
    【解决方案2】:

    问题是我需要安装缺少的 libxi-dev 包(并且没有描述该软件的要求)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-01-18
      • 1970-01-01
      • 2020-04-21
      • 2021-05-07
      • 2011-07-16
      • 1970-01-01
      • 2012-05-17
      • 2020-04-14
      相关资源
      最近更新 更多