GSI Forum - RDF feed
https://forum.gsi.de/index.php
Using zlib
https://forum.gsi.de/index.phpindex.php?t=rview&goto=18395&th=4665#msg_18395
I'm trying to use zlib.h in my project (with base on FairRoot 15.07). However I have problem with including this header. When I start to build my project I've got error:
Error: cannot open file "zconf.h" /usr/include/zlib.h:35:
zconf.h is present in :
/opt/fair_install/FairSoft/basics/cmake-3.1.0/Utilities/cmzlib/zconf.h
/opt/fair_install/FairSoft/tools/root/build_for_fair/graf2d/asimage/libA fterImage/zlib/zconf.h
/opt/fair_install/FairSoft/tools/root/core/zip/inc/zconf.h
/opt/fair_install/FairSoft/tools/root/graf2d/asimage/src/libAfterImage/z lib/zconf.h
/opt/fair_install/FairSoft/transport/geant4.10.01/build/source/externals /zlib/zconf.h
/opt/fair_install/FairSoft/transport/geant4.10.01/source/externals/zlib/ src/zconf.h.cmakein
/opt/fair_install/FairSoftInst/include/Geant4/zconf.h
/usr/src/linux-headers-3.13.0-24/include/linux/zconf.h
/usr/src/linux-headers-3.13.0-24-generic/include/linux/zconf.h
If I add Geant4 headers then I get error:
Error: class,struct,union or type Z_U4 not defined /opt/fair_install/FairSoftInst/include/Geant4/zconf.h:411:
Error: cannot open file "sys/types.h" /opt/fair_install/FairSoftInst/include/Geant4/zconf.h:427:
Does anybody know with path and how I should add do CMakeLists.txt?
]]>Daniel Wielanek2015-07-31T07:09:38-00:00Re: Using zlib
https://forum.gsi.de/index.phpindex.php?t=rview&goto=18396&th=4665#msg_18396
Please don't use any of the header files which come with the several packages of FairSoft. These files are only used in the project internally and shouldn't be used anywhere else.
If your zlib.h header files comes from the system include directory, then there should be also the zconf.h header file somewhere in system pathes. For example for a 64bit Debian system the zconf.h is in
/usr/include/x86_64-linux-gnu/zconf.h
In this case also the zconf.h is found. Please check if the correct development packages are fully installed.
Which OS do you use?
Ciao
Florian]]>Florian Uhlig2015-07-31T07:23:39-00:00Re: Using zlib
https://forum.gsi.de/index.phpindex.php?t=rview&goto=18397&th=4665#msg_18397
I'm using linux Mint (kind of Debian/Ubuntu-like system). I think that in "default" configuration my CMakeList.txt set only /usr/include as header directory. It find zlib.h but can't find zconf.h with is present - but in another place. Of course I can try to set this path "by hand" but I would like to use this software also in other OS where zconf.h can be in another place.
Btw. I used this "zlib.h" in previous installation (older version of fairsoft + mpdroot and I didn't have such problems.]]>Daniel Wielanek2015-07-31T07:31:49-00:00Re: Using zlib
https://forum.gsi.de/index.phpindex.php?t=rview&goto=18398&th=4665#msg_18398
if you have a debian based system you should have the file
/usr/include/x86_64-linux-gnu/zconf.h
or maybe in a directory defined by another triple (x86_64-linux-gnu) depending on your system. These directories ares system include directories and header files placed there will be found.
If the file isn't there then you have to install the correct development package
apt-get install zlib1g-dev
Ciao
Florian]]>Florian Uhlig2015-07-31T07:56:55-00:00Re: Using zlib
https://forum.gsi.de/index.phpindex.php?t=rview&goto=18399&th=4665#msg_18399
I found some workaround. It seems that this issue was caused by CINT, when I put include files by hand:
Set(SYSTEM_INCLUDE_DIRECTORIES
${ROOT_INCLUDE_DIR} ${INCLUDE_DIRECTORIES}
/usr/include/x86_64-linux-gnu/
)
I've got another errors:
Error: class,struct,union or type Z_U4 not defined /usr/include/x86_64-linux-gnu//zconf.h:406:
#error "You need a ISO C conforming compiler to use the glibc headers"
Error: Missing one of ' .. and so one
So for know only possibility of using zlib is using #ifndef __CINT__ to "hide" zlib members.]]>Daniel Wielanek2015-07-31T08:16:25-00:00