-----Original Message-----
From: Stefan Hett [mailto:ste...@egosoft.com]
Sent: woensdag 22 april 2015 15:59
To: 'subversion'
Subject: building SVN trunk on Windows fails on python gen-make.py

Hi,

I just tried to build
https://svn.apache.org/repos/asf/subversion/branches/svn-mergeinfo-
normalizer
on Windows following the INSTALL file documentation up to the point
where the make file is being generated.

Using this call: python gen-make.py -t vcproj --with-zlib=..\zlib
--with-apr=..\apr --with-apr-util=..\apr-util --vsnet-version=2010
I'm now getting the following error:

Traceback (most recent call last):
    File "gen-make.py", line 325, in <module> main(conf, gentype,
skip_depends=skip, other_options=rest.list)
    File "gen-make.py", line 62, in main generator =
gen_module.Generator(fname, verfname, other_options)
    File "build\generator\gen_vcnet_vcproj.py", line 36, in __init__
'vcnet-vcproj')
    File "build\generator\gen_win.py", line 83, in __init__
self.find_libraries(True)
    File "build\generator\gen_win_dependencies.py", line 286, in
find_libraries self._find_apr()
    File "build\generator\gen_win_dependencies.py", line 395, in
_find_apr bin_files = os.listdir(dll_dir)
FileNotFoundError: [WinError 3] The system cannot find the path
specified: '..\\apr\\bin'

Looking at the apr-directory I downloaded/extracted, there's no
apr/bin-directory.
I downloaded the following APR-source package (1.5.1):
http://mirror.serversupportforum.de/apache//apr/apr-1.5.1-win32-src.zip

Did I get the wrong one? Or did I miss some step?
Subversion expects that you already build apr before using it as a source of 
binaries to link against. It is not going to build apr for you.

Building APR would have created this bin directory. (A patch to produce a nicer 
error message would be welcome :))


There are other scripts that may help you building Subversion and all 
dependencies. I maintain one such script as part of SharpSvn (Repository: 
https://ctf.open.collab.net/svn/repos/sharpsvn/trunk/imports ; username guest; 
no password). This script uses NAnt, and is used to produce the publicly 
available binaries for SharpSvn and SlikSvn.

Somewhere in the Subversion repository there is a perl script that should also 
be able to help with building on Windows, but I don't have experience with that 
script.

        Bert
As the saying goes "better later than never", as per ur suggestion, here's a patch which adds some better handling to detect user-errors when putting just the downloaded source of apr (and/or apr-util) into the specified folder. Suggested patch for trunk and nomination for 1.9 I guess.

[[[
Produce human readable error when APR/APR-util wasn't installed/configured correctly.

* build/generator/gen_win_dependencies.py
  (_find_apr,
_find_apr_util): Add detection for missing lib/dll directories, pointing to
                    an unconfigured/uninstalled source directory.
]]]

Regards,
Stefan
Index: gen_win_dependencies.py
===================================================================
--- gen_win_dependencies.py     (revision 1691913)
+++ gen_win_dependencies.py     (working copy)
@@ -401,6 +401,12 @@
         dll_dir = os.path.join(self.apr_path, 'bin')
         debug_dll_dir = None
 
+    if not lib_dir or not os.path.isdir(lib_dir) or \
+       dll_dir and not os.path.isdir(dll_dir):
+      sys.stderr.write("ERROR: 'apr biniares' not found.\n")
+      sys.stderr.write("Use '--with-apr' option to configure APR location and 
make sure to have APR properly configured/installed.\n")
+      sys.exit(1)
+
     extra_bin = []
 
     if dll_dir:
@@ -502,6 +508,12 @@
         dll_dir = os.path.join(self.apr_util_path, 'bin')
         debug_dll_dir = None
 
+    if not lib_dir or not os.path.isdir(lib_dir) or \
+       dll_dir and not os.path.isdir(dll_dir):
+      sys.stderr.write("ERROR: ' apr-util biniares' not found.\n")
+      sys.stderr.write("Use '--with-apr-util' option to configure APR-Util 
location and make sure to have APR-Util properly configured/installed.\n")
+      sys.exit(1)
+
     extra_bin = []
 
     if dll_dir:

Reply via email to