Re: [fossil-users] Compilation with SSL option fails on Win7

2014-09-29 Thread Joe Mistachkin

Tony Papadimitriou wrote:
 
 link /nologo /subsystem:console /opt:ref /debug 
 /out:out32\md4test.exe @C:\Users\Tony\AppData\Local\Temp\nm7D8C.tmp
 LINK : fatal error LNK1181: cannot open input file 'link.obj'
 NMAKE : fatal error U1077: 'C:\Program Files\Microsoft Visual Studio 
 12.0\VC\BIN\link.EXE' : return code '0x49d'
 Stop.
 NMAKE : fatal error U1077: 'pushd' : return code '0x2'
 Stop. 
 

I have not been able to reproduce this error message here.  It might
be useful to know the contents of that temporary file being used by
link.exe.  However, it can be difficult to read those since they
are typically deleted automatically.

 
 But then, I also tried without the new FOSSIL_BUILD_SSL=1 (only the 
 FOSSIL_ENABLE_SSL=1 option), and it built OK.  (I suppose you
 separated the build of SSL from the inclusion of SSL.)
 

I'm confused by this.  You saying that you freshly extract the OpenSSL
source code between attempts, yet you are able to build Fossil with
SSL support enabled without actually being able to build the OpenSSL
libraries?

 
 1. The problem is with the build process of SSL because using pre-built 
 libraries apparently works.
 

Actually, Fossil follows the official OpenSSL instructions for building
with MSVC.


 2. Both 32-bit and 64-bit Win7 behave the same in either case.


Odd, because prior to last night building OpenSSL for 64-bit Windows was
not supported by the Fossil MSVC makefile.

 
 3. Latest trunk version builds FOSSIL executable successfully but only if 
 the FOSSIL_BUILD-SSL is not given.
 

This strongly implies that you have some OpenSSL libraries built and lurking
around somewhere.

 
 So, if you manage to build on your machine with the FOSSIL_BUILD_SSL=1 
 option, then apparently there must be some component(s) missing on mine.
I 
 have:
 

Possibly, but I cannot imagine what components that might be.  I've been
able
to build Fossil with OpenSSL enabled on a completely fresh box using
Visual
Studio 2013 Express, ActivePerl, and the OpenSSL source code.

--
Joe Mistachkin

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Compilation with SSL option fails on Win7

2014-09-29 Thread Stephan Beal
On Mon, Sep 29, 2014 at 5:05 PM, Joe Mistachkin sql...@mistachkin.com
wrote:

 Tony Papadimitriou wrote:
  NMAKE : fatal error U1077: 'pushd' : return code '0x2'
  Stop.
 


Pure speculation: is it a side-effect of the missing pushd, causing it not
to be able to (A) change dirs and (B) find the file(s) it expects in those
dirs (because (A) failed)?

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do. -- Bigby Wolf
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Compilation with SSL option fails on Win7

2014-09-29 Thread Joe Mistachkin

Stephan Beal wrote:
 
 Pure speculation: is it a side-effect of the missing pushd, causing it not
to
 be able to (A) change dirs and (B) find the file(s) it expects in those
dirs
 (because (A) failed)? 
 

Great catch.  The MSVC makefile is designed to be used from the directory it
is
contained in.  This should now be more strongly enforced, here:

https://www.fossil-scm.org/index.html/info/86de8cbeb5

--
Joe Mistachkin

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Compilation with SSL option fails on Win7

2014-09-29 Thread tonyp
I'm afraid several changes were made that were not directly related to the 
problem I was having at all, even if they may have added greater robustness 
to the build process.
(BTW, I always did NMAKE from within the win subdirectory that contains the 
makefile.msc so that was definitely not part of my problem.)


In trying to narrow down the problem, I tried compiling openssl by itself, 
outside of fossil.

(https://www.openssl.org/source/openssl-1.0.1i.tar.gz)
I followed their README.W32 steps, i.e.:

path c:\perl\bin;%path%
(I have to do this because I don't care to have PERL's path permanently 
installed)


perl Configure VC-WIN32 --prefix=\temp
ms\do_ms.bat
nmake -f ms\ntdll.mak

and I still got that same error (about link.obj missing).

So, the problem seems to be contained entirely within the openssl library 
build process, and not within FOSSIL makefiles.


So, it has to be something in the compiler configuration.  And I think I got 
it but without knowing why, however.  It's in the vc_xp.bat that runs in 
addition to vcvarsall.bat

file when setting up the MSVC paths etc.

vc_xp.bat is needed to add compatibility for WinXP targeting in the produced 
EXE/DLLs which by default is lacking in my version of MSVC.  Without it, the 
produced EXEs will not run on XP machines.  So, I tend to use it all the 
time.


vc_cp.bat contents:

@set INCLUDE=%ProgramFiles(x86)%\Microsoft 
SDKs\Windows\7.1A\Include;%INCLUDE%

@set PATH=%ProgramFiles(x86)%\Microsoft SDKs\Windows\7.1A\Bin;%PATH%
@set LIB=%ProgramFiles(x86)%\Microsoft SDKs\Windows\7.1A\Lib;%LIB%
@set CL=/D_USING_V110_SDK71_;%CL%
@set LINK=/SUBSYSTEM:CONSOLE,5.01 %LINK%

From this whole thing, the problem is the final line (with either 5.01 for 
32-bit, or 5.02 for 64-bit systems).  When removed, openssl compiles 
correctly, and so does fossil with SSL support.


This extra configuration (which requires the installation of some extra SDK 
from MS) comes from Microsoft's knowledge base, and assumed correct.  It 
never caused me any problems in compiling a variety of other applications, 
including SQLite, and Fossil (but when built without SSL support.) 
Apparently, however, it creates some incompatibility with the building of 
the openssl library.


This also explains why you couldn't reproduce the problem.

Thanks for all your work.

-Original Message- 
From: Joe Mistachkin

Sent: Monday, September 29, 2014 6:39 PM
To: 'Fossil SCM user's discussion'
Subject: Re: [fossil-users] Compilation with SSL option fails on Win7


Stephan Beal wrote:


Pure speculation: is it a side-effect of the missing pushd, causing it not

to

be able to (A) change dirs and (B) find the file(s) it expects in those

dirs

(because (A) failed)?



Great catch.  The MSVC makefile is designed to be used from the directory it
is
contained in.  This should now be more strongly enforced, here:

https://www.fossil-scm.org/index.html/info/86de8cbeb5

--
Joe Mistachkin

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users 


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Compilation with SSL option fails on Win7

2014-09-28 Thread tonyp

Update (if it helps):

The problem appears in the latest trunk version [e061a675e6].

I also tried with an earlier version [ee46563cbd], and it worked OK.  But 
the latest trunk fails consistently, so something must have broken in 
between these two.


-Original Message- 
From: to...@acm.org

Sent: Sunday, September 28, 2014 8:44 PM
To: Fossil SCM user's discussion
Subject: [fossil-users] Compilation with SSL option fails on Win7

Here's what I do:

(I have installed the latest perl - Strawberry Perl, and I have installed
openssl-1.0.1i.tar.gz under the compat subdirectory)

Then (with MSVC) I do:

nmake -f Makefile.msc FOSSIL_ENABLE_SSL=1

and after some successful work, it halts with this message:

--
C:\temp\compat\openssl-1.0.1iperl util\mkdef.pl 32 ssleay
1ms\ssleay32.def

Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation.  All rights reserved.

Building OpenSSL
   perl util/copy.pl .\crypto\buildinf.h tmp32\buildinf.h
Copying: ./crypto/buildinf.h to tmp32/buildinf.h
   perl util/copy.pl .\crypto\opensslconf.h
inc32\openssl\opensslconf.h

Copying: ./crypto/opensslconf.h to inc32/openssl/opensslconf.h
   link /nologo /subsystem:console /opt:ref /debug
/out:out32\md4test.exe @
C:\Users\Tony\AppData\Local\Temp\nmCE0C.tmp
LINK : fatal error LNK1181: cannot open input file 'link.obj'
NMAKE : fatal error U1077: 'C:\Program Files (x86)\Microsoft Visual Studio
12.0
\VC\BIN\link.EXE' : return code '0x49d'
Stop.
NMAKE : fatal error U1077: 'pushd' : return code '0x2'
Stop.
--

Any ideas what's missing (link.obj apparently but why?) or misconfigured?

TIA

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users 


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Compilation with SSL option fails on Win7

2014-09-28 Thread Joe Mistachkin

to...@acm.org wrote:
 
 (I have installed the latest perl - Strawberry Perl, and I have installed 
 openssl-1.0.1i.tar.gz under the compat subdirectory)
 

I suspect this may have to do with the line-endings in the OpenSSL files.

Please try again with ActiveState Perl and let us know if that fixes the
issue.

The PERLDIR=C:\path\to\ActiveState\Perl\bin can be used to force the build
process to use that installed instance of Perl; however, for the Command
Prompt Window being used to compile Fossil, you will also want to make sure
that none of the Strawberry Perl binary directories are located in the PATH.

--
Joe Mistachkin

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Compilation with SSL option fails on Win7

2014-09-28 Thread tonyp

Nope!  The same exact error.

I uninstalled StraberryPerl before installing ActivePerl.

So, the problem is elsewhere.  Also, as I mentioned in the follow-up email:

The problem appears in the latest trunk version [e061a675e6].

When I tried with an earlier version [ee46563cbd], it worked OK.  Since the 
latest trunk fails consistently (regardless of Perl version used), something 
must have broken sometime in between these two check-ins.


-Original Message- 
From: Joe Mistachkin

Sent: Sunday, September 28, 2014 9:16 PM
To: 'Fossil SCM user's discussion'
Subject: Re: [fossil-users] Compilation with SSL option fails on Win7


to...@acm.org wrote:


(I have installed the latest perl - Strawberry Perl, and I have installed
openssl-1.0.1i.tar.gz under the compat subdirectory)



I suspect this may have to do with the line-endings in the OpenSSL files.

Please try again with ActiveState Perl and let us know if that fixes the
issue.

The PERLDIR=C:\path\to\ActiveState\Perl\bin can be used to force the build
process to use that installed instance of Perl; however, for the Command
Prompt Window being used to compile Fossil, you will also want to make sure
that none of the Strawberry Perl binary directories are located in the PATH.

--
Joe Mistachkin

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users 


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Compilation with SSL option fails on Win7

2014-09-28 Thread Joe Mistachkin

to...@acm.org wrote:
 
 When I tried with an earlier version [ee46563cbd], it worked OK.  Since
the 
 latest trunk fails consistently (regardless of Perl version used),
something 
 must have broken sometime in between these two check-ins. 
 

That version ([ee46563cbd]) makes no attempt to automatically build OpenSSL;
therefore, it relies on the OpenSSL libraries already being built.

I'm unable to replicate this issue here locally and I just built an SSL
enabled
Fossil binary here with MSVC (yesterday).

Are you building for x86 or x64?  I suspect the current Makefile.msc will
only
work for x86 builds.  I'll look into fixing that.

--
Joe Mistachkin

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Compilation with SSL option fails on Win7

2014-09-28 Thread tonyp
I'm building on Win7 64-bit.  Tomorrow, at work, I can try again on a Win7 
32-bit, and see if that makes a difference.


Version [ee46563cbd] built without any errors, and apparently has SSL 
support (much larger file size, and an attempt to connect to an HTTPS server 
did not produce errors about missing SSL support).
So, the question is, if that older version relies on pre-built SSL 
libraries, where does it find them?  And, why can't I do the same (use these 
pre-built SSL libraries) when building the latest trunk version?


-Original Message- 
From: Joe Mistachkin

Sent: Sunday, September 28, 2014 10:44 PM
To: 'Fossil SCM user's discussion'
Subject: Re: [fossil-users] Compilation with SSL option fails on Win7


to...@acm.org wrote:


When I tried with an earlier version [ee46563cbd], it worked OK.  Since

the

latest trunk fails consistently (regardless of Perl version used),

something

must have broken sometime in between these two check-ins.



That version ([ee46563cbd]) makes no attempt to automatically build OpenSSL;
therefore, it relies on the OpenSSL libraries already being built.

I'm unable to replicate this issue here locally and I just built an SSL
enabled
Fossil binary here with MSVC (yesterday).

Are you building for x86 or x64?  I suspect the current Makefile.msc will
only
work for x86 builds.  I'll look into fixing that.

--
Joe Mistachkin

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users 


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Compilation with SSL option fails on Win7

2014-09-28 Thread Joe Mistachkin

to...@acm.org wrote:

 I'm building on Win7 64-bit.  Tomorrow, at work, I can try again on a Win7

 32-bit, and see if that makes a difference.
 

Ok, that explains it.  I had not tested x64 compilation with SSL enabled
prior
to today.  Thanks for the report.

Please try again with the latest trunk.

--
Joe Mistachkin

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Compilation with SSL option fails on Win7

2014-09-28 Thread Joe Mistachkin

As of the very latest trunk [80b4adddec], you'll also need to add the
following
to the command lines:

FOSSIL_BUILD_SSL=1

--
Joe Mistachkin

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users