pysam/zlib.h:34:19: error: zconf.h: No such file or directory

1,803 views
Skip to first unread message

Allan Kamau

unread,
Dec 8, 2013, 9:30:53 AM12/8/13
to pysam-us...@googlegroups.com
I am trying to install pysam but I the installation fails with the errors indicated at end of this text. I would like help in solving these errors.

I have python built and installed from source and working as shown below.
[kamauaa@node02 2013/12/08 17:26:33 AST]$ /home/kamauaa/apps/python/2.7.6/bin/python
Python 2.7.6 (default, Dec  8 2013, 09:10:30)
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import zlib;
>>>



I am attempting to install pysam using the command below.

export LD_LIBRARY_PATH="/home/apps/samtools_march13:/home/kamauaa/apps/bzip2/1.0.6/lib:/home/kamauaa/apps/zlib/1.2.8/lib:/home/kamauaa/apps/readline/6.2/lib";export CPLUS_INCLUDE_PATH="/home/kamauaa/apps/zlib/1.2.8/include:/home/apps/samtools_march13:/home/kamauaa/apps/src/python/Python-2.7.6/Modules/zlib";/home/kamauaa/apps/python/2.7.6/bin/python setup.py build>/tmp/some.txt 2>&1;date;



running build
running build_py
running build_ext
building 'pysam.csamtools' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -D_FILE_OFFSET_BITS=64 -D_USE_KNETFILE= -Isamtools -Ipysam -I/home/kamauaa/apps/python/2.7.6/include/python2.7 -c pysam/csamtools.c -o build/temp.linux-x86_64-2.7/pysam/csamtools.o
In file included from samtools/razf.h:38,
                 from pysam/csamtools.c:260:
pysam/zlib.h:34:19: error: zconf.h: No such file or directory
In file included from samtools/razf.h:38,
                 from pysam/csamtools.c:260:
pysam/zlib.h:80: error: expected declaration specifiers or ‘...’ before ‘*’ token
pysam/zlib.h:80: error: function definition declared ‘typedef’
pysam/zlib.h:80: warning: return type defaults to ‘int’
pysam/zlib.h:80: warning: function declaration isn’t a prototype
pysam/zlib.h: In function ‘voidpf’:
pysam/zlib.h:80: error: expected declaration specifiers before ‘OF’
pysam/zlib.h:81: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘OF’
pysam/zlib.h:83: warning: empty declaration
pysam/zlib.h:86: error: expected specifier-qualifier-list before ‘z_const’
...

Andreas

unread,
Dec 9, 2013, 12:07:31 PM12/9/13
to pysam-us...@googlegroups.com
Dear Allan,

I have zconf.h in /usr/include. It might only be part of the
zlib-devel package - can you try:

yum install zlib-devel

(or similar?)

Best wishes,
Andreas
Reply all
Reply to author
Forward
0 new messages