You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by void pointer <rc...@gmail.com> on 2008/12/04 05:53:10 UTC

Linker errors on MSVC9

Hi,

When I'm compiling the subversion API, I get the following linker errors:

svn_ra-1.lib(ra_loader.obj) : error LNK2001: unresolved external symbol
_svn_ra_serf_init
svn_ra-1.lib(ra_loader.obj) : error LNK2001: unresolved external symbol
_svn_ra_serf__init
svn_ra-1.lib(ra_loader.obj) : error LNK2001: unresolved external symbol
_svn_ra_local_init
svn_ra-1.lib(ra_loader.obj) : error LNK2001: unresolved external symbol
_svn_ra_local__init
svn_ra-1.lib(ra_loader.obj) : error LNK2001: unresolved external symbol
_svn_ra_svn_init
svn_ra-1.lib(ra_loader.obj) : error LNK2001: unresolved external symbol
_svn_ra_svn__init
svn_ra-1.lib(ra_loader.obj) : error LNK2001: unresolved external symbol
_svn_ra_dav_init
svn_ra-1.lib(ra_loader.obj) : error LNK2001: unresolved external symbol
_svn_ra_neon__init

What library can these symbols be found in and where can I find the
precompiled binary for it for Windows? Thanks.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=979293

Re: Problem in function in_skipped_tree of libsvn_wc\update_editor.c

Posted by Julian Foad <ju...@btopenworld.com>.
On Thu, 2008-12-04 at 16:53 +0000, Julian Foad wrote:
> On Thu, 2008-12-04 at 15:50 +0100, Marc Haesen wrote:
> > When running the following script in c:\ in windows I get an endless
> > loop during the last svn update command until I get an out of memory
> > error:
[...]
> I am currently fixing it.

Fixed (using your second way) in r34557.

- Julian


> > svnadmin create repos
> > 
> > svn co file:///repos wc1
> > 
> > cd wc1
> > 
> > svn mkdir dir1
> > 
> > svn -m "1" commit
> > 
> > cd dir1
> > 
> > echo line1 > file1.c
> > 
> > echo line2 >> file1.c
> > 
> > svn add file1.c
> > 
> > cd ..
> > 
> > svn -m"1" commit
> > 
> > cd dir1
> > 
> > svn up \wc1
> > 
> > I have debugged the problem and the endless loop is inside the
> > in_skipped_tree function of libsvn_wc/update_editor.c
> > 
> > The reason is the svn_path_dirname function with “/” as input returns
> > the same path “/”, causing an endless loop. Upon function entry, the
> > path is “/wc1/dir1”
> > 
> > There are 2 ways to fix the problem:
> > 
> > -         make sure svn_path_dirname returns an empty string with “/”
> > as input
> > 
> > -         replace the loop test while (! svn_path_is_empty(path)) by
> > while (! svn_path_is_empty(path) && strcmp(path,"/"))
> 
> > I have used revision 34550 of trunk on windows.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=979738

Re: Problem in function in_skipped_tree of libsvn_wc\update_editor.c

Posted by Julian Foad <ju...@btopenworld.com>.
On Thu, 2008-12-04 at 15:50 +0100, Marc Haesen wrote:
> When running the following script in c:\ in windows I get an endless
> loop during the last svn update command until I get an out of memory
> error:

Marc,

Thank you very much for reporting this problem and for debugging it.

I am currently fixing it.

- Julian


> svnadmin create repos
> 
> svn co file:///repos wc1
> 
> cd wc1
> 
> svn mkdir dir1
> 
> svn -m "1" commit
> 
> cd dir1
> 
> echo line1 > file1.c
> 
> echo line2 >> file1.c
> 
> svn add file1.c
> 
> cd ..
> 
> svn -m"1" commit
> 
> cd dir1
> 
> svn up \wc1
> 
> I have debugged the problem and the endless loop is inside the
> in_skipped_tree function of libsvn_wc/update_editor.c
> 
> The reason is the svn_path_dirname function with “/” as input returns
> the same path “/”, causing an endless loop. Upon function entry, the
> path is “/wc1/dir1”
> 
> There are 2 ways to fix the problem:
> 
> -         make sure svn_path_dirname returns an empty string with “/”
> as input
> 
> -         replace the loop test while (! svn_path_is_empty(path)) by
> while (! svn_path_is_empty(path) && strcmp(path,"/"))

