Sorry for the late response. Had to shift priorities the last month here, before I could get back to this issue.

Thanks for the additional information on ways to build SVN. I quickly skimmed through the scripts/steps and might use them later when I can't get the current steps to run...

After build APR myself, it got passed the previous error. However I'm now stuck with another one and can't make-up what's wrong now... Any hint (couldn't find any reference on google or in the mail archive):
swig not found; skipping SWIG file generation...
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 65, in main generator.compute_hdr_deps()
File "build\generator\gen_base.py", line 212, in compute_hdr_deps for include_file in include_deps.query(native_path(source.filename)): File "build\generator\gen_base.py", line 1167, in query c_includes, swig_includes = self.query_swig(fname) File "build\generator\gen_base.py", line 1150, in query_swig hdrs = self._scan_for_includes(fname) File "build\generator\gen_base.py", line 1203, in _scan_for_includes for line in fileinput.input(fname): File "E:\Python34\lib\fileinput.py", line 263, in __next__ line = self.readline() File "E:\Python34\lib\fileinput.py", line 363, in readline self._buffer = self._file.readlines(self._bufsize) File "E:\Python34\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 2116: character maps to <undefined>

Regards,
Stefan

On Wed, Apr 22, 2015 at 6:13 PM, Bert Huijben <b...@qqmail.nl> wrote:

-----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.

Indeed, that script is tools/dev/build-svn-deps-win.pl. But it's a bit
outdated now. I recently used bits and pieces of it to get myself a
new working build environment for svn on Windows. In general our tools
and documentation for building svn on Windows are quite outdated and
could really use some love. For instance, INSTALL still contains a lot
of old irrelevant information, it should primarily focus on current
tools that people install these days (e.g. focusing on VS 2012, 2013
and 2015).

With my last build-setup attempt, I kept a short log of what I did
(based on things from build-svn-deps-win.pl, and further trial and
error). Perhaps this is useful:

[[[
download awk95.exe and rename it to awk.exe and put somewhere in PATH
(as documented in INSTALL)
download and install:
- CMake
- SCons
- Python
- Perl

Install Visual Studio (I used 2013).

Download latest (or recent enough stable) sources of:
- zlib
- openssl
- sqlite
- serf
- httpd
- apr
- apr-util
- apr-iconv
- pcre

Extract these in a "deps" directory (I usually name the individual
dirs with the version number, so I have C:\svn\deps\httpd-2.4.12,
C:\svn\deps\zlib-1.2.8, ...).
Except: put apr, apr-util, apr-iconv and pcre as subdirectories
(without version number in the name) inside $HTTPD_SOURCE\srclib.

Then start building. Do all the following from inside a Visual Studio
Command Prompt:

zlib:
   For Debug build:
   set CC_OPTS=/MDd /Gm /ZI /Od /GZ /D_DEBUG
   set COMMON_CC_OPTS=/nologo /W3 /DWIN32 /D_WINDOWS

   For Release build:
   set CC_OPTS=/MD /02 /Zi
   set COMMON_CC_OPTS=/nologo /W3 /DWIN32 /D_WINDOWS

   Somehow, you need to make both a static build (for svn itself) and a
dynamic build (for serf):
   Static:
     nmake /nologo -f win32/Makefile.msc STATICLIB=zlibstat.lib all
   And for serf:
     nmake /nologo -f win32/Makefile.msc all

   unset CC_OPTS
   unset COMMON_CC_OPTS

PCRE:
   (replace RelWithDebInfo with Debug in the line below to make a debug build)
   cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
-DBUILD_SHARED_LIBS:BOOL=ON
-DCMAKE_INSTALL_PREFIX:PATH=C:\svn\deps\install
-DPCRE_NO_RECURSE:BOOL=ON .
   nmake
   nmake test
   nmake install

openssl:
   (replace VC-WIN32 with debug-VC-WIN32 to make a debug build)
   perl Configure no-asm --prefix=C:\svn\deps\install VC-WIN32
   call ms\do_ms
   nmake -f ms\ntdll.mak
   nmake -f ms\ntdll.mak test
   nmake -f ms\ntdll.mak install

httpd (+ apr, apr-util, apr-iconv):
   perl srclib\apr\build\lineends.pl
   perl srclib\apr\build\cvtdsp.pl -2005
   Strip cases of "/YuXXXX" en "/YcXXXX" from
srclib/apr-iconv/build/modules.mk.win
   Insert 
"<PropertyGroup><GenerateManifest>false</GenerateManifest></PropertyGroup>"
in support/win32/ApacheMonitor.vcxproj
   Insert "<PropertyGroup><TargetName>libapr-1</TargetName></PropertyGroup>"
in srclib/apr/libapr.vcxproj
   Insert "<PropertyGroup><TargetName>apr_ldap-1</TargetName></PropertyGroup>"
in srclib/aprutil/ldap/apr_ldap.vcxproj
   Insert 
"<PropertyGroup><TargetName>libapriconv-1</TargetName></PropertyGroup>"
in srclib/apr-iconv/libapriconv.vcxproj
   Insert "<PropertyGroup><TargetName>libaprutil-1</TargetName></PropertyGroup>"
in srclib/aprutil/libaprutil.vcxproj
   Applied fix from http://marc.info/?l=apr-dev&m=138386228311375&w=2
(see also https://www.apachelounge.com/viewtopic.php?t=6174) --
apparently otherwise there is a problem building httpd 2.4.10+ on
Windows 64-bit.

   For a debug build:
   nmake /f Makefile.win installd INSTDIR=C:\Apache24

   For a release build:
   nmake /f Makefile.win installr INSTDIR=C:\Apache24
   (for some reason, the build sometimes fails ... rerunning it usually
succeeds, don't know why)

serf:
   scons APR=..\httpd-2.4.12\srclib\apr
APU=..\httpd-2.4.12\srclib\apr-util OPENSSL=..\openssl-1.0.2
ZLIB=..\zlib-1.2.8
]]]

HTH,

Reply via email to