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

spiegepngrtran.c:98: warning: ‘png_rtran_ok’l.de when building #43

Closed
johannesjo opened this issue Aug 25, 2014 · 8 comments
Closed

Comments

@johannesjo
Copy link

When I try to install optipng-bin (via grunt-contrib-imagemin 0.3.0) I get the following build error for optipng:

> pngquant-bin@0.1.7 postinstall /home/layout/nord-relaunch/node_modules/grunt-contrib-imagemin/node_modules/pngquant-bin
> node index.js

✗ pre-build test failed, compiling from source...
✓ pngquant rebuilt successfully

> optipng-bin@0.3.11 postinstall /home/layout/nord-relaunch/node_modules/grunt-contrib-imagemin/node_modules/optipng-bin
> node index.js

⚠ pre-build test failed, compiling from source...
✖ { [Error: Command failed: pngrtran.c:98: warning: ‘png_rtran_ok’ defined but not used
pngxmem.c: In function ‘pngx_malloc_rows_extended’:
pngxmem.c:37: warning: comparison is always false due to limited range of data type
ratio.c:25: error: conflicting types for ‘opng_longest_impl_t’
ratio.c:24: error: previous declaration of ‘opng_longest_impl_t’ was here
ratio.c:76: error: expected declaration specifiers or ‘...’ before ‘opng_ulongest_impl_t’
ratio.c:76: error: expected declaration specifiers or ‘...’ before ‘opng_ulongest_impl_t’
ratio.c: In function ‘opng_sprint_uratio_impl’:
ratio.c:90: error: ‘opng_ulongest_impl_t’ undeclared (first use in this function)
ratio.c:90: error: (Each undeclared identifier is reported only once
ratio.c:90: error: for each function it appears in.)
ratio.c:90: error: expected ‘;’ before ‘integer_part’
ratio.c:95: error: ‘denom’ undeclared (first use in this function)
ratio.c:97: error: ‘num’ undeclared (first use in this function)
ratio.c:117: error: ‘integer_part’ undeclared (first use in this function)
ratio.c:118: error: ‘remainder’ undeclared (first use in this function)
ratio.c: In function ‘opng_ulratio_to_factor_string’:
ratio.c:158: error: ‘opng_ulongest_impl_t’ undeclared (first use in this function)
ratio.c:158: error: expected ‘;’ before ‘num’
ratio.c:159: error: expected ‘;’ before ‘denom’
ratio.c:160: error: ‘num’ undeclared (first use in this function)
ratio.c:160: error: ‘denom’ undeclared (first use in this function)
ratio.c:160: error: too many arguments to function ‘opng_sprint_uratio_impl’
ratio.c:156: warning: unused parameter ‘ratio’
ratio.c: In function ‘opng_ulratio_to_percent_string’:
ratio.c:170: error: ‘opng_ulongest_impl_t’ undeclared (first use in this function)
ratio.c:170: error: expected ‘;’ before ‘num’
ratio.c:171: error: expected ‘;’ before ‘denom’
ratio.c:172: error: ‘num’ undeclared (first use in this function)
ratio.c:172: error: ‘denom’ undeclared (first use in this function)
ratio.c:172: error: too many arguments to function ‘opng_sprint_uratio_impl’
ratio.c:168: warning: unused parameter ‘ratio’
make[1]: *** [ratio.o] Error 1
make: *** [install] Error 2
] killed: false, code: 2, signal: null }
✔︎ optipng built successfully!

The system of the build-server is red hat linux 5.9.

@kevva
Copy link
Member

kevva commented Aug 26, 2014

#40

@kevva kevva closed this as completed Aug 26, 2014
@johannesjo
Copy link
Author

Not sure this is the same issue actually, but linking the older version, would be a good start to find out.

@kevva
Copy link
Member

kevva commented Aug 26, 2014

Problem is that you can't detect whether a system runs RHEL or Ubuntu using process.platform. I'm not going to downgrade all Linux users because it doesn't work correctly on RHEL. Sure, we could try linking to an older version for RHEL using linux-distro, but that's flaky at best. What happens when you're running the pre-compiled binary?

@kevva
Copy link
Member

kevva commented Aug 26, 2014

You should really use a newer version of grunt-contrib-imagemin too.

@johannesjo
Copy link
Author

I wish I could, but it doesn't work with the newest version of grunt-contrib-imagemin as well. There is an error that at least RPM GLIBC_2.6 is needed, as well as the same error as above.

Believe me, I would also prefer Ubuntu or Debian to Red Hat 5, but unfortunately it is not my choice to make, and suppose that I'm not the only one.

