Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-04-11 Thread a b
> You mean I should set: > > CFLAGS="${CFLAGS} -Wl/usr/local/openldap/lib64 -lldap -llber -rpath > /usr/local/openldap/lib64"; export CFLAGS > > ...rather than LDFLAGS ? No, leave it as is, for now. The "-Wl,..." is for the maintainers of the ./configure.in. Ideally, they will fix it. The comp

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-04-11 Thread Nikolaos Milas
On 11/4/2013 9:51 μμ, a b wrote: That means that ./configure is using the compiler front end (gcc) to link the executable, which is correct and good, but is using LDFLAGS to do that, which is a mistake. For linking with the front end, the ./configure script should be using CFLAGS: -Wl,-rpa

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-04-11 Thread a b
> Hmm, it didn't work like that: > > LDFLAGS="${LDFLAGS} -L/usr/local/openldap/lib64 -lldap -llber -rpath > /usr/local/openldap/lib64"; export LDFLAGS > > In config.log: > > gcc: unrecognized option '-rpath' That means that ./configure is using the compiler front end (gcc) to link the exe

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-04-11 Thread Nikolaos Milas
On 11/4/2013 4:20 μμ, a b wrote: Please add "-rpath /usr/local/openldap/lib64" to your LDFLAGS so that you do not have to resort to LD_LIBRARY_PATH or ld.so.conf hacks. Hmm, it didn't work like that: LDFLAGS="${LDFLAGS} -L/usr/local/openldap/lib64 -lldap -llber -rpath /usr/local/openldap/lib

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-04-11 Thread a b
> I am still puzzled why in my case the above "export" statement was > needed, but anyway... Because a variable setting is only good within the current process; if you do not export (or setenv in C-shells) a variable, the child process(es) will not inherit it. When you build software, a lot of

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-04-10 Thread Jan-Piet Mens
> What does "-DLDAP_DEPRECATED" signify? It sets a define (LDAP_DEPRECATED) which in turn pulls in certain function prototypes from the include files which have been deprecated (e.g. ldap_sasl_bind() should be used i/o ldap_bind()) In other words, people shouldn't be using these routines in thei

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-04-10 Thread Nikolaos Milas
On 10/4/2013 10:44 πμ, Aki Tuomi wrote: LDFLAGS="-llber" ./configure OK, this worked! export LDFLAGS="-llber" %configure I am still puzzled why in my case the above "export" statement was needed, but anyway... And, if we want to link against the custom ldap libraries: CXXFLAGS="$

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-04-10 Thread a b
> [root@vmres x86_64]# cat /etc/ld.so.conf > include ld.so.conf.d/*.conf > /usr/local/berkeleydb/lib64 > /usr/local/openldap/lib64 Forget ld.so.conf; properly linked binaries and libraries will never need it. > [root@vmres x86_64]# ls -la /usr/local/openldap/lib64/liblber* > lrwxrwxrwx 1 ldap lda

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-04-10 Thread a b
> The actual libs, as installed by any openldap package (or compiled from > source), are (at /usr/lib or at /usr/lib64 or at custom paths): > libldap.so and liblber.so. > > Now what? The .spec file and the Makefiles should be checked for -llber. "-llber" tells the link editor to look for "liblber

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-04-10 Thread a b
Without looking at the SRPM, it  is  difficult  to  diagnose  the problem. I might look at it later, if I have some time. Please be advised that this SRPM is a third party contributed SRPM, not the canonical  source  package.  The only package which could be con- sidered canonical would be one from

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-04-10 Thread Aki Tuomi
On Wed, Apr 10, 2013 at 09:12:57AM +0300, Aki Tuomi wrote: > On Wed, Apr 10, 2013 at 08:06:45AM +0300, Nikolaos Milas wrote: > > On 10/4/2013 12:33 πμ, Ruben Kerkhof wrote: > > > > >There must be something broken in your setup, can you show us the same > > >output as I just did? > > > > [root@vmr

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-04-09 Thread Aki Tuomi
On Wed, Apr 10, 2013 at 08:06:45AM +0300, Nikolaos Milas wrote: > On 10/4/2013 12:33 πμ, Ruben Kerkhof wrote: > > >There must be something broken in your setup, can you show us the same > >output as I just did? > > [root@vmres x86_64]# rpm -qf /usr/lib64/liblber.so > openldap-devel-2.4.23-32.el6_

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-04-09 Thread Nikolaos Milas
On 10/4/2013 12:33 πμ, Ruben Kerkhof wrote: There must be something broken in your setup, can you show us the same output as I just did? [root@vmres x86_64]# rpm -qf /usr/lib64/liblber.so openldap-devel-2.4.23-32.el6_4.x86_64 [root@vmres x86_64]# ls -l /usr/lib64/liblber* lrwxrwxrwx. 1 root r

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-04-09 Thread Morten Stevens
2013/4/9 Nikolaos Milas >checking for ldap_set_option in -lldap_r... no >checking for ldap_set_option in -lldap... no >configure: error: ldap library (libldap) not found > > The mystery remains a mystery. Any ideas? That's probably a problem with your build setup: Please see my reply

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-04-09 Thread Ruben Kerkhof
On Tue, Apr 9, 2013 at 9:42 PM, Nikolaos Milas wrote: > There is not such a lib (llber.so or lber.so or lldap.so or ldap.so) in > any openldap installation either on CentOS/EL 5 or 6. On my system (Scientific Linux 6.4, but that shouldn't matter) there is: [ruben@dev-ruben ~]$ rpm -qf /usr/lib

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-04-09 Thread Nikolaos Milas
On 9/4/2013 9:04 μμ, Ruben Kerkhof wrote: I haven't followed this thread closely, so I don't know what you're trying to accomplish, but powerdns is in the EPEL repo too. The src.rpm is at http://dl.fedoraproject.org/pub/epel/6/SRPMS/pdns-3.1-2.el6.src.rpm, try that one. I just tried to build

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-04-09 Thread Nikolaos Milas
On 9/4/2013 5:30 μμ, Aki Tuomi wrote: This line here is the clue. You are missing -llber (/usr/lib64/llber.so) There is not such a lib (llber.so or lber.so or lldap.so or ldap.so) in any openldap installation either on CentOS/EL 5 or 6. If the process requires such libs, it's looking for so

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-04-09 Thread Ruben Kerkhof
On Tue, Apr 9, 2013 at 4:15 PM, Nikolaos Milas wrote: > To make things clearer, I started again from scratch; I downloaded > http://www.monshouwer.eu/**download/3rd_party/pdns-** > server/el6/SRPMS/pdns-server-**3.2-1.el6.MIND.src.rpm

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-04-09 Thread Aki Tuomi
On Tue, Apr 09, 2013 at 05:15:37PM +0300, Nikolaos Milas wrote: > On 8/4/2013 11:36 μμ, Nikolaos Milas wrote: > > >...But let's step back for a while. > > > /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libldap_r.so: > undefined reference to `ber_sockbuf_io_udp' > collect2: ld returned

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-04-08 Thread a b
> but it exited with an error: > + ./configure --build=x86_64-redhat-linux-gnu > --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu > --program-prefix= --prefix==/usr/local/openldap > --exec-prefix==/usr/local/openldap --bindir==/usr/local/openldap/bin > configure: error: expecte

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-04-08 Thread Nikolaos Milas
On 22/3/2013 10:46 μμ, a b wrote: Actually, you could try the following in the .spec file; this assumes %_prefix=/usr/local/openldap in your .rpmmacros, since you wrote that you would rather not change it: O='$$O'; export O ORIGIN='$ORIGIN'; export ORIGIN CPPFLAGS="${CPPFLAGS} -I%{_prefix}/i

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-03-22 Thread a b
> CPPFLAGS="${CPPFLAGS} -I%{_prefix}/include"; export CPPFLAGS > LDFLAGS="${LDFLAGS} -L%{_libdir} > -R${ORIGIN}:${ORIGIN}/../%{_lib}:${ORIGIN}/../../%{_lib}:%{_libdir}"; export > LDFLAGS > CFLAGS="${CFLAGS} > -Wl,-L%{_libdir},-R${ORIGIN}:${ORIGIN}/../%{_lib}:${ORIGIN}/../../%{_lib}:%{_libdir}";

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-03-22 Thread a b
> Thanks for your assistance. You are welcome. > Until now, I always use a simple: > > $ cat .rpmmacros > %_topdir %(echo $HOME)/rpmbuild > > which has worked fine in many builds I have, and it works fine when I > build pdns-server on CentOS 5. This works because you are redefining the top build

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-03-22 Thread Nikolaos Milas
On 22/3/2013 6:23 pm, a b wrote: I did not mean that literally, sorry for the confusion. What I meant is that you muss pass the equivalent of --libdir=/usr/local/openldap/lib64 by using --libdir=%{_libdir}, which is a special RPM built-in macro. Thanks for your assistance. Sorry, I am not a

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-03-22 Thread a b
> %_prefix/%{MY_BASE} I should also add that you should pick a top-level directory in opt, like for example "blabla" or some other generic name (usually your organization's name, acronym, or most preferrably, lower case version of your organization's stock symbol, if you have one), and a

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-03-22 Thread a b
> > You need to pass --libdir=/usr/local/openldap/lib64 on the %configure > > line. > > Tried that, but the same error occurred. I did not mean that literally, sorry for the confusion. What I meant is that you muss pass the equivalent of --libdir=/usr/local/openldap/lib64 by using --libdir=%{_

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-03-22 Thread a b
> Thanks for the reply. > > Please, see below. > /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libldap_r.so: > > undefined reference to `ber_sockbuf_io_udp' As suspected, the link editor is not finding the symbols (function definitions) it needs to resolve bindings in the object file(

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-03-21 Thread Nikolaos Milas
On 20/3/2013 8:25 μμ, a b wrote: You need to pass --libdir=/usr/local/openldap/lib64 on the %configure line. Tried that, but the same error occurred. %configure \ --sysconfdir=%{_sysconfdir}/powerdns \ --libdir=/usr/local/openldap/lib64 \ --with-sqlite3 \ --with-socketdir=/var/

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-03-21 Thread Nikolaos Milas
On 20/3/2013 8:38 μμ, a b wrote: What does "config.log" say regarding ldap? Thanks for the reply. Please, see below. Thanks, Nick === ... configure:18499: checking ldap.h usability configure:18499: g++ -c -D_GNU_SOURCE -O2 -g -pipe -Wall

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-03-20 Thread a b
> Hmm, actually now that I tried to build using even the standard CentOS 6 > RPMs/libs/headers/, it still fails at the same point. > > So, am I doing something wrong? Please advise. What does "config.log" say regarding ldap? ___

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-03-20 Thread a b
> LIBS="-L/usr/local/openldap/lib64" What makes you believe that anything would pay attention to $LIBS? Did you see this in the code or documentation somewhere? > %build > %configure \ > --sysconfdir=%{_sysconfdir}/powerdns \ > --libdir=%{_libdir} \ > --with

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-03-20 Thread Nikolaos Milas
On 19/3/2013 8:13 μμ, Nikolaos Milas wrote: But, as I mentioned, it even fails without any change in the spec file, simply trying to build with the standard CentOS 6 OpenLDAP packages. In that case, it should be using the default system lib dir: In the meantime, I tried building PowerDNS 3.2 o

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-03-19 Thread Nikolaos Milas
On 19/3/2013 6:02 μμ, bert hubert wrote: Can you try LIBS=-L/usr/local/openldap/lib64 ./configure ... ? And can you double check a libldap.so lives there? Thanks, I just tried: LIBS="-L/usr/local/openldap/lib64" and (just in case): LIBS="${LIBS} -L/usr/local/openldap/lib64" but it

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-03-19 Thread Nikolaos Milas
On 19/3/2013 5:28 μμ, Nikolaos Milas wrote: Can you please guide me on how to adapt the spec file so as to build correctly using the custom ldap libraries / headers? Hmm, actually now that I tried to build using even the standard CentOS 6 RPMs/libs/headers/, it still fails at the same point.

Re: [Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-03-19 Thread bert hubert
On Tue, Mar 19, 2013 at 05:28:28PM +0200, Nikolaos Milas wrote: > CXXFLAGS="${CXXFLAGS} -I/usr/local/openldap/include" > LDFLAGS="${LDFLAGS} -L/usr/local/openldap/lib64 -lldap -llber" Can you try LIBS=-L/usr/local/openldap/lib64 ./configure ... ? And can you double check a libldap.so live

[Pdns-users] Building pdns RPMs using custom LDAP libraries/headers

2013-03-19 Thread Nikolaos Milas
Hello, I'm trying to build PowerDNS 3.2 on CentOS 6.4 x86_64 using http://www.monshouwer.eu/download/3rd_party/pdns-server/el6/SRPMS/pdns-server-3.2-1.el6.MIND.src.rpm based NOT on standard el6/centos 6 LDAP libraries, but on those installed by LTB project's RPMs (see: http://ltb-project.org/