PDNS Recursor compile errors on g++ 4.4.0

View: New views
7 Messages — Rating Filter:   Alert me  

PDNS Recursor compile errors on g++ 4.4.0

by Roger Libiez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

pdns_recursor.cc: In function "void startDoResolve(void*)":
pdns_recursor.cc:669: error: reference to "exception" is ambiguous
/usr/include/boost/exception/exception.hpp:177: error: candidates are:
class boost::exception
/usr/lib/gcc/x86_64-redhat-linux/4.4.0/../../../../include/c++/4.4.0/exception:60:
error:                 class std::exception
pdns_recursor.cc:669: error: expected type-specifier before "exception"
pdns_recursor.cc:669: error: expected ) before & token
pdns_recursor.cc:669: error: expected { before & token
pdns_recursor.cc:669: error: e was not declared in this scope
pdns_recursor.cc:669: error: expected ; before ) token
pdns_recursor.cc:672: error: expected primary-expression before catch
pdns_recursor.cc:672: error: expected ; before catch

The above is displayed when attempting to compile on a server where g++
4.4.0 is the only available compiler. Downgrading the compiler is not an
option. What's the correct fix for these? There are quite a few of them
in various different spots in that module.

--
Arthmoor MUD Hosting Services: http://www.arthmoor.com/
_______________________________________________
Pdns-users mailing list
Pdns-users@...
http://mailman.powerdns.com/mailman/listinfo/pdns-users

Re: PDNS Recursor compile errors on g++ 4.4.0

by Leen Besselink :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Roger Libiez wrote:

> pdns_recursor.cc: In function "void startDoResolve(void*)":
> pdns_recursor.cc:669: error: reference to "exception" is ambiguous
> /usr/include/boost/exception/exception.hpp:177: error: candidates are:
> class boost::exception
> /usr/lib/gcc/x86_64-redhat-linux/4.4.0/../../../../include/c++/4.4.0/exception:60:
> error:                 class std::exception
> pdns_recursor.cc:669: error: expected type-specifier before "exception"
> pdns_recursor.cc:669: error: expected ) before & token
> pdns_recursor.cc:669: error: expected { before & token
> pdns_recursor.cc:669: error: e was not declared in this scope
> pdns_recursor.cc:669: error: expected ; before ) token
> pdns_recursor.cc:672: error: expected primary-expression before catch
> pdns_recursor.cc:672: error: expected ; before catch
>
> The above is displayed when attempting to compile on a server where g++
> 4.4.0 is the only available compiler. Downgrading the compiler is not an
> option. What's the correct fix for these? There are quite a few of them
> in various different spots in that module.
>

Hi Roger,

What version of PowerDNS-recursor and what version of Boost are you using ?:

I'm no expert, but I wouldn't be surprised if a newer Boost library solved the problem.

Atleast that's what my gut instinct told me, a quick Google search was much more useful.

I think you might need to add:

#include <cstdio>

to misc.hh

http://cvs.fedora.redhat.com/viewvc/devel/pdns-recursor/pdns-recursor-gcc44.patch?revision=1.1&view=markup

Hope that helps.

Have a nice day,
        Leen Besselink.
_______________________________________________
Pdns-users mailing list
Pdns-users@...
http://mailman.powerdns.com/mailman/listinfo/pdns-users

Re: PDNS Recursor compile errors on g++ 4.4.0

by Roger Libiez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Leen Besselink wrote:

> Hi Roger,
>
> What version of PowerDNS-recursor and what version of Boost are you using ?:
>
> I'm no expert, but I wouldn't be surprised if a newer Boost library solved the problem.
>
> Atleast that's what my gut instinct told me, a quick Google search was much more useful.
>
> I think you might need to add:
>
> #include <cstdio>
>
> to misc.hh
>
> http://cvs.fedora.redhat.com/viewvc/devel/pdns-recursor/pdns-recursor-gcc44.patch?revision=1.1&view=markup
>
> Hope that helps.
>
> Have a nice day,
> Leen Besselink.

