GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » Fairroot » General Discussion » Using zlib (How enable zlib in newest FairRoot)
Using zlib [message #18395] Fri, 31 July 2015 09:09 Go to next message
Daniel Wielanek is currently offline  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 #18396 is a reply to message #18395] Fri, 31 July 2015 09:23 Go to previous messageGo to next message
Florian Uhlig is currently offline  Florian Uhlig
Messages: 424
Registered: May 2007
first-grade participant
From: *gsi.de
Hi,

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
Re: Using zlib [message #18397 is a reply to message #18396] Fri, 31 July 2015 09:31 Go to previous messageGo to next message
Daniel Wielanek is currently offline  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 #18398 is a reply to message #18397] Fri, 31 July 2015 09:56 Go to previous messageGo to next message
Florian Uhlig is currently offline  Florian Uhlig
Messages: 424
Registered: May 2007
first-grade participant
From: *gsi.de
Hi,

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
Re: Using zlib [message #18399 is a reply to message #18398] Fri, 31 July 2015 10:16 Go to previous message
Daniel Wielanek is currently offline  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

Previous Topic: make errors on the latest update
Next Topic: Problem in installing FairRoot version v-15.11
Goto Forum:
  


Current Time: Fri Apr 19 00:25:13 CEST 2024

Total time taken to generate the page: 0.00936 seconds