wpa_supplicant v2.10 cross-compile for Hi3518ev200

67 views Asked by At

I am trying to cross-compile the latest wpa_supplicant v2.10, and need some advice about the below error.

I compiled the openssl and libnl; however, it fails when compiling the wpa_supplicant

  CC  ../src/drivers/driver_wext.c
  CC  ../src/drivers/drivers.c
  CC  ../src/l2_packet/l2_packet_linux.c
/usr/lib/dbus-1.0/debug-build/lib/libdbus-1.so: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
make: *** [Makefile:1894: wpa_supplicant] Error 1

The dbus-1 of the above step refers to the following libs and cflags locations

root@Debian12:/home/dev/yi-hack-v5/src/wpa/wpa_supplicant-2.10/wpa_supplicant# pkg-config --libs --cflags dbus-1
-I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/debug-build/lib/dbus-1.0/include -L/usr/lib/dbus-1.0/debug-build/lib -ldbus-1 

Below is the library file output.

root@Debian12:/home/dev/yi-hack-v5/src/wpa/wpa_supplicant-2.10/wpa_supplicant# file /usr/lib/dbus-1.0/debug-build/lib/libdbus-1.so.3.32.4 
/usr/lib/dbus-1.0/debug-build/lib/libdbus-1.so.3.32.4: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=3afa1524c30e559f584583e19c3b73788d28354a, stripped 

The symlinks:

root@Debian12:/home/dev/yi-hack-v5/src/wpa/wpa_supplicant-2.10/wpa_supplicant# ls -l /usr/lib/dbus-1.0/debug-build/lib/
total 1872
drwxr-xr-x 3 root root    4096 Nov 15 07:43 cmake
drwxr-xr-x 3 root root    4096 Nov 15 07:43 dbus-1.0
-rw-r--r-- 1 root root 1310198 Sep 16 11:03 libdbus-1.a
lrwxrwxrwx 1 root root      19 Sep 16 11:03 libdbus-1.so -> libdbus-1.so.3.32.4
lrwxrwxrwx 1 root root      19 Sep 16 11:03 libdbus-1.so.3 -> libdbus-1.so.3.32.4
-rw-r--r-- 1 root root  593656 Sep 16 11:03 libdbus-1.so.3.32.4
drwxr-xr-x 2 root root    4096 Nov 15 07:43 pkgconfig

Any help or direction is appreciated.

I tried Debian 9 with similar effect - I may try https://github.com/drygdryg/wifi_tools_static as per suggestions, but its mainly for Android, so need to adapt for my own platform.

1

There are 1 answers

0
alienatedsec On

I think I figured it out myself. I had to compile dbus, and expat for the same platform. I followed this guide How to cross-compile D-Bus to ARM?