Xilinx ISE14.7安装好后编译程序时出现如下的错误:
$ cmake -G"Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE=../../../..
/../cmake/toolchain-xilinx-zynqarm-eabi-gnu.cmake .. -DCMAKE_BUILD_TYPE=Debug
cmake: /opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by cmake)
cmake: /opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by cmake)
cmake: /opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64/libstdc++.so.6: version `CXXABI_1.3.5' not found (required by cmake)
cmake: /opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by cmake)
cmake: /opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by cmake)
cmake: /opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by cmake)
cmake: /opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by cmake)
cmake: /opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by cmake)
cmake: /opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /usr/lib/x86_64-linux-gnu/libjsoncpp.so.1)
cmake: /opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64/libstdc++.so.6: version `GLIBCXX_3.4.11' not found (required by /usr/lib/x86_64-linux-gnu/libjsoncpp.so.1)
cmake: /opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/lib/x86_64-linux-gnu/libjsoncpp.so.1)
cmake: /opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/lib/x86_64-linux-gnu/libicuuc.so.57)
是因为ISE14.7的libstdc++.so.6库文件版本太旧,解决办法是用linux系统里的libstdc++.so.6替代(ubuntu16.10, 64位系统的安装方法是:sudo apt install libstdc++6,安装位置是:/usr/lib/x86_64-linux-gnu)
I have made the following steps to fix this problem:
cd /opt/Xilinx/14.7/ISE_DS/ISE/lib/lin64
mv libstdc++.so libstdc++.so-orig
mv libstdc++.so.6 libstdc++.so.6-orig
mv libstdc++.so.6.0.8 libstdc++.so.6.0.8-orig
ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 libstdc++.so
ln -s libstdc++.so libstdc++.so.6
ln -s libstdc++.so libstdc++.so.6.0.8
cd /opt/Xilinx/14.7/ISE_DS/common/lib/lin64
mv libstdc++.so libstdc++.so-orig
mv libstdc++.so.6 libstdc++.so.6-orig
mv libstdc++.so.6.0.8 libstdc++.so.6.0.8-orig
ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 libstdc++.so
ln -s libstdc++.so libstdc++.so.6
ln -s libstdc++.so libstdc++.so.6.0.8