[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Re: Newbie's same old question about Cygwin (was: Re: Newbie's same old ques

From: Max Bowsher <maxb_at_ukf.net>
Date: 2004-07-31 17:04:28 CEST

Marcos Chaves wrote:
> Hi.
>
> I spent the last few days with a .po file and now I'm trying to build the
> whole trunk/ again with Cygwin.
>
> Max Bowsher wrote:
>> Try executing exactly the following:
>>
>> export PATH="/usr/autotool/devel/bin:$PATH"
>
> I put it on my .bash_profile and removed the ln for libtool.m4. Thanks for
> the help.
>
>> svn co http://svn.collab.net/repos/svn/trunk svn-trunk
>> cd svn-trunk
>> ./autogen.sh
>> ./configure --disable-static --prefix=/newtestsvn
>> make
>> make install
>
> Even if I can build 1.0.x releases without problems, I can't build the
whole
> trunk/ or the 1.1.0 release with Cygwin.
>
> I have some experience with unix systems but not with Cygwin and looks
like
> it is not exactly what I needed. Or more likely, it's just some simple
> configuration that still don't know. Anyway, the problem seems to be the
> combination: Cygwin + libtool + gcc (I'm using libtool 1.5.6 and gcc
3.3.1).
>
> Even if I tell './configure' to disable static libraries, apr and apr-util
> are created as static. After that, this is what I have in stderr:
>
> libtool: link: warning: undefined symbol not allowed in i686-pc-cygwin
> shared libraries
> ...
> Creating library file: .libs/libsvn_subr-1.dll.a
> .libs/auth.o(.text+0x18): In function 'svn_auth_open':
> .../libsvn_subr/auth.c:103: undefined reference to '_apr_palloc'
>
> And stdout goes like:
>
> *** Warning: this system can not link to static lib archive
> .../trunk/apr-util/libaprutil-0.la.
>
> I searched the web and looks like I needed to create DLL files. Is it
true?
> I didn't need DLL files for 1.0.6.

Now this is a problem I can explain.

Windows DLLs cannot contain references to undefined symbols (unlike most
unices' implementation of sharedlibs).

Therefore, libtool doesn't try to create DLLs unless it is told (via
the -no-undefined switch) that a library has no undefined symbols.

Furthermore, linking a shared library with a static library cannot be
assumed to be reliable (because if the static library is linked with
multiple shared libraries or the main program, any process-global state of
the static library will not, in fact, be process-global, introducing
possibly subtle bugs). Therefore, libtool refuses to do this.

Now, in 1.1.x and later, I taught the subversion build to provide
the -no-undefined flag to libtool where appropriate, permitting libtool to
create DLLs when asked. But if your apr and apr-util are static, then
libtool won't link DLLs against them.

The solution is simple. Install the 'apr' and 'apr-util' packages from
Cygwin setup.
That will be enough for svn checkout builds to just work.
For tarballs, either erase the included apr and apr-util subdirs, or pass
the --with-apr=/usr --with-apr-util=/usr options, to make the build use the
system apr installation.

Max.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Jul 31 17:05:15 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.