dropbox / lepton

Lepton is a tool and file format for losslessly compressing JPEGs by an average of 22%.
https://blogs.dropbox.com/tech/2016/07/lepton-image-compression-saving-22-losslessly-from-images-at-15mbs/
Apache License 2.0
5.01k stars 354 forks source link

Unable to build on Debian #49

Closed GuillaumeRossolini closed 8 years ago

GuillaumeRossolini commented 8 years ago

Hi,

On a virtualized box we have for testing thing out:

$ make && make check && make install
make  all-am
make[1]: entrant dans le répertoire « /usr/local/src/lepton-1.2.1 »
depbase=`echo dependencies/zlib/inflate.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
        gcc -DHAVE_CONFIG_H -I.    -std=c99 -DDEFAULT_ALLOW_PROGRESSIVE -DHIGH_MEMORY  -pedantic -Wall -Wextra -Wno-write-strings -Wno-unused-parameter -march=native  -DNDEBUG -g -O2 -MT dependencies/zlib/inflate.o -MD -MP -MF $depbase.Tpo -c -o dependencies/zlib/inflate.o dependencies/zlib/inflate.c &&\
        mv -f $depbase.Tpo $depbase.Po
dependencies/zlib/inflate.c:1:0: error: CPU you selected does not support x86-64 instruction set
make[1]: *** [dependencies/zlib/inflate.o] Erreur 1
make[1]: quittant le répertoire « /usr/local/src/lepton-1.2.1 »
make: *** [all] Erreur 2

On a dedicated box:

$ make && make check && make install
[...]
In file included from src/io/Reader.hh:32:0,
                 from src/io/MemReadWriter.hh:1,
                 from src/io/MemReadWriter.cc:1:
src/io/Allocator.hh: In instantiation of ‘T* Sirikata::JpegAllocator<T>::allocate(Sirikata::JpegAllocator<T>::size_type, const void*) [with T = unsigned char; Sirikata::JpegAllocator<T>::pointer = unsigned char*; Sirikata::JpegAllocator<T>::size_type = long unsigned int]’:
/usr/include/c++/4.7/bits/stl_vector.h:169:51:   required from ‘std::_Vector_base<_Tp, _Alloc>::pointer std::_Vector_base<_Tp, _Alloc>::_M_allocate(std::size_t) [with _Tp = unsigned char; _Alloc = Sirikata::JpegAllocator<unsigned char>; std::_Vector_base<_Tp, _Alloc>::pointer = unsigned char*; std::size_t = long unsigned int]’
/usr/include/c++/4.7/bits/stl_vector.h:1109:44:   required from ‘std::vector<_Tp, _Alloc>::pointer std::vector<_Tp, _Alloc>::_M_allocate_and_copy(std::vector<_Tp, _Alloc>::size_type, _ForwardIterator, _ForwardIterator) [with _ForwardIterator = __gnu_cxx::__normal_iterator<const unsigned char*, std::vector<unsigned char, Sirikata::JpegAllocator<unsigned char> > >; _Tp = unsigned char; _Alloc = Sirikata::JpegAllocator<unsigned char>; std::vector<_Tp, _Alloc>::pointer = unsigned char*; std::vector<_Tp, _Alloc>::size_type = long unsigned int]’
/usr/include/c++/4.7/bits/vector.tcc:186:19:   required from ‘std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = unsigned char; _Alloc = Sirikata::JpegAllocator<unsigned char>]’
src/io/MemReadWriter.hh:24:19:   required from here
src/io/Allocator.hh:138:6: error: ‘custom_exit’ was not declared in this scope
make[1]: *** [src/io/MemReadWriter.o] Error 1
make[1]: Leaving directory `/usr/local/src/lepton-1.2.1'
make: *** [all] Error 2

This is using the releases tar.gz files. The ./autogen.sh script failed to run its git commands since that tool is not installed on the boxes.

Please tell me what information you need to debug this.

gcc version 4.7.2 (Debian 4.7.2-5)

danielrh commented 8 years ago

I think this needs at least gcc-4.8 to properly work

you could try adding a #include "vp8/util/memory.hh" from Allocator.hh but I bet std::thread won't be present

Can you try a newer compiler, or llvm?

lfaraone commented 8 years ago

@danielrh Can we document that in the README? Dunno if it'd also be possible/useful to make cmake fail-fast somehow…

GuillaumeRossolini commented 8 years ago

I tried building the latest gcc-4.8 but it failed. I don't think I'll be able to debug this. This version of gcc is getting old anyway, so it might be better to just document this as a requirement and fail fast?

danielrh commented 8 years ago

good idea.. llvm is really easy to install and probably has prebuild binaries for your distro...maybe try that one?

GuillaumeRossolini commented 8 years ago

I'm sure it is. That said, I am happy to try things out so long as they fit more or less in my usual setup, but I am not confident enough to stray too much from that path. Sorry.