zoglauer/megalib

Problem Compiling MEGAlib: ‘gzoffset’ was not declared in this scope

Closed this issue · 5 comments

Hi,

I'm using ROOT and GEANT4 gcc and make pre installed versions from cvmfs.
And get the following errors:

Compiling MFileManager.cxx ...
src/MFile.cxx: In member function ‘virtual std::streampos MFile::GetUncompressedFileLength(bool)’:
src/MFile.cxx:920:47: error: ‘gzoffset’ was not declared in this scope
double Compressed = gzoffset(m_ZipFile);
^
src/MFile.cxx:937:46: error: ‘gzoffset’ was not declared in this scope
Length = (streampos) gzoffset(m_ZipFile); // We are already at the end
^
src/MFile.cxx: In member function ‘virtual std::streampos MFile::GetFileLength(bool)’:
src/MFile.cxx:981:46: error: ‘gzoffset’ was not declared in this scope
Length = (streampos) gzoffset(m_ZipFile); // We are already at the end
^
src/MFile.cxx: In member function ‘virtual std::streampos MFile::GetFilePosition()’:
src/MFile.cxx:1016:41: error: ‘gzoffset’ was not declared in this scope
Pos = (streampos) gzoffset(m_ZipFile);
^

Thanks,
David

Hi David,

Could you check which version of zlib you have installed?
Old versions before 1.2.4 (from 2010) don't have gzoffset.

Ciao,
Andreas

Hi Andreas,
zlib-1.2.3-29.el6.x86_64

Cheers,
David

Hi David,

Yes, that’s the reason: you have to update zlib.
Which operating system are you using?

Ciao,
Andreas

Hi Andreas,
Scientific Linux 6.x (hence el6 in the package version)
Can I untar zlib source into the MEGAlib source somehow so it uses the updated version?
Sorry for mixing issues, in a first installation, can I define installation target other then the source directory in which I'm compiling?

Cheers,
David

Hi David,

You would have to do the following - but I do not know if it works:
(1) Download and compile zlib
(2) Set up your paths to include the zlib library
(3) Launch the MEGAlib setup file with the --keepenvironmentasis=on flag

But no guarantee that this works -- using a more up to date OS or even a virtual machine (e.g. VirtualBox) would be easier.
You could also try an old version of MEGAlib, e.g. 2.28, via.
bash setup --rel=dev --branch=MEGAlib_v2.28

Hope this helps,
Andreas