> I have used revision 34550 of trunk on windows.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=979721

Problem in function in_skipped_tree of libsvn_wc\update_editor.c

Posted by Marc Haesen <Ma...@oneaccess-net.com>.
When running the following script in c:\ in windows I get an endless
loop during the last svn update command until I get an out of memory
error:

svnadmin create repos

svn co file:///repos wc1

cd wc1

svn mkdir dir1

svn -m "1" commit

cd dir1

echo line1 > file1.c

echo line2 >> file1.c

svn add file1.c

cd ..

svn -m"1" commit

cd dir1

svn up \wc1

 

I have debugged the problem and the endless loop is inside the
in_skipped_tree function of libsvn_wc/update_editor.c

The reason is the svn_path_dirname function with "/" as input returns
the same path "/", causing an endless loop. Upon function entry, the
path is "/wc1/dir1"

 

There are 2 ways to fix the problem:

-          make sure svn_path_dirname returns an empty string with "/"
as input

-          replace the loop test while (! svn_path_is_empty(path)) by
while (! svn_path_is_empty(path) && strcmp(path,"/"))

 

I have used revision 34550 of trunk on windows.

 

 

Regards,

Marc

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=979646

Re: Linker errors on MSVC9

Posted by "D.J. Heap" <dj...@gmail.com>.
On Thu, Dec 4, 2008 at 12:56 PM, Robert Dailey <rc...@gmail.com> wrote:
> On Thu, Dec 4, 2008 at 1:53 PM, D.J. Heap <dj...@gmail.com> wrote:
>>
>> You are building a program that uses the Subversion API's, correct?
>>
>> I don't know why those API's are missing from the libraries and I'll
>> look at it when I can (I suspect they aren't being exported correctly
>> or something), but is there a specific reason you want to use the
>> static libraries rather than the libsvn_* dynamic link libraries?
>>
>> The dynamic link libraries are much more commonly used and are quite a
>> bit easier to deal with although you may have to deploy the Subversion
>> (and support) dll's with your program if you can't depend on an
>> existing Subversion installation.
>
> The DLLs for the libsvn_ import libraries were not packaged with the svn
> 1.5.4 win32 package I downloaded, which contained precompiled binaries for
> SVN API as well as apr, neon, and its other dependencies. This is why I use
> the static libs.
>


The corresponding dll's are in the main binary zip that goes along
with the dev zip.  The zips are segregated to minimize what people
need to download -- if you aren't going to build an app based on
Subversion then you shouldn't need to download all the headers,
libraries, symbols, etc.

DJ

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=979814

Re: Linker errors on MSVC9

Posted by void pointer <rc...@gmail.com>.
On Thu, Dec 4, 2008 at 1:53 PM, D.J. Heap <dj...@gmail.com> wrote:
>
> You are building a program that uses the Subversion API's, correct?
>
> I don't know why those API's are missing from the libraries and I'll
> look at it when I can (I suspect they aren't being exported correctly
> or something), but is there a specific reason you want to use the
> static libraries rather than the libsvn_* dynamic link libraries?
>
> The dynamic link libraries are much more commonly used and are quite a
> bit easier to deal with although you may have to deploy the Subversion
> (and support) dll's with your program if you can't depend on an
> existing Subversion installation.


The DLLs for the libsvn_ import libraries were not packaged with the svn
1.5.4 win32 package I downloaded, which contained precompiled binaries for
SVN API as well as apr, neon, and its other dependencies. This is why I use
the static libs.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=979790

Re: Linker errors on MSVC9

Posted by void pointer <rc...@gmail.com>.
2008/12/4 D.J. Heap <dj...@gmail.com>
>
> I don't think these static libraries are built on Windows -- they are
> folded into svn_ra-1.lib, I think.  I'm not sure, though, I haven't
> looked closely at the static libraries in a long time.


I'll probably use the import libraries at this point, since they appear to
be the most commonly used. Thanks for the help guys.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=979819

Re: Linker errors on MSVC9

Posted by "D.J. Heap" <dj...@gmail.com>.
On Thu, Dec 4, 2008 at 1:31 PM, Branko Čibej <br...@xbc.nu> wrote:
[snip]
>
> Just as I foretold. You're not linking svn_ra_local, svn_ra_neon,
> svn_ra_svn, svn_ra_serf.
>


