g4sipm icon indicating copy to clipboard operation
g4sipm copied to clipboard

'TFile.h' file not found

Open ghost opened this issue 7 years ago • 4 comments

Hello, I have a problem with make after cmake.

MacOS: 10.13.4 (17E199)

/Users/MY-user/desktop/g4/source/sample/src/persistency/RootPersistVisitor.cc:13:10: fatal error: 'TFile.h' file not found #include ^~~~~~~~~ 1 error generated. make[2]: *** [sample/CMakeFiles/g4sipm_sample.dir/src/persistency/RootPersistVisitor.cc.o] Error 1 make[1]: *** [sample/CMakeFiles/g4sipm_sample.dir/all] Error 2 make: *** [all] Error 2

Can anyone help me with this?

ghost avatar May 22 '18 07:05 ghost

Which version of ROOT have you got installed? This should give you the relevant version information: root-config --prefix

thehubbard avatar May 23 '18 10:05 thehubbard

Hello, I didn't install root, I just use geant4. Should I install that?

hamid-hassani avatar May 23 '18 17:05 hamid-hassani

Hi @theparmis you can configure your build using cmake. If you enable building with ROOT therein, you need to install ROOT but you can get along without. Best you install ROOT also using cmake or via a distribution (e.g. it is available in many apt repositories). ROOT is the standart tool for physicists.

ntim avatar May 23 '18 18:05 ntim

Thank you, It seems that problem is solved, But I got new problem while "make"

Can you help me with this?

