gmarcais / Jellyfish

A fast multi-threaded k-mer counter
Other
463 stars 136 forks source link

Cannot make files successfully on the cygwin ('posix_memalign' was not declared in this scope) #99

Closed ryshjx closed 6 years ago

ryshjx commented 7 years ago

Hi,

I am installing the jellyfish 2.2.6 on the Cygwin. The previous steps (./jellyfish-2.2.6/configure --prefix=$HOME --enable-python-binding) is OK. However, when I try to run make -j 4, I got the following error message:

$ make -j 4
make  all-am
make[1]: Entering directory“/home/dell/jellyfish-2.2.6”
  PYTHONC  swig/python/__init__.pyc
  CXX      lib/rectangular_binary_matrix.lo
  CXX      lib/mer_dna.lo
  CXX      lib/storage.lo
  CXX      lib/allocators_mmap.lo
lib/rectangular_binary_matrix.cc: In static member function 'static uint64_t* jellyfish::RectangularBinaryMatrix::alloc(unsigned int, unsigned int)':
lib/rectangular_binary_matrix.cc:34:81: error: 'posix_memalign' was not declared in this scope
   if(posix_memalign(&mem, sizeof(uint64_t) * 2, alloc_columns * sizeof(uint64_t)))
                                                                                 ^
make[1]: *** [Makefile:1617:lib/rectangular_binary_matrix.lo] Error 1
make[1]: Leaving directory "/home/dell/jellyfish-2.2.6"
make: *** [Makefile:933:all] Error 2

Could you please help me solve this problem? Thank you very much.

metzgerm commented 6 years ago

Sorry, I missed this and just submitted exactly the same problem.

metzgerm commented 6 years ago

Did you ever find a solution?

gmarcais commented 6 years ago

Configure with ./configure CXXFLAGS=-std=gnu++11. It will be automatic in the next release.