LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 07-14-2020, 05:57 AM   #1
LuisO
LQ Newbie
 
Registered: Mar 2020
Location: France
Posts: 6

Rep: Reputation: Disabled
LDFLAGS and CPPFLAGS on OpenLDAP


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!
 
Old 07-14-2020, 12:04 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,168
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
Quote:
Originally Posted by LuisO View Post
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!
Running "./configure --help" gives:
Code:
./configure --help
<snip>
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
Meaning that you'll need LDFLAGS/CPPFLAGS only if you are compiling openldap against s/w that is not installed in the standard places (usually under /usr).
This could happen if you're not using official packages, so the compiler cannot find the needed libraries in /usr/lib and/or /usr/lib64 and the header files in /usr/include

Also note that if you want to compile s/w from sources, you'll need to use your package manager in order to install the development packages of core stuff.
 
1 members found this post helpful.
Old 07-23-2020, 05:07 AM   #3
LuisO
LQ Newbie
 
Registered: Mar 2020
Location: France
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Running "./configure --help" gives:
Code:
./configure --help
<snip>
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>
Meaning that you'll need LDFLAGS/CPPFLAGS only if you are compiling openldap against s/w that is not installed in the standard places (usually under /usr).
This could happen if you're not using official packages, so the compiler cannot find the needed libraries in /usr/lib and/or /usr/lib64 and the header files in /usr/include

Also note that if you want to compile s/w from sources, you'll need to use your package manager in order to install the development packages of core stuff.
What does "s/w" mean?

Also, I have installed it under "/app" , a newly created directory.

So I am guessing I need those two flags?

( I am newish to OpenLDAP )
 
Old 07-23-2020, 06:29 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,168
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
Quote:
What does "s/w" mean?
Means software...


Quote:
Also, I have installed it under "/app" , a newly created directory.

So I am guessing I need those two flags?

( I am newish to OpenLDAP )
You don't understand the usage of those 2 env. variables.
You'll need to define them when you're compiling openldap, if you have installed any of its dependencies under a non standard directory.

If you have installed openldap in /app, then it should work fine, because it already found its dependencies in the standard directories.

However, if later on you're going to compile some other software that depends on openldap, then you'll have to define those 2 variables in that software's ./configure script.

I hope it's clear now
Regards
 
1 members found this post helpful.
Old 07-30-2020, 02:09 AM   #5
LuisO
LQ Newbie
 
Registered: Mar 2020
Location: France
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by bathory View Post
Means software...



You don't understand the usage of those 2 env. variables.
You'll need to define them when you're compiling openldap, if you have installed any of its dependencies under a non standard directory.

If you have installed openldap in /app, then it should work fine, because it already found its dependencies in the standard directories.

However, if later on you're going to compile some other software that depends on openldap, then you'll have to define those 2 variables in that software's ./configure script.

I hope it's clear now
Regards
I find it difficult to understand, to be honest, but it is really my fault. I am new to OpenLDAP.

Anyway I really appreciate your effort !
 
  


Reply

Tags
openldap



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] exhale: CPPFLAGS and SlackBuild... andrew.46 Slackware 2 04-06-2020 06:37 PM
CFLAGS and LDFLAGS configuration problem vofka Linux - General 3 11-06-2009 04:28 PM
nss_ldap, openldap and openldap-server ... what is openldap for? chakkerz Linux - Server 2 08-13-2009 07:16 PM
CFLAGS and LDFLAGS question versaulis Linux - Software 1 11-07-2008 11:33 AM
What are LDFLAGS and AM_LDFLAGS!? wimnat Linux - Software 2 11-21-2005 04:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 04:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration