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

1.9/trunk build errors when building without OpenSSL

From: Stefan Hett <stefan_at_egosoft.com>
Date: Mon, 20 Jul 2015 16:20:02 +0200


following several hours of investigation and discussion on IRC with
danielsh, philipm and bert I believe there to be some issue in the build
generator for Windows.

Running the python command:
python gen-make.py -t vcproj --with-zlib=..\zlib --with-apr=..\apr
--with-apr-util=..\apr-util --vsnet-version=2010

followed by building (using VS 2010 SP1):
msbuild subversion_vcnet.sln /t:__ALL_TESTS__ /p:Configuration=Release

I get 8 project errors:
- libsvn_ra_dll: LINK : fatal error LNK1181: cannot open input file
- test_client: LINK : fatal error LNK1181: cannot open input file
- conflict-data-test: LINK : fatal error LNK1181: cannot open input file
- some more tests - all with ssleay32.lib missing

ssleay32.lib is an OpenSSL library specified in build.conf in the
openssl-section alongside libeay32.lib for the "msvc-libs"-option.

Looking at the generated libsvn_ra_dll.vcxproj-file actually shows the
additional linker dependencies being set to:

IMHO this is wrong. I'm explicitly building without OpenSSL as well as
without serf and still these OpenSSL/Serf librarie references are being
generated in the project files.

Taken from build.conf:
libsvn_ra specifies "ra_libs" as a libs dependency and "ra-libs"
specifies "libsvn_ra_serf" as a libs-dependency which then specifies
"serf" as a lib-dependency which defines msvc-libs as secur32.lib.
"serf" then also defines "openssl" as the dependency which in effect
takes ssleay32.lib and libeay32.lib as the setting for msvc-libs.

gen_win.py:get_win_libs: takes the msvc-libs conditionless as the
required dependencies *UNLESS* the target specifies msvc_static (in
which case get_win_libs returns an empty array).

Originally my thought was that the generated dependency tree should be
adjusted so it correctly reflects the build-parameter-state (aka: drop
serf/openSSL completely) but danielsh clarified to me that he believes
the issue rather to be in the part generating the project output since
the dependency tree should simply reflect exactly what is specified in
the build.conf-file.

So I guess that the issue is located in gen_win.py:get_win_libs() not
omitting the libraries, if these are not specified by the gen-make commands.

I've tested the attached patch and with that applied, running the two
build commands stated above succeed with no errors (also verified that
the generated project files then no longer contain the lib-references).
However, I'm not 100% convinced yet that this is the correct approach or
whether some more generic solution would be more suitable (aka one which
would handle any optional library not present and the corresponding
entry in the build dependency tree).
Given that there's already another special case command omitting the
ra-serf-install target if "serf" is not found, I guess the patch might
be acceptable though.
Nevertheless, I think some SVN developer is better of with providing
more input on this so to find the right solution.

(note: the issue also exists in 1.9 and currently results in the fact
that building without OpenSSL fails on Windows - assuming this is not a
problem in 1.8, it's a regression of 1.9 compared to 1.8).


Received on 2015-07-20 16:20:20 CEST

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