LDFLAGS and CPPFLAGS on OpenLDAP

General support questions
Post Reply
turumihu
Posts: 1
Joined: 2020/07/31 09:57:17

LDFLAGS and CPPFLAGS on OpenLDAP

Post by turumihu » 2020/08/01 03:02:01

Hello,
I am compiling OpenLDAP.
I opened "./configure --help" , and among the options I read the "LDFLAGS" and "CPPFLAGS" but they are not explained there. When I looked it up on other compilation samples, I see different paths to those, like:
LDFLAGS="-L/usr/lib64/sasl2" but also "-L/usr/local/lib"
The same goes for "CPPFLAGS"
So, I am confused as to what those flags must contain.
Thanks in advance!

User avatar
TrevorH
Forum Moderator
Posts: 29113
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: LDFLAGS and CPPFLAGS on OpenLDAP

Post by TrevorH » 2020/08/01 11:16:21

Compiling openldap doesn't sound like a good move. Yes, Red Hat have deprecated it in RHEL/CentOS 8 but tehre are alternatives that are maintained and you would probably be better off using one of those. They provide freeipa and 389-ds packages, both of which have LDAP servers.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

User avatar
jlehtone
Posts: 2931
Joined: 2007/12/11 08:17:33
Location: Finland

Re: LDFLAGS and CPPFLAGS on OpenLDAP

Post by jlehtone » 2020/08/03 06:20:32

According to FreeIPA's site, it integrates:
389 Directory Server, MIT Kerberos, NTP, (BIND) DNS, Dogtag Certificate System, AD Integration, etc
In other words, FreeIPA's LDAP server is 389-ds?

I'm just in the process of replacing openldap-server with 389-ds-base, and it is almost painless. Certainly less suicidal than compiling sources.


When you compile a program, you use both compiler and linker and you give them instructions with command line options.
Make calls these programs with recipe ("Makefile"), where options are in variables. The configure writes the recipe.
The CPPFLAGS contains (some of the) options given to C++ compiler.
The LDFLAGS contains (some of the) options given to linker.

The -I and -L are described in man gcc. They are used to locate third-party libraries that are in non-standard locations.
However, RPM-packaged third-party libraries are in standard locations and compiler&linker should find them automatically.

Post Reply

Return to “CentOS 7 - General Support”