witwall / sam2p

Automatically exported from code.google.com/p/sam2p
GNU General Public License v2.0
0 stars 0 forks source link

tif22pnm-0.13 fails to build with libpng 1.5 API #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
tif22pnm is accessing libpng's internal structure instead of using the matching 
functions.
note that these functions have been around since libpng 1.2.
the usage of internal structure was marked deprecated in libpng 1.4 (compile 
warnings).
and with libpng 1.5 it is now fatal error.

ng22pnm.c: In function ‘save_text’:
png22pnm.c:479:28: error: dereferencing pointer to incomplete type
png22pnm.c:481:20: error: dereferencing pointer to incomplete type
png22pnm.c:481:56: error: dereferencing pointer to incomplete type
png22pnm.c:483:17: error: dereferencing pointer to incomplete type
png22pnm.c:484:35: error: dereferencing pointer to incomplete type
png22pnm.c:485:32: error: dereferencing pointer to incomplete type
png22pnm.c:488:39: error: dereferencing pointer to incomplete type
png22pnm.c:489:32: error: dereferencing pointer to incomplete type
png22pnm.c:494:33: error: dereferencing pointer to incomplete type
png22pnm.c:495:7: error: dereferencing pointer to incomplete type
png22pnm.c:496:19: error: dereferencing pointer to incomplete type
png22pnm.c: In function ‘show_time’:
png22pnm.c:515:15: error: dereferencing pointer to incomplete type
png22pnm.c:517:25: error: dereferencing pointer to incomplete type
png22pnm.c:517:55: error: dereferencing pointer to incomplete type
png22pnm.c:518:25: error: dereferencing pointer to incomplete type
png22pnm.c:518:50: error: dereferencing pointer to incomplete type
png22pnm.c:519:25: error: dereferencing pointer to incomplete type
png22pnm.c:519:52: error: dereferencing pointer to incomplete type
png22pnm.c:511:16: warning: variable ‘month’ set but not used 
[-Wunused-but-set-variable]
png22pnm.c: In function ‘convertpng’:
png22pnm.c:649:21: error: dereferencing pointer to incomplete type
png22pnm.c:675:17: error: dereferencing pointer to incomplete type
png22pnm.c:679:17: error: dereferencing pointer to incomplete type
png22pnm.c:680:63: error: dereferencing pointer to incomplete type
png22pnm.c:687:13: error: dereferencing pointer to incomplete type
png22pnm.c:687:33: error: dereferencing pointer to incomplete type
png22pnm.c:688:13: error: dereferencing pointer to incomplete type
png22pnm.c:688:34: error: dereferencing pointer to incomplete type
png22pnm.c:690:13: error: dereferencing pointer to incomplete type
png22pnm.c:693:27: error: dereferencing pointer to incomplete type
png22pnm.c:694:27: error: dereferencing pointer to incomplete type
png22pnm.c:695:27: error: dereferencing pointer to incomplete type
png22pnm.c:696:27: error: dereferencing pointer to incomplete type
png22pnm.c:697:27: error: dereferencing pointer to incomplete type
png22pnm.c:701:44: error: dereferencing pointer to incomplete type
png22pnm.c:708:15: error: dereferencing pointer to incomplete type
png22pnm.c:709:28: error: dereferencing pointer to incomplete type
png22pnm.c:711:24: error: dereferencing pointer to incomplete type
png22pnm.c:713:15: error: dereferencing pointer to incomplete type
png22pnm.c:716:15: error: dereferencing pointer to incomplete type
png22pnm.c:719:15: error: dereferencing pointer to incomplete type
png22pnm.c:722:31: error: dereferencing pointer to incomplete type
png22pnm.c:734:15: error: dereferencing pointer to incomplete type
png22pnm.c:737:15: error: dereferencing pointer to incomplete type
png22pnm.c:740:29: error: dereferencing pointer to incomplete type
png22pnm.c:745:17: error: dereferencing pointer to incomplete type
png22pnm.c:746:35: error: dereferencing pointer to incomplete type
png22pnm.c:747:55: error: dereferencing pointer to incomplete type
png22pnm.c:748:32: error: dereferencing pointer to incomplete type
png22pnm.c:750:10: error: dereferencing pointer to incomplete type
png22pnm.c:753:29: error: dereferencing pointer to incomplete type
png22pnm.c:756:35: error: dereferencing pointer to incomplete type
png22pnm.c:759:10: error: dereferencing pointer to incomplete type
png22pnm.c:775:15: error: dereferencing pointer to incomplete type
png22pnm.c:779:21: error: dereferencing pointer to incomplete type
png22pnm.c:780:21: error: dereferencing pointer to incomplete type
png22pnm.c:782:21: error: dereferencing pointer to incomplete type
png22pnm.c:783:22: error: dereferencing pointer to incomplete type
png22pnm.c:785:36: error: dereferencing pointer to incomplete type
png22pnm.c:789:25: error: dereferencing pointer to incomplete type
png22pnm.c:789:58: error: dereferencing pointer to incomplete type
png22pnm.c:802:22: error: dereferencing pointer to incomplete type
png22pnm.c:803:22: error: dereferencing pointer to incomplete type
png22pnm.c:804:22: error: dereferencing pointer to incomplete type
png22pnm.c:805:22: error: dereferencing pointer to incomplete type
png22pnm.c:805:47: error: dereferencing pointer to incomplete type
png22pnm.c:806:22: error: dereferencing pointer to incomplete type
png22pnm.c:806:47: error: dereferencing pointer to incomplete type
png22pnm.c:809:63: error: dereferencing pointer to incomplete type
png22pnm.c:811:24: error: dereferencing pointer to incomplete type
png22pnm.c:812:17: error: dereferencing pointer to incomplete type
png22pnm.c:813:31: error: dereferencing pointer to incomplete type
png22pnm.c:814:16: error: dereferencing pointer to incomplete type
png22pnm.c:814:52: error: dereferencing pointer to incomplete type
png22pnm.c:815:16: error: dereferencing pointer to incomplete type
png22pnm.c:815:52: error: dereferencing pointer to incomplete type
png22pnm.c:816:16: error: dereferencing pointer to incomplete type
png22pnm.c:816:52: error: dereferencing pointer to incomplete type
png22pnm.c:818:30: error: dereferencing pointer to incomplete type
png22pnm.c:821:11: error: dereferencing pointer to incomplete type
png22pnm.c:823:24: error: dereferencing pointer to incomplete type
png22pnm.c:824:24: error: dereferencing pointer to incomplete type
png22pnm.c:825:17: error: dereferencing pointer to incomplete type
png22pnm.c:825:41: error: dereferencing pointer to incomplete type
png22pnm.c:826:40: error: dereferencing pointer to incomplete type
png22pnm.c:827:30: error: dereferencing pointer to incomplete type
png22pnm.c:830:11: error: dereferencing pointer to incomplete type
png22pnm.c:832:24: error: dereferencing pointer to incomplete type
png22pnm.c:833:24: error: dereferencing pointer to incomplete type
png22pnm.c:834:17: error: dereferencing pointer to incomplete type
png22pnm.c:834:42: error: dereferencing pointer to incomplete type
png22pnm.c:835:40: error: dereferencing pointer to incomplete type
png22pnm.c:836:30: error: dereferencing pointer to incomplete type
png22pnm.c:839:11: error: dereferencing pointer to incomplete type
png22pnm.c:845:22: error: dereferencing pointer to incomplete type
png22pnm.c:846:22: error: dereferencing pointer to incomplete type
png22pnm.c:847:15: error: dereferencing pointer to incomplete type
png22pnm.c:847:40: error: dereferencing pointer to incomplete type
png22pnm.c:848:38: error: dereferencing pointer to incomplete type
png22pnm.c:851:11: error: dereferencing pointer to incomplete type
png22pnm.c:852:28: error: dereferencing pointer to incomplete type
png22pnm.c:861:15: error: dereferencing pointer to incomplete type
png22pnm.c:862:21: error: dereferencing pointer to incomplete type
png22pnm.c:865:50: error: dereferencing pointer to incomplete type
png22pnm.c:868:38: error: dereferencing pointer to incomplete type
png22pnm.c:868:56: error: dereferencing pointer to incomplete type
png22pnm.c:869:38: error: dereferencing pointer to incomplete type
png22pnm.c:869:56: error: dereferencing pointer to incomplete type
png22pnm.c:870:38: error: dereferencing pointer to incomplete type
png22pnm.c:870:56: error: dereferencing pointer to incomplete type
png22pnm.c:874:38: error: dereferencing pointer to incomplete type
png22pnm.c:875:38: error: dereferencing pointer to incomplete type
png22pnm.c:876:38: error: dereferencing pointer to incomplete type
png22pnm.c:888:21: error: dereferencing pointer to incomplete type
png22pnm.c:911:15: error: dereferencing pointer to incomplete type
png22pnm.c:913:24: error: dereferencing pointer to incomplete type
png22pnm.c:913:54: error: dereferencing pointer to incomplete type
png22pnm.c:921:14: error: dereferencing pointer to incomplete type
png22pnm.c:922:33: error: dereferencing pointer to incomplete type
png22pnm.c:931:17: error: dereferencing pointer to incomplete type
png22pnm.c:932:17: error: dereferencing pointer to incomplete type
png22pnm.c:935:19: error: dereferencing pointer to incomplete type
png22pnm.c:937:21: error: dereferencing pointer to incomplete type
png22pnm.c:938:36: error: dereferencing pointer to incomplete type
png22pnm.c:942:25: error: dereferencing pointer to incomplete type
png22pnm.c:942:58: error: dereferencing pointer to incomplete type
png22pnm.c:956:17: error: dereferencing pointer to incomplete type
png22pnm.c:957:17: error: dereferencing pointer to incomplete type
png22pnm.c:958:19: error: dereferencing pointer to incomplete type
png22pnm.c:964:17: error: dereferencing pointer to incomplete type
png22pnm.c:966:32: error: dereferencing pointer to incomplete type
png22pnm.c:967:30: error: dereferencing pointer to incomplete type
png22pnm.c:999:44: error: dereferencing pointer to incomplete type
png22pnm.c:999:65: error: dereferencing pointer to incomplete type
png22pnm.c:1002:48: error: dereferencing pointer to incomplete type
png22pnm.c:1002:69: error: dereferencing pointer to incomplete type
png22pnm.c:1005:48: error: dereferencing pointer to incomplete type
png22pnm.c:1005:69: error: dereferencing pointer to incomplete type
png22pnm.c:1011:31: error: dereferencing pointer to incomplete type
png22pnm.c:1014:33: error: dereferencing pointer to incomplete type
png22pnm.c:1015:11: error: dereferencing pointer to incomplete type
png22pnm.c:1016:23: error: dereferencing pointer to incomplete type
png22pnm.c:1019:13: error: dereferencing pointer to incomplete type
png22pnm.c:1023:33: error: dereferencing pointer to incomplete type
png22pnm.c:1029:15: error: dereferencing pointer to incomplete type
png22pnm.c:1034:43: error: dereferencing pointer to incomplete type
png22pnm.c:1035:32: error: dereferencing pointer to incomplete type
png22pnm.c:1035:60: error: dereferencing pointer to incomplete type
png22pnm.c:1036:33: error: dereferencing pointer to incomplete type
png22pnm.c:1037:35: error: dereferencing pointer to incomplete type
png22pnm.c:1041:33: error: dereferencing pointer to incomplete type
png22pnm.c:1046:16: error: dereferencing pointer to incomplete type
png22pnm.c:1047:16: error: dereferencing pointer to incomplete type
png22pnm.c:1049:13: error: dereferencing pointer to incomplete type
png22pnm.c:1055:34: error: dereferencing pointer to incomplete type
png22pnm.c:1056:34: error: dereferencing pointer to incomplete type
png22pnm.c:1057:34: error: dereferencing pointer to incomplete type
png22pnm.c:1063:16: error: dereferencing pointer to incomplete type
png22pnm.c:1064:16: error: dereferencing pointer to incomplete type
png22pnm.c:1065:15: error: dereferencing pointer to incomplete type
png22pnm.c:1071:39: error: dereferencing pointer to incomplete type
png22pnm.c:1083:27: error: dereferencing pointer to incomplete type
png22pnm.c:1182:31: error: dereferencing pointer to incomplete type

