[prev in list] [next in list] [prev in thread] [next in thread]
List: pdns-users
Subject: [Pdns-users] error compiling pdns recursor on mac os x 10.5
From: ati <atiware () gmx ! net>
Date: 2009-03-07 20:11:55
Message-ID: 1236456715.6833.8.camel () kukac
[Download RAW message or body]
hi,
i tryed to compile pdns-recursor-3.1.7 on mac os x 10.5.6 (intel) an i
get the following errors:
g++ -Wall -DBOOST_SP_DISABLE_THREADS -D_XOPEN_SOURCE -O3
-D_XOPEN_SOURCE -c -o lwres.o lwres.cc
lwres.cc: In function int asyncresolve(const ComboAddress&, const
std::string&, int, bool, bool, timeval*, LWResult*):
lwres.cc:184: error: expected type-specifier before exception
lwres.cc:184: error: expected `)' before & token
lwres.cc:184: error: expected `{' before & token
lwres.cc:184: error: mde was not declared in this scope
lwres.cc:184: error: expected `;' before ) token
lwres.cc:188: error: expected primary-expression before catch
lwres.cc:188: error: expected `;' before catch
lwres.cc:194: error: jump to label out
lwres.cc:163: error: from here
lwres.cc:194: error: enters catch block
lwres.cc:198: error: expected `}' at end of input
make: *** [lwres.o] Error 1
my xcode version is xcode312
i changed all occurences of "catch (exception" to "catch(std::exception"
and it compiles whitout errors. After installing it seems to be running
o.k.
the patch is attached.
please check this patch...
cheers,
Attila Soki
["patch-pdns-recursor-3.1.7.patch" (patch-pdns-recursor-3.1.7.patch)]
diff -Nuar pdns-recursor-3.1.7-orig/lwres.cc pdns-recursor-3.1.7/lwres.cc
--- pdns-recursor-3.1.7-orig/lwres.cc 2008-06-24 20:23:33.000000000 +0200
+++ pdns-recursor-3.1.7/lwres.cc 2009-03-07 20:35:42.000000000 +0100
@@ -181,7 +181,7 @@
return 1;
}
- catch(exception &mde) {
+ catch(std::exception& mde) {
if(::arg().mustDo("log-common-errors"))
L<<Logger::Notice<<"Unable to parse packet from remote server \
"<<ip.toString()<<": "<<mde.what()<<endl; }
diff -Nuar pdns-recursor-3.1.7-orig/pdns_recursor.cc \
pdns-recursor-3.1.7/pdns_recursor.cc
--- pdns-recursor-3.1.7-orig/pdns_recursor.cc 2008-06-24 20:23:33.000000000 +0200
+++ pdns-recursor-3.1.7/pdns_recursor.cc 2009-03-07 20:40:47.000000000 +0100
@@ -666,7 +666,7 @@
catch(MOADNSException& e) {
L<<Logger::Error<<"DNS parser error: "<<dc->d_mdp.d_qname<<", "<<e.what()<<endl;
}
- catch(exception& e) {
+ catch(std::exception& e) {
L<<Logger::Error<<"STL error: "<<e.what()<<endl;
}
catch(...) {
@@ -1183,7 +1183,7 @@
s_rcc.send(answer, &remote);
command();
}
- catch(exception& e) {
+ catch(std::exception& e) {
L<<Logger::Error<<"Error dealing with control socket request: "<<e.what()<<endl;
}
catch(AhuException& ae) {
@@ -1486,7 +1486,7 @@
SyncRes::s_negcache.clear();
return "ok\n";
}
- catch(exception& e) {
+ catch(std::exception& e) {
L<<Logger::Error<<"Had error reloading zones, keeping original data: \
"<<e.what()<<endl; }
catch(AhuException& ae) {
@@ -1525,7 +1525,7 @@
string tmp=DNSRR2String(rr);
rr=String2DNSRR(rr.qname, rr.qtype, tmp, rr.ttl);
}
- catch(exception &e) {
+ catch(std::exception &e) {
throw AhuException("Error parsing record '"+rr.qname+"' of type \
"+rr.qtype.getName()+" in zone '"+headers.first+"' from file '"+headers.second+"': \
"+e.what()); }
catch(...) {
@@ -1647,7 +1647,7 @@
}
}
}
- catch(exception& e) {
+ catch(std::exception& e) {
L<<Logger::Error<<"Retaining current script, error from '"<<fname<<"': "<< \
e.what() <<endl;
return string("Retaining current script, error from '"+fname+"': \
"+string(e.what())+"\n"); }
@@ -1771,7 +1771,7 @@
}
}
- catch(exception &e) {
+ catch(std::exception &e) {
L<<Logger::Error<<"Failed to load 'lua' script from \
'"<<::arg()["lua-dns-script"]<<"': "<<e.what()<<endl; exit(99);
}
@@ -2060,7 +2060,7 @@
L<<Logger::Error<<"Exception: "<<ae.reason<<endl;
ret=EXIT_FAILURE;
}
- catch(exception &e) {
+ catch(std::exception &e) {
L<<Logger::Error<<"STL Exception: "<<e.what()<<endl;
ret=EXIT_FAILURE;
}
_______________________________________________
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
http://mailman.powerdns.com/mailman/listinfo/pdns-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic