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

Unable to build with Emscripten #96

Closed jdluzen closed 6 years ago

jdluzen commented 7 years ago

Hello and thanks for this great project! I'm currently attempting to build master using the latest Emscripten, however I cannot get it to link. It is entirely possible that I am missing something or not using the em{make|configure} wrappers properly. Is someone able to help?

CXXFLAGS="-DUSE_SCALAR -DEMSCRIPTEN" emmake make
[  1%] Built target localmd5
[  1%] Built target version
[ 10%] Built target localzlib
[ 10%] Linking CXX executable lepton.js
LLVM ERROR: Invalid SIMD cast between items of different bit sizes!
Traceback (most recent call last):
  File "/root/downloads/emsdk-portable/emscripten/1.37.14/em++", line 16, in <module>
    emcc.run()
  File "/root/downloads/emsdk-portable/emscripten/1.37.14/emcc.py", line 1524, in run
    final = shared.Building.emscripten(final, append_ext=False, extra_args=extra_args)
  File "/root/downloads/emsdk-portable/emscripten/1.37.14/tools/shared.py", line 2007, in emscripten
    call_emscripten(cmdline)
  File "/root/downloads/emsdk-portable/emscripten/1.37.14/emscripten.py", line 2195, in _main
    temp_files.run_and_clean(lambda: main(
  File "/root/downloads/emsdk-portable/emscripten/1.37.14/tools/tempfiles.py", line 78, in run_and_clean
    return func()
  File "/root/downloads/emsdk-portable/emscripten/1.37.14/emscripten.py", line 2200, in <lambda>
    DEBUG=DEBUG,
  File "/root/downloads/emsdk-portable/emscripten/1.37.14/emscripten.py", line 2100, in main
    temp_files=temp_files, DEBUG=DEBUG)
  File "/root/downloads/emsdk-portable/emscripten/1.37.14/emscripten.py", line 93, in emscript
    backend_output = compile_js(infile, settings, temp_files, DEBUG)
  File "/root/downloads/emsdk-portable/emscripten/1.37.14/emscripten.py", line 127, in compile_js
    backend_output = open(temp_js).read()
IOError: [Errno 2] No such file or directory: '/tmp/tmp0vg8uW.4.js'
CMakeFiles/lepton.dir/build.make:963: recipe for target 'lepton.js' failed
make[2]: *** [lepton.js] Error 1
CMakeFiles/Makefile2:106: recipe for target 'CMakeFiles/lepton.dir/all' failed
make[1]: *** [CMakeFiles/lepton.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
danielrh commented 7 years ago

maybe you can make -k and then use the lepton-scalar result... which declines to use the sse instructions

jdluzen commented 7 years ago

Thanks so much, it did generate the scalar files. I'll try these out and let you know.

danielrh commented 6 years ago

Closing unless I hear back from you: it sounds like you were unblocked here