chGoodchild / TollGateNostrToolKit

0 stars 0 forks source link

Missing config.h which is generated by configurator.c in nostr_client_relay #9

Closed chGoodchild closed 2 months ago

chGoodchild commented 3 months ago
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:

  1. 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.

  2. 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.

  3. 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:

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.

chGoodchild commented 2 months ago

No longer facing this issue