[4.0.x] build fails (module imap) with libcurl 7.29.0

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

[4.0.x] build fails (module imap) with libcurl 7.29.0

Devel mailing list
Module imap is trying to use CURLOPT_DEFAULT_PROTOCOL, which was added in libcurl 7.45.0.

See build error below:


CC src/modules/rlm_imap/rlm_imap.c
In file included from /usr/include/curl/curl.h:2223,
                 from src/freeradius-devel/curl/base.h:32,
                 from src/modules/rlm_imap/rlm_imap.c:29:
src/modules/rlm_imap/rlm_imap.c: In function 'mod_authenticate':
src/modules/rlm_imap/rlm_imap.c:150:29: error: 'CURLOPT_DEFAULT_PROTOCOL' undeclared (first use in this function); did you mean 'CURLOPT_REDIR_PROTOCOLS'?
  150 |  FR_CURL_REQUEST_SET_OPTION(CURLOPT_DEFAULT_PROTOCOL, "imap");
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~
src/modules/rlm_imap/rlm_imap.c:150:2: note: in expansion of macro 'FR_CURL_REQUEST_SET_OPTION'
  150 |  FR_CURL_REQUEST_SET_OPTION(CURLOPT_DEFAULT_PROTOCOL, "imap");
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~
src/modules/rlm_imap/rlm_imap.c:150:29: note: each undeclared identifier is reported only once for each function it appears in
  150 |  FR_CURL_REQUEST_SET_OPTION(CURLOPT_DEFAULT_PROTOCOL, "imap");
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~
src/modules/rlm_imap/rlm_imap.c:150:2: note: in expansion of macro 'FR_CURL_REQUEST_SET_OPTION'
  150 |  FR_CURL_REQUEST_SET_OPTION(CURLOPT_DEFAULT_PROTOCOL, "imap");
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [scripts/boiler.mk:704: build/objs/src/modules/rlm_imap/rlm_imap.lo] Error 1

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
| Threaded
Open this post in threaded view
|

Re: [4.0.x] build fails (module imap) with libcurl 7.29.0

Alan DeKok-2
On Jun 27, 2020, at 3:15 PM, Chaigneau, Nicolas via Freeradius-Devel <[hidden email]> wrote:
>
> Module imap is trying to use CURLOPT_DEFAULT_PROTOCOL, which was added in libcurl 7.45.0.

  I've pushed a fix, thanks.

  Alan DeKok.


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
| Threaded
Open this post in threaded view
|

Re: [4.0.x] build fails (module imap) with libcurl 7.29.0

arr2036


> On Jun 27, 2020, at 3:10 PM, Alan DeKok <[hidden email]> wrote:
>
> On Jun 27, 2020, at 3:15 PM, Chaigneau, Nicolas via Freeradius-Devel <[hidden email]> wrote:
>>
>> Module imap is trying to use CURLOPT_DEFAULT_PROTOCOL, which was added in libcurl 7.45.0.
>
>  I've pushed a fix, thanks.

It's an enumeration value not a macro so using ifdef doesn't work.

Curl helpfully provides:

https://github.com/curl/curl/blob/7f40633422df36b50e752749fb8795cac3e99e37/docs/libcurl/symbols-in-versions

and:

#if CURL_AT_LEASE_VERSION(x, y, x)

As the lack of CURLOPT_DEFAULT_PROTOCOL means that users must explicitly specify the scheme for curl based modules, and as I really don't feel like sticking #ifdefs everywhere in the code and using our own custom function to emulate this behaviour, I've bumped the minimum curl version to 7.45.0.

curl version 7.45.0 was released on October 7 2015.

If you don't need any of the libcurl based modules like rlm_rest or rlm_imap then they'll just be excluded from the build.

-Arran



-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
| Threaded
Open this post in threaded view
|

RE: [4.0.x] build fails (module imap) with libcurl 7.29.0

Devel mailing list
It's perfectly fine to require a recent version of libcurl.

Just a minor inconsistency remains in the configure output... the minimum version shown in the WARNING is incorrect (should be 7.45.0, not 7.19.2):

checking for the version of libcurl... 7.29.0
checking for libcurl >= version 7.45.0... no
configure: WARNING: silently not building libfreeradius-curl.
configure: WARNING: FAILURE: libfreeradius-curl requires:  libcurl >= 7.19.2.
configure: creating ./config.status



Regards,
Nicolas.


This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
| Threaded
Open this post in threaded view
|

Re: [4.0.x] build fails (module imap) with libcurl 7.29.0

Alan DeKok-2
On Jun 28, 2020, at 1:20 PM, Chaigneau, Nicolas via Freeradius-Devel <[hidden email]> wrote:

>
> It's perfectly fine to require a recent version of libcurl.
>
> Just a minor inconsistency remains in the configure output... the minimum version shown in the WARNING is incorrect (should be 7.45.0, not 7.19.2):
>
> checking for the version of libcurl... 7.29.0
> checking for libcurl >= version 7.45.0... no
> configure: WARNING: silently not building libfreeradius-curl.
> configure: WARNING: FAILURE: libfreeradius-curl requires:  libcurl >= 7.19.2.
> configure: creating ./config.status

  I don't see that here.  There's no "7.19.2" string in the source.  Maybe just "git pull" again?

  Alan DeKok.


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
| Threaded
Open this post in threaded view
|

RE: [4.0.x] build fails (module imap) with libcurl 7.29.0

Devel mailing list
Arran fixed it :-)
https://github.com/FreeRADIUS/freeradius-server/commit/e7a215b28bd16af3148bbe044d92297a4f2b256d


>   I don't see that here.  There's no "7.19.2" string in the source.  Maybe just "git pull" again?
>
>   Alan DeKok.

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html