[ 96%] Linking CXX shared library libg4sipm_sample.dylib Undefined symbols for architecture x86_64: "boost::program_options::to_internal(std::__1::basic_string, std::__1::allocator > const&)", referenced from: std::__1::vector<:__1::basic_string std::__1::char_traits>, std::__1::allocator >, std::__1::allocator<:__1::basic_string std::__1::char_traits>, std::__1::allocator > > > boost::program_options::to_internal<:__1::basic_string std::__1::char_traits>, std::__1::allocator > >(std::__1::vector<:__1::basic_string std::__1::char_traits>, std::__1::allocator >, std::__1::allocator<:__1::basic_string std::__1::char_traits>, std::__1::allocator > > > const&) in ProgramOptionsUtil.cc.o "boost::program_options::validation_error::get_template(boost::program_options::validation_error::kind_t)", referenced from: std::__1::basic_string, std::__1::allocator > const& boost::program_options::validators::get_single_string(std::__1::vector<:__1::basic_string std::__1::char_traits>, std::__1::allocator >, std::__1::allocator<:__1::basic_string std::__1::char_traits>, std::__1::allocator > > > const&, bool) in ParticleSourceMessenger.cc.o "boost::program_options::options_description::options_description(std::__1::basic_string, std::__1::allocator > const&, unsigned int, unsigned int)", referenced from: ParticleSourceMessenger::parseProgramOptions(int, char**) in ParticleSourceMessenger.cc.o "boost::program_options::invalid_option_value::invalid_option_value(std::__1::basic_string, std::__1::allocator > const&)", referenced from: void boost::program_options::validate(boost::any&, std::__1::vector<:__1::basic_string std::__1::char_traits>, std::__1::allocator >, std::__1::allocator<:__1::basic_string std::__1::char_traits>, std::__1::allocator > > > const&, int*, long) in ParticleSourceMessenger.cc.o void boost::program_options::validate(boost::any&, std::__1::vector<:__1::basic_string std::__1::char_traits>, std::__1::allocator >, std::__1::allocator<:__1::basic_string std::__1::char_traits>, std::__1::allocator > > > const&, double*, long) in ParticleSourceMessenger.cc.o "boost::program_options::error_with_option_name::error_with_option_name(std::__1::basic_string, std::__1::allocator > const&, std::__1::basic_string, std::__1::allocator > const&, std::__1::basic_string, std::__1::allocator > const&, int)", referenced from: std::__1::basic_string, std::__1::allocator > const& boost::program_options::validators::get_single_string(std::__1::vector<:__1::basic_string std::__1::char_traits>, std::__1::allocator >, std::__1::allocator<:__1::basic_string std::__1::char_traits>, std::__1::allocator > > > const&, bool) in ParticleSourceMessenger.cc.o "boost::program_options::arg", referenced from: boost::program_options::typed_value::name() const in ParticleSourceMessenger.cc.o boost::program_options::typed_value::name() const in ParticleSourceMessenger.cc.o boost::program_options::typed_value<:__1::basic_string std::__1::char_traits>, std::__1::allocator >, char>::name() const in ParticleSourceMessenger.cc.o "boost::program_options::detail::cmdline::cmdline(std::__1::vector<:__1::basic_string std::__1::char_traits>, std::__1::allocator >, std::__1::allocator<:__1::basic_string std::__1::char_traits>, std::__1::allocator > > > const&)", referenced from: boost::program_options::basic_command_line_parser::basic_command_line_parser(int, char const* const*) in ProgramOptionsUtil.cc.o "boost::program_options::validate(boost::any&, std::__1::vector<:__1::basic_string std::__1::char_traits>, std::__1::allocator >, std::__1::allocator<:__1::basic_string std::__1::char_traits>, std::__1::allocator > > > const&, std::__1::basic_string, std::__1::allocator >*, int)", referenced from: boost::program_options::typed_value<:__1::basic_string std::__1::char_traits>, std::__1::allocator >, char>::xparse(boost::any&, std::__1::vector<:__1::basic_string std::__1::char_traits>, std::__1::allocator >, std::__1::allocator<:__1::basic_string std::__1::char_traits>, std::__1::allocator > > > const&) const in ParticleSourceMessenger.cc.o "boost::program_options::abstract_variables_map::operator[](std::__1::basic_string, std::__1::allocator > const&) const", referenced from: setNewValueIfArgumentGiven(boost::program_options::variables_map const&, std::__1::basic_string, std::__1::allocator >, double*, double) in ParticleSourceMessenger.cc.o setNewValueIfArgumentGiven(boost::program_options::variables_map const&, std::__1::basic_string, std::__1::allocator >, G4String*) in ParticleSourceMessenger.cc.o ParticleSourceMessenger::parseProgramOptions(int, char**) in ParticleSourceMessenger.cc.o void setNewValueIfArgumentGiven(boost::program_options::variables_map const&, std::__1::basic_string, std::__1::allocator >, int*) in ParticleSourceMessenger.cc.o "boost::program_options::error_with_option_name::substitute_placeholders(std::__1::basic_string, std::__1::allocator > const&) const", referenced from: vtable for boost::exception_detail::clone_impl<:exception_detail::error_info_injector> > in ParticleSourceMessenger.cc.o vtable for boost::exception_detail::error_info_injector<:program_options::validation_error> in ParticleSourceMessenger.cc.o vtable for boost::program_options::validation_error in ParticleSourceMessenger.cc.o vtable for boost::exception_detail::clone_impl<:exception_detail::error_info_injector> > in ParticleSourceMessenger.cc.o vtable for boost::exception_detail::error_info_injector<:program_options::invalid_option_value> in ParticleSourceMessenger.cc.o vtable for boost::program_options::invalid_option_value in ParticleSourceMessenger.cc.o "boost::program_options::value_semantic_codecvt_helper::parse(boost::any&, std::__1::vector<:__1::basic_string std::__1::char_traits>, std::__1::allocator >, std::__1::allocator<:__1::basic_string std::__1::char_traits>, std::__1::allocator > > > const&, bool) const", referenced from: vtable for boost::program_options::typed_value in ParticleSourceMessenger.cc.o vtable for boost::program_options::typed_value in ParticleSourceMessenger.cc.o vtable for boost::program_options::typed_value<:__1::basic_string std::__1::char_traits>, std::__1::allocator >, char> in ParticleSourceMessenger.cc.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [sample/libg4sipm_sample.dylib] Error 1 make[1]: *** [sample/CMakeFiles/g4sipm_sample.dir/all] Error 2 make: *** [all] Error

ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [sample/libg4sipm_sample.dylib] Error 1 make[1]: *** [sample/CMakeFiles/g4sipm_sample.dir/all] Error 2 make: *** [all] Error

Is there any problem with boost? I had problems with boost 1.66 so I downgrade to 1.55 and when I want to cmake this I got this information:

. .. ... -- Boost version: 1.55.0 -- Found the following Boost libraries: -- date_time -- program_options -- filesystem -- system -- regex C compiler: Clang

hamid-hassani avatar May 25 '18 12:05 hamid-hassani