You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Colin JN Breame <co...@breame.com> on 2004/10/24 22:30:58 UTC

undefined reference when compiling on cygwin

Hello,

I have a new installation of cygwin and version 1.1.1 of subversion.

$ configure --prefix=/usr
...
$ make
cd subversion/libsvn_subr && /bin/bash 
/home/Colin/src/subversion-1.1.1/libtool --silent --mode=link gcc  -g 
-O2    -DNEON_ZLIB -DNEON_SSL   -rpath /usr/lib -o libsvn_subr-1.la 
-no-undefined auth.lo cmdline.lo config.lo config_auth.lo config_file.lo 
config_win.lo date.lo error.lo hash.lo io.lo md5.lo opt.lo path.lo 
pool.lo quoprint.lo sorts.lo stream.lo subst.lo svn_base64.lo 
svn_string.lo target.lo time.lo utf.lo utf_validate.lo validate.lo 
version.lo xml.lo /usr/lib/libaprutil-0.la -lgdbm -ldb-4.2 -lexpat 
-liconv /usr/lib/libapr-0.la -lcrypt -lintl
/usr/lib/libcygwin.a(libcmain.o)(.text+0x7d): undefined reference to 
`_WinMain@16'
collect2: ld returned 1 exit status
make: *** [subversion/libsvn_subr/libsvn_subr-1.la] Error 1

I'm using the cygwin distribution of neon, apr and apr-util.

Any ideas what might be going wrong here?

Colin


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: undefined reference when compiling on cygwin

Posted by Colin JN Breame <co...@breame.com>.
Max Bowsher wrote:

> Colin JN Breame wrote:
>
>> Max Bowsher wrote:
>>
>>> Colin JN Breame wrote:
>>>
>>>> my conclusion is that it
>>>> cannot (or has not) been compiled with shared libraries for cygwin.
>>>
>>>
>>>
>>>
>>> That's an ....interesting.... conclusion to come to, given that there
>>> is an official Cygwin package of Subversion which - guess what? - is
>>> compiled with shared libraries.
>>>
>>> Max.
>>>
>>>
>> At least, not from the distribution that I have (svn 1.1.1 and the
>> latest cygwin).  If you know any different, I would be interesting in
>> finding out how it was done.
>
>
>
> I don't understand what you are saying.
>
> That distro you refer to *is* compiled to shared libraries.
>
> And if you want to know how it is done - well, the source package is 
> available on the cygwin mirrors.
>
> Max.
>
>
cygwin has 1.0.6 and I am trying to compile 1.1.1 of svn.

Colin



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: undefined reference when compiling on cygwin

Posted by Max Bowsher <ma...@ukf.net>.
Colin JN Breame wrote:
> Max Bowsher wrote:
>
>> Colin JN Breame wrote:
>>
>>> my conclusion is that it
>>> cannot (or has not) been compiled with shared libraries for cygwin.
>>
>>
>> That's an ....interesting.... conclusion to come to, given that there
>> is an official Cygwin package of Subversion which - guess what? - is
>> compiled with shared libraries.
>>
>> Max.
>>
>>
> At least, not from the distribution that I have (svn 1.1.1 and the
> latest cygwin).  If you know any different, I would be interesting in
> finding out how it was done.

I don't understand what you are saying.

That distro you refer to *is* compiled to shared libraries.

And if you want to know how it is done - well, the source package is 
available on the cygwin mirrors.

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: undefined reference when compiling on cygwin

Posted by Colin JN Breame <co...@breame.com>.
Max Bowsher wrote:

> Colin JN Breame wrote:
>
>> my conclusion is that it
>> cannot (or has not) been compiled with shared libraries for cygwin.
>
>
> That's an ....interesting.... conclusion to come to, given that there 
> is an official Cygwin package of Subversion which - guess what? - is 
> compiled with shared libraries.
>
> Max.
>
>
At least, not from the distribution that I have (svn 1.1.1 and the 
latest cygwin).  If you know any different, I would be interesting in 
finding out how it was done.

Colin



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: undefined reference when compiling on cygwin

Posted by Max Bowsher <ma...@ukf.net>.
Colin JN Breame wrote:
> my conclusion is that it
> cannot (or has not) been compiled with shared libraries for cygwin.

That's an ....interesting.... conclusion to come to, given that there is an 
official Cygwin package of Subversion which - guess what? - is compiled with 
shared libraries.

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: undefined reference when compiling on cygwin

Posted by Colin JN Breame <co...@breame.com>.
Philip Martin wrote:

>Colin JN Breame <co...@breame.com> writes:
>
>  
>
>>cd subversion/libsvn_subr && /bin/bash
>>/home/Colin/src/subversion-1.1.1/libtool --silent --mode=link gcc  -g
>>-O2    -DNEON_ZLIB -DNEON_SSL   -rpath /usr/lib -o libsvn_subr-1.la
>>-no-undefined auth.lo cmdline.lo config.lo config_auth.lo
>>config_file.lo config_win.lo date.lo error.lo hash.lo io.lo md5.lo
>>opt.lo path.lo pool.lo quoprint.lo sorts.lo stream.lo subst.lo
>>svn_base64.lo svn_string.lo target.lo time.lo utf.lo utf_validate.lo
>>validate.lo version.lo xml.lo /usr/lib/libaprutil-0.la -lgdbm -ldb-4.2
>>-lexpat -liconv /usr/lib/libapr-0.la -lcrypt -lintl
>>/home/Colin/src/subversion-1.1.1/libtool: line 1:  sed: command not found
>>make: *** [subversion/libsvn_subr/libsvn_subr-1.la] Error 127
>>
>>Looks like it can't find sed.  However:
>>
>>$ which sed
>>/usr/bin/sed
>>    
>>
>
>libtool is a shell script, you need to determine where and why it is
>failing.  Execute the above command from the command line but replace
>--silent with --debug and see if that helps determine where the
>problem lies.
>
>Did you reuse the compiled objects created by libtool 1.4.3?  I don't
>whether that would cause the above problem.  I suppose you could try
>"make clean" to get rid of any 1.4.3 stuff.
>
>  
>

Eventually got this working.  It seems that libtool was failing when 
extracting symbols from the dll's.  The reason why it was saying it 
can't find sed was that the command was written as ' sed' which is 
different from 'sed' (Notice the leading space).  After changing this, 
there were a whole load of other problems and my conclusion is that it 
cannot (or has not) been compiled with shared libraries for cygwin.

To get it working, I used:

$ ./configure --disable-shared

Maybe this should be in the instructions, along with the need to delete 
apr and apr-util, the need to run ./autogen.sh, etc...?

Colin




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: undefined reference when compiling on cygwin

Posted by Philip Martin <ph...@codematters.co.uk>.
Colin JN Breame <co...@breame.com> writes:

> cd subversion/libsvn_subr && /bin/bash
> /home/Colin/src/subversion-1.1.1/libtool --silent --mode=link gcc  -g
> -O2    -DNEON_ZLIB -DNEON_SSL   -rpath /usr/lib -o libsvn_subr-1.la
> -no-undefined auth.lo cmdline.lo config.lo config_auth.lo
> config_file.lo config_win.lo date.lo error.lo hash.lo io.lo md5.lo
> opt.lo path.lo pool.lo quoprint.lo sorts.lo stream.lo subst.lo
> svn_base64.lo svn_string.lo target.lo time.lo utf.lo utf_validate.lo
> validate.lo version.lo xml.lo /usr/lib/libaprutil-0.la -lgdbm -ldb-4.2
> -lexpat -liconv /usr/lib/libapr-0.la -lcrypt -lintl
> /home/Colin/src/subversion-1.1.1/libtool: line 1:  sed: command not found
> make: *** [subversion/libsvn_subr/libsvn_subr-1.la] Error 127
>
> Looks like it can't find sed.  However:
>
> $ which sed
> /usr/bin/sed

libtool is a shell script, you need to determine where and why it is
failing.  Execute the above command from the command line but replace
--silent with --debug and see if that helps determine where the
problem lies.

Did you reuse the compiled objects created by libtool 1.4.3?  I don't
whether that would cause the above problem.  I suppose you could try
"make clean" to get rid of any 1.4.3 stuff.

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: undefined reference when compiling on cygwin

Posted by Colin JN Breame <co...@breame.com>.
 Ben Reser wrote:

>On Mon, Oct 25, 2004 at 12:20:28AM +0100, Philip Martin wrote:
>  
>
>>Colin JN Breame <co...@breame.com> writes:
>>
>>    
>>
>>>/usr/lib/libcygwin.a(libcmain.o)(.text+0x7d): undefined reference to
>>>`_WinMain@16'
>>>collect2: ld returned 1 exit status
>>>make: *** [subversion/libsvn_subr/libsvn_subr-1.la] Error 1
>>>      
>>>
>>What does "./libtool --version" report?  Google suggests that you need
>>libtool 1.5 and I don't know what's in the tarball.  If you have a
>>suitable libtool/autoconf/autoheader installed then you could run
>>./autogen.sh before running ./configure.
>>    
>>
>
>Tarball ships with 1.3
>
>  
>

