Nitish Bangera | 23 Feb 2012 19:21
Picon

Problems in compiling bind

Hello all,


Os: Cent os 5.3
Bind: 9.2.2
DLZ: 0.7.0

rpm -qa | grep mysql
mysql-5.0.95-1.el5_7.1
mysql-devel-5.0.95-1.el5_7.1
mysql-5.0.95-1.el5_7.1
mysql-devel-5.0.95-1.el5_7.1
mysql-server-5.0.95-1.el5_7.1

I had configured bind for just mysql.I am having problems during make. 

-L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm   -lnsl
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.so when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
make[2]: *** [named] Error 1
make[2]: Leaving directory `/array/purato/bind/bind-9.2.2/bin/named'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/array/purato/bind/bind-9.2.2/bin'
make: *** [subdirs] Error 1


Please help me resolve this error

--
Regards,
Nitish S. Bangera
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Bind-dlz-testers mailing list
Bind-dlz-testers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bind-dlz-testers
Kwasi Gyasi - Agyei | 23 Feb 2012 19:33
Picon

Re: Problems in compiling bind

On 2012/02/23 8:21 PM, Nitish Bangera wrote:
> Hello all,
>
> Os: Cent os 5.3
> Bind: 9.2.2
> DLZ: 0.7.0
>
> rpm -qa | grep mysql
> mysql-5.0.95-1.el5_7.1
> mysql-devel-5.0.95-1.el5_7.1
> mysql-5.0.95-1.el5_7.1
> mysql-devel-5.0.95-1.el5_7.1
> mysql-server-5.0.95-1.el5_7.1
>
> I had configured bind for just mysql.I am having problems during make.
>
> -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm   -lnsl
> /usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.so 
> when searching for -lmysqlclient
> /usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.a 
> when searching for -lmysqlclient
> /usr/bin/ld: cannot find -lmysqlclient
> collect2: ld returned 1 exit status
> make[2]: *** [named] Error 1
> make[2]: Leaving directory `/array/purato/bind/bind-9.2.2/bin/named'
> make[1]: *** [subdirs] Error 1
> make[1]: Leaving directory `/array/purato/bind/bind-9.2.2/bin'
> make: *** [subdirs] Error 1
>
>
> Please help me resolve this error
>
> -- 
> Regards,
> Nitish S. Bangera
>
>
> ------------------------------------------------------------------------------
> Virtualization&  Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
>
>
> _______________________________________________
> Bind-dlz-testers mailing list
> Bind-dlz-testers <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bind-dlz-testers
I would recommend you install named-sdb

$yum -y install named-sdb

-- 

Multimedia and Communication | Property | Entertainment
Kwasi Owusu Gyasi - Agyei

*cell* (+27) (0) 76 466 4488
*website *www.4things.co.za <http://www.4things.co.za>
*email *kwasi.gyasiagyei <at> 4things.co.za 
<mailto:kwasi.gyasiagyei <at> 4things.co.za>
*skype *kwasi.gyasiagyei
*role* Developer.Designer.Software Architect
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Bind-dlz-testers mailing list
Bind-dlz-testers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bind-dlz-testers
Todd Lyons | 23 Feb 2012 20:33
Gravatar

Re: Problems in compiling bind

2012/2/23 Nitish Bangera <bangera.nitish <at> gmail.com>:
>
> Os: Cent os 5.3
> Bind: 9.2.2
> DLZ: 0.7.0
>
> rpm -qa | grep mysql
> mysql-devel-5.0.95-1.el5_7.1
> mysql-devel-5.0.95-1.el5_7.1

So you've got both the i386 and the x86_64 versions installed.  Not a big deal.

> I had configured bind for just mysql.I am having problems during make.
>
> -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm   -lnsl
> /usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.so when
> searching for -lmysqlclient

This first line is just a warning, tells you that it found an
incompatible version (found i386 version when it wants x86_64 version
of libs).

> /usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.a when
> searching for -lmysqlclient

Still just a warning.

> /usr/bin/ld: cannot find -lmysqlclient

Wasn't configured to look anywhere else, so it bailed.  Look at your line:
> -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm   -lnsl

Change the linker path to the 64 bit binaries.  You need to change
your Makefile to use the correct dynamic library search path for
mysql.  That needs to be changed to:
-L/usr/lib64/mysql

This may be set by an option to ./configure, or editing an m4 file, or
directly editing the Makefile.  I can't remember because I just update
and rebuild the SRPMs, so I've not had to deal with it for a very long
time.

...Todd
--

-- 
SOPA: Any attempt to [use legal means to] reverse technological
advances is doomed.  --Leo Leporte

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
Todd Lyons | 23 Feb 2012 20:37
Gravatar

Re: Problems in compiling bind

One other comment:

2012/2/23 Nitish Bangera <bangera.nitish <at> gmail.com>:
>
> rpm -qa | grep mysql
> mysql-5.0.95-1.el5_7.1
> mysql-devel-5.0.95-1.el5_7.1
> mysql-5.0.95-1.el5_7.1
> mysql-devel-5.0.95-1.el5_7.1
> mysql-server-5.0.95-1.el5_7.1

Useful tip:  Add this to root's ~/.rpmmacros :

%_query_all_fmt %%{name}-%%{version}-%%{release}.%%{arch}

Then you will get output like this:

mysql-5.0.95-1.el5_7.1.i386
mysql-devel-5.0.95-1.el5_7.1.x86_64
mysql-5.0.95-1.el5_7.1.x86_64
mysql-devel-5.0.95-1.el5_7.1.i386
mysql-server-5.0.95-1.el5_7.1.x86_64

--

-- 
SOPA: Any attempt to [use legal means to] reverse technological
advances is doomed.  --Leo Leporte

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
Nitish Bangera | 24 Feb 2012 08:41
Picon

Re: Problems in compiling bind

Hey Todd,

Thanks for the advice. Changing the path name from /usr/lib to /usr/lib64 in configure worked like a gem. Now i am wondering where exactly the configs to connect to the mysql database should be put in.

On Fri, Feb 24, 2012 at 1:07 AM, Todd Lyons <tlyons <at> ivenue.com> wrote:
One other comment:

2012/2/23 Nitish Bangera <bangera.nitish <at> gmail.com>:
>
> rpm -qa | grep mysql
> mysql-5.0.95-1.el5_7.1
> mysql-devel-5.0.95-1.el5_7.1
> mysql-5.0.95-1.el5_7.1
> mysql-devel-5.0.95-1.el5_7.1
> mysql-server-5.0.95-1.el5_7.1

Useful tip:  Add this to root's ~/.rpmmacros :

%_query_all_fmt %%{name}-%%{version}-%%{release}.%%{arch}

Then you will get output like this:

mysql-5.0.95-1.el5_7.1.i386
mysql-devel-5.0.95-1.el5_7.1.x86_64
mysql-5.0.95-1.el5_7.1.x86_64
mysql-devel-5.0.95-1.el5_7.1.i386
mysql-server-5.0.95-1.el5_7.1.x86_64


--
SOPA: Any attempt to [use legal means to] reverse technological
advances is doomed.  --Leo Leporte

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Bind-dlz-testers mailing list
Bind-dlz-testers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bind-dlz-testers



--
Regards,
Nitish S. Bangera
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Bind-dlz-testers mailing list
Bind-dlz-testers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bind-dlz-testers
Todd Lyons | 24 Feb 2012 15:42
Gravatar

Re: Problems in compiling bind

My apologies for the formatting, but I wanted to keep the long lines from wrapping.  If you don't like rich text, feel free to delete this email.

2012/2/23 Nitish Bangera <bangera.nitish <at> gmail.com>:
> Hey Todd,
>
> Thanks for the advice. Changing the path name from /usr/lib to /usr/lib64 in
> configure worked like a gem. Now i am wondering where exactly the configs to
> connect to the mysql database should be put in.

In your named.conf.

You can also mix regular zones with DLZ zones if you choose to.  For example:
/etc/named.conf:
logging {
       channel default_debug {
               file "/var/log/named.debug";
               severity info;
       };
};

zone "." IN {
       type hint;
       file "named.ca";
};

include "/etc/named.rfc1912.zones";
include "/etc/named.dlz";
============================

/etc/named.dlz:
dlz "Mysql zone" {
  database "mysql
  {host=db-master user=domains pass=******************** dbname=live_sites ssl=false}
  {SELECT name FROM domain WHERE name = '$zone$' AND active=1}
  {SELECT '7200' AS ttl,domain_record_type.type,
       case when lower(domain_record_type.type) = 'mx' then domain_record.mx_priority end,
       case when lower(domain_record_type.type) = 'txt' then concat('\"', domain_record.value, '\"') else domain_record.value end AS data
       FROM domain_record,domain,domain_record_type
       WHERE domain_record_type.id=domain_record.type_id AND domain_record.active=1
           AND domain.id=domain_record.domain_id
           AND domain.name='$zone$'
           AND domain_record.name='$record$'}";
};

# I use the short form of database lookups since I don't do transfers and such.
# That's a personal choice, it's up to you how you configure your system.

============================

/etc/named.rfc1912.zones:
zone "localhost.localdomain" IN {
       type master;
       file "named.localhost";
       allow-update { none; };
};

zone "localhost" IN {
       type master;
       file "named.localhost";
       allow-update { none; };
};

zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
       type master;
       file "named.loopback";
       allow-update { none; };
};

zone "1.0.0.127.in-addr.arpa" IN {
       type master;
       file "named.loopback";
       allow-update { none; };
};

zone "0.in-addr.arpa" IN {
       type master;
       file "named.empty";
       allow-update { none; };
};

etc...

Regards...    Todd

--
SOPA: Any attempt to [use legal means to] reverse technological advances is doomed.  --Leo Leporte

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Bind-dlz-testers mailing list
Bind-dlz-testers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bind-dlz-testers
Nitish Bangera | 25 Feb 2012 13:58
Picon

Re: Problems in compiling bind

Hello Todd,

I am really thankfull to your advices as it has helped me a lot. But, i kind of new to Bind and do not understand what's written in the rfc files. If you can please explain it in detail then i would be really grateful. Hope i am causing too much of a hassle to you.

Thanks,
Nitish

2012/2/24 Todd Lyons <tlyons <at> ivenue.com>
My apologies for the formatting, but I wanted to keep the long lines from wrapping.  If you don't like rich text, feel free to delete this email.

2012/2/23 Nitish Bangera <bangera.nitish <at> gmail.com>:

> Hey Todd,
>
> Thanks for the advice. Changing the path name from /usr/lib to /usr/lib64 in
> configure worked like a gem. Now i am wondering where exactly the configs to
> connect to the mysql database should be put in.

In your named.conf.

You can also mix regular zones with DLZ zones if you choose to.  For example:
/etc/named.conf:
logging {
       channel default_debug {
               file "/var/log/named.debug";
               severity info;
       };
};

zone "." IN {
       type hint;
       file "named.ca";
};

include "/etc/named.rfc1912.zones";
include "/etc/named.dlz";
============================

/etc/named.dlz:
dlz "Mysql zone" {
  database "mysql
  {host=db-master user=domains pass=******************** dbname=live_sites ssl=false}
  {SELECT name FROM domain WHERE name = '$zone$' AND active=1}
  {SELECT '7200' AS ttl,domain_record_type.type,
       case when lower(domain_record_type.type) = 'mx' then domain_record.mx_priority end,
       case when lower(domain_record_type.type) = 'txt' then concat('\"', domain_record.value, '\"') else domain_record.value end AS data
       FROM domain_record,domain,domain_record_type
       WHERE domain_record_type.id=domain_record.type_id AND domain_record.active=1
           AND domain.id=domain_record.domain_id
           AND domain.name='$zone$'
           AND domain_record.name='$record$'}";
};

# I use the short form of database lookups since I don't do transfers and such.
# That's a personal choice, it's up to you how you configure your system.

============================

/etc/named.rfc1912.zones:
zone "localhost.localdomain" IN {
       type master;
       file "named.localhost";
       allow-update { none; };
};

zone "localhost" IN {
       type master;
       file "named.localhost";
       allow-update { none; };
};

zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
       type master;
       file "named.loopback";
       allow-update { none; };
};

zone "1.0.0.127.in-addr.arpa" IN {
       type master;
       file "named.loopback";
       allow-update { none; };
};

zone "0.in-addr.arpa" IN {
       type master;
       file "named.empty";
       allow-update { none; };
};

etc...

Regards...    Todd


--
SOPA: Any attempt to [use legal means to] reverse technological advances is doomed.  --Leo Leporte


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Bind-dlz-testers mailing list
Bind-dlz-testers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bind-dlz-testers




--
Regards,
Nitish S. Bangera
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Bind-dlz-testers mailing list
Bind-dlz-testers <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bind-dlz-testers
Todd Lyons | 25 Feb 2012 23:18
Gravatar

Re: Problems in compiling bind

If I'm not mistaken, those came with the bind package as distributed
by RedHat.  I just took the srpm with an older version, adjusted it to
use the newer version, adjusted the build process (removed some
patches), and built the newer version.

These are standard basic configs that should be present in your
nameservers so that your nameservers don't recurse all the way up to
the root nameservers for these local configurations.  Refer to chapter
4 of RFC 1912 if you want more (than you want) detail.

...Todd

2012/2/25 Nitish Bangera <bangera.nitish <at> gmail.com>:
> Hello Todd,
>
> I am really thankfull to your advices as it has helped me a lot. But, i kind
> of new to Bind and do not understand what's written in the rfc files. If you
> can please explain it in detail then i would be really grateful. Hope i am
> causing too much of a hassle to you.
>
> Thanks,
> Nitish
>
> 2012/2/24 Todd Lyons <tlyons <at> ivenue.com>
>>
>> My apologies for the formatting, but I wanted to keep the long lines from
>> wrapping.  If you don't like rich text, feel free to delete this email.
>>
>> 2012/2/23 Nitish Bangera <bangera.nitish <at> gmail.com>:
>>
>> > Hey Todd,
>> >
>> > Thanks for the advice. Changing the path name from /usr/lib to
>> > /usr/lib64 in
>> > configure worked like a gem. Now i am wondering where exactly the
>> > configs to
>> > connect to the mysql database should be put in.
>>
>> In your named.conf.
>>
>> You can also mix regular zones with DLZ zones if you choose to.  For
>> example:
>> /etc/named.conf:
>> logging {
>>        channel default_debug {
>>                file "/var/log/named.debug";
>>                severity info;
>>        };
>> };
>>
>> zone "." IN {
>>        type hint;
>>        file "named.ca";
>> };
>>
>> include "/etc/named.rfc1912.zones";
>> include "/etc/named.dlz";
>> ============================
>>
>> /etc/named.dlz:
>> dlz "Mysql zone" {
>>   database "mysql
>>   {host=db-master user=domains pass=******************** dbname=live_sites
>> ssl=false}
>>   {SELECT name FROM domain WHERE name = '$zone$' AND active=1}
>>   {SELECT '7200' AS ttl,domain_record_type.type,
>>        case when lower(domain_record_type.type) = 'mx' then
>> domain_record.mx_priority end,
>>        case when lower(domain_record_type.type) = 'txt' then concat('\"',
>> domain_record.value, '\"') else domain_record.value end AS data
>>        FROM domain_record,domain,domain_record_type
>>        WHERE domain_record_type.id=domain_record.type_id AND
>> domain_record.active=1
>>            AND domain.id=domain_record.domain_id
>>            AND domain.name='$zone$'
>>            AND domain_record.name='$record$'}";
>> };
>>
>> # I use the short form of database lookups since I don't do transfers and
>> such.
>> # That's a personal choice, it's up to you how you configure your system.
>>
>> ============================
>>
>> /etc/named.rfc1912.zones:
>> zone "localhost.localdomain" IN {
>>        type master;
>>        file "named.localhost";
>>        allow-update { none; };
>> };
>>
>> zone "localhost" IN {
>>        type master;
>>        file "named.localhost";
>>        allow-update { none; };
>> };
>>
>> zone
>> "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa"
>> IN {
>>        type master;
>>        file "named.loopback";
>>        allow-update { none; };
>> };
>>
>> zone "1.0.0.127.in-addr.arpa" IN {
>>        type master;
>>        file "named.loopback";
>>        allow-update { none; };
>> };
>>
>> zone "0.in-addr.arpa" IN {
>>        type master;
>>        file "named.empty";
>>        allow-update { none; };
>> };
>>
>> etc...
>>
>> Regards...    Todd
>>
>>
>> --
>> SOPA: Any attempt to [use legal means to] reverse technological advances
>> is doomed.  --Leo Leporte
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Virtualization & Cloud Management Using Capacity Planning
>> Cloud computing makes use of virtualization - but cloud computing
>> also focuses on allowing computing to be delivered as a service.
>> http://www.accelacomm.com/jaw/sfnl/114/51521223/
>> _______________________________________________
>> Bind-dlz-testers mailing list
>> Bind-dlz-testers <at> lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/bind-dlz-testers
>>
>
>
>
> --
> Regards,
> Nitish S. Bangera
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> Bind-dlz-testers mailing list
> Bind-dlz-testers <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bind-dlz-testers
>

--

-- 
SOPA: Any attempt to [use legal means to] reverse technological
advances is doomed.  --Leo Leporte

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/

Gmane