On Sat, Jul 26, 2008 at 11:45:36AM -0700, gh wrote:
-> 2) the function calloc_int is defined in pygr/cgraph.c and used in
-> other places, but it it never declared in pygr/cgraph.h.
Alex Nolley reported this a while back. We did a little bit of
troubleshooting and it appears to be a version issue with pyrexc or C,
not sure which. ('calloc_int' is presumably related to 'calloc', the
stdlib C call.) I was hoping someone more familiar with Pyrex could
speak up...
At this point I'm not sure what to do. We have a whole bunch of issues
backed up, and I can certainly tackle some of them, but I'm loathe to
continue working on my own patchset until I have some idea of whether
or not my patches are OK for the main branch. I already feel like my
current patchset is getting dangerously isolated from the main branch.
Chris, should I simply assume that I'm coding in the appropriate way
until you let me know otherwise?
cheers,
--titus
On Jul 26, 2008, at 11:45 AM, gh wrote:
>
>
> I had a bit of trouble building the git tree that I checked out
> yesterday and wanted to pass back the fixes.
>
> I'm running on an amd64 FreeBSD-STABLE system.
>
> I've pasted a patch below, although the mail system will probably
> mangle it.
>
> There are three problems.
>
> 1) the function 'free_seqnames' is used pygr/pygr.cnestedlist.c but is
> only defined in a section of pygr/apps/maf2nclist.c that is ifdef'ed
> out. I "fixed" it by simply pasting a copy of it outside the ifdef.
> Clearly that's not a real fix, but since I don't know what it was
> ifdef'ed out I'll leave it to all y'all to do it right.
Huh? The string "free_seqnames" does not appear in pygr/
cnestedlist.pyx (or its compiled product, pygr/cnestedlist.c) even
once. I just checked my own repository, which should match exactly
what is on the public git repository master branch (http://repo.or.cz/w/pygr.git
). That function hasn't been used in at least a couple years, since
we switched over to sequence unionization, so the implication is you
are working with some really old code...
>
>
> 2) the function calloc_int is defined in pygr/cgraph.c and used in
> other places, but it it never declared in pygr/cgraph.h.
>
> 3) the function write_padded_binary is defined in pygr/intervaldb.c
> and used other places, but isn't declared in pygr/intervaldb.h.
All of this makes me wonder how exactly you are getting the code. Is
it possible you are working with some kind of mix of old and new code?
e.g. if you didn't run Pyrex to build the code for the extension
modules (our setup.py will run it for you automatically, but if you
don't have pyrex available, it will fall back to using existing C code
files that you may have lying around from an old version).
cnestedlist.c is not in the public git repository so the only way it
could appear in your build is if A) it was built by pyrex from
cnestedlist.pyx; B) it was sitting in the directory from some older
version that you extracted to that directory.
Simple test:
in a completely empty directory, get a fresh copy of the public git
repository:
git clone git://repo.or.cz/pygr.git
cd into the source code you just obtained, and run the setup:
python setup.py build
Watch carefully for any error messages, e.g. indicating that you don't
have pyrexc ( the pyrex compiler, required for the build).
-- Chris
>
> Hi, gh, thanks for your e-mail!
>
> On Sat, Jul 26, 2008 at 11:45:36AM -0700, gh wrote:
> -> 2) the function calloc_int is defined in pygr/cgraph.c and used in
> -> other places, but it it never declared in pygr/cgraph.h.
>
> Alex Nolley reported this a while back. We did a little bit of
> troubleshooting and it appears to be a version issue with pyrexc or C,
> not sure which. ('calloc_int' is presumably related to 'calloc', the
> stdlib C call.) I was hoping someone more familiar with Pyrex could
> speak up...
looks like cdict.pxd (Pyrex's version of a header file) defines
calloc_int() sufficient for Pyrex to be happy, even though as you say
that prototype is not also given in cgraph.h as it should be. I guess
the C compiler handles this OK since the calling argument is an int,
which is the default for unknown argument types in C. I will add the
prototype to cgraph.h.
Thanks for pointing this out!
> 3) the function write_padded_binary is defined in pygr/intervaldb.c
> and used other places, but isn't declared in pygr/intervaldb.h.
I added the prototype for write_padded_binary() to pygr/intervaldb.h
Thanks!
-- Chris
-- Chris
On Jul 26, 2008, at 11:45 AM, gh wrote:
>
> This package was of course pulled from the repo.or.cz site today (aug
> 6th) so it is up to date at least. You can view all the code on our
> Buildbot page here under x86_win_master: http://iorich.caltech.edu:8015/
>
> Anyway, I hope that gives you some useful information about the error.
Hi Alex,
thanks for highlighting this problem again. I rechecked all the
places free_seqnames could be hiding out...
$ grep free_seqnames *.c
$ grep free_seqnames *.h
$ grep free_seqnames *.pyx
$ grep free_seqnames *.pxd
cnestedlist.pxd: void free_seqnames(SeqNameID_T seqnames[],int n)
Lo and behold, the free_seqnames prototype was hiding out in the pyrex
pxd file (which just lists the prototypes)! I've removed it and
updated the public git repository.
Thank you George and Alex!!
Lo and behold, the free_seqnames prototype was hiding out in the pyrex
pxd file (which just lists the prototypes)! I've removed it and
updated the public git repository.