Ubuntu 16.04编译WizNote填坑小记
写在前面
今天将物理机系统换成了Ubuntu 16.04,一方面可以强迫自己去学习Linux方面相关知识来填充自己的技能点,另一方面也为自己提供更好的开发环境,因为博主2017年将要学习的知识更适合在linux环境下实践。一直都有记笔记的习惯,刚好为知笔记有linux版本的客户端(遗憾的是windows客户端中一键发布文章到个人博客的功能在linux平台还未实现),所以就决定用它了,但是官方给出来的只有源代码,需要自己去github下载源码编译后才能使用,本文记录全过程。
安装Git
$sudo apt-get install git
安装编译工具
$sudo apt-get install build-essential
安装CMake
$sudo apt-get install cmake
安装zlib
$sudo apt-get install zlib1g-dev
Clone为知笔记源代码
$cd ~
$mkdir WizTeam
$cd WizTeam
$git clone https://github.com/WizTeam/WizQTClient.git
安装Qt 5.7.0 for Linux 64-bit (715 MB) 或者更高版本
下载的过程可能会很漫长,请耐心等待
$cd /tmp
$wget http://download.qt.io/official_releases/qt/5.7/5.7.0/qt-opensource-linux-x64-5.7.0.run
$chmod +x qt-opensource-linux-x64-5.7.0.run
$./qt-opensource-linux-x64-5.7.0.run
编译源代码
运行QtCreator,菜单栏选择文件->打开文件或项目->选中CMakeLists.txt->打开
选中Minimum Size Release 并配置编译过后文件的保存路径
最后configure Project 开始配置项目,大约1分钟之后会是酱紫
在QtCreator左侧导航栏,点击左下角Project构建按钮(对!就是那个锤子!)就可以开始编译WizNote源代码了。在漫长的等待过后(大约10分钟),你就可以在WizTeam目录下发现多了一个名为build-WizQTClient-Desktop_Qt_5_7_0_GCC_64bit-Minimum Size Release的文件夹,在build-WizQTClient-Desktop_Qt_5_7_0_GCC_64bit-Minimum Size Release/bin目录下就是我们编译好的客户端
双击WizNote就可以愉快的使用使用为知笔记客户端了
修复为知笔记无法切换中文输入法的问题
经过上面的步骤编译好为知笔记的客户端之后你会发现虽然能正常登录和同步文章,但是在新建文章中切换中文输入法输入中文是无效的,下面介绍如何解决这个问题。
关于原因
网上给的说法是由于Qt5的兼容性问题导致为知笔记使用fcitx输入法录入汉字会有问题,解决办法是自己编译fcitx-qt5,安装部署 libfcitxplatforminputcontextplugin.so即可。
安装 fcitx-libs-dev
$sudo apt-get install fcitx-libs-dev
设置qmake环境变量
找到你电脑上qmake的路径,我的是/home/eason/Qt5.7.0/5.7/gcc_64/bin/
$export PATH="/home/eason/Qt5.7.0/5.7/gcc_64/bin/":$PATH
下载fcitx-libs源码
$cd ~
$git clone https://github.com/fcitx/fcitx-qt5.git
编译
进入fcitx-qt5目录执行cmake来生成Makefile文件,使用-D参数指定Qt5_DIR路径(你的安装路径可能不一样)
$cd fcitx-qt5/
$ cmake -D Qt5_DIR=/home/eason/Qt5.7.0/5.7/gcc_64/lib/cmake/Qt5 .
生成Makefile文件后执行下列命令开始编译
$ make
Scanning dependencies of target FcitxQt5DBusAddons_automoc
[ 4%] Automatic moc for target FcitxQt5DBusAddons
Generating moc_fcitxqtconnection.cpp
Generating moc_fcitxqtconnection_p.cpp
Generating moc_fcitxqtinputcontextproxy.cpp
Generating moc_fcitxqtinputmethodproxy.cpp
Generating moc_fcitxqtkeyboardproxy.cpp
[ 4%] Built target FcitxQt5DBusAddons_automoc
Scanning dependencies of target FcitxQt5DBusAddons
[ 8%] Building CXX object dbusaddons/CMakeFiles/FcitxQt5DBusAddons.dir/fcitxqtconnection.cpp.o
[ 12%] Building CXX object dbusaddons/CMakeFiles/FcitxQt5DBusAddons.dir/fcitxqtformattedpreedit.cpp.o
[ 16%] Building CXX object dbusaddons/CMakeFiles/FcitxQt5DBusAddons.dir/fcitxqtinputcontextproxy.cpp.o
[ 20%] Building CXX object dbusaddons/CMakeFiles/FcitxQt5DBusAddons.dir/fcitxqtinputmethodproxy.cpp.o
[ 24%] Building CXX object dbusaddons/CMakeFiles/FcitxQt5DBusAddons.dir/fcitxqtkeyboardlayout.cpp.o
[ 28%] Building CXX object dbusaddons/CMakeFiles/FcitxQt5DBusAddons.dir/fcitxqtkeyboardproxy.cpp.o
[ 32%] Building CXX object dbusaddons/CMakeFiles/FcitxQt5DBusAddons.dir/fcitxqtinputmethoditem.cpp.o
[ 36%] Building CXX object dbusaddons/CMakeFiles/FcitxQt5DBusAddons.dir/FcitxQt5DBusAddons_automoc.cpp.o
[ 40%] Linking CXX shared library libFcitxQt5DBusAddons.so
[ 40%] Built target FcitxQt5DBusAddons
Scanning dependencies of target FcitxQt5WidgetsAddons_automoc
[ 44%] Automatic moc for target FcitxQt5WidgetsAddons
Generating moc_fcitxqtkeysequencewidget.cpp
Generating moc_fcitxqtconfiguifactory.cpp
Generating moc_fcitxqtconfiguifactory_p.cpp
Generating moc_fcitxqtconfiguiplugin.cpp
Generating moc_fcitxqtconfiguiwidget.cpp
Generating moc_fcitxqtkeysequencewidget_p.cpp
[ 44%] Built target FcitxQt5WidgetsAddons_automoc
Scanning dependencies of target FcitxQt5WidgetsAddons
[ 48%] Building CXX object widgetsaddons/CMakeFiles/FcitxQt5WidgetsAddons.dir/fcitxqtconfiguifactory.cpp.o
[ 52%] Building CXX object widgetsaddons/CMakeFiles/FcitxQt5WidgetsAddons.dir/fcitxqtconfiguiplugin.cpp.o
[ 56%] Building CXX object widgetsaddons/CMakeFiles/FcitxQt5WidgetsAddons.dir/fcitxqtconfiguiwidget.cpp.o
[ 60%] Building CXX object widgetsaddons/CMakeFiles/FcitxQt5WidgetsAddons.dir/fcitxqtkeysequencewidget.cpp.o
[ 64%] Building CXX object widgetsaddons/CMakeFiles/FcitxQt5WidgetsAddons.dir/qtkeytrans.cpp.o
[ 68%] Building CXX object widgetsaddons/CMakeFiles/FcitxQt5WidgetsAddons.dir/FcitxQt5WidgetsAddons_automoc.cpp.o
[ 72%] Linking CXX shared library libFcitxQt5WidgetsAddons.so
[ 72%] Built target FcitxQt5WidgetsAddons
Scanning dependencies of target fcitxplatforminputcontextplugin_automoc
[ 76%] Automatic moc for target fcitxplatforminputcontextplugin
Generating moc_main.cpp
Generating moc_qfcitxplatforminputcontext.cpp
[ 76%] Built target fcitxplatforminputcontextplugin_automoc
Scanning dependencies of target fcitxplatforminputcontextplugin
[ 80%] Building CXX object platforminputcontext/CMakeFiles/fcitxplatforminputcontextplugin.dir/qfcitxplatforminputcontext.cpp.o
[ 84%] Building CXX object platforminputcontext/CMakeFiles/fcitxplatforminputcontextplugin.dir/keyuni.cpp.o
[ 88%] Building CXX object platforminputcontext/CMakeFiles/fcitxplatforminputcontextplugin.dir/main.cpp.o
[ 92%] Building CXX object platforminputcontext/CMakeFiles/fcitxplatforminputcontextplugin.dir/utils.cpp.o
[ 96%] Building CXX object platforminputcontext/CMakeFiles/fcitxplatforminputcontextplugin.dir/fcitxplatforminputcontextplugin_automoc.cpp.o
[100%] Linking CXX shared module libfcitxplatforminputcontextplugin.so
[100%] Built target fcitxplatforminputcontextplugin
编译好后开始安装
$ sudo make install
[sudo] eason 的密码:
[ 4%] Automatic moc for target FcitxQt5DBusAddons
[ 4%] Built target FcitxQt5DBusAddons_automoc
[ 40%] Built target FcitxQt5DBusAddons
[ 44%] Automatic moc for target FcitxQt5WidgetsAddons
[ 44%] Built target FcitxQt5WidgetsAddons_automoc
[ 72%] Built target FcitxQt5WidgetsAddons
[ 76%] Automatic moc for target fcitxplatforminputcontextplugin
[ 76%] Built target fcitxplatforminputcontextplugin_automoc
[100%] Built target fcitxplatforminputcontextplugin
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/lib/cmake/FcitxQt5DBusAddons/FcitxQt5DBusAddonsConfig.cmake
-- Installing: /usr/local/lib/cmake/FcitxQt5DBusAddons/FcitxQt5DBusAddonsConfigVersion.cmake
-- Installing: /usr/local/lib/cmake/FcitxQt5DBusAddons/FcitxQt5DBusAddonsTargets.cmake
-- Installing: /usr/local/lib/cmake/FcitxQt5DBusAddons/FcitxQt5DBusAddonsTargets-noconfig.cmake
-- Installing: /usr/local/include/FcitxQt5/fcitxqtdbusaddons_version.h
-- Installing: /usr/local/lib/libFcitxQt5DBusAddons.so.1.0
-- Installing: /usr/local/lib/libFcitxQt5DBusAddons.so.1
-- Installing: /usr/local/lib/libFcitxQt5DBusAddons.so
-- Set runtime path of "/usr/local/lib/libFcitxQt5DBusAddons.so.1.0" to ""
-- Installing: /usr/local/include/FcitxQt5/FcitxQtDBusAddons/fcitxqtconnection.h
-- Installing: /usr/local/include/FcitxQt5/FcitxQtDBusAddons/fcitxqtformattedpreedit.h
-- Installing: /usr/local/include/FcitxQt5/FcitxQtDBusAddons/fcitxqtinputcontextproxy.h
-- Installing: /usr/local/include/FcitxQt5/FcitxQtDBusAddons/fcitxqtinputmethodproxy.h
-- Installing: /usr/local/include/FcitxQt5/FcitxQtDBusAddons/fcitxqtkeyboardlayout.h
-- Installing: /usr/local/include/FcitxQt5/FcitxQtDBusAddons/fcitxqtkeyboardproxy.h
-- Installing: /usr/local/include/FcitxQt5/FcitxQtDBusAddons/fcitxqtinputmethoditem.h
-- Installing: /usr/local/include/FcitxQt5/FcitxQtDBusAddons/fcitxqtdbusaddons_export.h
-- Installing: /usr/local/lib/cmake/FcitxQt5WidgetsAddons/FcitxQt5WidgetsAddonsConfig.cmake
-- Installing: /usr/local/lib/cmake/FcitxQt5WidgetsAddons/FcitxQt5WidgetsAddonsConfigVersion.cmake
-- Installing: /usr/local/lib/cmake/FcitxQt5WidgetsAddons/FcitxQt5WidgetsAddonsTargets.cmake
-- Installing: /usr/local/lib/cmake/FcitxQt5WidgetsAddons/FcitxQt5WidgetsAddonsTargets-noconfig.cmake
-- Installing: /usr/local/include/FcitxQt5/fcitxqtwidgetsaddons_version.h
-- Installing: /usr/local/lib/libFcitxQt5WidgetsAddons.so.1.0
-- Installing: /usr/local/lib/libFcitxQt5WidgetsAddons.so.1
-- Installing: /usr/local/lib/libFcitxQt5WidgetsAddons.so
-- Set runtime path of "/usr/local/lib/libFcitxQt5WidgetsAddons.so.1.0" to ""
-- Installing: /usr/local/include/FcitxQt5/FcitxQtWidgetsAddons/fcitxqtconfiguifactory.h
-- Installing: /usr/local/include/FcitxQt5/FcitxQtWidgetsAddons/fcitxqtconfiguiplugin.h
-- Installing: /usr/local/include/FcitxQt5/FcitxQtWidgetsAddons/fcitxqtconfiguiwidget.h
-- Installing: /usr/local/include/FcitxQt5/FcitxQtWidgetsAddons/fcitxqtkeysequencewidget.h
-- Installing: /usr/local/include/FcitxQt5/FcitxQtWidgetsAddons/fcitxqtwidgetsaddons_export.h
-- Installing: /home/eason/Qt5.7.0/5.7/gcc_64/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so
-- Set runtime path of "/home/eason/Qt5.7.0/5.7/gcc_64/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so" to ""
$
将编译好的libfcitxplatforminputcontextplugin.so
文件copy到/home/eason/Qt5.7.0/Tools/QtCreator/lib/Qt/plugins/platforminputcontexts
目录。 重启系统,大功告成!
下面是编译fcitx-qt5的过程中可能会遇到的问题,没有的话可以跳过
问题1:
eason@eason:~/fcitx-qt5$ cmake .
CMake Error at CMakeLists.txt:8 (find_package):
Could not find a package configuration file provided by "ECM" (requested
version 1.4.0) with any of the following names:
ECMConfig.cmake
ecm-config.cmake
Add the installation prefix of "ECM" to CMAKE_PREFIX_PATH or set "ECM_DIR"
to a directory containing one of the above files. If "ECM" provides a
separate development package or SDK, be sure it has been installed.
-- Configuring incomplete, errors occurred!
See also "/home/eason/fcitx-qt5/CMakeFiles/CMakeOutput.log".
eason@eason:~/fcitx-qt5$
解决办法:
先下载cmake的扩展模块包
$ sudo wget https://launchpadlibrarian.net/189487929/extra-cmake-modules_1.4.0.orig.tar.xz
解压
$ tar -xJf extra-cmake-modules_1.4.0.orig.tar.xz
进入解压后的目录,执行cmake来生成Makefile文件,使用-D参数指定Qt5_DIR路径(你的安装路径可能不一样)
$ cd extra-cmake-modules-1.4.0/
$ cmake -D Qt5_DIR=/home/eason/Qt5.7.0/5.7/gcc_64/lib/cmake/Qt5 .
-- The C compiler identification is GNU 5.4.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
-- Looking for Sphinx Documentation Builder...
-- Sphinx Documentation Builder not found - documentation will not be built (see http://sphinx-doc.org/)
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
Qt5_DIR
-- Build files have been written to: /home/eason/softwares/extra-cmake-modules-1.4.0
生成了Makefile之后,直接sudo make install来安装就可以了。
$ sudo make install
[sudo] eason 的密码:
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/share/ECM/modules/ECMVersionHeader.h.in
-- Installing: /usr/local/share/ECM/modules/ECMGeneratePkgConfigFile.cmake
-- Installing: /usr/local/share/ECM/modules/ECMPackageConfigHelpers.cmake
-- Installing: /usr/local/share/ECM/modules/ECMCreateQmFromPoFiles.cmake
-- Installing: /usr/local/share/ECM/modules/ECMOptionalAddSubdirectory.cmake
-- Installing: /usr/local/share/ECM/modules/ECMCoverageOption.cmake
-- Installing: /usr/local/share/ECM/modules/ECMSetupVersion.cmake
-- Installing: /usr/local/share/ECM/modules/ECMFindModuleHelpers.cmake
-- Installing: /usr/local/share/ECM/modules/ECMPoQmTools.cmake
-- Installing: /usr/local/share/ECM/modules/ECMGenerateHeaders.cmake
-- Installing: /usr/local/share/ECM/modules/ECMUseFindModules.cmake
-- Installing: /usr/local/share/ECM/modules/ECMQueryQmake.cmake
-- Installing: /usr/local/share/ECM/modules/ECMMarkAsTest.cmake
-- Installing: /usr/local/share/ECM/modules/ECMEnableSanitizers.cmake
-- Installing: /usr/local/share/ECM/modules/ECMMarkNonGuiExecutable.cmake
-- Installing: /usr/local/share/ECM/modules/ECMInstallIcons.cmake
-- Installing: /usr/local/share/ECM/modules/ECMGeneratePriFile.cmake
-- Installing: /usr/local/share/ECM/modules/ECMQmLoader.cpp.in
-- Installing: /usr/local/share/ECM/modules/ECMAddTests.cmake
-- Installing: /usr/local/share/ECM/kde-modules/KDECompilerSettings.cmake
-- Installing: /usr/local/share/ECM/kde-modules/KDEInstallDirs.cmake
-- Installing: /usr/local/share/ECM/kde-modules/KDECMakeSettings.cmake
-- Installing: /usr/local/share/ECM/kde-modules/KDEFrameworkCompilerSettings.cmake
-- Installing: /usr/local/share/ECM/find-modules/FindWayland.cmake
-- Installing: /usr/local/share/ECM/find-modules/FindQtWaylandScanner.cmake
-- Installing: /usr/local/share/ECM/find-modules/FindXCB.cmake
-- Installing: /usr/local/share/ECM/find-modules/FindWaylandScanner.cmake
-- Installing: /usr/local/share/ECM/find-modules/FindX11_XCB.cmake
-- Installing: /usr/local/share/ECM/find-modules/FindKF5.cmake
-- Installing: /usr/local/share/ECM/find-modules/FindSharedMimeInfo.cmake
-- Installing: /usr/local/share/ECM/find-modules/FindLibGit2.cmake
-- Installing: /usr/local/share/ECM/find-modules/FindOpenEXR.cmake
-- Installing: /usr/local/share/ECM/find-modules/FindEGL.cmake
-- Installing: /usr/local/share/ECM/find-modules/ECMFindModuleHelpersStub.cmake
-- Installing: /usr/local/share/ECM/cmake/ECMConfig.cmake
-- Installing: /usr/local/share/ECM/cmake/ECMConfigVersion.cmake
问题2:
$ cmake -D Qt5_DIR=/home/eason/Qt5.7.0/5.7/gcc_64/lib/cmake/Qt5 .
-- Could NOT find XKBCommon_XKBCommon (missing: XKBCommon_XKBCommon_LIBRARY XKBCommon_XKBCommon_INCLUDE_DIR)
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find XKBCommon (missing: XKBCommon_LIBRARIES XKBCommon) (Required
is at least version "0.5.0")
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
cmake/FindXKBCommon.cmake:30 (find_package_handle_standard_args)
CMakeLists.txt:31 (find_package)
解决办法:
下载libxkbcommon-0.5.0.tar.xz, 然后解压编译, 编译的时候需要yacc的支持,所以最先要安装bison
$ sudo apt-get install bison
$ wget http://xkbcommon.org/download/libxkbcommon-0.5.0.tar.xz
$ tar -xJf libxkbcommon-0.5.0.tar.xz
$ cd libxkbcommon-0.5.0/
使用./configure –disable-x11来生成Makefile, 这里使用–disable-x11来禁用x11,否则会报错 configure: error: xkbcommon-x11 requires xcb-xkb >= 1.10 which was not found. You can disable X11 support with –disable-x11.
$ ./configure --disable-x11
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc option to accept ISO C99... none needed
checking whether __clang__ is declared... no
checking whether __INTEL_COMPILER is declared... no
checking whether __SUNPRO_C is declared... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking if gcc supports -Werror=unknown-warning-option... no
checking if gcc supports -Werror=unused-command-line-argument... no
checking if gcc supports -Wall... yes
checking if gcc supports -Wpointer-arith... yes
checking if gcc supports -Wmissing-declarations... yes
checking if gcc supports -Wformat=2... yes
checking if gcc supports -Wstrict-prototypes... yes
checking if gcc supports -Wmissing-prototypes... yes
checking if gcc supports -Wnested-externs... yes
checking if gcc supports -Wbad-function-cast... yes
checking if gcc supports -Wold-style-definition... yes
checking if gcc supports -Wdeclaration-after-statement... yes
checking if gcc supports -Wunused... yes
checking if gcc supports -Wuninitialized... yes
checking if gcc supports -Wshadow... yes
checking if gcc supports -Wmissing-noreturn... yes
checking if gcc supports -Wmissing-format-attribute... yes
checking if gcc supports -Wredundant-decls... yes
checking if gcc supports -Wlogical-op... yes
checking if gcc supports -Werror=implicit... yes
checking if gcc supports -Werror=nonnull... yes
checking if gcc supports -Werror=init-self... yes
checking if gcc supports -Werror=main... yes
checking if gcc supports -Werror=missing-braces... yes
checking if gcc supports -Werror=sequence-point... yes
checking if gcc supports -Werror=return-type... yes
checking if gcc supports -Werror=trigraphs... yes
checking if gcc supports -Werror=array-bounds... yes
checking if gcc supports -Werror=write-strings... yes
checking if gcc supports -Werror=address... yes
checking if gcc supports -Werror=int-to-pointer-cast... yes
checking if gcc supports -Werror=pointer-to-int-cast... yes
checking if gcc supports -pedantic... yes
checking if gcc supports -Werror... yes
checking if gcc supports -Werror=attributes... yes
Package xorg-macros was not found in the pkg-config search path.
Perhaps you should add the directory containing `xorg-macros.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xorg-macros' found
checking whether make supports nested variables... (cached) yes
checking whether to build documentation... yes
checking for doxygen... no
configure: WARNING: doxygen not found - documentation targets will be skipped
checking for inline... inline
checking for pkg-config... (cached) /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for bison... bison -y
checking for bison... /usr/bin/bison
checking for strcasecmp... yes
checking for strncasecmp... yes
checking for eaccess... yes
checking for euidaccess... yes
checking for mmap... yes
checking for secure_getenv... yes
checking for __secure_getenv... no
checking for __builtin_expect... yes
checking linux/input.h usability... yes
checking linux/input.h presence... yes
checking for linux/input.h... yes
checking if gcc supports -fvisibility=hidden... yes
checking if gcc supports -Wextra -Wno-unused-parameter -Wno-missing-field-initializers... yes
checking if gcc supports -Wdocumentation... no
checking whether the linker accepts -Wl,--no-undefined... yes
checking for clock_gettime in -lrt... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating xkbcommon-uninstalled.pc
config.status: creating xkbcommon.pc
config.status: creating xkbcommon-x11.pc
config.status: creating xkbcommon-x11-uninstalled.pc
config.status: creating doc/Doxyfile
config.status: creating src/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
libxkbcommon 0.5.0
libxkbcommon: yes
libxkbcommon-x11: no
documentation: yes
default XKB rules: evdev
default XKB model: pc105
default XKB layout: us
default XKB variant:
default XKB options:
prefix: /usr/local
includedir: ${prefix}/include
lib dir: ${exec_prefix}/lib
XKB config root: /usr/share/X11/xkb
X11 locale root: ${datarootdir}/X11/locale
生成Makefile文件后执行命令
$make
$sudo make install
转载:http://jinbitou.net/2017/01/05/2319.html