MaciekAber / pysam

Automatically exported from code.google.com/p/pysam
0 stars 0 forks source link

Error building tabix module #37

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Untar pysam-0.3.tar.gz
2. run python setup.py build

What is the expected output? What do you see instead?
In file included from tabix/bgzf.c:36:
tabix/bgzf.h: In function `bgzf_getc':
tabix/bgzf.h:148: warning: implicit declaration of function `ftello'
tabix/bgzf.c: At top level:
tabix/bgzf.c:44: warning: function declaration isn't a prototype
tabix/bgzf.c:50: error: conflicting types for 'ftello'
tabix/bgzf.h:148: error: previous implicit declaration of 'ftello' was here
tabix/bgzf.c:115: warning: function declaration isn't a prototype
error: command 'gcc' failed with exit status 1

What version of the product are you using? On what operating system?
RedHat EL 4.8, gcc 3.4.6

Please provide any additional information below.

I was able to fix the problem by moving the #if def block that includes the 
ftello define in bgzf.c above the #include 'bgzf.h' line. 

Original issue reported on code.google.com by mbre...@gmail.com on 11 Aug 2010 at 9:05

GoogleCodeExporter commented 8 years ago
The stock files worked out of the box on a Mac 10.6 box, so the issue is likely 
just dealing with an older version of gcc.

I'm attaching the patch that I used.

Original comment by mbre...@gmail.com on 11 Aug 2010 at 9:10

Attachments:

GoogleCodeExporter commented 8 years ago
Hi,

thanks for submitting the bug and providing a fix. I am hesitant to apply it
to bgzf.c as I want to avoid patching tabix source. Hopefully, this bug will be 
fixed in newer versions of tabix. In the meantime, your fix should help others 
with gcc 3.4

Thanks,
Andreas

Original comment by andreas....@gmail.com on 10 Sep 2010 at 12:20