[英]Error while compiling Inkscape from source code
我沒有很好的處理C ++項目的知識,我從它的GitLab存儲庫下載了Inkscape的源代碼並進行了一些更改(添加小功能)並嘗試根據INSTALL.md中提供的指令和其他可用的源代碼進行編譯。網站。
雖然我似乎已經在系統上安裝了所有依賴項,但是在構建文件夾中運行cmake之后我得到了這個結果:
------------------------------
Building Makefile for Inkscape
------------------------------
Source Dir: /home/user/myProgs/inkscape
Binary Dir: /home/user/myProgs/inkscape/build
-- Creating build files in: /home/user/myProgs/inkscape/build
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.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
-- Found GTest: /usr/lib/libgtest.so
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for modules 'harfbuzz;pangocairo;pangoft2;fontconfig;gsl;gmodule-2.0;libsoup-2.4>=2.42'
--
CMake Error at /usr/share/cmake-3.7/Modules/FindPkgConfig.cmake:415 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake-3.7/Modules/FindPkgConfig.cmake:588 (_pkg_check_modules_internal)
CMakeScripts/DefineDependsandFlags.cmake:42 (pkg_check_modules)
CMakeLists.txt:136 (include)
-- Configuring incomplete, errors occurred!
See also "/home/user/myProgs/inkscape/build/CMakeFiles/CMakeOutput.log".
See also "/home/user/myProgs/inkscape/build/CMakeFiles/CMakeError.log".
DefineDependsandFlags.cmake:42中的相關行是:
pkg_check_modules(INKSCAPE_DEP REQUIRED
harfbuzz
pangocairo
pangoft2
fontconfig
gsl
gmodule-2.0
libsoup-2.4>=2.42)
據我檢查,所有這些軟件包已經安裝在我的系統上。
以下是CMakeError.log的內容,其中這些行可能會給出一些線索:
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_d21be.dir/CheckFunctionExists.c.o -o cmTC_d21be -rdynamic -lpthreads
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_d21be.dir/build.make:97: recipe for target 'cmTC_d21be' failed
make[1]: *** [cmTC_d21be] Error 1
make[1]: Leaving directory '/home/user/myProgs/inkscape/build/CMakeFiles/CMakeTmp'
Makefile:126: recipe for target 'cmTC_d21be/fast' failed
make: *** [cmTC_d21be/fast] Error 2
我在網上找不到任何幫助。
任何幫助,將不勝感激。
我已嘗試在Kubuntu 17.04和Ubuntu 16.04 LTS上進行編譯
為了編譯源代碼,您需要安裝一些缺少的依賴項。 根據你的cmake結果:
A required package was not found
在Ubuntu(Kubuntu測試)中最簡單的方法是從ppa存儲庫安裝Inkscape開發包。 在終端中鍵入以下命令,然后按Enter鍵:
sudo add-apt-repository ppa:inkscape.dev/trunk
之后,您需要啟用源代碼存儲庫。 嘗試取消注釋deb-src
行。 (從頭開始刪除#):
sudo vim /etc/apt/sources.list.d/inkscape_dev-ubuntu-trunk-zesty.list
現在使用sudo apt update
軟件包列表。 接下來,您已准備好安裝開發包:
sudo apt build-dep inkscape-trunk
現在它已經設置為編譯並運行;)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.