PDNS-Recursor version 3.1.7 from the download page. I'm unaware of there
being anything newer.

If the RPM package is any indication, it's Boost 1.37.

The OS is Fedora 11.

The compiler is g++ 4.4.0

Adding that include to the bottom of misc.hh didn't change anything either.

I should add I have two other boxes at a different site using the same
PDNS-Recursor but on Fedora 10, with Boost 1.34, and gcc 4.3.2. They do
not display the error during compile.

--
Arthmoor MUD Hosting Services: http://www.arthmoor.com/
_______________________________________________
Pdns-users mailing list
Pdns-users@...
http://mailman.powerdns.com/mailman/listinfo/pdns-users

Re: PDNS Recursor compile errors on g++ 4.4.0

by bert hubert-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi everybody,

On Sun, Jul 5, 2009 at 11:44 AM, Roger Libiez<rlibiez@...> wrote:
> PDNS-Recursor version 3.1.7 from the download page. I'm unaware of there
> being anything newer.
>
> If the RPM package is any indication, it's Boost 1.37.

3.1.7 indeed does not compile with Boost 1.37 or higher, since they
started including an 'exception' class too.

The current subversion version of PowerDNS is compatible with Boost
1.37+, but no releases are. In the meantime, please use an older
boost, or if you are feeling adventurous, run the snapshot on:

http://svn.powerdns.com/snapshots/pdns-recursor-3.1.8-pre1.tar.bz2

The problem is not in the compiler.

    Bert
_______________________________________________
Pdns-users mailing list
Pdns-users@...
http://mailman.powerdns.com/mailman/listinfo/pdns-users

Re: PDNS Recursor compile errors on g++ 4.4.0

by Roger Libiez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Actually what you've told me here will fix the issue. Since I wasn't
really sure if you were relying on some boost mechanism that was
previously vague or if the gcc people made things more strict since I've
never even seen the error before in anything using the exception class.

All that's necessary then to fix it in all the instances it pops up is
to specify std::exception and the code compiles cleanly from there.

bert hubert wrote:

> Hi everybody,
>
> On Sun, Jul 5, 2009 at 11:44 AM, Roger Libiez<rlibiez@...> wrote:
>> PDNS-Recursor version 3.1.7 from the download page. I'm unaware of there
>> being anything newer.
>>
>> If the RPM package is any indication, it's Boost 1.37.
>
> 3.1.7 indeed does not compile with Boost 1.37 or higher, since they
> started including an 'exception' class too.
>
> The current subversion version of PowerDNS is compatible with Boost
> 1.37+, but no releases are. In the meantime, please use an older
> boost, or if you are feeling adventurous, run the snapshot on:
>
> http://svn.powerdns.com/snapshots/pdns-recursor-3.1.8-pre1.tar.bz2
>
> The problem is not in the compiler.
>
>     Bert
>

--
Arthmoor MUD Hosting Services: http://www.arthmoor.com/
_______________________________________________
Pdns-users mailing list
Pdns-users@...
http://mailman.powerdns.com/mailman/listinfo/pdns-users

GeoBackend Advice

by Kalpesh Thaker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi Guys


I need a little advice on a small problem we're having on our geo dns server.
it is related to the geobackend and MX records.


firstly, some background on my current setup, i am using debian lenny with pdns-server, and geo and bind backends. all packages were installed via the debian repositories, so nothing was compiled by hand.


this is what i have in the bind conf file for the domain domain.net


domain.net. IN SOA ns1.domain.net.,ns2.domain.net.,dns-admin@.... (
2009070304
10800
3600
604800
38400 )


domain.net. IN NS ns1.domain.net.
domain.net. IN NS ns2.domain.net.
domain.net. IN MX 10 mx0.email.com.
domain.net. IN MX 15 mx1.email.com.
domain.net. IN MX 20 mx2.email.com.
domain.net. IN MX 25 mx3.email.com.
domain.net. IN MX 30 mx4.email.com.
eu IN A 10.1.1.1
us IN A 10.1.1.2
www IN CNAME www.geo.domain.net.