Actually, "./libtool --version" gives 1.4.3.  After autogen, "./libtool 
--version" gives 1.5.10.

I've run ./autogen.sh (after installing python) then ./configure then 
make.  However, this error is now produced:

$ make
...
cd subversion/libsvn_subr && /bin/bash 
/home/Colin/src/subversion-1.1.1/libtool --silent --mode=link gcc  -g 
-O2    -DNEON_ZLIB -DNEON_SSL   -rpath /usr/lib -o libsvn_subr-1.la 
-no-undefined auth.lo cmdline.lo config.lo config_auth.lo config_file.lo 
config_win.lo date.lo error.lo hash.lo io.lo md5.lo opt.lo path.lo 
pool.lo quoprint.lo sorts.lo stream.lo subst.lo svn_base64.lo 
svn_string.lo target.lo time.lo utf.lo utf_validate.lo validate.lo 
version.lo xml.lo /usr/lib/libaprutil-0.la -lgdbm -ldb-4.2 -lexpat 
-liconv /usr/lib/libapr-0.la -lcrypt -lintl
/home/Colin/src/subversion-1.1.1/libtool: line 1:  sed: command not found
make: *** [subversion/libsvn_subr/libsvn_subr-1.la] Error 127

Looks like it can't find sed.  However:

$ which sed
/usr/bin/sed

