Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to install SoX, and get through configure fine, but it fails on make with the following:

/bin/sh ../libtool --silent  --tag=CC  --silent --mode=compile gcc -DHAVE_CONFIG_H
-I.  -DLADSPA_PATH="\"/var/tmp/sox/sox14/lib/ladspa\"" -DPKGLIBDIR="\"/var/tmp/sox
/sox14/lib/sox\""    -Wconversion    -g -O2 -D_FORTIFY_SOURCE=2 -Wall -W -Wmissing-
prototypes -Wstrict-prototypes -pedantic -MT libsox_la-spectrogram.lo -MD -MP -MF 
.deps/libsox_la-spectrogram.Tpo -c -o libsox_la-spectrogram.lo `test -f 
'spectrogram.c' || echo './'`spectrogram.c
spectrogram.c: In function `stop':
spectrogram.c:593: warning: implicit declaration of function `png_set_rows'
spectrogram.c:594: warning: implicit declaration of function `png_write_png'
spectrogram.c:594: `PNG_TRANSFORM_IDENTITY' undeclared (first use in this function)
spectrogram.c:594: (Each undeclared identifier is reported only once
spectrogram.c:594: for each function it appears in.)
make[1]: *** [libsox_la-spectrogram.lo] Error 1
make[1]: Leaving directory `/var/tmp/sox/sox-14.3.1/src'
make: *** [all-recursive] Error 1

I'm guessing this is more of a linker/pointer error than anything else because this is the beginning of spectrogram.c

#include "sox_i.h"
#include "fft4g.h"
#include "sgetopt.h"
#include <assert.h>
#include <math.h>
#include <png.h>

png.h is included, which is where PNG_TRANSFORM_IDENTITY is supposed to come from. Am I missing something?

share|improve this question
Is the code you're trying to compile publicly available? Are there any PNG-related #defines? What version of the libpng development files do you have? – Gilles Oct 29 '10 at 19:55
Are you still experiencing this problem. If not, how did you fix it? – Tshepang Feb 4 '11 at 18:43
Sorry Gilles, I seem to have missed your message. @Tshepang - I fixed this by disabling png. If you're trying to install sox, I can't remember too well, but I think it was a configure option, have a look in INSTALL. – Bharat Feb 8 '11 at 13:54

If you're unable to get lib-png to work, and don't really want it anyway, you can specify it to try and install without png support (so no spectrograph) by doing:

./configure --without-png

That solved the problem for me. Leaving this here in case someone needs it!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.