Closed UnixJunkie closed 12 years ago
Here is more context...
---------- Forwarded message ---------- From: terwill Date: Tue, Sep 4, 2012 at 2:17 PM Subject: Re: durandal To: Nathaniel Echols
Hi Nat, Maybe the entire error message will be more helpful...here it is:
c++ -o Durandal/src/DistMatrix.o -c -DBOOST_ALL_NO_LIB -arch i386 -fPIC -fno-strict-aliasing -w -no-cpp-precomp -arch i386 -DNDEBUG -O1 -ffast-math /Users/terwill/unix/PHENIX/phenix-dev-1148/Durandal/src/DistMatrix.cc c++ -o Durandal/src/rmsd.o -c -DBOOST_ALL_NO_LIB -arch i386 -fPIC -fno-strict-aliasing -w -no-cpp-precomp -arch i386 -DNDEBUG -O1 -ffast-math /Users/terwill/unix/PHENIX/phenix-dev-1148/Durandal/src/rmsd.cc c++ -o Durandal/src/ranker.o -c -DBOOST_ALL_NO_LIB -arch i386 -fPIC -fno-strict-aliasing -w -no-cpp-precomp -arch i386 -DNDEBUG -O1 -ffast-math /Users/terwill/unix/PHENIX/phenix-dev-1148/Durandal/src/ranker.cc
In file included from /Users/terwill/unix/PHENIX/phenix-dev-1148/Durandal/src/DistMatrix.cc:33: /Users/terwill/unix/PHENIX/phenix-dev-1148/Durandal/src/Singleton.h:101:8: error: call to function 'operator<<' that is neither visible in the template definition nor found by argument-dependent lookup os << v[i] << '\n'; ^ /Users/terwill/unix/PHENIX/phenix-dev-1148/Durandal/src/DistMatrix.cc:844:12: note: in instantiation of function template specialization 'operator<<<std::pair<float, int> >' requested here cerr << bins; ^ /Users/terwill/unix/PHENIX/phenix-dev-1148/Durandal/src/Singleton.h:117:10: note: 'operator<<' should be declared prior to the call site ostream& operator<<(ostream& os, const pair<T, U>& p) { ^ 1 error generated.
All the best, Tom T
Hello,
I registered the bug under github's bugtracker here: https://github.com/HappyCrow/Durandal/issues?state=open
It would be nice if follow-ups go there.
I could not reproduce the problem at home on my mac.
I untared Durandal, ran make and it went fine.
Thanks, F.
The problem only appears to be with clang. Here is compilation with g++ and then clang:
terwill% mkdir -p build terwill% g++ -o build/DistMatrix.o -c -g -O3 -DNDEBUG -W -Wall src/DistMatrix.cc terwill% clang -o build/DistMatrix.o -c -g -O3 -DNDEBUG -W -Wall src/DistMatrix.cc In file included from src/DistMatrix.cc:33: src/Singleton.h:101:8: error: call to function 'operator<<' that is neither visible in the template definition nor found by argument-dependent lookup os << v[i] << '\n'; ^ src/DistMatrix.cc:844:12: note: in instantiation of function template specialization 'operator<<<std::pair<float, int> >' requested here cerr << bins; ^ src/Singleton.h:117:10: note: 'operator<<' should be declared prior to the call site ostream& operator<<(ostream& os, const pair<T, U>& p) { ^ 1 error generated.
I created a branch for fixes here: https://github.com/HappyCrow/Durandal/tree/fix_for_clang
Compilation goes further than before. I have binding of executable failing on Ubuntu but you should give it a try on a Mac.
I got until here:
make
find . -name "_.cc" > srcfiles
find . -name ".h" >> src_files
cat src_files | xargs etags -a -o src/TAGS
rm -f src_files
scons opt=true
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
clang -o build/DistMatrix.o -c -g -O3 -DNDEBUG -W -Wall src/DistMatrix.cc
clang -o build/DistRange.o -c -g -O3 -DNDEBUG -W -Wall src/DistRange.cc
clang -o build/SimpPDB.o -c -g -O3 -DNDEBUG -W -Wall src/SimpPDB.cc
clang -o build/Singleton.o -c -g -O3 -DNDEBUG -W -Wall src/Singleton.cc
clang -o build/Stru.o -c -g -O3 -DNDEBUG -W -Wall src/Stru.cc
clang -o build/durandal.o -c -g -O3 -DNDEBUG -W -Wall src/durandal.cc
clang -o build/ranker.o -c -g -O3 -DNDEBUG -W -Wall src/ranker.cc
clang -o build/rmsd.o -c -g -O3 -DNDEBUG -W -Wall src/rmsd.cc
clang -o durandal.cluster_pdbs build/durandal.o build/DistMatrix.o build/DistRange.o build/Stru.o build/SimpPDB.o build/rmsd.o build/Singleton.o
Undefined symbols for architecture x86_64:
"std::basic_string<char, std::char_traits
And I have no idea of what clang is missing.
Corrections were merged into the master branch. Thanks to Thomas Terwilliger for having confirmed the fixes are OK.
---------- Forwarded message ---------- From: terwill Date: Tue, Sep 4, 2012 at 2:10 PM Subject: durandal To: nechols, terwilliger
Hi Nat,
I got my compilation working using a mac-osx version (even though my computer is 64-bit I couldn't get that to work; it installed and then libraries were missing).
however there is one thing that didn't work. When compiling Durandal/:
In file included from /Users/terwill/unix/PHENIX/phenix-dev-1148/Durandal/src/DistMatrix.cc:33: /Users/terwill/unix/PHENIX/phenix-dev-1148/Durandal/src/Singleton.h:101:8: error: call to function 'operator<<' that is neither visible in the template definition nor found by argument-dependent lookup os << v[i] << '\n'; ^
Is this directory needed? And have you seen an error like that? seems weird that << would not be recognized.
All the best, Tom T