Menu

#1261 compile error on FreeBSD

closed-fixed
configure (1)
5
2013-08-06
2013-08-03
No

Hello,

when I try to compile the Curl lib on FreeBSD, I'm getting this error:

CFLAGS error: CFLAGS may only be used to specify C compiler flags, not macro definitions. Use CPPFLAGS for: -DLDAP_DEPRECATED

How to circumvent this?

Thx, in advance.

1 Attachments

Discussion

  • Daniel Stenberg

    Daniel Stenberg - 2013-08-03
    • assigned_to: Daniel Stenberg
     
  • Daniel Stenberg

    Daniel Stenberg - 2013-08-03

    Where does -DLDAP_DEPRECATED come from?

     
  • Daniel Stenberg

    Daniel Stenberg - 2013-08-03
    • labels: --> configure
    • status: open --> pending-invalid
     
  • Daniel Stenberg

    Daniel Stenberg - 2013-08-03

    Besides, that's not truly an error but just a warning text as it may lead to funny effects in the generated build scripts.

    Is there something that actually doesn't work when you invoke make after configure has run?

     
  • Madam Smokey

    Madam Smokey - 2013-08-04

    Hi Daniel,

    I was trying to compile KDE4 from the ports collection. As attachement I've added the output from this compilation. When I disable LDAP in the configure script, then Curl compiles without error.

     
  • Daniel Stenberg

    Daniel Stenberg - 2013-08-04

    Still, LDAP_DECPRECATED is something your environment sets in CFLAGS. It is not a define curl/libcurl uses and it is wrongly set in CFLAGS instead of CPPFLAGS.

    The easiest path for you is to just make sure it isn't set at all as it serves no purpose when building curl.

    I don't think curl's configure should error out on this though so I'll fix it to behave slightly different in the future.

     
  • Madam Smokey

    Madam Smokey - 2013-08-04

    A fix seems to edit /usr/ports/Mk/bsd.ldap.mk

    to change:
    CFLAGS+= -DLDAP_DEPRECATED

    to:
    CPPFLAGS+= -DLDAP_DEPRECATED

    but i don't know the consequences are....

     
  • Daniel Stenberg

    Daniel Stenberg - 2013-08-04

    That's not really a question we can help you with either. That seems highly FreeBSD-specific!

    My changes in curl's configure scripts that will no longer error out on those warnings were merged as commit 6b27703b5f52.

    I hereby consider this issue closed and fixed. Is there anything else we can do?

     
  • Daniel Stenberg

    Daniel Stenberg - 2013-08-06
    • status: pending-invalid --> closed-fixed