title: Error in NGSLIB PACKAGE INSTALLATION
body: <p>I am trying to install ngslib python package for oncotator 1.9.5.0 . But every time installation failed due to some reason (mentioned below). I have tried all possible methods like</p>
  
  <pre><code>pip install ngslib
  </code></pre>
  
  <p>directly or</p>
  
  <pre><code>python -m pip install --upgrade pip
  pip install ngslib
  </code></pre>
  
  <p>or</p>
  
  <pre><code>git clone https://github.com/tsznxx/ngslib
  </code></pre>
  
  <p>Everytime I am getting the following error:</p>
  
  
  
  <pre class="lang-none prettyprint-override"><code>Collecting ngslib
  Using cached ngslib-1.1.20.tar.gz
  Complete output from command python setup.py egg_info:
  Compile KentLib ...
  cd lib &amp;&amp; make
  make[1]: Entering directory `/tmp/pip-build-d1JyTR/ngslib/external/KentLib/lib'
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 chainToPsl.c -o chainToPsl.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 vGfx.c -o vGfx.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 psPoly.c -o psPoly.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 obscure.c -o obscure.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 mgTimes14.c -o mgTimes14.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 fuzzyShow.c -o fuzzyShow.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 sqlList.c -o sqlList.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 seqOut.c -o seqOut.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 verbose.c -o verbose.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 memgfx.c -o memgfx.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 tabRow.c -o tabRow.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 phyloTree.c -o phyloTree.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 servmsII.c -o servmsII.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 vPng.c -o vPng.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 servcl.c -o servcl.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 xa.c -o xa.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 mgTimes12.c -o mgTimes12.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 hmmstats.c -o hmmstats.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 mgTimes8.c -o mgTimes8.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 bwgQuery.c -o bwgQuery.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 numObscure.c -o numObscure.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 jpegSize.c -o jpegSize.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 rbTree.c -o rbTree.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 seqStats.c -o seqStats.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 axt.c -o axt.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 chain.c -o chain.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 chainBlock.c -o chainBlock.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 snof.c -o snof.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 snofmake.c -o snofmake.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 ffAli.c -o ffAli.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 mgHelvetica10.c -o mgHelvetica10.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 rnautil.c -o rnautil.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 seg.c -o seg.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 htmlPage.c -o htmlPage.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 gemfont.c -o gemfont.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 peakCluster.c -o peakCluster.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 repMask.c -o repMask.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 gff3.c -o gff3.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 apacheLog.c -o apacheLog.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 dnaseq.c -o dnaseq.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 twoBit.c -o twoBit.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 diGraph.c -o diGraph.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 mgCourier8.c -o mgCourier8.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 aliType.c -o aliType.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 spacedColumn.c -o spacedColumn.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 cirTree.c -o cirTree.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 sqlNum.c -o sqlNum.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 splatAli.c -o splatAli.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 hash.c -o hash.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 snofsig.c -o snofsig.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 gfNet.c -o gfNet.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 mgHelvetica14.c -o mgHelvetica14.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 boxLump.c -o boxLump.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 fixColor.c -o fixColor.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 linefile.c -o linefile.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 md5.c -o md5.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 dlist.c -o dlist.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 jointalign.c -o jointalign.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 bPlusTree.c -o bPlusTree.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 trix.c -o trix.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 mgCourier18.c -o mgCourier18.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 rangeTree.c -o rangeTree.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 itsa.c -o itsa.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 mgHelvetica34.c -o mgHelvetica34.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 mafFromAxt.c -o mafFromAxt.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 mgSixhi6.c -o mgSixhi6.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 kxTok.c -o kxTok.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 pslGenoShow.c -o pslGenoShow.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 spacedSeed.c -o spacedSeed.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 options.c -o options.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 oldGff.c -o oldGff.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 servcis.c -o servcis.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 mgHelveticaBold34.c -o mgHelveticaBold34.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 psGfx.c -o psGfx.o
  gcc -c -fPIC -Wall -I../inc  -DMACHTYPE_x86_64 pngwrite.c -o pngwrite.o
  pngwrite.c:7:87: error: png.h: No such file or directory
  pngwrite.c:13: error: expected ‘)’ before ‘png’
  pngwrite.c:19: error: expected ‘)’ before ‘png’
  pngwrite.c: In function ‘mgSaveToPng’:
  pngwrite.c:34: error: ‘png_structp’ undeclared (first use in this function)
  pngwrite.c:34: error: (Each undeclared identifier is reported only once
  pngwrite.c:34: error: for each function it appears in.)
  pngwrite.c:34: error: expected ‘;’ before ‘png’
  pngwrite.c:37: error: ‘png’ undeclared (first use in this function)
  pngwrite.c:42: error: ‘png_infop’ undeclared (first use in this function)
  pngwrite.c:42: error: expected ‘;’ before ‘info’
  pngwrite.c:43: error: ‘info’ undeclared (first use in this function)
  pngwrite.c:46: warning: implicit declaration of function ‘png_destroy_write_struct’
  pngwrite.c:52: warning: implicit declaration of function ‘png_jmpbuf’
  pngwrite.c:62: warning: implicit declaration of function ‘png_init_io’
  pngwrite.c:68: warning: implicit declaration of function ‘png_set_IHDR’
  pngwrite.c:69: error: ‘PNG_COLOR_TYPE_PALETTE’ undeclared (first use in this function)
  pngwrite.c:69: error: ‘PNG_INTERLACE_NONE’ undeclared (first use in this function)
  pngwrite.c:70: error: ‘PNG_COMPRESSION_TYPE_DEFAULT’ undeclared (first use in this function)
  pngwrite.c:70: error: ‘PNG_FILTER_TYPE_DEFAULT’ undeclared (first use in this function)
  pngwrite.c:71: warning: implicit declaration of function ‘png_set_PLTE’
  pngwrite.c:72: error: ‘png_color’ undeclared (first use in this function)
  pngwrite.c:72: error: expected expression before ‘)’ token
  pngwrite.c:80: error: ‘png_byte’ undeclared (first use in this function)
  pngwrite.c:80: error: expected ‘;’ before ‘opacities’
  pngwrite.c:81: error: ‘opacities’ undeclared (first use in this function)
  pngwrite.c:82: error: ‘png_color_16p’ undeclared (first use in this function)
  pngwrite.c:82: error: expected ‘;’ before ‘nonPalette_opacities_values’
  pngwrite.c:83: warning: implicit declaration of function ‘png_set_tRNS’
  pngwrite.c:83: error: ‘nonPalette_opacities_values’ undeclared (first use in this function)
  pngwrite.c:91: error: ‘row_pointers’ undeclared (first use in this function)
  pngwrite.c:91: error: expected expression before ‘)’ token
  pngwrite.c:95: warning: implicit declaration of function ‘png_set_rows’
  pngwrite.c:96: warning: implicit declaration of function ‘png_write_png’
  pngwrite.c:96: error: ‘PNG_TRANSFORM_IDENTITY’ undeclared (first use in this function)
  make[1]: *** [pngwrite.o] Error 1
  make[1]: Leaving directory `/tmp/pip-build-d1JyTR/ngslib/external/KentLib/lib'
  make: *** [all] Error 2
  ['-c', 'egg_info', '--egg-base', 'pip-egg-info']
  ERROR: Compiling KentLib error!
  
  ----------------------------------------
  Command "python setup.py egg_info" failed with error code 1 in  /tmp/pip-  build-d1JyTR/ngslib/
  </code></pre>
  
  <p>Initially it starts good but later on there is an error in <code>setup.py</code>. <strong>Most of the time in <code>png.h</code> file</strong>.</p>
  
  <p>How to install ngslib(specifically 1.1.9) for oncotator (package used for annotation purpose)? I am working on oracle Linux server and using python 2.7</p>
  
  <p>Thanks.</p>