Is there the possibility to detect which c-libraries are installed on the system and use a the older binary for older versions?

@johannesjo
Copy link
Author

For npm install grunt-contrib-imagemin@0.8.0 I get:

⚠ pre-build test failed, compiling from source...
✖ pngquant failed to build, make sure that libpng-dev is installed

{ [Error: Command failed: ar: creating libimagequant.a
rwpng.c: In function ‘rwpng_write_image8’:
rwpng.c:521: error: ‘PNG_HAVE_IHDR’ undeclared (first use in this function)
rwpng.c:521: error: (Each undeclared identifier is reported only once
rwpng.c:521: error: for each function it appears in.)
make: *** [rwpng.o] Error 1
] killed: false, code: 2, signal: null }

...

⚠ pre-build test failed, compiling from source...
✖ { [Error: Command failed: pngrtran.c:98: warning: ‘png_rtran_ok’ defined but not used
pngxmem.c: In function ‘pngx_malloc_rows_extended’:
pngxmem.c:37: warning: comparison is always false due to limited range of data type
ratio.c:25: error: conflicting types for ‘opng_longest_impl_t’
ratio.c:24: error: previous declaration of ‘opng_longest_impl_t’ was here
ratio.c:76: error: expected declaration specifiers or ‘...’ before ‘opng_ulongest_impl_t’
ratio.c:76: error: expected declaration specifiers or ‘...’ before ‘opng_ulongest_impl_t’
ratio.c: In function ‘opng_sprint_uratio_impl’:
ratio.c:90: error: ‘opng_ulongest_impl_t’ undeclared (first use in this function)
ratio.c:90: error: (Each undeclared identifier is reported only once
ratio.c:90: error: for each function it appears in.)
ratio.c:90: error: expected ‘;’ before ‘integer_part’
ratio.c:95: error: ‘denom’ undeclared (first use in this function)
ratio.c:97: error: ‘num’ undeclared (first use in this function)
ratio.c:117: error: ‘integer_part’ undeclared (first use in this function)
ratio.c:118: error: ‘remainder’ undeclared (first use in this function)
ratio.c: In function ‘opng_ulratio_to_factor_string’:
ratio.c:158: error: ‘opng_ulongest_impl_t’ undeclared (first use in this function)
ratio.c:158: error: expected ‘;’ before ‘num’
ratio.c:159: error: expected ‘;’ before ‘denom’
ratio.c:160: error: ‘num’ undeclared (first use in this function)
ratio.c:160: error: ‘denom’ undeclared (first use in this function)
ratio.c:160: error: too many arguments to function ‘opng_sprint_uratio_impl’
ratio.c:156: warning: unused parameter ‘ratio’
ratio.c: In function ‘opng_ulratio_to_percent_string’:
ratio.c:170: error: ‘opng_ulongest_impl_t’ undeclared (first use in this function)
ratio.c:170: error: expected ‘;’ before ‘num’
ratio.c:171: error: expected ‘;’ before ‘denom’
ratio.c:172: error: ‘num’ undeclared (first use in this function)
ratio.c:172: error: ‘denom’ undeclared (first use in this function)
ratio.c:172: error: too many arguments to function ‘opng_sprint_uratio_impl’
ratio.c:168: warning: unused parameter ‘ratio’
make[1]: *** [ratio.o] Error 1
make: *** [install] Error 2
] killed: false, code: 2, signal: null }
✔︎ optipng built successfully!

and for the imagemin-task:

Running "imagemin:dist" (imagemin) task
Warning: Error: Command failed: /home/user/prj/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-optipng/node_modules/optipng-bin/vendor/optipng: /lib64/libc.so.6: version `GLIBC_2.6' not found (required by /home/user/prj/node_modules/grunt-contrib-imagemin/node_modules/imagemin/node_modules/imagemin-optipng/node_modules/optipng-bin/vendor/optipng)
 in file public/img/icons-s844df85ca1.png Use --force to continue.

@johannesjo
Copy link
Author

An honenst and hopefully not stupid question: Why not use the old binary for one of the old versions of imagemin (0.2.0 or 0.3.0)?

I'm not sure about if that is true, but I was told, that the image-minfication was working on the very same system (Red Hat 5.9) with the very same package.json and Gruntfile some months ago.

@kevva
Copy link
Member

kevva commented Aug 26, 2014

Because new binaries comes with new features. You're free to browse the commit history and find the old binary and use it yourselves. Back then we unfortunately didn't tag the binaries (we do now) so it probably fetches the one from master.

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

2 participants