the www.geo.domain.net record is where the geodns direction happens...
at the moment, there are only two geodns zones setup at the moment....US and EU. every other IP outside of US, will direct to EU.


if someone types www.domain.net in a browser, it cnames to www.geo.domain.net and then redirects accordingly via the geodns server.


the problem i'm having, is that when adding a wildcard cname of *, (So that whenever someone types domain.net without the www part it will still go to the website via geodns redirection) is that the geodns server then stops serving up queries for MX for this domain... until you add the mx's as the following:


us.domain.net. IN MX 10 mx0.email.com.
eu.domain.net. IN MX 10 mx0.email.com.


then if you dig the mx, you then get the following depending on your originating IP address:


;; QUESTION SECTION:
;domain.net. IN MX


;; ANSWER SECTION:
domain.net. 3600 IN CNAME www.geo.domain.net.
www.geo.domain.net. 3600 IN CNAME eu.domain.net.
eu.domain.net. 3600 IN MX 10 mx0.email.com.


this setup seems fine initially and the digs seem to work out correctly, however, some mail servers when sending us emails fail with the following errors:


A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:


user@...
(generated from user@...)
SMTP error from remote mail server after RCPT TO:<user@...>:
host mx0.email.com [***.**.**.**]: 550 relay not permitted


so it seems that some mail servers add the @www.geo.domain.net part automatically, and then relaying fails at the smtp host. gmail and a few others send mail fine, however, some UK based smtp's fail with the message above.


i have been told that some mail servers perform reverse dns lookups, and that is what causes these errors, and that the only way round this, is to remove the wildcard, and specify a static address record for the domain ie:


domain.net. IN A 10.1.1.2


then in some way perform redirection from the 10.1.1.2 host.
without the wildcard, you can then specify normal MX records as below:


domain.net. IN MX 10 mx0.email.com.
domain.net. IN MX 15 mx1.email.com.
domain.net. IN MX 20 mx2.email.com.
domain.net. IN MX 25 mx3.email.com.
domain.net. IN MX 30 mx4.email.com.


digs then send out the following:


;; QUESTION SECTION:
;domain.net. IN MX


;; ANSWER SECTION:
domain.net. 3600 IN MX 25 mx3.email.com.
domain.net. 3600 IN MX 30 mx4.email.com.
domain.net. 3600 IN MX 10 mx0.email.com.
domain.net. 3600 IN MX 15 mx1.email.com.
domain.net. 3600 IN MX 20 mx2.email.com.


mail then relays correctly from anywhere, however, when a user types
http://domain.net in a browser it will go to 10.1.1.2 by default due to the A record.


i need to find a way to redirect the user from 10.1.1.2 to www.domain.net without using the cname, otherwise, it just adds geodns to the address which somehow affects the MX as well. the redirection can be done from apache, but this can be tedious.


please have a look at the records i've listed in this email, and let me know if i could be missing something, or doing something wrong or if there is an alternative way to do this.


many thanks for your help.


kalpesh







_______________________________________________
Pdns-users mailing list
Pdns-users@...
http://mailman.powerdns.com/mailman/listinfo/pdns-users

Re: GeoBackend Advice

by Martin Barry :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

$quoted_author = "Kalpesh Thaker" ;
>
> the problem i'm having, is that when adding a wildcard cname of *, (So that
> whenever someone types domain.net without the www part it will still go to the
> website via geodns redirection)

Do you see "CNAME and other data" in your logs? You can't have a CNAME RR if
there are any other RRs for that name.

The right way to solve this is to:

- have an A record for domain.net pointing to one of your locations
- have a web server virtual host listening on that IP which HTTP redirects
to www.domain.net

cheers
Marty
_______________________________________________
Pdns-users mailing list
Pdns-users@...
http://mailman.powerdns.com/mailman/listinfo/pdns-users