Im compiling a custom openwrt image and one package stubbornly refuses to build (nginx)...Can I force the buildsystem to use an (already compiled) .ipk for just nginx?

Im trying to compile a custom firmware image using the openwrt toolchain for my R9000, and it seems that no matter what I try nginx-ssl refuses to compile, throwing the following error during one of the (fairly early) configure stages:

checking for int size ...
./configure: error: can not detect int size

Ive tried:

  • using the nginx-full package
  • using the nginx-ssl package with all modules manually selected
  • using the nginx package with no modules selected (well, as few as it would let me have)
  • trying the above with a git-src override to the current nginx "master" git branch

And still the same error. Apparently, this has been an issue with nginx for over a decade. Which makes me question my decision to use nginx instead of uhttpd for LUCI, but whatever.

Right now I just want to get the firmware compiled. Can I download an already-compiled nginx .ipk package (e.g., from here) and force the build system to use that instead?

If so, what is the best way to go about doing this? My initial thought would be to compile nginx with make -i so it thinks it built and then unpack the .ipk somewhere in the staging_dir and overwrite everything nginx (failed to) compile, but perhaps there is an easier way? It would be nice if I could just overwrite the nginx .ipk (that is borked because the compile failed) somewhere and have it all work...

Thanks in advance.

Is there anything stopping you from using Image Builder instead?

What is you buildhost? Some special Linux variant?

As nginx compiles ok in buildbot, there may be something special in your buildhost.

1 Like