Skip to content
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

Can't make on Ubuntu 16.04 #31

Closed
pixelastic opened this issue Sep 18, 2016 · 5 comments
Closed

Can't make on Ubuntu 16.04 #31

pixelastic opened this issue Sep 18, 2016 · 5 comments

Comments

@pixelastic
Copy link

Hello,

I've just tried to run make in the freshly cloned dssim directory but was greeted with the following answer:

make
cc -Wall -I. -DNDEBUG -O3 -fstrict-aliasing -ffast-math -funroll-loops -fomit-frame-pointer -ffinite-math-only -std=c99 `pkg-config libpng --cflags || pkg-config libpng16 --cflags`    -c -o src/main.o src/main.c
In file included from /usr/include/libpng12/png.h:321:0,
                 from src/main.c:26:
/usr/include/libpng12/pngconf.h:383:21: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘.’ token
            __pngconf.h__ in libpng already includes setjmp.h;
                     ^
/usr/include/libpng12/pngconf.h:384:12: error: unknown type name ‘__dont__’
            __dont__ include it again.;
            ^
/usr/include/libpng12/pngconf.h:384:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘it’
            __dont__ include it again.;
                             ^
/usr/include/libpng12/pngconf.h:384:29: error: unknown type name ‘it’
<builtin>: recipe for target 'src/main.o' failed
make: *** [src/main.o] Error 1

I think I have all the needed dependencies installed, but have no idea how to move forward from here. Thanks for any help.

✔ libpng12-dev  1.2.54-1ubuntu1
✔ zlib1g-dev      1:1.2.8.dfsg-2ubuntu4
✔ pkg-config      0.29.1-0ubuntu1
✔ make             4.1-6
@kornelski
Copy link
Owner

kornelski commented Sep 18, 2016

libpng 1.2 is ancient. Can you use libpng 1.6?

@pixelastic
Copy link
Author

Thanks, I just installed libpng16-dev and make succeeded. Apparently libpng12 ships with Ubuntu 16.04.

@cout
Copy link

cout commented Jan 19, 2018

Unfortunately, installing libpng16-dev causes libpng12-dev to be removed, and anything depending on it (including libfreetype6-dev and libgtk-3-dev).

@kornelski
Copy link
Owner

The Rust version doesn't have this problem. Build with cargo build --release.

@Seanmatthews
Copy link

For anyone else who's trying to build this for Ubuntu 16.04 and comes across this:

make CFLAGS='-DPNG_SKIP_SETJMP_CHECK'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants