chGoodchild / TollGateNostrToolKit

0 stars 0 forks source link

__BYTE_ORDER problem with ipq806x #19

Open chGoodchild opened 1 week ago

chGoodchild commented 1 week ago

Facing the error with this config file:

username@ubuntu-32gb-fsn1-1:~/TollGateNostrToolKit$ cat ~/openwrt/.config | grep "CONFIG_TARGET_.*=y"
CONFIG_TARGET_ipq806x=y
CONFIG_TARGET_ipq806x_generic=y
CONFIG_TARGET_ipq806x_generic_DEVICE_netgear_r7800=y
CONFIG_TARGET_ROOTFS_INITRAMFS=y
CONFIG_TARGET_INITRAMFS_COMPRESSION_NONE=y
CONFIG_TARGET_ROOTFS_SQUASHFS=y
CONFIG_TARGET_UBIFS_FREE_SPACE_FIXUP=y
CONFIG_TARGET_PREINIT_SUPPRESS_STDERR=y
CONFIG_TARGET_INIT_SUPPRESS_STDERR=y

Relevant parts from error log:

username@ubuntu-32gb-fsn1-1:~/openwrt$ grep -n -E "Error" -C 5 ~/openwrt/make_logs.md
31529-conf.c: In function 'main':
31530-conf.c:617:41: warning: format not a string literal and no format arguments [-Wformat-security]
31531-  617 |                                         _("\n*** The configuration requires explicit update.\n\n"));
31532-      |                                         ^
31533-conf.c:669:25: warning: format not a string literal and no format arguments [-Wformat-security]
31534:  669 |                         fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
31535-      |                         ^~~~~~~
31536-conf.c:673:25: warning: format not a string literal and no format arguments [-Wformat-security]
31537:  673 |                         fprintf(stderr, _("\n*** Error during update of the configuration.\n\n"));
31538-      |                         ^~~~~~~
31539-conf.c:684:25: warning: format not a string literal and no format arguments [-Wformat-security]
31540:  684 |                         fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
31541-      |                         ^~~~~~~
31542-OpenWrt-libtool: compile:  arm-openwrt-linux-muslgnueabi-gcc -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/usr/include -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include/fortify -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gmp-6.2.1=gmp-6.2.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic -c gcd.c  -fPIC -DPIC -o .libs/gcd.o
31543-arm-openwrt-linux-muslgnueabi-gcc  -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include  -DAES_ASM -DBSAES_ASM -DECP_NISTZ256_ASM -DGHASH_ASM -DKECCAK1600_ASM -DOPENSSL_BN_ASM_GF2m -DOPENSSL_BN_ASM_MONT -DOPENSSL_CPUID_OBJ -DPOLY1305_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -fPIC -pthread -Wa,--noexecstack -Wall -O3 -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/openssl-3.0.13=openssl-3.0.13 -ffunction-sections -fdata-sections -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -O3 -DPIC -fpic -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/openssl-3.0.13=openssl-3.0.13 -ffunction-sections -fdata-sections -Wformat -Werror=format-security -fstack-protector -O3 -fpic -znow -zrelro -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSLDIR="\"/etc/ssl\"" -DENGINESDIR="\"/usr/lib/engines-3\"" -DMODULESDIR="\"/usr/lib/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -D_FORTIFY_SOURCE=1 -DPIC -DOPENSSL_PREFER_CHACHA_OVER_GCM -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/usr/include -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include/fortify -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include -MMD -MF crypto/rsa/libcrypto-lib-rsa_x931.d.tmp -MT crypto/rsa/libcrypto-lib-rsa_x931.o -c -o crypto/rsa/libcrypto-lib-rsa_x931.o crypto/rsa/rsa_x931.c
31544-yes
31545-checking for stdint.h... cc1: note: someone does not honour COPTS correctly, passed 2 times
--
31912-OpenWrt-libtool: compile:  arm-openwrt-linux-muslgnueabi-gcc -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/usr/include -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include/fortify -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gmp-6.2.1=gmp-6.2.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic -c millerrabin.c  -fPIC -DPIC -o .libs/millerrabin.o
31913-arm-openwrt-linux-muslgnueabi-gcc  -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include  -DAES_ASM -DBSAES_ASM -DECP_NISTZ256_ASM -DGHASH_ASM -DKECCAK1600_ASM -DOPENSSL_BN_ASM_GF2m -DOPENSSL_BN_ASM_MONT -DOPENSSL_CPUID_OBJ -DPOLY1305_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -fPIC -pthread -Wa,--noexecstack -Wall -O3 -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/openssl-3.0.13=openssl-3.0.13 -ffunction-sections -fdata-sections -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -O3 -DPIC -fpic -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/openssl-3.0.13=openssl-3.0.13 -ffunction-sections -fdata-sections -Wformat -Werror=format-security -fstack-protector -O3 -fpic -znow -zrelro -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSLDIR="\"/etc/ssl\"" -DENGINESDIR="\"/usr/lib/engines-3\"" -DMODULESDIR="\"/usr/lib/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -D_FORTIFY_SOURCE=1 -DPIC -DOPENSSL_PREFER_CHACHA_OVER_GCM -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/usr/include -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include/fortify -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include -MMD -MF crypto/x509/libcrypto-lib-v3_bitst.d.tmp -MT crypto/x509/libcrypto-lib-v3_bitst.o -c -o crypto/x509/libcrypto-lib-v3_bitst.o crypto/x509/v3_bitst.c
31914-/bin/bash ../libtool  --tag=CC   --mode=compile arm-openwrt-linux-muslgnueabi-gcc -DHAVE_CONFIG_H -I. -I..  -D__GMP_WITHIN_GMP -I.. -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/usr/include -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include/fortify -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include   -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gmp-6.2.1=gmp-6.2.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic  -c -o mod.lo mod.c
31915-cc1: note: someone does not honour COPTS correctly, passed 2 times
31916-arm-openwrt-linux-muslgnueabi-gcc  -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include  -DAES_ASM -DBSAES_ASM -DECP_NISTZ256_ASM -DGHASH_ASM -DKECCAK1600_ASM -DOPENSSL_BN_ASM_GF2m -DOPENSSL_BN_ASM_MONT -DOPENSSL_CPUID_OBJ -DPOLY1305_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -fPIC -pthread -Wa,--noexecstack -Wall -O3 -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/openssl-3.0.13=openssl-3.0.13 -ffunction-sections -fdata-sections -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -O3 -DPIC -fpic -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/openssl-3.0.13=openssl-3.0.13 -ffunction-sections -fdata-sections -Wformat -Werror=format-security -fstack-protector -O3 -fpic -znow -zrelro -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSLDIR="\"/etc/ssl\"" -DENGINESDIR="\"/usr/lib/engines-3\"" -DMODULESDIR="\"/usr/lib/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -D_FORTIFY_SOURCE=1 -DPIC -DOPENSSL_PREFER_CHACHA_OVER_GCM -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/usr/include -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include/fortify -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include -MMD -MF crypto/x509/libcrypto-lib-v3_conf.d.tmp -MT crypto/x509/libcrypto-lib-v3_conf.o -c -o crypto/x509/libcrypto-lib-v3_conf.o crypto/x509/v3_conf.c
31917:checking for GPG Error - version >= 1.27... OpenWrt-libtool: compile:  arm-openwrt-linux-muslgnueabi-gcc -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/usr/include -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include/fortify -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gmp-6.2.1=gmp-6.2.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic -c mfac_uiui.c -o mfac_uiui.o >/dev/null 2>&1
31918-cc1: note: someone does not honour COPTS correctly, passed 2 times
31919-arm-openwrt-linux-muslgnueabi-gcc -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/libselinux-3.5=libselinux-3.5 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -D_LARGEFILE64_SOURCE  -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/usr/include -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include/fortify -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include  -I../include -D_GNU_SOURCE  -DUSE_PCRE2 -DPCRE2_CODE_UNIT_WIDTH=8 -I/home/username/openwrt/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/usr/include  -L/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/usr/lib -L/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/lib -znow -zrelro  -L../src  compute_av.c  -lselinux -lfts -o compute_av
31920-OpenWrt-libtool: compile:  arm-openwrt-linux-muslgnueabi-gcc -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/usr/include -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include/fortify -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gmp-6.2.1=gmp-6.2.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic -c mod.c  -fPIC -DPIC -o .libs/mod.o
31921-OpenWrt-libtool: compile:  arm-openwrt-linux-muslgnueabi-gcc -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/usr/include -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include/fortify -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gmp-6.2.1=gmp-6.2.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic -c millerrabin.c -o millerrabin.o >/dev/null 2>&1
31922-/bin/bash ../libtool  --tag=CC   --mode=compile arm-openwrt-linux-muslgnueabi-gcc -DHAVE_CONFIG_H -I. -I..  -D__GMP_WITHIN_GMP -I.. -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/usr/include -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include/fortify -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include   -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gmp-6.2.1=gmp-6.2.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic  -c -o mul.lo mul.c
--
43319-arm-openwrt-linux-muslgnueabi-ranlib providers/liblegacy.a || echo Never mind.
43320-rm -f providers/libcommon.a
43321-arm-openwrt-linux-muslgnueabi-ar qc providers/libcommon.a providers/common/der/libcommon-lib-der_digests_gen.o providers/common/der/libcommon-lib-der_dsa_gen.o providers/common/der/libcommon-lib-der_dsa_key.o providers/common/der/libcommon-lib-der_dsa_sig.o providers/common/der/libcommon-lib-der_ec_gen.o providers/common/der/libcommon-lib-der_ec_key.o providers/common/der/libcommon-lib-der_ec_sig.o providers/common/der/libcommon-lib-der_ecx_gen.o providers/common/der/libcommon-lib-der_ecx_key.o providers/common/der/libcommon-lib-der_rsa_gen.o providers/common/der/libcommon-lib-der_rsa_key.o providers/common/der/libcommon-lib-der_wrap_gen.o providers/common/libcommon-lib-provider_ctx.o providers/common/libcommon-lib-provider_err.o providers/implementations/ciphers/libcommon-lib-ciphercommon.o providers/implementations/ciphers/libcommon-lib-ciphercommon_block.o providers/implementations/ciphers/libcommon-lib-ciphercommon_ccm.o providers/implementations/ciphers/libcommon-lib-ciphercommon_ccm_hw.o providers/implementations/ciphers/libcommon-lib-ciphercommon_gcm.o providers/implementations/ciphers/libcommon-lib-ciphercommon_gcm_hw.o providers/implementations/ciphers/libcommon-lib-ciphercommon_hw.o providers/implementations/digests/libcommon-lib-digestcommon.o ssl/record/libcommon-lib-tls_pad.o
43322-arm-openwrt-linux-muslgnueabi-ranlib providers/libcommon.a || echo Never mind.
43323-mkdir .lib 2>/dev/null
43324:make[4]: [Makefile:322: libhogweed.so] Error 1 (ignored)
43325-(cd .lib \
43326-          && rm -f libhogweed.so \
43327-  && ln -s ../libhogweed.so libhogweed.so \
43328-  && [ -z "libhogweed.so.6" ] \
43329-  || { rm -f libhogweed.so.6 \
--
47329-arm-openwrt-linux-muslgnueabi-gcc -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gltollgate-1.0=gltollgate-1.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/username/openwrt/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/usr/include -I/home/username/openwrt/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/target-mips_24kc_musl/usr/include -c -o sha256.o sha256.c  # Ensure this line begins with a tab
47330-In file included from sha256.c:10:
47331-endian.h:127:2: error: #error "__BYTE_ORDER already defined, but not equal to __BIG_ENDIAN"
47332-  127 | #error "__BYTE_ORDER already defined, but not equal to __BIG_ENDIAN"
47333-      |  ^~~~~
47334:make[4]: *** [Makefile:21: sha256.o] Error 1
47335-make[4]: Leaving directory '/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gltollgate-1.0'
47336:make[3]: *** [Makefile:61: /home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gltollgate-1.0/.built] Error 2
47337-make[3]: Leaving directory '/home/username/openwrt/feeds/custom/custom/gltollgate'
47338-time: package/feeds/custom/gltollgate/compile#3.09#1.81#12.05
47339-    ERROR: package/feeds/custom/gltollgate failed to build.
47340:make[2]: *** [package/Makefile:129: package/feeds/custom/gltollgate/compile] Error 1
47341-make[2]: *** Waiting for unfinished jobs....
47342-autoreconf: configure.ac: tracing
47343-autoreconf: running: /home/username/openwrt/staging_dir/host/bin/libtoolize --install --force
47344-OpenWrt-libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
47345-OpenWrt-libtoolize: linking file 'build-aux/config.guess'
--
52980-rm -rf /home/username/openwrt/tmp/stage-gnutls
52981-touch /home/username/openwrt/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/stamp/.gnutls_installed
52982-make[3]: Leaving directory '/home/username/openwrt/feeds/packages/libs/gnutls'
52983-time: package/feeds/packages/gnutls/compile#383.76#86.28#255.57
52984-make[2]: Leaving directory '/home/username/openwrt'
52985:make[1]: *** [package/Makefile:123: /home/username/openwrt/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/stamp/.package_compile] Error 2
52986-make[1]: Leaving directory '/home/username/openwrt'
52987:make: *** [/home/username/openwrt/include/toplevel.mk:232: world] Error 2
username@ubuntu-32gb-fsn1-1:~/openwrt$ 
username@ubuntu-32gb-fsn1-1:~/openwrt$ grep -n -E "Error" -C 5 ~/openwrt/make_logs.md
31529-conf.c: In function 'main':
31530-conf.c:617:41: warning: format not a string literal and no format arguments [-Wformat-security]
31531-  617 |                                         _("\n*** The configuration requires explicit update.\n\n"));
31532-      |                                         ^
31533-conf.c:669:25: warning: format not a string literal and no format arguments [-Wformat-security]
31534:  669 |                         fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
31535-      |                         ^~~~~~~
31536-conf.c:673:25: warning: format not a string literal and no format arguments [-Wformat-security]
31537:  673 |                         fprintf(stderr, _("\n*** Error during update of the configuration.\n\n"));
31538-      |                         ^~~~~~~
31539-conf.c:684:25: warning: format not a string literal and no format arguments [-Wformat-security]
31540:  684 |                         fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
31541-      |                         ^~~~~~~
31542-OpenWrt-libtool: compile:  arm-openwrt-linux-muslgnueabi-gcc -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/usr/include -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include/fortify -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gmp-6.2.1=gmp-6.2.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic -c gcd.c  -fPIC -DPIC -o .libs/gcd.o
31543-arm-openwrt-linux-muslgnueabi-gcc  -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include  -DAES_ASM -DBSAES_ASM -DECP_NISTZ256_ASM -DGHASH_ASM -DKECCAK1600_ASM -DOPENSSL_BN_ASM_GF2m -DOPENSSL_BN_ASM_MONT -DOPENSSL_CPUID_OBJ -DPOLY1305_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -fPIC -pthread -Wa,--noexecstack -Wall -O3 -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/openssl-3.0.13=openssl-3.0.13 -ffunction-sections -fdata-sections -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -O3 -DPIC -fpic -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/openssl-3.0.13=openssl-3.0.13 -ffunction-sections -fdata-sections -Wformat -Werror=format-security -fstack-protector -O3 -fpic -znow -zrelro -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSLDIR="\"/etc/ssl\"" -DENGINESDIR="\"/usr/lib/engines-3\"" -DMODULESDIR="\"/usr/lib/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -D_FORTIFY_SOURCE=1 -DPIC -DOPENSSL_PREFER_CHACHA_OVER_GCM -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/usr/include -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include/fortify -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include -MMD -MF crypto/rsa/libcrypto-lib-rsa_x931.d.tmp -MT crypto/rsa/libcrypto-lib-rsa_x931.o -c -o crypto/rsa/libcrypto-lib-rsa_x931.o crypto/rsa/rsa_x931.c
31544-yes
31545-checking for stdint.h... cc1: note: someone does not honour COPTS correctly, passed 2 times
--
31912-OpenWrt-libtool: compile:  arm-openwrt-linux-muslgnueabi-gcc -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/usr/include -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include/fortify -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gmp-6.2.1=gmp-6.2.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic -c millerrabin.c  -fPIC -DPIC -o .libs/millerrabin.o
31913-arm-openwrt-linux-muslgnueabi-gcc  -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include  -DAES_ASM -DBSAES_ASM -DECP_NISTZ256_ASM -DGHASH_ASM -DKECCAK1600_ASM -DOPENSSL_BN_ASM_GF2m -DOPENSSL_BN_ASM_MONT -DOPENSSL_CPUID_OBJ -DPOLY1305_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -fPIC -pthread -Wa,--noexecstack -Wall -O3 -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/openssl-3.0.13=openssl-3.0.13 -ffunction-sections -fdata-sections -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -O3 -DPIC -fpic -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/openssl-3.0.13=openssl-3.0.13 -ffunction-sections -fdata-sections -Wformat -Werror=format-security -fstack-protector -O3 -fpic -znow -zrelro -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSLDIR="\"/etc/ssl\"" -DENGINESDIR="\"/usr/lib/engines-3\"" -DMODULESDIR="\"/usr/lib/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -D_FORTIFY_SOURCE=1 -DPIC -DOPENSSL_PREFER_CHACHA_OVER_GCM -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/usr/include -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include/fortify -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include -MMD -MF crypto/x509/libcrypto-lib-v3_bitst.d.tmp -MT crypto/x509/libcrypto-lib-v3_bitst.o -c -o crypto/x509/libcrypto-lib-v3_bitst.o crypto/x509/v3_bitst.c
31914-/bin/bash ../libtool  --tag=CC   --mode=compile arm-openwrt-linux-muslgnueabi-gcc -DHAVE_CONFIG_H -I. -I..  -D__GMP_WITHIN_GMP -I.. -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/usr/include -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include/fortify -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include   -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gmp-6.2.1=gmp-6.2.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic  -c -o mod.lo mod.c
31915-cc1: note: someone does not honour COPTS correctly, passed 2 times
31916-arm-openwrt-linux-muslgnueabi-gcc  -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include  -DAES_ASM -DBSAES_ASM -DECP_NISTZ256_ASM -DGHASH_ASM -DKECCAK1600_ASM -DOPENSSL_BN_ASM_GF2m -DOPENSSL_BN_ASM_MONT -DOPENSSL_CPUID_OBJ -DPOLY1305_ASM -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -fPIC -pthread -Wa,--noexecstack -Wall -O3 -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/openssl-3.0.13=openssl-3.0.13 -ffunction-sections -fdata-sections -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -O3 -DPIC -fpic -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/openssl-3.0.13=openssl-3.0.13 -ffunction-sections -fdata-sections -Wformat -Werror=format-security -fstack-protector -O3 -fpic -znow -zrelro -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSLDIR="\"/etc/ssl\"" -DENGINESDIR="\"/usr/lib/engines-3\"" -DMODULESDIR="\"/usr/lib/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -D_FORTIFY_SOURCE=1 -DPIC -DOPENSSL_PREFER_CHACHA_OVER_GCM -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/usr/include -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include/fortify -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include -MMD -MF crypto/x509/libcrypto-lib-v3_conf.d.tmp -MT crypto/x509/libcrypto-lib-v3_conf.o -c -o crypto/x509/libcrypto-lib-v3_conf.o crypto/x509/v3_conf.c
31917:checking for GPG Error - version >= 1.27... OpenWrt-libtool: compile:  arm-openwrt-linux-muslgnueabi-gcc -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/usr/include -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include/fortify -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gmp-6.2.1=gmp-6.2.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic -c mfac_uiui.c -o mfac_uiui.o >/dev/null 2>&1
31918-cc1: note: someone does not honour COPTS correctly, passed 2 times
31919-arm-openwrt-linux-muslgnueabi-gcc -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/libselinux-3.5=libselinux-3.5 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -D_LARGEFILE64_SOURCE  -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/usr/include -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include/fortify -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include  -I../include -D_GNU_SOURCE  -DUSE_PCRE2 -DPCRE2_CODE_UNIT_WIDTH=8 -I/home/username/openwrt/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/usr/include  -L/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/usr/lib -L/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/lib -znow -zrelro  -L../src  compute_av.c  -lselinux -lfts -o compute_av
31920-OpenWrt-libtool: compile:  arm-openwrt-linux-muslgnueabi-gcc -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/usr/include -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include/fortify -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gmp-6.2.1=gmp-6.2.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic -c mod.c  -fPIC -DPIC -o .libs/mod.o
31921-OpenWrt-libtool: compile:  arm-openwrt-linux-muslgnueabi-gcc -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/usr/include -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include/fortify -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gmp-6.2.1=gmp-6.2.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic -c millerrabin.c -o millerrabin.o >/dev/null 2>&1
31922-/bin/bash ../libtool  --tag=CC   --mode=compile arm-openwrt-linux-muslgnueabi-gcc -DHAVE_CONFIG_H -I. -I..  -D__GMP_WITHIN_GMP -I.. -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/usr/include -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include/fortify -I/home/username/openwrt/staging_dir/toolchain-arm_cortex-a15+neon-vfpv4_gcc-12.3.0_musl_eabi/include   -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gmp-6.2.1=gmp-6.2.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic  -c -o mul.lo mul.c
--
43319-arm-openwrt-linux-muslgnueabi-ranlib providers/liblegacy.a || echo Never mind.
43320-rm -f providers/libcommon.a
43321-arm-openwrt-linux-muslgnueabi-ar qc providers/libcommon.a providers/common/der/libcommon-lib-der_digests_gen.o providers/common/der/libcommon-lib-der_dsa_gen.o providers/common/der/libcommon-lib-der_dsa_key.o providers/common/der/libcommon-lib-der_dsa_sig.o providers/common/der/libcommon-lib-der_ec_gen.o providers/common/der/libcommon-lib-der_ec_key.o providers/common/der/libcommon-lib-der_ec_sig.o providers/common/der/libcommon-lib-der_ecx_gen.o providers/common/der/libcommon-lib-der_ecx_key.o providers/common/der/libcommon-lib-der_rsa_gen.o providers/common/der/libcommon-lib-der_rsa_key.o providers/common/der/libcommon-lib-der_wrap_gen.o providers/common/libcommon-lib-provider_ctx.o providers/common/libcommon-lib-provider_err.o providers/implementations/ciphers/libcommon-lib-ciphercommon.o providers/implementations/ciphers/libcommon-lib-ciphercommon_block.o providers/implementations/ciphers/libcommon-lib-ciphercommon_ccm.o providers/implementations/ciphers/libcommon-lib-ciphercommon_ccm_hw.o providers/implementations/ciphers/libcommon-lib-ciphercommon_gcm.o providers/implementations/ciphers/libcommon-lib-ciphercommon_gcm_hw.o providers/implementations/ciphers/libcommon-lib-ciphercommon_hw.o providers/implementations/digests/libcommon-lib-digestcommon.o ssl/record/libcommon-lib-tls_pad.o
43322-arm-openwrt-linux-muslgnueabi-ranlib providers/libcommon.a || echo Never mind.
43323-mkdir .lib 2>/dev/null
43324:make[4]: [Makefile:322: libhogweed.so] Error 1 (ignored)
43325-(cd .lib \
43326-          && rm -f libhogweed.so \
43327-  && ln -s ../libhogweed.so libhogweed.so \
43328-  && [ -z "libhogweed.so.6" ] \
43329-  || { rm -f libhogweed.so.6 \
--
47329-arm-openwrt-linux-muslgnueabi-gcc -Os -pipe -fno-caller-saves -fno-plt -fhonour-copts -mfloat-abi=hard -fmacro-prefix-map=/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gltollgate-1.0=gltollgate-1.0 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/username/openwrt/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/usr/include -I/home/username/openwrt/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/target-mips_24kc_musl/usr/include -c -o sha256.o sha256.c  # Ensure this line begins with a tab
47330-In file included from sha256.c:10:
47331-endian.h:127:2: error: #error "__BYTE_ORDER already defined, but not equal to __BIG_ENDIAN"
47332-  127 | #error "__BYTE_ORDER already defined, but not equal to __BIG_ENDIAN"
47333-      |  ^~~~~
47334:make[4]: *** [Makefile:21: sha256.o] Error 1
47335-make[4]: Leaving directory '/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gltollgate-1.0'
47336:make[3]: *** [Makefile:61: /home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gltollgate-1.0/.built] Error 2
47337-make[3]: Leaving directory '/home/username/openwrt/feeds/custom/custom/gltollgate'
47338-time: package/feeds/custom/gltollgate/compile#3.09#1.81#12.05
47339-    ERROR: package/feeds/custom/gltollgate failed to build.
47340:make[2]: *** [package/Makefile:129: package/feeds/custom/gltollgate/compile] Error 1
47341-make[2]: *** Waiting for unfinished jobs....
47342-autoreconf: configure.ac: tracing
47343-autoreconf: running: /home/username/openwrt/staging_dir/host/bin/libtoolize --install --force
47344-OpenWrt-libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
47345-OpenWrt-libtoolize: linking file 'build-aux/config.guess'
--
52980-rm -rf /home/username/openwrt/tmp/stage-gnutls
52981-touch /home/username/openwrt/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/stamp/.gnutls_installed
52982-make[3]: Leaving directory '/home/username/openwrt/feeds/packages/libs/gnutls'
52983-time: package/feeds/packages/gnutls/compile#383.76#86.28#255.57
52984-make[2]: Leaving directory '/home/username/openwrt'
52985:make[1]: *** [package/Makefile:123: /home/username/openwrt/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/stamp/.package_compile] Error 2
52986-make[1]: Leaving directory '/home/username/openwrt'
52987:make: *** [/home/username/openwrt/include/toplevel.mk:232: world] Error 2

Claude says:

Based on the log output, there are a few key errors that caused the build to fail:

1. The main error that stopped the build:

make[4]: [Makefile:21: sha256.o] Error 1 make[3]: [Makefile:61: /home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gltollgate-1.0/.built] Error 2 make[2]: *** [package/Makefile:129: package/feeds/custom/gltollgate/compile] Error 1


This error occurred while trying to compile the `gltollgate` package. The specific issue was in compiling `sha256.c`:

In file included from sha256.c:10: endian.h:127:2: error: #error "__BYTE_ORDER already defined, but not equal to __BIG_ENDIAN"


2. There was also an earlier error that was ignored:

make[4]: [Makefile:322: libhogweed.so] Error 1 (ignored)


To resolve these issues:

1. For the `gltollgate` package:
   - Check the `endian.h` file in the package source. It seems there's a conflict with the `__BYTE_ORDER` definition.
   - You might need to update the package to be compatible with the current OpenWrt build environment.
   - Consider checking if there's an updated version of the package available.

2. For the `libhogweed.so` error:
   - Although this error was ignored, it might be worth investigating why it occurred.
   - Check the build logs for any warnings or errors related to this library.

3. General troubleshooting:
   - Make sure all dependencies are properly installed.
   - Try cleaning the build directory and rebuilding:
 make clean
 make
 ```
  1. If the problem persists, you might need to:
    • Temporarily disable the problematic package in your configuration.
    • Report the issue to the OpenWrt community or the package maintainer.

Remember to backup your configuration before making significant changes to your build setup.

chGoodchild commented 1 week ago

Same problem with MR76x8:

username@ubuntu-32gb-fsn1-1:~/openwrt$ cat ~/openwrt/.config | grep "CONFIG_TARGET_.*=y"
CONFIG_TARGET_ramips=y
CONFIG_TARGET_ramips_mt76x8=y
CONFIG_TARGET_ramips_mt76x8_DEVICE_glinet_gl-mt300n-v2=y
CONFIG_TARGET_ROOTFS_INITRAMFS=y
CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA=y
CONFIG_TARGET_ROOTFS_SQUASHFS=y
CONFIG_TARGET_UBIFS_FREE_SPACE_FIXUP=y
CONFIG_TARGET_PREINIT_SUPPRESS_STDERR=y
CONFIG_TARGET_INIT_SUPPRESS_STDERR=y
username@ubuntu-32gb-fsn1-1:~/openwrt$ grep -n -E "Error" -C 5 ~/openwrt/make_logs.md
32354-touch /home/username/openwrt/build_dir/target-mipsel_24kc_musl/libselinux-3.5/.configured_68b329da9893e34099c7d8ad5cb9c940
32355-rm -f /home/username/openwrt/build_dir/target-mipsel_24kc_musl/libselinux-3.5/.built
32356-touch /home/username/openwrt/build_dir/target-mipsel_24kc_musl/libselinux-3.5/.built_check
32357-CFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/username/openwrt/build_dir/target-mipsel_24kc_musl/libselinux-3.5=libselinux-3.5 -mips16 -minterlink-mips16 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -D_LARGEFILE64_SOURCE  -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/usr/include -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include/fortify -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include " CXXFLAGS="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/username/openwrt/build_dir/target-mipsel_24kc_musl/libselinux-3.5=libselinux-3.5 -mips16 -minterlink-mips16 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -D_LARGEFILE64_SOURCE -mips16 -minterlink-mips16  -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/usr/include -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include/fortify -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include " LDFLAGS="-L/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/usr/lib -L/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/lib -znow -zrelro " make -j1 -C /home/username/openwrt/build_dir/target-mipsel_24kc_musl/libselinux-3.5/. AR="mipsel-openwrt-linux-musl-gcc-ar" AS="mipsel-openwrt-linux-musl-gcc -c -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/username/openwrt/build_dir/target-mipsel_24kc_musl/libselinux-3.5=libselinux-3.5 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -D_LARGEFILE64_SOURCE" LD=mipsel-openwrt-linux-musl-ld NM="mipsel-openwrt-linux-musl-gcc-nm" CC="mipsel-openwrt-linux-musl-gcc" GCC="mipsel-openwrt-linux-musl-gcc" CXX="mipsel-openwrt-linux-musl-g++" RANLIB="mipsel-openwrt-linux-musl-gcc-ranlib" STRIP=mipsel-openwrt-linux-musl-strip OBJCOPY=mipsel-openwrt-linux-musl-objcopy OBJDUMP=mipsel-openwrt-linux-musl-objdump SIZE=mipsel-openwrt-linux-musl-size CROSS="mipsel-openwrt-linux-musl-" ARCH="mipsel" FTS_LDLIBS=-lfts SHLIBDIR=/usr/lib OS=Linux all;
32358-make[4]: Entering directory '/home/username/openwrt/build_dir/target-mipsel_24kc_musl/libselinux-3.5'
32359:checking for GPG Error - version >= 1.27... no
32360-checking for bool... mipsel-openwrt-linux-musl-gcc -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/username/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/ppp-default/ppp-2.4.9.git-2021-01-04=ppp-2.4.9.git-2021-01-04 -mips16 -minterlink-mips16 -ffunction-sections -fdata-sections -flto=auto -fno-fat-lto-objects -Wformat -Werror=format-security -DPIC -fpic -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I. -I../.. -I../../../include -fPIC -DPPPD_VERSION=\"2.4.9\" -c -o vector.o vector.c
32361-make[5]: Entering directory '/home/username/openwrt/build_dir/target-mipsel_24kc_musl/libselinux-3.5/include'
32362-make[5]: Nothing to be done for 'all'.
32363-make[5]: Leaving directory '/home/username/openwrt/build_dir/target-mipsel_24kc_musl/libselinux-3.5/include'
32364-make[5]: Entering directory '/home/username/openwrt/build_dir/target-mipsel_24kc_musl/libselinux-3.5/src'
--
35153-conf.c: In function 'main':
35154-conf.c:617:41: warning: format not a string literal and no format arguments [-Wformat-security]
35155-  617 |                                         _("\n*** The configuration requires explicit update.\n\n"));
35156-      |                                         ^
35157-conf.c:669:25: warning: format not a string literal and no format arguments [-Wformat-security]
35158:  669 |                         fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
35159-      |                         ^~~~~~~
35160-conf.c:673:25: warning: format not a string literal and no format arguments [-Wformat-security]
35161:  673 |                         fprintf(stderr, _("\n*** Error during update of the configuration.\n\n"));
35162-      |                         ^~~~~~~
35163-conf.c:684:25: warning: format not a string literal and no format arguments [-Wformat-security]
35164:  684 |                         fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
35165-      |                         ^~~~~~~
35166-mipsel-openwrt-linux-musl-gcc  -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include  -DAES_ASM -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -fPIC -pthread -mabi=32 -Wa,--noexecstack -Wall -O3 -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/username/openwrt/build_dir/target-mipsel_24kc_musl/openssl-3.0.13=openssl-3.0.13 -ffunction-sections -fdata-sections -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/username/openwrt/build_dir/target-mipsel_24kc_musl/openssl-3.0.13=openssl-3.0.13 -ffunction-sections -fdata-sections -Wformat -Werror=format-security -fstack-protector -fpic -znow -zrelro -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSLDIR="\"/etc/ssl\"" -DENGINESDIR="\"/usr/lib/engines-3\"" -DMODULESDIR="\"/usr/lib/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -D_FORTIFY_SOURCE=1 -DPIC -DOPENSSL_PREFER_CHACHA_OVER_GCM -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/usr/include -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include/fortify -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include -MMD -MF crypto/x509/libcrypto-lib-t_crl.d.tmp -MT crypto/x509/libcrypto-lib-t_crl.o -c -o crypto/x509/libcrypto-lib-t_crl.o crypto/x509/t_crl.c
35167-cc1: note: someone does not honour COPTS correctly, passed 2 times
35168-OpenWrt-libtool: compile:  mipsel-openwrt-linux-musl-gcc -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/usr/include -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include/fortify -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/username/openwrt/build_dir/target-mipsel_24kc_musl/gmp-6.2.1=gmp-6.2.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic -c set_d.c -o set_d.o >/dev/null 2>&1
35169-OpenWrt-libtool: compile:  mipsel-openwrt-linux-musl-gcc -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/usr/include -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include/fortify -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/username/openwrt/build_dir/target-mipsel_24kc_musl/gmp-6.2.1=gmp-6.2.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic -c set_f.c -o set_f.o >/dev/null 2>&1
--
47055-cc1: note: someone does not honour COPTS correctly, passed 2 times
47056-mipsel-openwrt-linux-musl-gcc  -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include  -DAES_ASM -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -fPIC -pthread -mabi=32 -Wa,--noexecstack -Wall -O3 -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/username/openwrt/build_dir/target-mipsel_24kc_musl/openssl-3.0.13=openssl-3.0.13 -ffunction-sections -fdata-sections -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/username/openwrt/build_dir/target-mipsel_24kc_musl/openssl-3.0.13=openssl-3.0.13 -ffunction-sections -fdata-sections -Wformat -Werror=format-security -fstack-protector -fpic -znow -zrelro -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSLDIR="\"/etc/ssl\"" -DENGINESDIR="\"/usr/lib/engines-3\"" -DMODULESDIR="\"/usr/lib/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -D_FORTIFY_SOURCE=1 -DPIC -DOPENSSL_PREFER_CHACHA_OVER_GCM -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/usr/include -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include/fortify -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include -MMD -MF crypto/siphash/libcrypto-shlib-siphash.d.tmp -MT crypto/siphash/libcrypto-shlib-siphash.o -c -o crypto/siphash/libcrypto-shlib-siphash.o crypto/siphash/siphash.c
47057-mkdir .lib 2>/dev/null
47058-cc1: note: someone does not honour COPTS correctly, passed 2 times
47059-cc1: note: someone does not honour COPTS correctly, passed 2 times
47060:make[4]: [Makefile:322: libhogweed.so] Error 1 (ignored)
47061-(cd .lib \
47062-          && rm -f libhogweed.so \
47063-  && ln -s ../libhogweed.so libhogweed.so \
47064-  && [ -z "libhogweed.so.6" ] \
47065-  || { rm -f libhogweed.so.6 \
--
52915-    2 | #error Unknown Endian
52916-      |  ^~~~~
52917-endian.h:114:2: error: #error "Unknown endian"
52918-  114 | #error "Unknown endian"
52919-      |  ^~~~~
52920:make[4]: *** [Makefile:21: sha256.o] Error 1
52921-make[4]: Leaving directory '/home/username/openwrt/build_dir/target-mipsel_24kc_musl/gltollgate-1.0'
52922:make[3]: *** [Makefile:61: /home/username/openwrt/build_dir/target-mipsel_24kc_musl/gltollgate-1.0/.built] Error 2
52923-make[3]: Leaving directory '/home/username/openwrt/feeds/custom/custom/gltollgate'
52924-time: package/feeds/custom/gltollgate/compile#2.30#1.33#4.54
52925-    ERROR: package/feeds/custom/gltollgate failed to build.
52926:make[2]: *** [package/Makefile:129: package/feeds/custom/gltollgate/compile] Error 1
52927-make[2]: *** Waiting for unfinished jobs....
52928-  #include <getopt.h>
52929-  #include <locale.h>
52930-  #include <noreturn.h>
52931-  #include <signal.h>
--
69743-touch /home/username/openwrt/build_dir/hostpkg/gettext-0.21.1/.built
69744-touch /home/username/openwrt/staging_dir/hostpkg/stamp/.gettext-full_installed 
69745-make[3]: Leaving directory '/home/username/openwrt/package/libs/gettext-full'
69746-time: package/libs/gettext-full/host-compile#582.30#557.06#1025.45
69747-make[2]: Leaving directory '/home/username/openwrt'
69748:make[1]: *** [package/Makefile:123: /home/username/openwrt/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile] Error 2
69749-make[1]: Leaving directory '/home/username/openwrt'
69750:make: *** [/home/username/openwrt/include/toplevel.mk:232: world] Error 2
chGoodchild commented 1 week ago

Also facing errors around mr200:

username@ubuntu-32gb-fsn1-1:~/openwrt$ cat ~/openwrt/.config | grep "CONFIG_TARGET_.*=y"
CONFIG_TARGET_ramips=y
CONFIG_TARGET_ramips_mt7620=y
CONFIG_TARGET_ramips_mt7620_DEVICE_tplink_archer-mr200=y
CONFIG_TARGET_ROOTFS_INITRAMFS=y
CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA=y
CONFIG_TARGET_ROOTFS_SQUASHFS=y
CONFIG_TARGET_UBIFS_FREE_SPACE_FIXUP=y
CONFIG_TARGET_PREINIT_SUPPRESS_STDERR=y
CONFIG_TARGET_INIT_SUPPRESS_STDERR=y
username@ubuntu-32gb-fsn1-1:~/openwrt$ grep -n -E "Error" -C 5 ~/openwrt/make_logs.md
28165-mipsel-openwrt-linux-musl-gcc  -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include  -DAES_ASM -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -fPIC -pthread -mabi=32 -Wa,--noexecstack -Wall -O3 -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/username/openwrt/build_dir/target-mipsel_24kc_musl/openssl-3.0.13=openssl-3.0.13 -ffunction-sections -fdata-sections -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/username/openwrt/build_dir/target-mipsel_24kc_musl/openssl-3.0.13=openssl-3.0.13 -ffunction-sections -fdata-sections -Wformat -Werror=format-security -fstack-protector -fpic -znow -zrelro -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSLDIR="\"/etc/ssl\"" -DENGINESDIR="\"/usr/lib/engines-3\"" -DMODULESDIR="\"/usr/lib/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -D_FORTIFY_SOURCE=1 -DPIC -DOPENSSL_PREFER_CHACHA_OVER_GCM -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/usr/include -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include/fortify -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include -MMD -MF crypto/libcrypto-lib-params_dup.d.tmp -MT crypto/libcrypto-lib-params_dup.o -c -o crypto/libcrypto-lib-params_dup.o crypto/params_dup.c
28166-mipsel-openwrt-linux-musl-gcc -I../ncurses -DHAVE_CONFIG_H -DBUILDING_FORM -I. -I../include -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/usr/include -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include/fortify -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include  -D_FORTIFY_SOURCE=1 -DPIC -DNDEBUG -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/username/openwrt/build_dir/target-mipsel_24kc_musl/ncurses-6.4=ncurses-6.4 -mips16 -minterlink-mips16 -Wformat -Werror=format-security -fstack-protector -Wl,-z,now -Wl,-z,relro -fpic --param max-inline-insns-single=1200  -fPIC -c ../form/frm_user.c -o ../obj_s/frm_user.o
28167-cc1: note: someone does not honour COPTS correctly, passed 2 times
28168-mipsel-openwrt-linux-musl-gcc -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/username/openwrt/build_dir/target-mipsel_24kc_musl/libselinux-3.5=libselinux-3.5 -mips16 -minterlink-mips16 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -D_LARGEFILE64_SOURCE  -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/usr/include -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include/fortify -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include  -I../include -D_GNU_SOURCE -DNO_ANDROID_BACKEND -DUSE_PCRE2 -DPCRE2_CODE_UNIT_WIDTH=8 -I/home/username/openwrt/staging_dir/target-mipsel_24kc_musl/usr/include -DHAVE_STRLCPY  -c -o matchmediacon.o matchmediacon.c
28169-/bin/bash ../libtool  --tag=CC   --mode=compile mipsel-openwrt-linux-musl-gcc -DHAVE_CONFIG_H -I. -I..  -D__GMP_WITHIN_GMP -I.. -DOPERATION_`echo bsqrtinv | sed 's/_$//'` -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/usr/include -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include/fortify -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include   -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/username/openwrt/build_dir/target-mipsel_24kc_musl/gmp-6.2.1=gmp-6.2.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic  -c -o bsqrtinv.lo bsqrtinv.c
28170:checking for GPG Error - version >= 1.27... mipsel-openwrt-linux-musl-gcc -I../ncurses -DHAVE_CONFIG_H -DBUILDING_FORM -I. -I../include -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/usr/include -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include/fortify -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include  -D_FORTIFY_SOURCE=1 -DPIC -DNDEBUG -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/username/openwrt/build_dir/target-mipsel_24kc_musl/ncurses-6.4=ncurses-6.4 -mips16 -minterlink-mips16 -Wformat -Werror=format-security -fstack-protector -Wl,-z,now -Wl,-z,relro -fpic --param max-inline-insns-single=1200  -fPIC -c ../form/frm_win.c -o ../obj_s/frm_win.o
28171-mipsel-openwrt-linux-musl-gcc -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/username/openwrt/build_dir/target-mipsel_24kc_musl/libselinux-3.5=libselinux-3.5 -mips16 -minterlink-mips16 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -D_LARGEFILE64_SOURCE  -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/usr/include -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include/fortify -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include  -I../include -D_GNU_SOURCE -DNO_ANDROID_BACKEND -DUSE_PCRE2 -DPCRE2_CODE_UNIT_WIDTH=8 -I/home/username/openwrt/staging_dir/target-mipsel_24kc_musl/usr/include -DHAVE_STRLCPY  -c -o matchpathcon.o matchpathcon.c
28172-OpenWrt-libtool: compile:  mipsel-openwrt-linux-musl-gcc -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_bsqrtinv -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/usr/include -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include/fortify -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/username/openwrt/build_dir/target-mipsel_24kc_musl/gmp-6.2.1=gmp-6.2.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic -c bsqrtinv.c  -fPIC -DPIC -o .libs/bsqrtinv.o
28173-OpenWrt-libtool: compile:  mipsel-openwrt-linux-musl-gcc -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_bsqrtinv -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/usr/include -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include/fortify -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/username/openwrt/build_dir/target-mipsel_24kc_musl/gmp-6.2.1=gmp-6.2.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic -c bsqrtinv.c -o bsqrtinv.o >/dev/null 2>&1
28174-make[5]: Leaving directory '/home/username/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7620/ppp-default/ppp-2.4.9.git-2021-01-04/pppstats'
28175-cd pppdump; make -w --jobserver-auth=3,4 all
--
30647-conf.c: In function 'main':
30648-conf.c:617:41: warning: format not a string literal and no format arguments [-Wformat-security]
30649-  617 |                                         _("\n*** The configuration requires explicit update.\n\n"));
30650-      |                                         ^
30651-conf.c:669:25: warning: format not a string literal and no format arguments [-Wformat-security]
30652:  669 |                         fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
30653-      |                         ^~~~~~~
30654-conf.c:673:25: warning: format not a string literal and no format arguments [-Wformat-security]
30655:  673 |                         fprintf(stderr, _("\n*** Error during update of the configuration.\n\n"));
30656-      |                         ^~~~~~~
30657-conf.c:684:25: warning: format not a string literal and no format arguments [-Wformat-security]
30658:  684 |                         fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
30659-      |                         ^~~~~~~
30660-cc1: note: someone does not honour COPTS correctly, passed 2 times
30661-/bin/bash ../libtool  --tag=CC   --mode=compile mipsel-openwrt-linux-musl-gcc -DHAVE_CONFIG_H -I. -I..  -D__GMP_WITHIN_GMP -I.. -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/usr/include -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include/fortify -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include   -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/username/openwrt/build_dir/target-mipsel_24kc_musl/gmp-6.2.1=gmp-6.2.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic  -c -o fib2_ui.lo fib2_ui.c
30662-mipsel-openwrt-linux-musl-gcc  -I. -Iinclude -Iproviders/common/include -Iproviders/implementations/include  -DAES_ASM -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -fPIC -pthread -mabi=32 -Wa,--noexecstack -Wall -O3 -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/username/openwrt/build_dir/target-mipsel_24kc_musl/openssl-3.0.13=openssl-3.0.13 -ffunction-sections -fdata-sections -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/username/openwrt/build_dir/target-mipsel_24kc_musl/openssl-3.0.13=openssl-3.0.13 -ffunction-sections -fdata-sections -Wformat -Werror=format-security -fstack-protector -fpic -znow -zrelro -DOPENSSL_USE_NODELETE -DOPENSSL_PIC -DOPENSSLDIR="\"/etc/ssl\"" -DENGINESDIR="\"/usr/lib/engines-3\"" -DMODULESDIR="\"/usr/lib/ossl-modules\"" -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -D_FORTIFY_SOURCE=1 -DPIC -DOPENSSL_PREFER_CHACHA_OVER_GCM -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/usr/include -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include/fortify -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include -MMD -MF crypto/x509/libcrypto-lib-pcy_tree.d.tmp -MT crypto/x509/libcrypto-lib-pcy_tree.o -c -o crypto/x509/libcrypto-lib-pcy_tree.o crypto/x509/pcy_tree.c
30663-OpenWrt-libtool: compile:  mipsel-openwrt-linux-musl-gcc -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/usr/include -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include/fortify -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/username/openwrt/build_dir/target-mipsel_24kc_musl/gmp-6.2.1=gmp-6.2.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic -c fib_ui.c -o fib_ui.o >/dev/null 2>&1
--
43414-mipsel-openwrt-linux-musl-gcc -I. -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/usr/include -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include/fortify -I/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/include  -DHAVE_CONFIG_H -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/username/openwrt/build_dir/target-mipsel_24kc_musl/nettle-3.9.1=nettle-3.9.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic  -ggdb3 -Wall -W -Wno-sign-compare   -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes   -Wpointer-arith -Wbad-function-cast -Wnested-externs -fpic  -c ecc-curve448.c \
43415-&& true
43416-mipsel-openwrt-linux-musl-ranlib libcrypto.a || echo Never mind.
43417-mipsel-openwrt-linux-musl-gcc -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/username/openwrt/build_dir/target-mipsel_24kc_musl/nettle-3.9.1=nettle-3.9.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DPIC -fpic  -ggdb3 -Wall -W -Wno-sign-compare   -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes   -Wpointer-arith -Wbad-function-cast -Wnested-externs -L/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/usr/lib -L/home/username/openwrt/staging_dir/toolchain-mipsel_24kc_gcc-12.3.0_musl/lib -znow -zrelro  -shared -Wl,-soname=libhogweed.so.6 sexp.o sexp-format.o sexp-transport.o sexp-transport-format.o bignum.o bignum-random.o bignum-random-prime.o sexp2bignum.o pkcs1.o pkcs1-encrypt.o pkcs1-decrypt.o pkcs1-sec-decrypt.o pkcs1-rsa-digest.o pkcs1-rsa-md5.o pkcs1-rsa-sha1.o pkcs1-rsa-sha256.o pkcs1-rsa-sha512.o pss.o pss-mgf1.o rsa.o rsa-sign.o rsa-sign-tr.o rsa-verify.o rsa-sec-compute-root.o rsa-pkcs1-sign.o rsa-pkcs1-sign-tr.o rsa-pkcs1-verify.o rsa-md5-sign.o rsa-md5-sign-tr.o rsa-md5-verify.o rsa-sha1-sign.o rsa-sha1-sign-tr.o rsa-sha1-verify.o rsa-sha256-sign.o rsa-sha256-sign-tr.o rsa-sha256-verify.o rsa-sha512-sign.o rsa-sha512-sign-tr.o rsa-sha512-verify.o rsa-pss-sha256-sign-tr.o rsa-pss-sha256-verify.o rsa-pss-sha512-sign-tr.o rsa-pss-sha512-verify.o rsa-encrypt.o rsa-decrypt.o rsa-sec-decrypt.o rsa-decrypt-tr.o rsa-keygen.o rsa-blind.o rsa2sexp.o sexp2rsa.o dsa.o dsa-compat.o dsa-compat-keygen.o dsa-gen-params.o dsa-sign.o dsa-verify.o dsa-keygen.o dsa-hash.o dsa-sha1-sign.o dsa-sha1-verify.o dsa-sha256-sign.o dsa-sha256-verify.o dsa2sexp.o sexp2dsa.o pgp-encode.o rsa2openpgp.o der-iterator.o der2rsa.o der2dsa.o sec-add-1.o sec-sub-1.o gmp-glue.o cnd-copy.o ecc-mod.o ecc-mod-inv.o ecc-mod-arith.o ecc-pp1-redc.o ecc-pm1-redc.o ecc-curve25519.o ecc-curve448.o ecc-gost-gc256b.o ecc-gost-gc512a.o ecc-secp192r1.o ecc-secp224r1.o ecc-secp256r1.o ecc-secp384r1.o ecc-secp521r1.o ecc-size.o ecc-j-to-a.o ecc-a-to-j.o ecc-dup-jj.o ecc-add-jja.o ecc-add-jjj.o ecc-nonsec-add-jjj.o ecc-eh-to-a.o ecc-dup-eh.o ecc-add-eh.o ecc-add-ehh.o ecc-dup-th.o ecc-add-th.o ecc-add-thh.o ecc-mul-g-eh.o ecc-mul-a-eh.o ecc-mul-m.o ecc-mul-g.o ecc-mul-a.o ecc-hash.o ecc-random.o ecc-point.o ecc-scalar.o ecc-point-mul.o ecc-point-mul-g.o ecc-ecdsa-sign.o ecdsa-sign.o ecc-ecdsa-verify.o ecdsa-verify.o ecdsa-keygen.o ecc-gostdsa-sign.o gostdsa-sign.o ecc-gostdsa-verify.o gostdsa-verify.o gostdsa-vko.o curve25519-mul-g.o curve25519-mul.o curve25519-eh-to-x.o curve448-mul-g.o curve448-mul.o curve448-eh-to-x.o eddsa-compress.o eddsa-decompress.o eddsa-expand.o eddsa-hash.o eddsa-pubkey.o eddsa-sign.o eddsa-verify.o ed25519-sha512.o ed25519-sha512-pubkey.o ed25519-sha512-sign.o ed25519-sha512-verify.o ed448-shake256.o ed448-shake256-pubkey.o ed448-shake256-sign.o ed448-shake256-verify.o   -Wl,--version-script=libhogweed.map -o libhogweed.so libnettle.so -lgmp 
43418-mkdir .lib 2>/dev/null
43419:make[4]: [Makefile:322: libhogweed.so] Error 1 (ignored)
43420-(cd .lib \
43421-          && rm -f libhogweed.so \
43422-  && ln -s ../libhogweed.so libhogweed.so \
43423-  && [ -z "libhogweed.so.6" ] \
43424-  || { rm -f libhogweed.so.6 \
--
45475-mipsel-openwrt-linux-musl-gcc -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -msoft-float -fmacro-prefix-map=/home/username/openwrt/build_dir/target-mipsel_24kc_musl/gltollgate-1.0=gltollgate-1.0 -mips16 -minterlink-mips16 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/username/openwrt/staging_dir/target-mipsel_24kc_musl/usr/include -I/home/username/openwrt/staging_dir/target-mipsel_24kc_musl/target-mips_24kc_musl/usr/include -c -o sha256.o sha256.c  # Ensure this line begins with a tab
45476-In file included from sha256.c:10:
45477-endian.h:127:2: error: #error "__BYTE_ORDER already defined, but not equal to __BIG_ENDIAN"
45478-  127 | #error "__BYTE_ORDER already defined, but not equal to __BIG_ENDIAN"
45479-      |  ^~~~~
45480:make[4]: *** [Makefile:21: sha256.o] Error 1
45481-make[4]: Leaving directory '/home/username/openwrt/build_dir/target-mipsel_24kc_musl/gltollgate-1.0'
45482:make[3]: *** [Makefile:61: /home/username/openwrt/build_dir/target-mipsel_24kc_musl/gltollgate-1.0/.built] Error 2
45483-make[3]: Leaving directory '/home/username/openwrt/feeds/custom/custom/gltollgate'
45484-time: package/feeds/custom/gltollgate/compile#2.55#1.50#5.21
45485-    ERROR: package/feeds/custom/gltollgate failed to build.
45486:make[2]: *** [package/Makefile:129: package/feeds/custom/gltollgate/compile] Error 1
45487-make[2]: *** Waiting for unfinished jobs....
45488-autoreconf: configure.ac: tracing
45489-autoreconf: running: /home/username/openwrt/staging_dir/host/bin/libtoolize --install --force
45490-OpenWrt-libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
45491-OpenWrt-libtoolize: linking file 'build-aux/config.guess'
--
51126-rm -rf /home/username/openwrt/tmp/stage-gnutls
51127-touch /home/username/openwrt/staging_dir/target-mipsel_24kc_musl/stamp/.gnutls_installed
51128-make[3]: Leaving directory '/home/username/openwrt/feeds/packages/libs/gnutls'
51129-time: package/feeds/packages/gnutls/compile#375.97#87.07#255.08
51130-make[2]: Leaving directory '/home/username/openwrt'
51131:make[1]: *** [package/Makefile:123: /home/username/openwrt/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile] Error 2
51132-make[1]: Leaving directory '/home/username/openwrt'
51133:make: *** [/home/username/openwrt/include/toplevel.mk:232: world] Error 2
chGoodchild commented 1 week ago

https://github.com/chGoodchild/GLTollGate/blob/main/nostr/c/endian.h

Based on the error messages, it looks like there are a few issues to address in the code:

  1. The main error is coming from the endian.h file:
endian.h:127:2: error: #error "__BYTE_ORDER already defined, but not equal to __BIG_ENDIAN"

This suggests that there's a conflict with the endianness definitions. To resolve this, you can try:

#ifndef __BYTE_ORDER
#define __BYTE_ORDER __LITTLE_ENDIAN
#endif

#ifndef __BIG_ENDIAN
#define __BIG_ENDIAN 4321
#endif

#ifndef __LITTLE_ENDIAN 
#define __LITTLE_ENDIAN 1234
#endif
  1. The error is occurring in sha256.c, which includes endian.h. You may need to modify how endian.h is included or used in sha256.c.

  2. There seems to be a mismatch between the target architecture and some definitions. The error mentions both ARM and MIPS architectures. Make sure your Makefile and configuration files are correctly set for your target architecture.

  3. Review the OpenWrt build system documentation to ensure you're following best practices for custom feeds and packages.

  4. Check if there are any OpenWrt-specific headers or definitions that should be used instead of standard ones for endianness.

  5. If possible, try to use OpenWrt's built-in functions or macros for handling endianness instead of defining your own.

To resolve these issues:

  1. Review and update endian.h to avoid conflicts with system definitions.
  2. Check sha256.c and how it uses endian.h.
  3. Ensure your package's Makefile is correctly configured for the target architecture.
  4. Consider using OpenWrt's built-in facilities for handling architecture-specific details like endianness.

If you can provide the relevant parts of sha256.c and your package's Makefile, I can give more specific advice on how to modify them.

chGoodchild commented 1 week ago

The main error causing the build failure is in the gltollgate package:

In file included from sha256.c:10:
endian.h:127:2: error: #error "__BYTE_ORDER already defined, but not equal to __BIG_ENDIAN"
  127 | #error "__BYTE_ORDER already defined, but not equal to __BIG_ENDIAN"
      |  ^~~~~
make[4]: *** [Makefile:21: sha256.o] Error 1

This error suggests that there's a conflict in the endianness definitions. The package's endian.h file is assuming a big-endian system, but the target architecture (ARM Cortex-A15) is likely little-endian.

To resolve this, you can try the following steps:

  1. Open the endian.h file in the gltollgate package source.

  2. Look for the section around line 127 where it's checking the __BYTE_ORDER definition.

  3. Modify the condition to accommodate both big and little endian systems. For example, you might change it to something like this:

    #if defined(__BYTE_ORDER)
     #if __BYTE_ORDER != __BIG_ENDIAN && __BYTE_ORDER != __LITTLE_ENDIAN
       #error "__BYTE_ORDER defined but not equal to __BIG_ENDIAN or __LITTLE_ENDIAN"
     #endif
    #else
     #define __BYTE_ORDER __LITTLE_ENDIAN  // Default to little endian if not defined
    #endif
  4. Save the file and try rebuilding the package.

If modifying the source directly isn't feasible, you could also try to override the endianness definition when compiling. Add the following to the package's Makefile:

TARGET_CFLAGS += -D__BYTE_ORDER=__LITTLE_ENDIAN

This will define __BYTE_ORDER as little endian during compilation.

If these changes don't resolve the issue, you may need to review how endianness is handled throughout the gltollgate package and ensure it's compatible with both big and little endian systems.

chGoodchild commented 1 week ago

Based on the provided code and considering the need to accommodate both big and little endian systems without conflicts, here's a revised version of the code:

#ifndef __BIG_ENDIAN
#define __BIG_ENDIAN 4321
#endif

#ifndef __LITTLE_ENDIAN 
#define __LITTLE_ENDIAN 1234
#endif

/* If __BYTE_ORDER is not already defined, we'll define it based on the system */
#ifndef __BYTE_ORDER
#if defined(__LITTLE_ENDIAN__) || defined(__ARMEL__) || defined(__AARCH64EL__) || \
    (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
#define __BYTE_ORDER __LITTLE_ENDIAN
#elif defined(__BIG_ENDIAN__) || defined(__ARMEB__) || defined(__AARCH64EB__) || \
    (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
#define __BYTE_ORDER __BIG_ENDIAN
#else
#error "Unable to determine endianness"
#endif
#endif

/* Sanity check the defines. */
#if __BYTE_ORDER != __LITTLE_ENDIAN && __BYTE_ORDER != __BIG_ENDIAN
#error "Invalid __BYTE_ORDER defined"
#endif

/* These defines can be used in the code to check endianness */
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define HAVE_LITTLE_ENDIAN 1
#define HAVE_BIG_ENDIAN 0
#elif __BYTE_ORDER == __BIG_ENDIAN
#define HAVE_LITTLE_ENDIAN 0
#define HAVE_BIG_ENDIAN 1
#endif

This revised code:

  1. Defines __BIG_ENDIAN and __LITTLE_ENDIAN if they're not already defined.
  2. Attempts to determine the endianness if __BYTE_ORDER isn't already defined, using various common macros and definitions.
  3. Performs a sanity check on __BYTE_ORDER.
  4. Defines HAVE_LITTLE_ENDIAN and HAVE_BIG_ENDIAN based on the determined byte order, which can be used elsewhere in the code.

This approach should work for both big and little endian systems, and it avoids the conflicting definitions that were causing the original error. It also maintains compatibility with systems where __BYTE_ORDER is already correctly defined.

chGoodchild commented 1 week ago
username@ubuntu-4gb-nbg1-2:~/TollGateNostrToolKicat ~/openwrt/.config | grep "CONFIG_TARGET_.*=y"
CONFIG_TARGET_ipq806x=y
CONFIG_TARGET_ipq806x_generic=y
CONFIG_TARGET_ipq806x_generic_DEVICE_netgear_r7800=y
CONFIG_TARGET_ROOTFS_INITRAMFS=y
CONFIG_TARGET_INITRAMFS_COMPRESSION_NONE=y
CONFIG_TARGET_ROOTFS_SQUASHFS=y
CONFIG_TARGET_UBIFS_FREE_SPACE_FIXUP=y
CONFIG_TARGET_PREINIT_SUPPRESS_STDERR=y
CONFIG_TARGET_INIT_SUPPRESS_STDERR=y
username@ubuntu-4gb-nbg1-2:~/TollGateNostrToolKit$ grep -n -E "Error" -C 5 ~/openwrt/make_logs.md
28037-checking for string.h... yes
28038-checking for inttypes.h... yes
28039-checking for stdint.h... yes
28040-checking for strings.h... mkdir .lib 2>/dev/null
28041-yes
28042:checking for sys/stat.h... make[4]: [Makefile:322: libhogweed.so] Error 1 (ignored)
28043-(cd .lib \
28044-          && rm -f libhogweed.so \
28045-  && ln -s ../libhogweed.so libhogweed.so \
28046-  && [ -z "libhogweed.so.6" ] \
28047-  || { rm -f libhogweed.so.6 \
--
39554-checking whether a instrumentation (-fprofile, -fsanitize) munging is requested... yes
39555-checking whether to enable AMD64 as(1) feature detection... yes
39556-checking for gpg-error-config... /home/username/openwrt/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/usr/bin/gpg-error-config
39557-checking for gpgrt-config... /home/username/openwrt/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/host/bin/gpgrt-config
39558-configure: Use gpgrt-config with /home/username/openwrt/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/host/lib as gpg-error-config
39559:checking for GPG Error - version >= 1.27... yes (1.47-unknown)
39560-configure: WARNING:
39561-***
39562-*** The config script "/home/username/openwrt/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/host/bin/gpgrt-config --libdir=/home/username/openwrt/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/host/lib gpg-error" was
39563-*** built for arm-unknown-linux-gnueabi and thus may not match the
39564-*** used host arm-openwrt-linux-gnu.
--
50811-                 from sha256.c:10:
50812-config.h:2:2: error: #error Unknown Endian
50813-    2 | #error Unknown Endian
50814-      |  ^~~~~
50815-yes
50816:checking whether gcvt is declared... make[4]: *** [Makefile:21: sha256.o] Error 1
50817-make[4]: Leaving directory '/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gltollgate-1.0'
50818:make[3]: *** [Makefile:61: /home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gltollgate-1.0/.built] Error 2
50819-make[3]: Leaving directory '/home/username/openwrt/feeds/custom/custom/gltollgate'
50820-time: package/feeds/custom/gltollgate/compile#2.58#1.23#5.17
50821-    ERROR: package/feeds/custom/gltollgate failed to build.
50822:make[2]: *** [package/Makefile:129: package/feeds/custom/gltollgate/compile] Error 1
50823-make[2]: *** Waiting for unfinished jobs....
50824-yes
50825-checking whether strerror(0) succeeds... yes
50826-checking for strerror_r... yes
50827-checking for strerror_r with POSIX signature... no
--
61013-touch /home/username/openwrt/build_dir/hostpkg/gettext-0.21.1/.built
61014-touch /home/username/openwrt/staging_dir/hostpkg/stamp/.gettext-full_installed 
61015-make[3]: Leaving directory '/home/username/openwrt/package/libs/gettext-full'
61016-time: package/libs/gettext-full/host-compile#642.21#362.28#1002.41
61017-make[2]: Leaving directory '/home/username/openwrt'
61018:make[1]: *** [package/Makefile:123: /home/username/openwrt/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/stamp/.package_compile] Error 2
61019-make[1]: Leaving directory '/home/username/openwrt'
61020:make: *** [/home/username/openwrt/include/toplevel.mk:232: world] Error 2
chGoodchild commented 1 week ago

Based on the error message and the provided code, it seems the issue is related to endianness detection. The error suggests that __BYTE_ORDER is already defined but not equal to __BIG_ENDIAN. To resolve this, we need to modify the endian.h file to handle the case where __BYTE_ORDER is already defined.

Here's how you can modify the relevant section in the endian.h file:

  1. Locate the endian.h file in your project.

  2. Replace the problematic section with the following code:

#ifndef __BYTE_ORDER
#if defined(__LITTLE_ENDIAN__) || defined(__ARMEL__) || defined(__AARCH64EL__) || \
    (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
#define __BYTE_ORDER __LITTLE_ENDIAN
#elif defined(__BIG_ENDIAN__) || defined(__ARMEB__) || defined(__AARCH64EB__) || \
    (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
#define __BYTE_ORDER __BIG_ENDIAN
#else
#error "Unable to determine endianness"
#endif
#endif

/* Sanity check the defines. */
#if __BYTE_ORDER != __LITTLE_ENDIAN && __BYTE_ORDER != __BIG_ENDIAN
#error "Invalid __BYTE_ORDER defined"
#endif

/* These defines can be used in the code to check endianness */
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define HAVE_LITTLE_ENDIAN 1
#define HAVE_BIG_ENDIAN 0
#elif __BYTE_ORDER == __BIG_ENDIAN
#define HAVE_LITTLE_ENDIAN 0
#define HAVE_BIG_ENDIAN 1
#endif
  1. After making these changes, try rebuilding your project.

If the issue persists, you may need to check the config.h file that's generated by the generate_config_h.sh script. Ensure that it's not defining __BYTE_ORDER or related macros in a conflicting way.

Also, in your Makefile, you can add a flag to force little-endian compilation if you're certain about the target architecture:

CFLAGS += -D__BYTE_ORDER=__LITTLE_ENDIAN

Add this line in the Build/Compile section of your package Makefile.

If you're still facing issues after these changes, please provide the content of the generated config.h file and any new error messages you encounter.

chGoodchild commented 1 week ago

feeds: 7a721b107fcbf5933ced39059fa250e9c81afeab TollGateToolKit: f39cbc34c205923c66af1a9a3f0d99f902aa9988

Based on the information you've provided, it appears there might be a mismatch between your current target configuration and some remnants of a previous build or configuration. Let's analyze and address this issue:

  1. Your current target is set to ipq806x (which is ARM-based), as evidenced by your .config file:

    CONFIG_TARGET_ipq806x=y
    CONFIG_TARGET_ipq806x_generic=y
    CONFIG_TARGET_ipq806x_generic_DEVICE_netgear_r7800=y
  2. However, OpenWrt is still creating a MIPS toolchain directory:

    toolchain-mips_24kc_gcc-12.3.0_musl

This discrepancy suggests that there might be some leftover configurations or cached information from a previous build targeting MIPS architecture.

To resolve this issue, try the following steps:

  1. Clean the build environment:

    make clean
  2. Remove the staging_dir completely:

    rm -rf staging_dir
  3. Delete the tmp directory:

    rm -rf tmp
  4. Reconfigure your target:

    make menuconfig

    Ensure that you select the correct target (ipq806x in your case) and save the configuration.

  5. Rebuild the toolchain:

    make toolchain/install
  6. Rebuild everything:

    make -j$(nproc)

If the issue persists after these steps, you might want to check:

  1. Your feeds configuration in feeds.conf or feeds.conf.default
  2. Any custom scripts or makefiles that might be referencing MIPS
  3. Environment variables that might be set (though this is less likely)

You can search for MIPS references in your OpenWrt directory:

grep -R "mips" .

This will help you identify if there are any hardcoded references to MIPS architecture in your setup.

If none of these steps resolve the issue, you might want to consider backing up your configurations and custom packages, then doing a fresh clone of the OpenWrt repository and rebuilding from scratch.

Remember, mixing architectures can lead to build problems and non-functional firmware, so it's crucial to ensure that all components are aligned with your target architecture (ipq806x/ARM in this case).

chGoodchild commented 1 week ago

Facing a new error now. Will shift focus to testing the ath79 sysupgrade.bin files that already build and will resume this at a later point in time.

Leaving of on the following branches:

username@ubuntu-32gb-nbg1-1:~/TollGateNostrToolKit$ git branch --list
* add_configs
  main
commit f39cbc34c205923c66af1a9a3f0d99f902aa9988
~/secp256k1_openwrt_feed/custom$ git branch --list
  * endian_problems
commit 7a721b107fcbf5933ced39059fa250e9c81afeab
pachai@pachai-ThinkPad-T440:~/GLTollGate$ git branch --list
* endian_problems
commit 8b891cdba8c6b482005f7cff1a2091cb2e963621

Current error message:

username@ubuntu-32gb-nbg1-1:~/openwrt$ tail make_logs.md 
ln -sf msgfmt /home/username/openwrt/staging_dir/hostpkg/bin/gmsgfmt
mkdir -p /home/username/openwrt/staging_dir/hostpkg/stamp
touch /home/username/openwrt/build_dir/hostpkg/gettext-0.21.1/.built
touch /home/username/openwrt/staging_dir/hostpkg/stamp/.gettext-full_installed 
make[3]: Leaving directory '/home/username/openwrt/package/libs/gettext-full'
time: package/libs/gettext-full/host-compile#634.04#662.35#1156.46
make[2]: Leaving directory '/home/username/openwrt'
make[1]: *** [package/Makefile:123: /home/username/openwrt/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/username/openwrt'
make: *** [/home/username/openwrt/include/toplevel.mk:232: world] Error 2
username@ubuntu-32gb-nbg1-1:~/openwrt$ cat ~/openwrt/.config | grep "CONFIG_TARGET_.*=y"
CONFIG_TARGET_ipq806x=y
CONFIG_TARGET_ipq806x_generic=y
CONFIG_TARGET_ipq806x_generic_DEVICE_netgear_r7800=y
CONFIG_TARGET_ROOTFS_INITRAMFS=y
CONFIG_TARGET_INITRAMFS_COMPRESSION_NONE=y
CONFIG_TARGET_ROOTFS_SQUASHFS=y
CONFIG_TARGET_UBIFS_FREE_SPACE_FIXUP=y
CONFIG_TARGET_PREINIT_SUPPRESS_STDERR=y
CONFIG_TARGET_INIT_SUPPRESS_STDERR=y
username@ubuntu-32gb-nbg1-1:~/openwrt$ grep -n -E "Error" -C 5 ~/openwrt/make_logs.md | grep -i gltollgate
54878-make[4]: Leaving directory '/home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gltollgate-1.0'
54879:make[3]: *** [Makefile:60: /home/username/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/gltollgate-1.0/.built] Error 2
54880-make[3]: Leaving directory '/home/username/openwrt/feeds/custom/custom/gltollgate'
54881-time: package/feeds/custom/gltollgate/compile#2.64#1.75#4.82
54882-    ERROR: package/feeds/custom/gltollgate failed to build.
54883:make[2]: *** [package/Makefile:129: package/feeds/custom/gltollgate/compile] Error 1