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 355 forks source link

prctl(SECCOMP): Invalid argument #94

Closed Dingo64 closed 7 years ago

Dingo64 commented 7 years ago

Hello! I compiled lepton under Debian 8.8 amd64. It shows version information or help info just fine but when I try to compress a file: ./lepton -singlethread ../test.jpg test.lep I get:

lepton v1.0-1.2.1-102-g4d14fe2
prctl(SECCOMP): Invalid argument
SHORT_READ

How can I fix this?

Dingo64 commented 7 years ago

When I compile: https://github.com/dropbox/lepton/archive/1.2.tar.gz I get this:

lepton v1.0-lepton-1.2
prctl(SECCOMP): Invalid argument
SECCOMP_MODE_STRICT is not available.
Trying to set a filter to emulate strict mode
prctl(SECCOMP): Invalid argument
SHORT_READ
danielrh commented 7 years ago

can you try running with -unjailed to see if that helps (only use trusted content with that option--but it should help us diagnose the issue)

Can you also try checking out the latest source code from master--I made the seccomp stuff a little more permissive when playing around with a ibm power system?

Dingo64 commented 7 years ago

Sorry, I made a mistake. I compiled under Debian 8.8 amd64 but mistakenly tested on Debian 8.5 amd 64. The error is from Debian 8.5. With -unjailed I get something similar:

START ACHIEVED 1495455159 210117
SHORT_READ
Illegal instruction

It does work on Debian 8.8 just fine. But is there any chance to compile in a way that allows me to use it on Debian 8.5 too? I can't compile it there.

danielrh commented 7 years ago

it sounds possible that the -march=native causes the issue if you build with cmake then you should get out a version that works

cd build cmake .. make -j8 I think lepton or lepton-scalar should work on your 8.5 system lepton-avx may not (due to requiring core-avx2) Hope that helps