I don't think these static libraries are built on Windows -- they are
folded into svn_ra-1.lib, I think.  I'm not sure, though, I haven't
looked closely at the static libraries in a long time.

DJ

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=979816

Re: Linker errors on MSVC9

Posted by void pointer <rc...@gmail.com>.
2008/12/4 Robert Dailey <rc...@gmail.com>

> On Thu, Dec 4, 2008 at 2:31 PM, Branko Čibej <br...@xbc.nu> wrote:
>
>> Robert Dailey wrote:
>> >  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib
>> > oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
>> > boost_system-mt-gd.lib svn_client-1.lib svn_delta-1.lib svn_diff-1.lib
>> > svn_fs-1.lib svn_ra-1.lib svn_repos-1.lib svn_subr-1.lib svn_wc-1.lib
>> > libapr.lib intl3_svn.lib libapriconv.lib libaprutil.lib xml.lib
>> > libneon.lib zlibstat.lib libsasl.lib serf.lib
>>
>> Just as I foretold. You're not linking svn_ra_local, svn_ra_neon,
>> svn_ra_svn, svn_ra_serf.
>
>
> I do not have these libraries. Where can I download them for windows? These
> were not part of the SVN Win32 1.5.4 zip file I downloaded!
>

Correction, I have the libsvn_ra_* files, but not the svn_ra_* files (static
libraries). I need the static versions of these libraries.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=979813

Re: Linker errors on MSVC9

Posted by void pointer <rc...@gmail.com>.
On Thu, Dec 4, 2008 at 6:43 PM, Branko Čibej <br...@xbc.nu> wrote:

> That's strange, they were part of the SVN Win32 1.5.4 zip file that *I*
> downloaded. I expect you did use the development package?


Indeed, I did download the dev package. I simply assumed that would be the
correct one for me since I plan to be using it for development. Thanks for
the help everyone.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=979889

Re: Linker errors on MSVC9

Posted by Branko Cibej <br...@xbc.nu>.
D.J. Heap wrote:
> On Thu, Dec 4, 2008 at 5:43 PM, Branko Čibej <br...@xbc.nu> wrote:
>   
>> Robert Dailey wrote:
>>     
>>> On Thu, Dec 4, 2008 at 2:31 PM, Branko Čibej <brane@xbc.nu
>>> <ma...@xbc.nu>> wrote:
>>>       
> [snip]
>   
>>>     Just as I foretold. You're not linking svn_ra_local, svn_ra_neon,
>>>     svn_ra_svn, svn_ra_serf.
>>>
>>>
>>> I do not have these libraries. Where can I download them for windows?
>>> These were not part of the SVN Win32 1.5.4 zip file I downloaded!
>>>       
>> That's strange, they were part of the SVN Win32 1.5.4 zip file that *I*
>> downloaded. I expect you did use the development package?
>>     
>
>
> Are you talking about the static libraries?  I don't see any static
> libraries with those names either in the zip or in the release tree I
> just built...
>
> I can't get a simple client to statically link Subversion anymore,
> either, due to the same missing symbols.  Linking to the dynamic
> import libraries works fine.  I'm obviously missing something...
>   

No, you're right, I mixed up the static and the import libraries. So the
Windows static build is broken now? That's most peculiar.

-- Brane

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=979899

Re: Linker errors on MSVC9

Posted by "D.J. Heap" <dj...@gmail.com>.
On Thu, Dec 4, 2008 at 5:43 PM, Branko Čibej <br...@xbc.nu> wrote:
> Robert Dailey wrote:
>> On Thu, Dec 4, 2008 at 2:31 PM, Branko Čibej <brane@xbc.nu
>> <ma...@xbc.nu>> wrote:
[snip]
>>     Just as I foretold. You're not linking svn_ra_local, svn_ra_neon,
>>     svn_ra_svn, svn_ra_serf.
>>
>>
>> I do not have these libraries. Where can I download them for windows?
>> These were not part of the SVN Win32 1.5.4 zip file I downloaded!
>
> That's strange, they were part of the SVN Win32 1.5.4 zip file that *I*
> downloaded. I expect you did use the development package?


Are you talking about the static libraries?  I don't see any static
libraries with those names either in the zip or in the release tree I
just built...

I can't get a simple client to statically link Subversion anymore,
either, due to the same missing symbols.  Linking to the dynamic
import libraries works fine.  I'm obviously missing something...

