jd-boyd / python-lzo

Python bindings for the LZO data compression library
GNU General Public License v2.0
74 stars 41 forks source link

Building of lzomodule.o fails because of missing lzo1x.h #29

Closed dorazouri closed 7 years ago

dorazouri commented 7 years ago

Hi this is about an issue with the build process: Trying to install from a fresh clone on Ubuntu 14.04 (x64) with either setup.py or make fails with error:

> /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'tests_require'
>   warnings.warn(msg)
> running install
> running build
> running build_ext
> building 'lzo' extension
> x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/lzo -I/usr/include/python2.7 -c lzomodule.c -o build/temp.linux-x86_64-2.7/lzomodule.o
> lzomodule.c:35:19: fatal error: lzo1x.h: No such file or directory
>  #include <lzo1x.h>
>                    ^
> compilation terminated.
> error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

I tried moving all include files from source code here: http://www.oberhumer.com/opensource/lzo/ to /usr/include/lzo.

It now finds the required include files but fails on compilation:

/usr/bin/ld: cannot find -llzo2
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
make: *** [all] Error 1

Is there a missing assumed dependency?

jd-boyd commented 7 years ago

It would probably be easier to just apt-get install zlib1g-dev.

I guess a little more documentation on installation is needed.

jpecar commented 6 years ago

Also the include should be #include <lzo/lzo1x.h> and not just