Rootlogon.C loading lib many errors

Dear,
(Mac Os10.10, root-6.02.05)

I am having some troubles loading libs in root. I am using a rootlogon.C:

if(gSystem->Getenv("HOME_CFITSIO")==NULL) {
  cout << "Error : environment HOME_CFITSIO is not defined !!!" << endl;
  exit(1);
}

if(gSystem->Getenv("HOME_HEALPIX")==NULL) {
  cout << "Error : environment HOME_HEALPIX is not defined !!!" << endl;
  exit(1);
} 
gSystem->AddIncludePath(" -I/Files/Libraries/cfitsio/include/");
gSystem->AddIncludePath(" -I/Files/Libraries/Healpix_3.20_test_gcc/src/cxx/osx/include/");

if(gSystem->Load("$HOME_CFITSIO/libcfitsio.2.3.37.dylib")<0) cout<<"error at cftis";
 if(gSystem->Load("$HOME_HEALPIX/src/cxx/shared/lib/libcxxsupport.so")<0) libSTAT=false;
  if(gSystem->Load("$HOME_HEALPIX/src/cxx/shared/lib/libfftpack.so")<0) libSTAT=false;
  if(gSystem->Load("$HOME_HEALPIX/src/cxx/shared/lib/libc_utils.so")<0) libSTAT=false;
  if(gSystem->Load("$HOME_HEALPIX/src/cxx/shared/lib/libsharp.so")<0) libSTAT=false;
  if(gSystem->Load("$HOME_HEALPIX/src/cxx/shared/lib/libhealpix_cxx.so")<0) libSTAT=false;

I got this kind of error: (here with two libraries, but with others also)
Processing logoroot3/rootlogon.C…
dyld: lazy symbol binding failed: Symbol not found: _ffvers
Referenced from: /Files/Libraries/Healpix_3.20_test_gcc/src/cxx/shared/lib/libcxxsupport.dylib
Expected in: flat namespace

dyld: Symbol not found: _ffvers
Referenced from: /Files/Libraries/Healpix_3.20_test_gcc/src/cxx/shared/lib/libcxxsupport.dylib
Expected in: flat namespace

“fevers” belongs to the “cfitsio” lib
The path of the includes are also $PATH and libs in $DYLD_LIBRARY_PATH
What I am missing, maybe something stupid?
Thank you

Hi,

This seems odd reasoning in terms of first principles: if you are sure that libcfitsio.2.3.37.dylib is properly loaded, are you sure the symbol _ffvers (you can use the nm tool) is in the copy of the library?
Can you compile (with clang) executables against these libraries? This would be a test of the consistency of your setup excluding ROOT.

Cheers,
Danilo

I tested both libraries. HEALPIx is compiled using cfitsio.
But I found that cfitsio is compiled for i386 and x86_64 when HEALPix is only x84_64.
Could it be the reason why it is not linking when I do the load in root?

Thank you,
Filipe

Hi,

[quote]But I found that cfitsio is compiled for i386 and x86_64 when HEALPix is only x84_64.
Could it be the reason why it is not linking when I do the load in root?[/quote]

Yes, it is the problem. i386 (32 bits) and x86_64 (64 bits) libraries are not compatible.

Cheers,
Philippe.