Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to install ming 0.4.2 from source code and it was compilable before on Ubuntu 10.04, but now it' giving following compilation errors when I try to install using command sudo make install (libpng is already installed).

/bin/bash ../libtool --tag=CC   --mode=link gcc  -g -O2 -Wall -DSWF_LITTLE_ENDIAN   -o img2swf img2swf.o ../src/libming.la 
libtool: link: gcc -g -O2 -Wall -DSWF_LITTLE_ENDIAN -o .libs/img2swf img2swf.o  ../src/.libs/libming.so
gcc -DHAVE_CONFIG_H -I. -I../src -I../src    -g -O2 -Wall -DSWF_LITTLE_ENDIAN -MT png2dbl.o -MD -MP -MF .deps/png2dbl.Tpo -c -o png2dbl.o png2dbl.c
png2dbl.c: In function ‘readPNG’:
png2dbl.c:64:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
mv -f .deps/png2dbl.Tpo .deps/png2dbl.Po
/bin/bash ../libtool --tag=CC   --mode=link gcc  -g -O2 -Wall -DSWF_LITTLE_ENDIAN   -o png2dbl png2dbl.o ../src/libming.la 
libtool: link: gcc -g -O2 -Wall -DSWF_LITTLE_ENDIAN -o .libs/png2dbl png2dbl.o  ../src/.libs/libming.so
png2dbl.o: In function `readPNG':
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:69: undefined reference to `png_create_read_struct'
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:74: undefined reference to `png_create_info_struct'
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:82: undefined reference to `png_create_info_struct'
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:97: undefined reference to `png_init_io'
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:98: undefined reference to `png_set_sig_bytes'
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:99: undefined reference to `png_read_info'
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:101: undefined reference to `png_get_IHDR'
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:127: undefined reference to `png_get_valid'
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:156: undefined reference to `png_read_update_info'
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:158: undefined reference to `png_get_IHDR'
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:162: undefined reference to `png_get_channels'
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:187: undefined reference to `png_get_rowbytes'
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:194: undefined reference to `png_read_image'
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:128: undefined reference to `png_set_expand'
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:135: undefined reference to `png_set_strip_16'
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:143: undefined reference to `png_set_gray_to_rgb'
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:151: undefined reference to `png_set_filler'
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:125: undefined reference to `png_set_packing'
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:107: undefined reference to `png_get_valid'
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:117: undefined reference to `png_get_PLTE'
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:78: undefined reference to `png_destroy_read_struct'
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:92: undefined reference to `png_destroy_read_struct'
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:86: undefined reference to `png_destroy_read_struct'
png2dbl.o: In function `writeDBL':
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:278: undefined reference to `floor'
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:280: undefined reference to `compress2'
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:278: undefined reference to `floor'
/home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:280: undefined reference to `compress2'
collect2: ld returned 1 exit status
make[1]: *** [png2dbl] Error 1
make[1]: Leaving directory `/home/gmuhammad/Downloads/ming-0.4.2/util'
make: *** [install-recursive] Error 1
share|improve this question
add comment

1 Answer

The version of libpng has changed between Ubuntu 10.04 and 12.04. You're using an old version of ming -- a quick look at the changelog for the current version (0.4.4) shows a fix for newer libpng versions.

I just tried, and ming 0.4.4 compiles without any problem in Ubuntu 12.04.

share|improve this answer
    
So, what should I do to compile ming code? As for some reasons I must stick with ming 0.4.2. –  gmuhammad Sep 1 '12 at 16:49
    
If you need to stick with ming 0.4.2 you'll either have to compile against an old version of libpng or fix the source code yourself. Why do you need to use 0.4.2? It's not even a stable release according to the notes. –  teppic Sep 1 '12 at 16:51
    
Can you please tell me what was the version of libpng that was shipped with Ubuntu 10.04, so that I can install it from the source code. And can I have multiple versions of libpng on same machine without any conflicts? Or I need to uninstall the version that is shipped with 12.04? –  gmuhammad Sep 1 '12 at 16:57
    
You can install an extra copy of another version of libpng and link against that, but it's a much broader question than what you want here. The short answer: ming 0.4.2 is buggy code and not to be used. –  teppic Sep 1 '12 at 17:03
add comment

Your Answer

 
discard

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.