This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Building the GNU cgicc library...


Bakken, Luke wrote:

Hi all,

Just trying to get cgicc 3.2.2 built on cygwin...

Here's my environment:
Windows XP Professional Ver 5.1 Build 2600 Service Pack 1
    Cygwin DLL version info:
        DLL version: 1.3.22
g++ (GCC) 3.2 20020927 (prerelease)

Using this and the latest cgicc library sources (3.2.2), I get the
following errors:

----------

/bin/bash ../libtool --mode=link g++  -Wall -W -pedantic -g -O2   -o
libcgicc.la -rpath /usr/lib -version-info 5:0:0 CgiEnvironment.
lo CgiInput.lo CgiUtils.lo Cgicc.lo FormEntry.lo FormFile.lo
HTMLAttribute.lo HTMLAttributeList.lo HTMLDoctype.lo HTMLElement.lo HTM
LElementList.lo HTTPContentHeader.lo HTTPCookie.lo HTTPHTMLHeader.lo
HTTPHeader.lo HTTPPlainHeader.lo HTTPRedirectHeader.lo HTTPResp
onseHeader.lo HTTPStatusHeader.lo MStreamable.lo
libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin
shared libraries
^^^^^^^^^^^^^^^^^^^^

This may (or may not) be your problem, but your library is being built as a static archive eventhough you requested a shared library. A first glance, the errors you listed later on could indicate a compiler error. I noticed that, since last year, there have been quite a few C++ PR fixes, including some for Cygwin. However, I can advise you on a possible way to fix the build so that it builds a shared library properly, which might resolve the problem.

Edit the makefile in that library's source directory and look for the line which contains the "-version-info 5:0:0" string. Append "-no-undefined" after that string to get something like "-version-info 5:0:0 -no-undefined". Then make clean and rebuild.

This lib may or may not be trying to use external symbols (from another dll other than cygwin1.dll). If it still complains about undefined symbols, you will need to figure out what external libraries it is trying to use and add them to the following line:

libcgicc_la_LIBADD=

If this fixes it for you, file a bug report with the program's author. Even if it doesn't, the package author can probably help you fix up the build system so that it will build properly. Either way, make sure you convey the following points for building a cygwin target:

1)When building libtool shared libraries, you must pass "-no-undefined" at link time.

2)When building libtool shared libraries, you must pass *ALL* dependency libs(if any) at linktime (i.e. -lz, -lncurses, etc).

3)Using the latest libtool available is generally a good idea.

If you are feeling bold, you can try to fix the package and reautotoolize it yourself. However, that process is way too complex for me to go into right now, as there can be many subtle pitfalls. In fact, so much so that a book was written to cover the process of using those tools (although it is woefully out of date). If you feel so inclined, do a google search for "autobook" to read the online version. Good luck.

HTH,
Nicholas



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]