recursor svn+3.1.5-snapshot compile broken with debian libstdc++6-4.2-dev 4.2.2-7 #173

Closed
Habbie opened this Issue Apr 26, 2013 · 1 comment

Projects

None yet

1 participant

@Habbie
Member
Habbie commented Apr 26, 2013

after copying the missing htimer.hh from pdns/htimer.hh to the recursor directory (or tar.bz2) and doing this:

--- pdns-recursor-3.1.5-snapshot/recursor_cache.cc      2008-01-24 14:48:59.000000000 +0100
+++ ../../from-dl/pdns-recursor-3.1.5-snapshot/recursor_cache.cc        2008-01-24 15:33:08.000000000 +0100
@@ -12,7 +12,7 @@
 #include "config.h"

 #ifdef GCC_SKIP_LOCKING
-#include <bits/atomicity.h>
+#include <ext/atomicity.h>
 // This code is ugly but does speedup the recursor tremendously on multi-processor systems, and even has a large effect (20, 30%) on uniprocessor 
 namespace __gnu_cxx
 {

i still get the following compile error

tanj:/usr/src/pdns-recursor-3.1.5-snapshot# PROFILEFLAGS=-fprofile-generate make
g++  -Wall -DBOOST_SP_DISABLE_THREADS -O3 -fprofile-generate -D_GNU_SOURCE -MM -MG *.cc *.hh > dep

PLEASE READ: If you get an error mentioning #include <boost/something.hpp>, please read README
PLEASE READ: for an easy fix!

g++  -Wall -DBOOST_SP_DISABLE_THREADS -O3 -fprofile-generate -D_GNU_SOURCE -c epollmplexer.cc -o optional/epollmplexer.o ; true
g++  -Wall -DBOOST_SP_DISABLE_THREADS -O3 -fprofile-generate -D_GNU_SOURCE   -c -o syncres.o syncres.cc
g++  -Wall -DBOOST_SP_DISABLE_THREADS -O3 -fprofile-generate -D_GNU_SOURCE   -c -o misc.o misc.cc
g++  -Wall -DBOOST_SP_DISABLE_THREADS -O3 -fprofile-generate -D_GNU_SOURCE   -c -o unix_utility.o unix_utility.cc
g++  -Wall -DBOOST_SP_DISABLE_THREADS -O3 -fprofile-generate -D_GNU_SOURCE   -c -o qtype.o qtype.cc
g++  -Wall -DBOOST_SP_DISABLE_THREADS -O3 -fprofile-generate -D_GNU_SOURCE   -c -o logger.o logger.cc
g++  -Wall -DBOOST_SP_DISABLE_THREADS -O3 -fprofile-generate -D_GNU_SOURCE   -c -o arguments.o arguments.cc
g++  -Wall -DBOOST_SP_DISABLE_THREADS -O3 -fprofile-generate -D_GNU_SOURCE   -c -o lwres.o lwres.cc
g++  -Wall -DBOOST_SP_DISABLE_THREADS -O3 -fprofile-generate -D_GNU_SOURCE   -c -o pdns_recursor.o pdns_recursor.cc
g++  -Wall -DBOOST_SP_DISABLE_THREADS -O3 -fprofile-generate -D_GNU_SOURCE   -c -o recursor_cache.o recursor_cache.cc
recursor_cache.cc: In function '_Atomic_word __gnu_cxx::__exchange_and_add(volatile _Atomic_word*, int)':
recursor_cache.cc:21: error: redefinition of '_Atomic_word __gnu_cxx::__exchange_and_add(volatile _Atomic_word*, int)'
/usr/include/c++/4.2/ext/atomicity.h:50: error: '_Atomic_word __gnu_cxx::__exchange_and_add(volatile _Atomic_word*, int)' previously defined here
recursor_cache.cc: In function 'void __gnu_cxx::__atomic_add(volatile _Atomic_word*, int)':
recursor_cache.cc:30: error: redefinition of 'void __gnu_cxx::__atomic_add(volatile _Atomic_word*, int)'
/usr/include/c++/4.2/ext/atomicity.h:54: error: 'void __gnu_cxx::__atomic_add(volatile _Atomic_word*, int)' previously defined here
make: *** [recursor_cache.o] Error 1

Result is the same with or without -fprofile-generate.

Interestingly enough the compile error stays the same even if i totally remove the abovementioned #include <ext/atomicity.h> line.

tanj:~# g++ -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --disable-libmudflap --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu                                                                                              Thread model: posix
gcc version 4.2.3 20080114 (prerelease) (Debian 4.2.2-7)
tanj:~# dpkg -l|grep libstdc
ii  libstdc++5                         1:3.3.6-15                 The GNU Standard C++ Library v3
ii  libstdc++6                         4.3-20080116-1             The GNU Standard C++ Library v3
ii  libstdc++6-4.2-dev                 4.2.2-7                    The GNU Standard C++ Library v3 (development
tanj:~# dpkg -l|grep libboost       
ii  libboost-date-time-dev             1.34.1-4                   set of date-time libraries based on generic 
ii  libboost-date-time1.33.1           1.33.1-10                  set of date-time libraries based on generic 
ii  libboost-date-time1.34.0           1.34.0-1                   set of date-time libraries based on generic 
ii  libboost-date-time1.34.1           1.34.1-4                   set of date-time libraries based on generic 
ii  libboost-dev                       1.34.1-4                   Boost C++ Libraries development files
ii  libboost-doc                       1.34.1-4                   Boost.org libraries documentation
ii  libboost-filesystem-dev            1.34.1-4                   filesystem operations (portable paths, itera
ii  libboost-filesystem1.33.1          1.33.1-10                  filesystem operations (portable paths, itera
ii  libboost-filesystem1.34.0          1.34.0-1                   filesystem operations (portable paths, itera
ii  libboost-filesystem1.34.1          1.34.1-4                   filesystem operations (portable paths, itera
ii  libboost-graph-dev                 1.34.1-4                   generic graph components and algorithms in C
ii  libboost-graph1.34.1               1.34.1-4                   generic graph components and algorithms in C
ii  libboost-iostreams-dev             1.34.1-4                   Boost.Iostreams Library development files
ii  libboost-iostreams1.33.1           1.33.1-10                  Boost.Iostreams Library
ii  libboost-iostreams1.34.0           1.34.0-1                   Boost.Iostreams Library
ii  libboost-iostreams1.34.1           1.34.1-4                   Boost.Iostreams Library
ii  libboost-program-options-dev       1.34.1-4                   program options library for C++
ii  libboost-program-options1.33.1     1.33.1-10                  program options library for C++
ii  libboost-program-options1.34.0     1.34.0-1                   program options library for C++
ii  libboost-program-options1.34.1     1.34.1-4                   program options library for C++
ii  libboost-python-dev                1.34.1-4                   Boost.Python Library development files
ii  libboost-python1.34.1              1.34.1-4                   Boost.Python Library
ii  libboost-regex-dev                 1.34.1-4                   regular expression library for C++
ii  libboost-regex1.33.1               1.33.1-10                  regular expression library for C++
ii  libboost-regex1.34.1               1.34.1-4                   regular expression library for C++
ii  libboost-serialization-dev         1.34.1-4                   serialization library for C++
ii  libboost-serialization1.34.0       1.34.0-1                   serialization library for C++
ii  libboost-serialization1.34.1       1.34.1-4                   serialization library for C++
ii  libboost-signals-dev               1.34.1-4                   managed signals and slots library for C++
ii  libboost-signals1.33.1             1.33.1-10                  managed signals and slots library for C++
ii  libboost-signals1.34.0             1.34.0-1                   managed signals and slots library for C++
ii  libboost-signals1.34.1             1.34.1-4                   managed signals and slots library for C++
ii  libboost-test-dev                  1.34.1-4                   components for writing and executing test su
ii  libboost-test1.33.1                1.33.1-10                  components for writing and executing test su
ii  libboost-test1.34.0                1.34.0-1                   components for writing and executing test su
ii  libboost-test1.34.1                1.34.1-4                   components for writing and executing test su
ii  libboost-thread-dev                1.34.1-4                   portable C++ multi-threading
ii  libboost-thread1.33.1              1.33.1-10                  portable C++ multi-threading
ii  libboost-thread1.34.0              1.34.0-1                   portable C++ multi-threading
ii  libboost-thread1.34.1              1.34.1-4                   portable C++ multi-threading
ii  libboost-wave-dev                  1.34.1-4                   C99/C++ preprocessor library
ii  libboost-wave1.34.0                1.34.0-1                   C99/C++ preprocessor library
ii  libboost-wave1.34.1                1.34.1-4                   C99/C++ preprocessor library

best regards,

Stefan Schmidt zaphodb@zaphods.net

@Habbie Habbie was assigned Apr 26, 2013
@Habbie Habbie closed this Apr 26, 2013
@Habbie
Member
Habbie commented Apr 26, 2013

Author: anon
fixed in http://wiki.powerdns.com/cgi-bin/trac.fcgi/changeset/1134

thanks ahu,

Stefan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment