undefined symbol: deflate

"jhmark0" <[email protected]>
Newsgroups gmane.text.clearsilver.general
Message-ID <[email protected]>
hi all,

I built ClearSilver 0.10.5 on Linux and found that neo_cgi wouldn't
load... producing this error message at runtime:

neo_cgi.so: undefined symbol: deflate

A number of other people on the Internet seemed to have run into this
also, but I could not find a definitive solution.

I noticed that the problem was caused by the ordering of the ld
command line.
The "-lz" option was occurring before the other -l options
containing the ClearSilver code.  This caused "deflate" to be left
undefined in the symbol table, instead of being loaded from libz.a.

I was able to get it working by patching python/setup.py to add a
second "-lz" at the end (see below).  This is not a general solution
since it assumes that compression is enabled.  Is there a better way
of dealing with link order issues in distutils?

thanks,

Jonathan Mark

*** setup.py.old        2007-09-28 21:01:02.000000000 -0700
--- setup.py    2007-09-28 20:58:55.000000000 -0700
***************
*** 122,127 ****
--- 122,128 ----
        include_dirs=INC_DIRS,
        library_dirs=LIB_DIRS,
        libraries=LIBRARIES,
+       extra_link_args = ["-lz"],
        )]
    }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.