Any ideas?



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: undefined reference when compiling on cygwin

Posted by Ben Reser <be...@reser.org>.
On Mon, Oct 25, 2004 at 12:20:28AM +0100, Philip Martin wrote:
> Colin JN Breame <co...@breame.com> writes:
> 
> > /usr/lib/libcygwin.a(libcmain.o)(.text+0x7d): undefined reference to
> > `_WinMain@16'
> > collect2: ld returned 1 exit status
> > make: *** [subversion/libsvn_subr/libsvn_subr-1.la] Error 1
> 
> What does "./libtool --version" report?  Google suggests that you need
> libtool 1.5 and I don't know what's in the tarball.  If you have a
> suitable libtool/autoconf/autoheader installed then you could run
> ./autogen.sh before running ./configure.

Tarball ships with 1.3

-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: undefined reference when compiling on cygwin

Posted by Philip Martin <ph...@codematters.co.uk>.
Colin JN Breame <co...@breame.com> writes:

> /usr/lib/libcygwin.a(libcmain.o)(.text+0x7d): undefined reference to
> `_WinMain@16'
> collect2: ld returned 1 exit status
> make: *** [subversion/libsvn_subr/libsvn_subr-1.la] Error 1

What does "./libtool --version" report?  Google suggests that you need
libtool 1.5 and I don't know what's in the tarball.  If you have a
suitable libtool/autoconf/autoheader installed then you could run
./autogen.sh before running ./configure.

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org