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

Hi, I'm trying to build Accel-ppp on openwrt19.07 for 32 bit architecture . Is it possible to build for 32 bit armv7 based architecture.
Currently get some library issues

Package accel-ppp is missing dependencies for the following libraries:
libc.so.6
libcrypto.so.1.1
libpcre.so.3
libpthread.so.0
libssl.so.1.1
libtriton.so
Makefile:56: recipe for target '/home/nirajsingh/ipq50xx-qsdk/qca-networking-2022-spf-12-2_qca_oem/qsdk/bin/packages/arm_cortex-a7_neon-vfpv4/base/accel-ppp_1.12.0-1_arm_cortex-a7_neon-vfpv4.ipk' failed
  1. This is some vendor SDK, not OpenWrt.
  2. 19.07 is unsupported.

Please upgrade to a newer OpenWrt SDK if you need help.

1 Like

yeah i know is it not openwrt based but it is opensource correct?
can it be ported for 32 bit system? Or is it only for x86_64 architecture

Only the vendor can answer this question. This is the OpenWrt forum, not some generic Linux forum. Please stay with asking questions regarding to or at least closely related to OpenWrt.

1 Like

yup , thanks

1 Like