DJ

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=979895

Re: Linker errors on MSVC9

Posted by Branko Cibej <br...@xbc.nu>.
Robert Dailey wrote:
> On Thu, Dec 4, 2008 at 2:31 PM, Branko Čibej <brane@xbc.nu
> <ma...@xbc.nu>> wrote:
>
>     Robert Dailey wrote:
>     >  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib
>     ole32.lib
>     > oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
>     > boost_system-mt-gd.lib svn_client-1.lib svn_delta-1.lib
>     svn_diff-1.lib
>     > svn_fs-1.lib svn_ra-1.lib svn_repos-1.lib svn_subr-1.lib
>     svn_wc-1.lib
>     > libapr.lib intl3_svn.lib libapriconv.lib libaprutil.lib xml.lib
>     > libneon.lib zlibstat.lib libsasl.lib serf.lib
>
>     Just as I foretold. You're not linking svn_ra_local, svn_ra_neon,
>     svn_ra_svn, svn_ra_serf.
>
>
> I do not have these libraries. Where can I download them for windows?
> These were not part of the SVN Win32 1.5.4 zip file I downloaded!

That's strange, they were part of the SVN Win32 1.5.4 zip file that *I*
downloaded. I expect you did use the development package?

-- Brane

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=979888

Re: Linker errors on MSVC9

Posted by void pointer <rc...@gmail.com>.
On Thu, Dec 4, 2008 at 2:31 PM, Branko Čibej <br...@xbc.nu> wrote:

> Robert Dailey wrote:
> >  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib
> > oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
> > boost_system-mt-gd.lib svn_client-1.lib svn_delta-1.lib svn_diff-1.lib
> > svn_fs-1.lib svn_ra-1.lib svn_repos-1.lib svn_subr-1.lib svn_wc-1.lib
> > libapr.lib intl3_svn.lib libapriconv.lib libaprutil.lib xml.lib
> > libneon.lib zlibstat.lib libsasl.lib serf.lib
>
> Just as I foretold. You're not linking svn_ra_local, svn_ra_neon,
> svn_ra_svn, svn_ra_serf.


I do not have these libraries. Where can I download them for windows? These
were not part of the SVN Win32 1.5.4 zip file I downloaded!

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=979812

Re: Linker errors on MSVC9

Posted by Branko Cibej <br...@xbc.nu>.
Robert Dailey wrote:
>  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib
> oleaut32.lib uuid.lib comdlg32.lib advapi32.lib 
> boost_system-mt-gd.lib svn_client-1.lib svn_delta-1.lib svn_diff-1.lib
> svn_fs-1.lib svn_ra-1.lib svn_repos-1.lib svn_subr-1.lib svn_wc-1.lib
> libapr.lib intl3_svn.lib libapriconv.lib libaprutil.lib xml.lib
> libneon.lib zlibstat.lib libsasl.lib serf.lib 

Just as I foretold. You're not linking svn_ra_local, svn_ra_neon,
svn_ra_svn, svn_ra_serf.

-- Brane

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=979811

Re: Linker errors on MSVC9

Posted by void pointer <rc...@gmail.com>.
On Thu, Dec 4, 2008 at 1:58 PM, Branko Čibej <br...@xbc.nu> wrote:

> I very much doubt that's the case for the static libs; it's more
> probable that the DLL exports aren't complete.
>
> The most probable explanation is that he's not linking with some of the
> required libraries. Not surprisingly, this is svn_ra.lib looking for
> init functions in the specific RA implementation libraries.
>
> And "void pointer", for future reference ... posting linker errors
> without also showing your link command line is less than optimal. :)


Here is my link command, it's rather long. This is for MSVC9:

