eftsung / pygr

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

crashing and compilation errors on Windows #2

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The Windows binary distribution of pygr crashes for me when building 

cnestedlist.NLMSA('target', mode='w', use_virtual_lpo=True)

(the in memory build works!). 

When trying to compile the sources on windows the compile fails by not
finding the fseeko symbol (this is a Linux specific function). By adding a
conditional compilation to this macro I managed to fix this error (see
patch at the end) and the example above now works as expected. 

best.

Original issue reported on code.google.com by istvan.a...@gmail.com on 12 May 2008 at 3:23

Attachments:

GoogleCodeExporter commented 8 years ago
A simple test program that crashes on windows

Original comment by istvan.a...@gmail.com on 13 May 2008 at 7:37

Attachments:

GoogleCodeExporter commented 8 years ago
I made the following change to default.h, combining Namshin and Istvan's fixes. 
Correct me if I'm wrong, but we do want to get the MSVCRT fseeko64() version if 
it's
available, right?  Otherwise fallback to the old fseek() version.

/* try to get 64 bit fseek on Windows if available, otherwise fall
   back to regular fseek version.  On other platforms use POSIX fseeko */
#ifdef __MSVCRT__
#define PYGR_FSEEK(IFILE,OFFSET,WHENCE) fseeko64(IFILE,OFFSET,WHENCE)
#elif defined(_WIN32)
#define PYGR_FSEEK(IFILE,OFFSET,WHENCE) fseek(IFILE,OFFSET,WHENCE)
#else
#define PYGR_FSEEK(IFILE,OFFSET,WHENCE) fseeko(IFILE,OFFSET,WHENCE)
#endif

To test this, get the latest version from the git repository.  Istvan, we would 
be
very grateful if you could test whether this works for you!

Original comment by cjlee...@gmail.com on 13 May 2008 at 8:40

GoogleCodeExporter commented 8 years ago
works fine

Original comment by istvan.a...@gmail.com on 13 May 2008 at 9:14

GoogleCodeExporter commented 8 years ago

Original comment by istvan.a...@gmail.com on 19 Feb 2009 at 2:05

GoogleCodeExporter commented 8 years ago

Original comment by mare...@gmail.com on 21 Feb 2009 at 1:27