Bug #1026
Installation issue - DataBaseAPI.cc and read/write
100%
Description
I tried installing MAUS on an Arch-Linux 64-bit system, and there seems to be an issue of read, write and close not being declared:
g++ -o src/legacy/Interface/DataBaseAPI.os -c -Wall -Dlong32='int' "-Dlong64='long long'" -O3 -m64 -pthread -rdynamic -fPIC -Ithird_party/install/include -Ithird_party/install/include/python2.7 -Ithird_party/install/include/root -Isrc/legacy -Isrc/common_cpp -Ithird_party/build/root_v5.30.03/include -Ithird_party/build/geant4.9.2.p04/include -I. src/legacy/Interface/DataBaseAPI.cc
src/legacy/Interface/DataBaseAPI.cc: In member function 'XMLMessage DataBaseAPI::sendQuery(const XMLMessage&)':
src/legacy/Interface/DataBaseAPI.cc:87:56: error: 'write' was not declared in this scope
src/legacy/Interface/DataBaseAPI.cc:101:43: error: 'read' was not declared in this scope
src/legacy/Interface/DataBaseAPI.cc:120:18: error: 'close' was not declared in this scope
src/legacy/Interface/DataBaseAPI.cc: In member function 'bool DataBaseAPI::openConnection()':
src/legacy/Interface/DataBaseAPI.cc:179:20: error: 'close' was not declared in this scope
Now I am not sure where C libraries store their functions, but the file "include"d sstream as a header file. sstream was in /third_party/build/root_v5.30.03/cint/cint/include/ which seemed to link to iostream.h in the same folder, in which I couldn't find any read or write functions. Any suggestions for a work-around?
Files
Subtasks
Updated by Rogers, Chris over 11 years ago
- Category set to Build System
- Assignee set to Rogers, Chris
- Target version set to Future MAUS release
What gcc version do you have?
Updated by Rogers, Chris over 11 years ago
Looks like you can delete DataBaseAPI and DataBaseReader - they are no longer called (we now have the cdb python module to deal with this). I will remove them in the trunk.
Updated by Pradhan, Neetish over 11 years ago
Thanks, will try it without them and see how it goes. I've got gcc 4.7.
Updated by Rogers, Chris over 11 years ago
Latest we've tried so far is 4.6... let me know if there are problems.
Updated by Rogers, Chris over 11 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
Committed in r747
Let me know if you find any further issues.
Updated by Pradhan, Neetish over 11 years ago
- File install_log_std install_log_std added
Now it's produced a more obscure error, can't make anything of it - attaching the log. It seems to start with this:
./src/common_cpp/JsonCppProcessors/ArrayProcessors-inl.hh: In instantiation of 'std::vector<ArrayContents*>* MAUS::PointerArrayProcessor<ArrayContents>::JsonToCpp(const Json::Value&) [with ArrayContents = MAUS::Trigger]':
./src/common_cpp/JsonCppProcessors/SpillProcessor.hh:42:7: required from here
./src/common_cpp/JsonCppProcessors/ArrayProcessors-inl.hh:63:21: warning: deleting object of polymorphic class type 'MAUS::Trigger' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
Updated by Rogers, Chris over 11 years ago
The warnings are actually not the problem. What happened here - when we run ROOT macro to make classes ROOT-aware (Rtypes ClassDef macro) ROOT sneakily adds virtual functions to the classes. So now we need a virtual destructor. My compiler didn't warn me about this, I only found out when I got a complaint. So I fixed it in the latest version.
The error is
g++ -o src/common_cpp/JsonCppProcessors/HitProcessor.os -c -Wall -Dlong32='int' "-Dlong64='long long'" -O3 -m64 -pthread -rdynamic -fPIC -Ithird_party/install/include -Ithird_party/install/include/python2.7 -Ithird_party/install/include/root -Isrc/legacy -Isrc/common_cpp -Ithird_party/build/root_v5.30.03/include -Ithird_party/build/geant4.9.2.p04/include -I. src/common_cpp/JsonCppProcessors/HitProcessor.cc In file included from src/common_cpp/JsonCppProcessors/HitProcessor.cc:17:0: ./src/common_cpp/JsonCppProcessors/HitProcessor.hh: In instantiation of 'void MAUS::HitProcessor<ChannelId>::RegisterBranches() [with ChannelId = MAUS::SciFiChannelId]': src/common_cpp/JsonCppProcessors/HitProcessor.cc:28:5: required from here ./src/common_cpp/JsonCppProcessors/HitProcessor.hh:54:5: error: 'RegisterValueBranch' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] ./src/common_cpp/JsonCppProcessors/HitProcessor.hh:54:5: note: declarations in dependent base 'MAUS::ObjectProcessor<MAUS::Hit<MAUS::SciFiChannelId> >' are not found by unqualified lookup ./src/common_cpp/JsonCppProcessors/HitProcessor.hh:54:5: note: use 'this->RegisterValueBranch' instead
Let me have a dig...
Updated by Rogers, Chris over 11 years ago
nb: you can just run source env.sh; scons
to build now - the third party libraries have all built okay I think so no need to go through all that again (scons takes ~5 minutes to compile everything, otherwise you have to rebuild G4 and ROOT which takes ~ 1 hour). Run the tests using tests/run_tests.bash
Updated by Rogers, Chris over 11 years ago
- Status changed from Closed to Open
- % Done changed from 100 to 0
Updated by Rogers, Chris over 11 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
Updated by Rogers, Chris over 11 years ago
- Target version changed from Future MAUS release to MAUS-v0.3.0