/OUT:"C:\IT\personal\HareSVN\Debug\HareSVN.exe" /VERSION:0.0 /INCREMENTAL
/NOLOGO /LIBPATH:"third_party\boost\lib\Debug"
/LIBPATH:"third_party\boost\lib"
/LIBPATH:"third_party\wxWidgets\lib\vc_lib\Debug"
/LIBPATH:"third_party\wxWidgets\lib\vc_lib"
/LIBPATH:"third_party\svn\lib\Debug" /LIBPATH:"third_party\svn\lib"
/LIBPATH:"third_party\apr\lib\Debug" /LIBPATH:"third_party\apr\lib"
/LIBPATH:"third_party\apr-util\lib\Debug"
/LIBPATH:"third_party\apr-util\lib"
/LIBPATH:"third_party\apr-iconv\lib\Debug"
/LIBPATH:"third_party\apr-iconv\lib" /LIBPATH:"third_party\neon\Debug"
/LIBPATH:"third_party\neon" /LIBPATH:"third_party\sasl\Debug"
/LIBPATH:"third_party\sasl" /LIBPATH:"third_party\serf\Debug"
/LIBPATH:"third_party\serf" /LIBPATH:"third_party\libintl\lib\Debug"
/LIBPATH:"third_party\libintl\lib" /MANIFEST
/MANIFESTFILE:"HareSVN.dir\Debug\HareSVN.exe.intermediate.manifest"
/MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG
/PDB:"C:/IT/personal/HareSVN/Debug/HareSVN.pdb" /SUBSYSTEM:CONSOLE
/DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\IT\personal\HareSVN\Debug\HareSVN.lib"
/ERRORREPORT:PROMPT kernel32.lib user32.lib gdi32.lib winspool.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
boost_system-mt-gd.lib svn_client-1.lib svn_delta-1.lib svn_diff-1.lib
svn_fs-1.lib svn_ra-1.lib svn_repos-1.lib svn_subr-1.lib svn_wc-1.lib
libapr.lib intl3_svn.lib libapriconv.lib libaprutil.lib xml.lib libneon.lib
zlibstat.lib libsasl.lib serf.lib wxbase28ud.lib wxbase28ud_net.lib
wxbase28ud_odbc.lib wxbase28ud_xml.lib wxexpatd.lib wxjpegd.lib
wxmsw28ud_adv.lib wxmsw28ud_aui.lib wxmsw28ud_core.lib wxmsw28ud_dbgrid.lib
wxmsw28ud_gl.lib wxmsw28ud_html.lib wxmsw28ud_media.lib wxmsw28ud_qa.lib
wxmsw28ud_richtext.lib wxmsw28ud_xrc.lib wxpngd.lib wxregexud.lib
wxtiffd.lib wxzlibd.lib comctl32.lib rpcrt4.lib

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=979804

Re: Linker errors on MSVC9

Posted by Branko Cibej <br...@xbc.nu>.
D.J. Heap wrote:
> On Wed, Dec 3, 2008 at 10:53 PM, void pointer <rc...@gmail.com> wrote:
>   
>> Hi,
>>
>> When I'm compiling the subversion API, I get the following linker errors:
>>
>> svn_ra-1.lib(ra_loader.obj) : error LNK2001: unresolved external symbol
>> _svn_ra_serf_init
>>     
> [snip]
>   
>> What library can these symbols be found in and where can I find the
>> precompiled binary for it for Windows? Thanks.
>>
>>     
>
>
> You are building a program that uses the Subversion API's, correct?
>
> I don't know why those API's are missing from the libraries and I'll
> look at it when I can (I suspect they aren't being exported correctly
> or something),

I very much doubt that's the case for the static libs; it's more
probable that the DLL exports aren't complete.

The most probable explanation is that he's not linking with some of the
required libraries. Not surprisingly, this is svn_ra.lib looking for
init functions in the specific RA implementation libraries.

And "void pointer", for future reference ... posting linker errors
without also showing your link command line is less than optimal. :)

-- Brane

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=979793

Re: Linker errors on MSVC9

Posted by "D.J. Heap" <dj...@gmail.com>.
On Wed, Dec 3, 2008 at 10:53 PM, void pointer <rc...@gmail.com> wrote:
> Hi,
>
> When I'm compiling the subversion API, I get the following linker errors:
>
> svn_ra-1.lib(ra_loader.obj) : error LNK2001: unresolved external symbol
> _svn_ra_serf_init
[snip]
>
> What library can these symbols be found in and where can I find the
> precompiled binary for it for Windows? Thanks.
>


You are building a program that uses the Subversion API's, correct?

I don't know why those API's are missing from the libraries and I'll
look at it when I can (I suspect they aren't being exported correctly
or something), but is there a specific reason you want to use the
static libraries rather than the libsvn_* dynamic link libraries?

The dynamic link libraries are much more commonly used and are quite a
bit easier to deal with although you may have to deploy the Subversion
(and support) dll's with your program if you can't depend on an
existing Subversion installation.

DJ

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=979788