the attached patch is not complete, might need a cleanup or two, but I'm 
attaching it here for reference -- it will propably lead you to correct path

Thank you, Samuli

Original issue reported on code.google.com by ssuomine...@gmail.com on 2 Mar 2012 at 8:13

Attachments:

GoogleCodeExporter commented 9 years ago
(Just for the record, this bug is blocking the inclusion of tif22pnm to 
Gentoo's Portage as a dependency for sam2p, and thus, texlive :/)

Original comment by ssuomine...@gmail.com on 2 Mar 2012 at 8:15

GoogleCodeExporter commented 9 years ago
Thank you for making me aware of the issue, and thank you for attaching the 
patch. It was very educational and helped me a lot to understand what to 
change. Based on the information you have provided I was able to make 
modification which compiles and seems to work. For your information, I attach 
my patch to this comment.

I've released a new version of tiff2pnm (0.14) incorporating my patch. Get it 
from here: http://sam2p.googlecode.com/files/tif22pnm-0.14.tar.gz

FYI I've tried tiff2pnm-0.14 and it works with libpng-1.2. I don't have easy 
access (i.e. sudo apt-get install) to newer libpng versions. Please try it with 
libpng-1.5 and some images, and report any failures in this issue.

Original comment by pts...@gmail.com on 2 Mar 2012 at 11:19

Attachments:

GoogleCodeExporter commented 9 years ago
png22pnm-0.14 compiles fine against libpng 1.5.9 here now, but I'm also not 
sure howto test it runtime, but I've still committed it as media-gfx/tif22pnm 
in Gentoo's Portage ...

http://packages.gentoo.org/package/media-gfx/tif22pnm

... so users can test it, as it was requested earlier here:

http://bugs.gentoo.org/334551

Thanks a lot!

Original comment by ssuomine...@gmail.com on 2 Mar 2012 at 5:56