cc1: note: someone does not honour COPTS correctly, passed 0 times
mips-openwrt-linux-musl-gcc -I/usr/local/ssl/include -I../../../nostr_client_relay/src/nostril -g -Wall -c -o nostri.o nostri.c # Ensure this line begins with a tab
cc1: note: someone does not honour COPTS correctly, passed 0 times
mips-openwrt-linux-musl-gcc -I/usr/local/ssl/include -I../../../nostr_client_relay/src/nostril -g -Wall -c -o aes.o aes.c # Ensure this line begins with a tab
cc1: note: someone does not honour COPTS correctly, passed 0 times
mips-openwrt-linux-musl-gcc -I/usr/local/ssl/include -I../../../nostr_client_relay/src/nostril -g -Wall -c -o base64.o base64.c # Ensure this line begins with a tab
cc1: note: someone does not honour COPTS correctly, passed 0 times
mips-openwrt-linux-musl-gcc -I/usr/local/ssl/include -I../../../nostr_client_relay/src/nostril -g -Wall -c -o sha256.o sha256.c # Ensure this line begins with a tab
cc1: note: someone does not honour COPTS correctly, passed 0 times
In file included from sha256.c:10:
endian.h:6:10: fatal error: config.h: No such file or directory
6 | #include "config.h"
| ^~~~~~~~~~
compilation terminated.
make[3]: *** [Makefile:21: sha256.o] Error 1
make[3]: Leaving directory '/home/username/openwrt/build_dir/target-mips_24kc_musl/gltollgate-1.0'
make[2]: *** [Makefile:48: /home/username/openwrt/build_dir/target-mips_24kc_musl/gltollgate-1.0/.built] Error 2
make[2]: Leaving directory '/home/username/openwrt/feeds/custom/custom/gltollgate'
time: package/feeds/custom/gltollgate/compile#2.32#1.55#4.93
ERROR: package/feeds/custom/gltollgate failed to build.
make[1]: *** [package/Makefile:129: package/feeds/custom/gltollgate/compile] Error 1
make[1]: Leaving directory '/home/username/openwrt'
make: *** [/home/username/openwrt/include/toplevel.mk:232: package/gltollgate/compile] Error 2
username@ubuntu-32gb-nbg1-1:~/openwrt$ make package/gltollgate/compile V=s
Using the configurator.c code directly for cross-compiling with OpenWRT might not be ideal due to the differences in the build environments and potential platform-specific nuances in the code. The configurator.c is designed to generate a config.h based on the compilation and runtime characteristics of the system it's run on, which typically assumes a native build environment.
Here are a few considerations if you're thinking of using this code for cross-compiling:
Environment Differences: The original configurator.c checks system characteristics and capabilities, which might not accurately reflect the target environment when cross-compiling. For example, endianess checks or filesystem features might differ between your build system and the target system.
Cross-Compilation Constraints: When cross-compiling, the build system's libraries and headers are different from those on the target system. Checks that involve runtime tests (like executing a binary to see if a particular feature works) won't execute correctly on the build host if they're meant for the target architecture.
OpenWRT Specifics: OpenWRT has its own build system and environment that manages many aspects of configuration through its own mechanisms. It is generally better to utilize OpenWRT’s native tools and methods for configuring packages.
Alternative Approach
To adapt the concept of configurator.c for OpenWRT, you could:
Modify Tests for Cross-Compiling: Adjust the code to remove runtime tests and focus solely on compile-time checks, which can be validated by the cross-compiler.
Use OpenWRT's Package Infrastructure: Integrate the generation of config.h into the OpenWRT package Makefiles. You can add pre-build checks using $(STAGING_DIR) variables to reference the target system's headers and libraries.
Custom Patching: You might need to create patches for your software that hardcode certain expected features or behaviors based on the known capabilities of the target hardware and the OpenWRT system.
Conditional Compilation: Use conditional compilation in your source code to handle differences between the build and target environments, relying on predefined macros that OpenWRT's build environment provides.
If adapting the configurator to work with OpenWRT proves too complex or unreliable, consider simplifying the configuration process by statically defining capabilities in config.h based on what you know about the target platform. This approach requires less automation but increases maintainability and clarity when dealing with the diverse hardware supported by OpenWRT.
Using the
configurator.c
code directly for cross-compiling with OpenWRT might not be ideal due to the differences in the build environments and potential platform-specific nuances in the code. Theconfigurator.c
is designed to generate aconfig.h
based on the compilation and runtime characteristics of the system it's run on, which typically assumes a native build environment.Here are a few considerations if you're thinking of using this code for cross-compiling:
Environment Differences: The original
configurator.c
checks system characteristics and capabilities, which might not accurately reflect the target environment when cross-compiling. For example, endianess checks or filesystem features might differ between your build system and the target system.Cross-Compilation Constraints: When cross-compiling, the build system's libraries and headers are different from those on the target system. Checks that involve runtime tests (like executing a binary to see if a particular feature works) won't execute correctly on the build host if they're meant for the target architecture.
OpenWRT Specifics: OpenWRT has its own build system and environment that manages many aspects of configuration through its own mechanisms. It is generally better to utilize OpenWRT’s native tools and methods for configuring packages.
Alternative Approach
To adapt the concept of
configurator.c
for OpenWRT, you could:Modify Tests for Cross-Compiling: Adjust the code to remove runtime tests and focus solely on compile-time checks, which can be validated by the cross-compiler.
Use OpenWRT's Package Infrastructure: Integrate the generation of
config.h
into the OpenWRT package Makefiles. You can add pre-build checks using$(STAGING_DIR)
variables to reference the target system's headers and libraries.Custom Patching: You might need to create patches for your software that hardcode certain expected features or behaviors based on the known capabilities of the target hardware and the OpenWRT system.
Conditional Compilation: Use conditional compilation in your source code to handle differences between the build and target environments, relying on predefined macros that OpenWRT's build environment provides.
If adapting the configurator to work with OpenWRT proves too complex or unreliable, consider simplifying the configuration process by statically defining capabilities in
config.h
based on what you know about the target platform. This approach requires less automation but increases maintainability and clarity when dealing with the diverse hardware supported by OpenWRT.