libvncserver-LibVNCServer-0.9.13
依赖包编译参考
libX11编译libX11编译
源码下载LibVNC/libvncserver
libvncserver没有configure文件,要用cmake编译,先安装cmake配置工具,cmake-gui
apt-get install cmake-gui
先创建CMAKE构建文件存放目录mkdir MyMake
然后执行libvncserver执行cmake-gui
选择libvncserver源码目录和构建目录,然后点击configure,
然后根据图片选择,然后下一步
操作系统选择linux(随便就行),processor(CPU 也 随便就行)
C选择交叉编译工具gcc(/opt/gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu/bin/arm-linux-gcc)
C++选择交叉编译工具g++(/opt/gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu/bin/arm-linux-g++)
Fortran选择(/opt/gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu/bin/arm-linux-gfortran)
find program/lib/include 设置编译器要查找的库路劲和头文件路劲,这里根路劲target root选择了X11VNC存放的一些依赖库路劲,
program mode 选择从根路劲和系统路劲查找
Library mode 选择选择从根路劲和系统路劲查找
Includemode 选择选择从根路劲和系统路劲查找
这里生成了配置相关的参数
BUILD_SHARED_LIBS 第一个是生成共享库的意思,勾选
CMAKE_INSTALL_PREFIX 编译生成的目标路劲
下面一些参数为了测试编译效果,去掉了暂时没有的库 包括GTK SDL LZO等
点configure检查是否有文件,然后点generate生成Makefile
这个提示不用管
System is unknown to cmake, create:
Platform/linux to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake
Your CMakeCache.txt file was copied to CopyOfCMakeCache.txt. Please send that file to cmake@www.cmake.org.
然后进入构建目录make
root@ubuntu:/home/mywork/X11_VNC_Src/libvncserver-LibVNCServer-0.9.13/MyMake# ls
client_examples cmake_install.cmake CTestTestfile.cmake libvncserver.pc test
CMakeCache.txt compile_commands.json examples Makefile
CMakeFiles CopyOfCMakeCache.txt libvncclient.pc rfb
root@ubuntu:/home/mywork/X11_VNC_Src/libvncserver-LibVNCServer-0.9.13/MyMake# make
出错,
/opt/gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/5.3.1/../../../../aarch64-linux-gnu/bin/ld: CMakeFiles/test_copyrecttest.dir/test/copyrecttest.c.obj: undefined reference to symbol 'sin@@GLIBC_2.17'
/opt/gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu/bin/../aarch64-linux-gnu/libc/lib/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
CMakeFiles/test_copyrecttest.dir/build.make:102: recipe for target 'test/copyrecttest' failed
make[2]: *** [test/copyrecttest] Error 1
CMakeFiles/test_copyrecttest.dir/build.make:102: recipe for target ‘test/copyrecttest’ failed是这个文件出错的,打开这个文件定位102行,102行没有链接到libm.so.6,链接文件是link.txt,打开link.txt把链接路劲加进去
修改link.txt为
然后make,make install,生成的库都拷贝到libX11target里面了