New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
image fails to run on Mac OSX 10.9 #16
Comments
you must have upgraded your libjpeg, try re-installing image: luarocks install image ? |
I did with |
So, i reinstalled libjpeg via brew and reinstalled ( remove and install ) and still having the same issue. |
Could you try a "brew cleanup" and then reinstall the image package. I've definitely seen the error before and it was because I installed a new version of libjpeg |
Well, if I would not count the actual run, it seems like it has succeeded.
|
Even after many reboots and retries, nothing seems to have worked |
"brew cleanup" was the key for me to fix this. If that didn't help, I'm not sure what else. |
Hmmm... Thats bad. |
I had a similar issue (actually problems with both libjpeg and libpng having bad versions). It turns out that I had the "UnixImageIO" framework installed in /Library/Frameworks/UnixImageIO.framework. Apparently, the build system was compiling against that framework (which includes jpeg version 62 and libpng 1.2), but linking against my homebrew libs at runtime. I removed the framework, uninstalled image and reinstalled it, then everything worked smoothly. I would also recommend running a command like:
If you find a surprising copy of libpjeg where you don't expect it, try moving or deleting that copy. You may have some other totally random copy lying around in your path... |
@JohnZed is jpeg version 62 too new for torch7? When I try to install it (apt-get install libjpeg-dev), I always get this version on my debian machine: dfs00104:/home/smt/gfx.js# apt-get install libjpeg-dev |
I had a similar problem. Upgrading lua to 5.2.3 solved it for me. |
issue still there on MacOS Yosemite |
I had same problem in 10.10.2, and I try to upgrade the lua to Lua 5.3.0 to solve it, but the torch still run version 5.1. |
I have the latest version of everything ( |
After trying many things, I solved this in torch only using PNG files |
|
The solution of @JohnZed worked for me. This JPEG library was installed with GDAL and caused a conflict. Simply deleting it fixed the issue. |
On my mac system the following solved the issue.
after this the following command runs without issue
|
For me, I ran into similar problems with luajit -limage -e "image.test()"
seed: 1493905914
Running 41 tests
1/41 CompressAndDecompress ............................................. [PASS]
2/41 test_transformation_largeByteImage_vflip .......................... [PASS]
3/41 CompressAndDecompressPNG .......................................... [WAIT]libpng warning: Application built with libpng-1.4.12 but running with 1.6.29
3/41 CompressAndDecompressPNG .......................................... [ERROR]
...
CompressAndDecompressPNG
Function call failed
/Users/david/src/torch/install/share/lua/5.1/image/init.lua:215: [write_png_file] png_create_write_struct failed
stack traceback:
[C]: in function 'save'
/Users/david/src/torch/install/share/lua/5.1/image/init.lua:215: in function 'compressPNG'
/Users/david/src/torch/install/share/lua/5.1/image/test.lua:419: in function </Users/david/src/torch/install/share/lua/5.1/image/test.lua:416>
[C]: in function 'xpcall'
...s/david/src/torch/install/share/lua/5.1/torch/Tester.lua:477: in function '_pcall'
...s/david/src/torch/install/share/lua/5.1/torch/Tester.lua:436: in function '_run'
...s/david/src/torch/install/share/lua/5.1/torch/Tester.lua:355: in function 'run'
/Users/david/src/torch/install/share/lua/5.1/image/test.lua:708: in function 'test'
(command line):1: in main chunk
[C]: at 0x010d8e6a00 which was finally resolved by following @JohnZed suggestion: search for stray libjpg files, and re-build |
Mono.framework causes CMake to produce an incorrect build due to libpng and libjpeg. CMake has this funny parameter called CMAKE_FIND_FRAMEWORK which is set by default to FIRST. This means that CMake will first look for files first in all framework directories, and only then in regular include directories. Funnily enough Mono.framework contains the headers for libjpeg and libpng. So, CMake finds the headers in Mono, but the library in the regular install location, e.g. /usr/local/lib and therefore a version mismatch happens. Mono is a known menace (for some time The fix that definitively worked for me was to check out the project manually, add |
I was trying to use the image library, but this happens:
I have no idea how to fix that.
The text was updated successfully, but these errors were encountered: