Help with crosscompiling

hello,

i am trying to crosscompile this project for openwrt mips24kc https://github.com/xebd/accel-ppp

i did compile toolchain and set enviroment and i did
1-

~/openwrt-sdk-22.03.2-ath79-generic_gcc-11.2.0_musl.Linux-x86_64/openwrt/openwrt/accel-ppp/build$ 
cmake  -DCMAKE_CXX_COMPILER=/home/isso/openwrt-sdk-22.03.2-ath79-generic_gcc-11.2.0_musl.Linux-x86_64/openwrt/openwrt/staging_dir/toolchain-mips_24kc_gcc-11.3.0_musl/bin/mips-openwrt-linux-musl-g++ -DCMAKE_C_COMPILER=/home/isso/openwrt-sdk-22.03.2-ath79-generic_gcc-11.2.0_musl.Linux-x86_64/openwrt/openwrt/staging_dir/toolchain-mips_24kc_gcc-11.3.0_musl/bin/mips-openwrt-linux-musl-gcc [-DBUILD_DRIVER=TRUE] [-DKDIR=/usr/] [-DCMAKE_INSTALL_PREFIX=/usr/ [-DCMAKE_BUILD_TYPE=Release] [-DLOG_PGSQL=FALSE] [-DSHAPER=TRUE] [-DRADIUS=FALSE] [-DNETSNMP=FALSE] ..`

and when i try to do

make CC=/home/isso/openwrt-sdk-22.03.2-ath79-generic_gcc-11.2.0_musl.Linux-x86_64/openwrt/openwrt/staging_dir/toolchain-mips_24kc_gcc-11.3.0_musl/bin/mips-openwrt-linux-gcc  LD=/home/isso/openwrt-sdk-22.03.2-ath79-generic_gcc-11.2.0_musl.Linux-x86_64/openwrt/openwrt/staging_dir/toolchain-mips_24kc_gcc-11.3.0_musl/bin/mips-openwrt-linux-ld 

i get these errors:


make CC=/home/isso/openwrt-sdk-22.03.2-ath79-generic_gcc-11.2.0_musl.Linux-x86_64/openwrt/openwrt/staging_dir/toolchain-mips_24kc_gcc-11.3.0_musl/bin/mips-openwrt-linux-gcc  LD=/home/isso/openwrt-sdk-22.03.2-ath79-generic_gcc-11.2.0_musl.Linux-x86_64/openwrt/openwrt/staging_dir/toolchain-mips_24kc_gcc-11.3.0_musl/bin/mips-openwrt-linux-ld 
[  8%] Built target triton
[  8%] Linking C executable accel-pppd
/home/isso/openwrt-sdk-22.03.2-ath79-generic_gcc-11.2.0_musl.Linux-x86_64/openwrt/openwrt/staging_dir/toolchain-mips_24kc_gcc-11.3.0_musl/lib/gcc/mips-openwrt-linux-musl/11.3.0/../../../../mips-openwrt-linux-musl/bin/ld: cannot find -lcrypto
/home/isso/openwrt-sdk-22.03.2-ath79-generic_gcc-11.2.0_musl.Linux-x86_64/openwrt/openwrt/staging_dir/toolchain-mips_24kc_gcc-11.3.0_musl/lib/gcc/mips-openwrt-linux-musl/11.3.0/../../../../mips-openwrt-linux-musl/bin/ld: cannot find -lssl
collect2: error: ld returned 1 exit status
make[2]: *** [accel-pppd/CMakeFiles/accel-pppd.dir/build.make:690: accel-pppd/accel-pppd] Error 1
make[1]: *** [CMakeFiles/Makefile2:406: accel-pppd/CMakeFiles/accel-pppd.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

how can i install crypto and ssl for toolchain ?
i did compile openssl

are the libraries present?

yeah they are in /home/isso/openwrt-sdk-22.03.2-ath79-generic_gcc-11.2.0_musl.Linux-x86_64/openwrt/openwrt/staging_dir/target-mips_24kc_musl/usr/lib

Usually, the easiest way to cross compile is by creating a package for it. You can then list the dependencies there and buildroot should take care of that for you.

this project require cmake do you know how can i create package for it ?

A lot of the newer packages are CMake-based, one recent example that comes to my mind is realtek-poe: https://github.com/hurricos/realtek-poe

All you need to do is create a Makefile for the project according to the developer guide: https://openwrt.org/docs/guide-developer/packages

Hello Islam,

I know this is a very old post but I might have good news for you :slight_smile:
From your post I assume you are trying to get Accel-ppp to compile on OpenWrt.

I managed to get it to compile and run on my Xiaomi 4C (23.05.0).
If it can run on that hardware anything is possible. :face_with_monocle:

http://radiusdesk.com/wiki/technical/ppp-meshdesk

Compile instructions are here:

http://radiusdesk.com/wiki/technical/ppp-openwrt-compile

Regards

1 Like