facebookresearch / StarSpace

Learning embeddings for classification, retrieval and ranking.
MIT License
3.95k stars 531 forks source link

make for compress failing #230

Open checho221 opened 5 years ago

checho221 commented 5 years ago

I am on linux, i did:

git clone https://github.com/facebookresearch/Starspace.git
cd Starspace
make -f makefile_compress

But i got:

image

ledw commented 5 years ago

@checho221 Hi, Thanks for reporting. I'm not sure how to resolve this, as zlib is a third-party code. Let me search for zlib related questions to see if I can find anything. Could you provide your linux version?

checho221 commented 5 years ago

@ledw i am using 3.10.0-693.2.2.el7.x86_64 on aws instance.

ProchazkaPavel commented 5 years ago

I had the same issue. I have resolved it by adding zconf.h to the 3rdparty/ directory since 3rdparty/zlib.h contains line #include "zconf.h". I have successfully build Starspace then, but when I train the model from a compressed file, it crashes on segfault (I am not sure if I used correct zconf.h or the problem is elsewhere). Could it be possible to add either the proper zconf.h file into 3rdparty/ directory or a proper dependency?

ledw commented 5 years ago

@checho221 @ProchazkaPavel Thanks for the pointers here. I'll look into adding zconf.h into 3rdparty/ which could resolve the problem.

nliu86 commented 5 years ago

zconf.h is not needed. Here is what I did to make it work:

  1. Get zlib-1.2.11

  2. Configure and install zlib: ./configure; make test sudo make install

  3. Modify makefile_compress from the first line to the second line: