What's new

Solved Trying to compile the source code encountered an error 'No such file or directory'

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

tpxcer

New Around Here
Hi~!

I had a problem compiling the source code for ax86u ,anyone can help me ? Thanks.

My Config:

Code:
System: Ubuntu 24.04
Source Code Version: Last(Master)

export LD_LIBRARY_PATH=$LD_LIBRARY:/opt/toolchains/crosstools-arm-gcc-5.5-linux-4.1-glibc-2.26-binutils-2.28.1/usr/lib
export TOOLCHAIN_BASE=/opt/toolchains
PATH=$PATH:/opt/toolchains/crosstools-arm-gcc-5.5-linux-4.1-glibc-2.26-binutils-2.28.1/usr/bin
PATH=$PATH:/opt/toolchains/crosstools-aarch64-gcc-5.5-linux-4.1-glibc-2.26-binutils-2.28.1/usr/bin


cd ~/amng-build/release/src-rt-5.02L.07p2axhnd
make rt-ax86u

Error:

Code:
cc1: fatal error: /home/tpxcer/amng-build/release/src-rt-5.02L.07p2axhnd/bcmdrivers/broadcom/net/wl/bcm94908/main/src/router/busybox/include/autoconf.h: No such file or directory
compilation terminated.
cc1: fatal error: /home/tpxcer/amng-build/release/src-rt-5.02L.07p2axhnd/bcmdrivers/broadcom/net/wl/bcm94908/main/src/router/busybox/include/autoconf.h: No such file or directory
compilation terminated.
cc1: fatal error: /home/tpxcer/amng-build/release/src-rt-5.02L.07p2axhnd/bcmdrivers/broadcom/net/wl/bcm94908/main/src/router/busybox/include/autoconf.h: No such file or directory
compilation terminated.
cc1: fatal error: /home/tpxcer/amng-build/release/src-rt-5.02L.07p2axhnd/bcmdrivers/broadcom/net/wl/bcm94908/main/src/router/busybox/include/autoconf.h: No such file or directory
compilation terminated.
cc1: fatal error: /home/tpxcer/amng-build/release/src-rt-5.02L.07p2axhnd/bcmdrivers/broadcom/net/wl/bcm94908/main/src/router/busybox/include/autoconf.h: No such file or directory
compilation terminated.
cc1: fatal error: /home/tpxcer/amng-build/release/src-rt-5.02L.07p2axhnd/bcmdrivers/broadcom/net/wl/bcm94908/main/src/router/busybox/include/autoconf.h: No such file or directory
compilation terminated.
cc1: fatal error: /home/tpxcer/amng-build/release/src-rt-5.02L.07p2axhnd/bcmdrivers/broadcom/net/wl/bcm94908/main/src/router/busybox/include/autoconf.h: No such file or directory
compilation terminated.
cc1: fatal error: /home/tpxcer/amng-build/release/src-rt-5.02L.07p2axhnd/bcmdrivers/broadcom/net/wl/bcm94908/main/src/router/busybox/include/autoconf.h: No such file or directory
compilation terminated.
cc1: fatal error: /home/tpxcer/amng-build/release/src-rt-5.02L.07p2axhnd/bcmdrivers/broadcom/net/wl/bcm94908/main/src/router/busybox/include/autoconf.h: No such file or directory
compilation terminated.
version.c:3:21: fatal error: version.h: No such file or directory
compilation terminated.
defaults.c:11:21: fatal error: version.h: No such file or directory
compilation terminated.
defaults.c:11:21: fatal error: version.h: No such file or directory
compilation terminated.
rm -f *.o *.so *.a .*.depend *.prep sysdeps/*.o sysdeps/broadcom/*.o sysdeps/ralink/*.o sysdeps/qtn/*.o
make[5]: Leaving directory '/home/tpxcer/amng-build/release/src/router/shared'
make[5]: Entering directory '/home/tpxcer/amng-build/release/src/router/libdisk'
rm -f *.o libdisk.so write_smb_conf test_of_var_files test_disk1 test_disk2 test_share write_webdav_conf write_webdav_conf
make[5]: Leaving directory '/home/tpxcer/amng-build/release/src/router/libdisk'
make[5]: Entering directory '/home/tpxcer/amng-build/release/src/router/rc'
rm -f rc *.o .*.depend *.prep libconn_diag.so
rm -f wps_pbcd
make[5]: Leaving directory '/home/tpxcer/amng-build/release/src/router/rc'
make[5]: Entering directory '/home/tpxcer/amng-build/release/src-rt-5.02L.07p2axhnd/router-sysdep/wlan/nvram'
"Build BCA Wireless Router"
rm -f *.o
rm -f libnvram.so nvram nvram_shared.o main.o brcm_generic_lock.o
make[5]: Leaving directory '/home/tpxcer/amng-build/release/src-rt-5.02L.07p2axhnd/router-sysdep/wlan/nvram'
make[5]: Entering directory '/home/tpxcer/amng-build/release/src/router/httpd'
In file included from /home/tpxcer/amng-build/release/src-rt-5.02L.07p2axhnd/bcmdrivers/broadcom/net/wl/bcm94908/main/src/router/json-c/json_object.h:24:0,
                 from /home/tpxcer/amng-build/release/src-rt-5.02L.07p2axhnd/bcmdrivers/broadcom/net/wl/bcm94908/main/src/router/json-c/linkhash.h:16,
                 from /home/tpxcer/amng-build/release/src-rt-5.02L.07p2axhnd/bcmdrivers/broadcom/net/wl/bcm94908/main/src/router/json-c/json.h:22,
                 from data_arrays.c:67:
/home/tpxcer/amng-build/release/src-rt-5.02L.07p2axhnd/bcmdrivers/broadcom/net/wl/bcm94908/main/src/router/json-c/json_inttypes.h:5:25: fatal error: json_config.h: No such file or directory
compilation terminated.
In file included from web.c:126:0:
/home/tpxcer/amng-build/release/src-rt-5.02L.07p2axhnd/bcmdrivers/broadcom/net/wl/bcm94908/main/src/router/networkmap/networkmap.h:11:21: fatal error: version.h: No such file or directory
compilation terminated.
In file included from /home/tpxcer/amng-build/release/src-rt-5.02L.07p2axhnd/bcmdrivers/broadcom/net/wl/bcm94908/main/src/router/json-c/json_object.h:24:0,
                 from ej.c:42:
/home/tpxcer/amng-build/release/src-rt-5.02L.07p2axhnd/bcmdrivers/broadcom/net/wl/bcm94908/main/src/router/json-c/json_inttypes.h:5:25: fatal error: json_config.h: No such file or directory
 
Last edited:
Change Ubuntu from 20.04 to 18.04 ,still not works.


Code:
make[5]: Entering directory '/home/tpxcer/amng-build/release/src/router/wget'
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /home/tpxcer/amng-build/release/src/router/wget/build-aux/missing aclocal-1.16 -I m4
/home/tpxcer/amng-build/release/src/router/wget/build-aux/missing: line 81: aclocal-1.16: command not found
WARNING: 'aclocal-1.16' is missing on your system.
         You should only need it if you modified 'acinclude.m4' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'aclocal' program is part of the GNU Automake package:
         <https://www.gnu.org/software/automake>
         It also requires GNU Autoconf, GNU m4 and Perl in order to run:
         <https://www.gnu.org/software/autoconf>
         <https://www.gnu.org/software/m4/>
         <https://www.perl.org/>
Makefile:1727: recipe for target 'aclocal.m4' failed
make[5]: *** [aclocal.m4] Error 127
make[5]: Leaving directory '/home/tpxcer/amng-build/release/src/router/wget'
Makefile:7386: recipe for target 'wget' failed
make[4]: *** [wget] Error 2
make[4]: Leaving directory '/home/tpxcer/amng-build/release/src/router'
Makefile:31: recipe for target 'router_all' failed
make[3]: *** [router_all] Error 2
make[3]: Leaving directory '/home/tpxcer/amng-build/release/src-rt-5.02L.07p2axhnd/userspace'
build/Makefile:307: recipe for target 'userspace' failed
make[2]: *** [userspace] Error 2
make[2]: Leaving directory '/home/tpxcer/amng-build/release/src-rt-5.02L.07p2axhnd'
Makefile:5832: recipe for target 'bin' failed
make[1]: *** [bin] Error 2
make[1]: Leaving directory '/home/tpxcer/amng-build/release/src-rt-5.02L.07p2axhnd'
Makefile:6049: recipe for target 'rt-ax86u' failed
make: *** [rt-ax86u] Error 2
 
Last edited:
The reason is right on the first few lines:


Install it.
I installed Ubuntu 20.04 using a VMware virtual machine and then compiled RT-AC86U using amcfwm. Sometimes compilation is successful, and sometimes errors are reported. Then it was compiled using WSL2, and the same error still occurred. Can you help me see where the problem is? The error is as follows:

Code:
wl.c: In function ‘dhd_bssiovar_getint’:
wl.c:605:30: warning: passing argument 2 of ‘dhd_bssiovar_get’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  ret = dhd_bssiovar_get(dhd, iovar, bssidx, pval, sizeof(int));
                              ^
wl.c:490:1: note: expected ‘char *’ but argument is of type ‘const char *’
 dhd_bssiovar_get(char *ifname, char *iovar, int bssidx, void *outbuf, int len)
 ^
wl.c: At top level:
wl.c:551:1: warning: ‘dhd_get’ defined but not used [-Wunused-function]
 dhd_get(void *dhd, int cmd, void *buf, int len)
 ^
wl.c:557:1: warning: ‘dhd_bssiovar_mkbuf’ defined but not used [-Wunused-function]
 dhd_bssiovar_mkbuf(const char *iovar, int bssidx, void *param,
 ^
 [shared] CC wl_linux.o
 [shared] CC broadcom.o
sysdeps/broadcom/broadcom.c: In function ‘get_wlan_service_status’:
sysdeps/broadcom/broadcom.c:604:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  result = *(int*)data_buf;
  ^
sysdeps/broadcom/broadcom.c: In function ‘set_wlan_service_status’:
sysdeps/broadcom/broadcom.c:703:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   isup = *(int *) buf;
   ^
sysdeps/broadcom/broadcom.c: In function ‘get_uplinkports_linkrate’:
sysdeps/broadcom/broadcom.c:1033:6: warning: variable ‘ext_lret’ set but not used [-Wunused-but-set-variable]
  int ext_lret=0, model, mask;
      ^
#nothing to do...
 [shared] CC usb.o
 [shared] CC util.o
 [shared] CC linux_swap.o
 [shared] CC ext.o
 [shared] CC fat.o
 [shared] CC ntfs.o
 [shared] CC hfs.o
 [shared] CC hash_md5.o
 [shared] CC bb_bswap_64.o
 [shared] CC volume_id.o
 [shared] CC at_cmd.o
 [shared] CC ifaddrs.o
 [shared] CC wlif_utils.o
wlif_utils.c: In function ‘get_wifi_maxpower’:
wlif_utils.c:2749:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
 [shared] CC linux_timer.o
 [shared] CC UdpLib.o
cp prebuild/bcmutils.o .
 [shared] CC bcmwifi_channels.o
 [shared] CC memaccess.o
 [shared] CC bcm_usched.o
 [shared] CC bcm_stamon.o
 [shared] CC sched_v2.o
cp -f /home/tfy/amng-build/release/src-rt-5.02hnd/bcmdrivers/broadcom/net/wl/bcm94908/main/src/router/sw-hw-auth/prebuild/RT-AC86U/sw_auth.o ./
cp -f /home/tfy/amng-build/release/src-rt-5.02hnd/bcmdrivers/broadcom/net/wl/bcm94908/main/src/router/sw-hw-auth/prebuild/RT-AC86U/hw_auth.o ./
cp -f /home/tfy/amng-build/release/src-rt-5.02hnd/bcmdrivers/broadcom/net/wl/bcm94908/main/src/router/aaews/prebuild/RT-AC86U/aae_ipc.o ./
cp: cannot stat '/home/tfy/amng-build/release/src-rt-5.02hnd/bcmdrivers/broadcom/net/wl/bcm94908/main/src/router/aaews/prebuild/RT-AC86U/aae_ipc.o': No such file or directory
make[6]: *** [Makefile:520: aae_ipc.o] Error 1
make[6]: Leaving directory '/home/tfy/amng-build/release/src/router/shared'
make[5]: *** [Makefile:3874: shared] Error 2
make[5]: Leaving directory '/home/tfy/amng-build/release/src/router'
make[4]: *** [Makefile:30: router_all] Error 2
make[4]: Leaving directory '/home/tfy/amng-build/release/src-rt-5.02hnd/userspace'
make[3]: *** [make.hndrt:211: userspace] Error 2
make[3]: Leaving directory '/home/tfy/amng-build/release/src-rt-5.02hnd'
make[2]: *** [make.hndrt:19: parallel_targets] Error 2
make[2]: Leaving directory '/home/tfy/amng-build/release/src-rt-5.02hnd'
make[1]: *** [Makefile:5929: bin] Error 2
make[1]: Leaving directory '/home/tfy/amng-build/release/src-rt-5.02hnd'
make: *** [Makefile:6145: rt-ac86u] Error 2
tfy@DESKTOP-85H7GPJ:~/amng-build/release/src-rt-5.02hnd$
 
Last edited:
确保从386_x分支进行编译。
Okay, thank you, Mamelin. I will give it a try. In addition, I have changed the memory of AC86U to 1GB and tested its normal operation. I want to modify the firmware from the source code to support 1GB of memory. What should I do?
I have preliminarily located the memory information in the amng build/release/src rt 5.02hnd/targets/cfe/sysdeps/rt AC86U/cfe4908ram.bin file. I need to use Winhex to find the hexadecimal code 27140000000000002301 and replace it with 27150000000000002301, and then compile it. I don't know if it works.
 
Last edited:
好的,谢谢你,马默林。我会试一试。此外,我已将AC86U的内存更改为1GB,并测试了其正常运行。我想从源代码修改固件以支持 1GB 内存。我该怎么办?
我已经初步将内存信息定位在amng build/release/src rt 5.02hnd/targets/cfe/sysdeps/rt AC86U/cfe4908ram.bin文件中。我需要使用 Winhex 查找十六进制代码27140000002301并将其替换为 2715000002301,然后对其进行编译。我不知道它是否有效。
It seems that my CPU is 4906, not 4908😂
 
Make sure you are compiling from the 386_x branch.
Thank you.Tested twice and it was successful.
Code:
ubinize: writing layout volume
ubinize: done
No XIP to flash capability. Bootrom boot only. Build unsecure bootrom boot
/home/tfy/amng-build/release/src-rt-5.02hnd/hostTools/scripts/bcmImageMaker --cferom /home/tfy/amng-build/release/src-rt-5.02hnd/targets/cfe/cfe4908rom.bin --blocksize 131072 --bootofs 65536 --bootsize 131072  --ubifs --bootfs bootfs128kb.img --rootfs ubi_rootfs128kb.img --image RT-AC86U_386.11_alpha1_cferom_ubi --fsonly RT-AC86U_386.11_alpha1_ubi --unsecurehdr
64+0 records in
64+0 records out
65536 bytes (66 kB, 64 KiB) copied, 0.0002367 s, 277 MB/s
128+0 records in
128+0 records out
131072 bytes (131 kB, 128 KiB) copied, 0.000547 s, 240 MB/s
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.0027779 s, 377 MB/s
1+0 records in
1+0 records out
512 bytes copied, 6.95e-05 s, 7.4 MB/s
Packaging gen3 unsecure boot. This image expects the bootrom to run ...
input file: merged.tmp
addvtoken: little endian Output file size = 82837524 with image crc = 0x50bf4288
input file: RT-AC86U_386.11_alpha1_cferom_ubi
addvtoken: little endian Output file size = 83886100 with image crc = 0xf400e06a
find /home/tfy/amng-build/release/src-rt-5.02hnd/targets/94908HND -name *_nand_cferom_*.w  -printf "%f\n" | while read name; do cp /home/tfy/amng-build/release/src-rt-5.02hnd/targets/94908HND/$name /home/tfy/amng-build/release/src-rt-5.02hnd/image/${name/.w/_.L.-230416_1057.w}; done
md5sum /home/tfy/amng-build/release/src-rt-5.02hnd/targets/94908HND/RT-AC86U_386.11_alpha1_ubi.w > /home/tfy/amng-build/release/src-rt-5.02hnd/targets/94908HND/RT-AC86U_386.11_alpha1_ubi.md5
md5sum /home/tfy/amng-build/release/src-rt-5.02hnd/targets/94908HND/RT-AC86U_386.11_alpha1_cferom_ubi.w > /home/tfy/amng-build/release/src-rt-5.02hnd/targets/94908HND/RT-AC86U_386.11_alpha1_cferom_ubi.md5
if [ -f /home/tfy/amng-build/release/src-rt-5.02hnd/../../buildtools/private.pem ] ; then openssl sha1 -sign /home/tfy/amng-build/release/src-rt-5.02hnd/../../buildtools/private.pem -out image/RT-AC86U_386.11_alpha1_ubi_rsa.zip /home/tfy/amng-build/release/src-rt-5.02hnd/targets/94908HND/RT-AC86U_386.11_alpha1_ubi.w; openssl sha1 -sign /home/tfy/amng-build/release/src-rt-5.02hnd/../../buildtools/private.pem -out image/RT-AC86U_386.11_alpha1_cferom_ubi_rsa.zip /home/tfy/amng-build/release/src-rt-5.02hnd/targets/94908HND/RT-AC86U_386.11_alpha1_cferom_ubi.w; fi
make[3]: Leaving directory '/home/tfy/amng-build/release/src-rt-5.02hnd'
make[2]: Leaving directory '/home/tfy/amng-build/release/src-rt-5.02hnd'
make[1]: Leaving directory '/home/tfy/amng-build/release/src-rt-5.02hnd'
tfy@DESKTOP-85H7GPJ:~/amng-build/release/src-rt-5.02hnd$
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top