Using zlib [message #18395] |
Fri, 31 July 2015 09:09 |
Daniel Wielanek
Messages: 14 Registered: October 2012 Location: Warsaw
|
occasional visitor |
From: *jinr.ru
|
|
Hello,
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?
|
|
|
|
Re: Using zlib [message #18397 is a reply to message #18396] |
Fri, 31 July 2015 09:31 |
Daniel Wielanek
Messages: 14 Registered: October 2012 Location: Warsaw
|
occasional visitor |
From: *jinr.ru
|
|
Hi,
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.
[Updated on: Fri, 31 July 2015 09:34] Report message to a moderator
|
|
|
|
Re: Using zlib [message #18399 is a reply to message #18398] |
Fri, 31 July 2015 10:16 |
Daniel Wielanek
Messages: 14 Registered: October 2012 Location: Warsaw
|
occasional visitor |
From: *jinr.ru
|
|
Hi,
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.
[Updated on: Fri, 31 July 2015 10:46] Report message to a moderator
|
|
|