OpenWRT18 编译 cmake-3.13

主要问题是

 /usr/bin/ld: cannot find -ldl

和 /usr/bin/ld: cannot find -lrt

 

1. opkg install gcc make  

2. wget   cmake-3.13.tar.gz &&  tar -xzf cmake-3.13.tar.gz

3. cd cmake-3.13

4. find . -name "*.cmake.in" -exec sed -i  "s/-lrt//g" '{}' \;

5.find . -name "*.cmake.in" -exec sed -i  "s/-ldl//g" '{}' \;

6. sed -i  "s/-ldl//g" bootstrap &&  sed -i  "s/-lrt//g" bootstrap

7.  ./bootstrap --prefix=/usr

8. make 

9. find . -name "link.txt" -exec sed -i  "s/-ldl//g" '{}' \; 

10. find . -name "link.txt" -exec sed -i  "s/-lrt//g" '{}' \;

11.find . -name Makefile2 -exec sed -i  "s/-ldl//g" '{}' \;

12.find -name Makefile2 -exec sed -i  "s/-lrt//g" '{}' \;

13.make

14.make install 

你可能感兴趣的:(OpenWRT18 编译 cmake-3.13)