djcsdy / swfmill

Generate or decompile Adobe Flash SWF files using an XML dialect. Inspect and modify the XML by hand, or by using a built in XSLT processor.
http://www.swfmill.org/
GNU General Public License v2.0
131 stars 28 forks source link

undefined reference to symbol 'deflate' FIX #37

Closed ssuffian closed 7 years ago

ssuffian commented 8 years ago

After fixing the other bug regarding the freetype include error, I still received an error when doing 'make'. This seemed to fix it:

/usr/bin/ld: swft/swfmill-swft_import_png.o: undefined reference to symbol 'deflate' /lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from command line

To fix this problem, in src/MakeFile: On line 160 add the following links: ' -lm -lz -lcrypt'

So line 160 initially looks like this: EXSLT_LIBS = -lexslt -lxslt -lxml2

and after adding links it looks like this: EXSLT_LIBS = -lexslt -lxslt -lxml2 -lm -lz -lcrypt

This change allowed me to make and make install and use the code.

Line:

djcsdy commented 7 years ago

This is fixed as of ecc04cfbd658d24ffd7de67d34963b2ee1aafb36. The fix will be included in swfmill 0.3.5.

The problem was that the dynamic linking policy has changed in recent versions of GNU ld. Transitive dependencies used to be linked automatically, but now they must be linked explicitly. swfmill depends on libpng, and libpng depends on zlib, so now swfmill must explicitly link zlib.