Are modules built with --with-compat compatible across minor versions of NGINX?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Are modules built with --with-compat compatible across minor versions of NGINX?

ramirezc
If I build a dynamic module against, say nginx 1.12.2 with `--with-compat`,
will it work with, say nginx 1.12.1 (assuming --with-compat all around)


I assume not, because I found this in ngx_module.c, separate from the
signature check.  nginx_version has the minor version in it.


 if (module->version != nginx_version) {
        ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
                           "module \"%V\" version %ui instead of %ui",
                           file, module->version, (ngx_uint_t)
nginx_version);
        return NGX_ERROR;
    }

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,286335,286335#msg-286335

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: Are modules built with --with-compat compatible across minor versions of NGINX?

Maxim Dounin
Hello!

On Tue, Nov 26, 2019 at 04:10:28PM -0500, ptcell wrote:

> If I build a dynamic module against, say nginx 1.12.2 with `--with-compat`,
> will it work with, say nginx 1.12.1 (assuming --with-compat all around)
>
>
> I assume not, because I found this in ngx_module.c, separate from the
> signature check.  nginx_version has the minor version in it.

Your assumption is correct.

ABI stability is not guranteed on version changes, even minor,
hence modules build for different versions are not compatible.  
Version is checked to explicitly prevent loading of incompatible
modules.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx