You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Moradhassel, Kavian" <km...@ciena.com> on 2018/03/24 14:41:42 UTC

building 2.4.33 with apr < 1.5

Hello,

When building the new 2.4.33 release on one of the RHEL-based distributions (Oracle Linux 7 in my case, but I think this would also happen on RHEL 7 and CentOS 7), I see this warning:

mod_remoteip.c: In function 'remoteip_sockaddr_compat':
mod_remoteip.c:329:5: warning: implicit declaration of function 'apr_sockaddr_is_wildcard' [-Wimplicit-function-declaration]
     if (apr_sockaddr_is_wildcard(addr1) &&
     ^

And at runtime, I get this error when I try to load mod_remoteip:

Cannot load modules/mod_remoteip.so into server: /opt/httpd/modules/mod_remoteip.so: undefined symbol: apr_sockaddr_is_wildcard

A little googling tells me that apr_sockaddr_is_wildcard was adding in apr 1.5, but the apr version in RHEL/CentOS/etc. 7 is 1.4.8.

Is there any way to work around this in the build, or do I have to build my own apr?

Thanks,

Kav Moradhassel | Ciena
kmoradha@ciena.com<ma...@ciena.com> | 385 Terry Fox Drive | Ottawa, ON, K2K 0L1  Canada


Re: building 2.4.33 with apr < 1.5

Posted by Eric Covener <co...@gmail.com>.
On Sat, Mar 24, 2018 at 10:41 AM, Moradhassel, Kavian
<km...@ciena.com> wrote:
> Hello,
>
>
>
> When building the new 2.4.33 release on one of the RHEL-based distributions
> (Oracle Linux 7 in my case, but I think this would also happen on RHEL 7 and
> CentOS 7), I see this warning:
>
>
>
> mod_remoteip.c: In function ‘remoteip_sockaddr_compat’:
>
> mod_remoteip.c:329:5: warning: implicit declaration of function
> ‘apr_sockaddr_is_wildcard’ [-Wimplicit-function-declaration]
>
>      if (apr_sockaddr_is_wildcard(addr1) &&
>
>      ^
>
>
>
> And at runtime, I get this error when I try to load mod_remoteip:
>
>
>
> Cannot load modules/mod_remoteip.so into server:
> /opt/httpd/modules/mod_remoteip.so: undefined symbol:
> apr_sockaddr_is_wildcard
>
>
>
> A little googling tells me that apr_sockaddr_is_wildcard was adding in apr
> 1.5, but the apr version in RHEL/CentOS/etc. 7 is 1.4.8.
>
>
>
> Is there any way to work around this in the build, or do I have to build my
> own apr?
>

Looks inadvertent, sorry for the trouble.   Thanks for the report.

I suggest patching your mod_remoteip to make a local copy of that
little routine from APR:

http://people.apache.org/~covener/patches/remoteip-apr14.diff

I assume the workaround will not be necessary in any subsequent release.


>
>
> Thanks,
>
>
>
> Kav Moradhassel | Ciena
>
> kmoradha@ciena.com | 385 Terry Fox Drive | Ottawa, ON, K2K 0L1  Canada
>
>



-- 
Eric Covener
covener@gmail.com