You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Jon Foster <jo...@jon-foster.co.uk> on 2004/05/01 17:42:30 UTC
Re: Win32 neon build error (Spaces in path)
Hi,
D.J. Heap wrote:
> Can you try fixing it with quoting and posting a patch?
I tried, but I now believe it's impossible. The Neon makefile is
just too broken. I just posted a couple of patches to the Neon
list; if they get accepted then I'll provide the corresponding
fixes to Subversion.
Kind regards,
Jon Foster
D.J. Heap wrote:
> Jon Foster wrote:
>
>> Hi all,
>>
>> I've just built the Subversion trunk under Windows 2000, with MS Visual
>> Studio .NET 2002. When building neon, the VS project runs
>> build_neon.bat.
>> This gave the error message:
>>
>> > Performing Makefile project actions
>> > nmake /f neon.mak ALL EXPAT_FLAGS="/I
>> >>> D:\My
>> Documents\Jon\Prog\Subversion\Work\Subversion\apr-util/xml/expat/lib
>> >>> /D HAVE_EXPAT /D HAVE_EXPAT_H" DEBUG_BUILD=Aye
>> > NMAKE : fatal error U1073: don't know how to make 'D:\My'
>> > Stop.
>>
>> The problem seems to be the space in the path; editing build_neon.bat
>> to change "My Documents" to "MyDocu~1" fixes this.
>>
>> Is this a known bug?
>>
>> I can think of at least four ways to fix this:
>> 1) Document "don't do that".
>> 2) Come up with a way of quoting this properly.
>> 3) Fix the python script that generates build_neon.bat to use the
>> short file name.
>> 4) Change Neon to allow the paths to be specified in some other way.
>> (Would require changes to Neon as well as SVN).
>
> [snip]
>
> Can you try fixing it with quoting and posting a patch?
>
> DJ
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Win32 neon build error (Spaces in path)
Posted by Jon Foster <jo...@jon-foster.co.uk>.
Hi,
Branko Čibej wrote:
> Jon Foster wrote:
>> Hi,
>>
>> D.J. Heap wrote:
>> > Can you try fixing it with quoting and posting a patch?
>>
>> I tried, but I now believe it's impossible. The Neon makefile is
>> just too broken.
>
> I'd be interested to know how, since I wrote that makefile. :-) Do
> please post the patches here, as I'm not on the Neon mailing list.
Oh :-)
>> I just posted a couple of patches to the Neon
>> list; if they get accepted then I'll provide the corresponding
>> fixes to Subversion.
>
> I admit that I didn't bother to make sure that paths with spaces in them
> work with that makefile. What kind of quoting did you try before giving
> up? It's a fact that getting quoted parameters into a script is
> sometimes even harder in Windows batch files than in Unix shell
> scripts... but I can't believe it can't be done.
>
> -- Brane
Here is the message I sent to the Neon list:
> I'm trying to build Subversion on Windows. This uses Neon.
> I've got a space in the name of the folder I'm using to build
> everything, and this seems to be causing some problems for
> Neon's makefile.
>
> Here is how I am invoking Neon's make, which causes it to fail:
[The following is an extract from build_neon.bat]
>> set ZLIB_SRC=D:\My Documents\Jon\Prog\Subversion\Work\Subversion\common\zlib
>> set OPENSSL_SRC=D:\My Documents\Jon\Prog\Subversion\Work\Subversion\common\openssl
>> set EXPAT_FLAGS=/I "D:\My Documents\Jon\Prog\Subversion\Work\Subversion\apr-util/xml/expat/lib" /D HAVE_EXPAT /D HAVE_EXPAT_H
>> cd ..\..\neon
>> nmake /nologo /f neon.mak ALL DEBUG_BUILD=Aye
>
> If I set the variables so the paths do not contain spaces, it works:
>> set ZLIB_SRC=D:\MyDocu~1\Jon\Prog\Subversion\Work\Subversion\common\zlib
>> set OPENSSL_SRC=D:\MyDocu~1\Jon\Prog\Subversion\Work\Subversion\common\openssl
>> set EXPAT_FLAGS=/I D:\MyDocu~1\Jon\Prog\Subversion\Work\Subversion\apr-util/xml/expat/lib /D HAVE_EXPAT /D HAVE_EXPAT_H
>> cd ..\..\neon
>> nmake /nologo /f neon.mak ALL DEBUG_BUILD=Aye
>
> There are two problems here:
>
> (1) OPENSSL_SRC is expanded without being enclosed in quotes, e.g.:
>> LIB32_OBJS = $(LIB32_OBJS) $(OPENSSL_SRC)\out32dll\libeay32.lib \
>> $(OPENSSL_SRC)\out32dll\ssleay32.lib
> This needs to be changed to:
>> LIB32_OBJS = $(LIB32_OBJS) "$(OPENSSL_SRC)\out32\libeay32.lib" \
>> "$(OPENSSL_SRC)\out32\ssleay32.lib"
>
Note that I can't just quote the value passed to OPENSSL_SRC before
passing it to the Neon makefile, as that causes a problem similar
to (2) below. Also, everywhere else in the Neon makefile quotes
filenames like this already, it just seems to have been missed here.
> (2) EXPAT_FLAGS is tested by expanding it inside quotes - i.e.:
>> !IF "$(EXPAT_FLAGS)" == ""
> If EXPAT_FLAGS contains quotes, then this does not work. The quotes
> in EXPAT_FLAGS are essential - if I remove them, then the flags are
> parsed wrongly by the C compiler. The only solution I could come up
> with was to change the test like this:
>> !IFNDEF EXPAT_FLAGS
> Which doesn't quite test the same thing but is close enough. (Setting
> EXPAT_FLAGS="" will cause the original test to return TRUE but the new
> test to return FALSE).
Patch attached as "neon-spaces-fix.patch", against Neon 0.24.5.
I then sent another e-mail with an incremental improvement:
> While writing my previous patch, I noticed that Subversion
> is calling the Neon makefile in an overly complex way, and
> a small change to the Neon makefile would make things much
> easier for Subversion. It would also make Subversion much
> more resistent to changes in Neon - currently it has to
> know details of what #defines Neon uses internally.
>
> To quote the batch file in Subversion that calls Neon's
> makefile:
>
>> @rem The normal compilation of Neon on Windows is designed to compile
>> @rem and link against the pre-compiled Windows binary Expat
>> @rem installation and uses the EXPAT_SRC command line parameter to
>> @rem 'nmake /f neon.mak' to specify where this binary installation
>> @rem resides. However, here, Neon is instructed to compile and link
>> @rem against the Expat packages with APR, and the EXPAT_FLAGS
>> @rem parameter must be used instead of EXPAT_SRC.
>> set EXPAT_FLAGS=/I D:\Wherever\apr-util/xml/expat/lib /D HAVE_EXPAT /D HAVE_EXPAT_H
>
> It would be much easier if Neon provided an option that
> specifies the location of the directory which contains the
> Expat include files. Then Subversion could just do:
>> set EXPAT_INC=D:\Wherever\apr-util/xml/expat/lib
>
> The attached patch does just that.
Patch attached as "neon-expat-inc-path.patch", apply on top of the
first patch.
Kind regards,
Jon
Re: Win32 neon build error (Spaces in path)
Posted by Branko Čibej <br...@xbc.nu>.
Jon Foster wrote:
> Hi,
>
> D.J. Heap wrote:
> > Can you try fixing it with quoting and posting a patch?
>
> I tried, but I now believe it's impossible. The Neon makefile is
> just too broken.
I'd be interested to know how, since I wrote that makefile. :-) Do
please post the patches here, as I'm not on the Neon mailing list.
> I just posted a couple of patches to the Neon
> list; if they get accepted then I'll provide the corresponding
> fixes to Subversion.
I admit that I didn't bother to make sure that paths with spaces in them
work with that makefile. What kind of quoting did you try before giving
up? It's a fact that getting quoted parameters into a script is
sometimes even harder in Windows batch files than in Unix shell
scripts... but I can't believe it can't be done.
-- Brane
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Re: Win32 neon build error (Spaces in path)
Posted by "D.J. Heap" <dj...@shadyvale.net>.
Jon Foster wrote:
> Hi,
>
> My Neon fixes were included in Neon 0.24.6; here are the corresponding
> Subversion changes. Note that the Subversion trunk already claims to
> need this version of Neon, so this doesn't increase the stated system
> requirements.
[snip]
Committed in r9894, thanks!
DJ
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Re: Win32 neon build error (Spaces in path)
Posted by Jon Foster <jo...@jon-foster.co.uk>.
Hi,
Branko Čibej wrote:
> Note that the changes aren't strictly necessary -- setting EXPAT_FLAGS
> works just fine with neon-0.24.6.
Yes, setting EXPAT_FLAGS still works _if_ there aren't any spaces in
the Expat path, but the current code doesn't work if there are spaces
in the Expat path.
> But I agree it makes the batch file a wee bit more elegant.
> Thanks for the patch!
>
> D.J., could you test and commit this, please? I have something else on
> my plate right now; thanks.
Thanks!
Jon
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Re: Win32 neon build error (Spaces in path)
Posted by Branko Čibej <br...@xbc.nu>.
Jon Foster wrote:
> Hi,
>
> My Neon fixes were included in Neon 0.24.6; here are the corresponding
> Subversion changes. Note that the Subversion trunk already claims to
> need this version of Neon, so this doesn't increase the stated system
> requirements.
Note that the changes aren't strictly necessary -- setting EXPAT_FLAGS
works just fine with neon-0.24.6. But I agree it makes the batch file a
wee bit more elegant.
Thanks for the patch!
D.J., could you test and commit this, please? I have something else on
my plate right now; thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
[PATCH] Re: Win32 neon build error (Spaces in path)
Posted by Jon Foster <jo...@jon-foster.co.uk>.
Hi,
My Neon fixes were included in Neon 0.24.6; here are the corresponding
Subversion changes. Note that the Subversion trunk already claims to
need this version of Neon, so this doesn't increase the stated system
requirements.
Log message:
---
Fix Win32 build when there are spaces in the path.
Neon versions prior to 0.24.6 would not allow us to quote EXPAT_FLAGS
correctly, so paths with spaces would not work. Although we could now
quote this correctly, it's better to use the new EXPAT_INC flag (also
introduced in Neon 0.24.6). Setting EXPAT_FLAGS requires too much
knowledge of Neon build-system internals.
* build_neon.ezt: Set EXPAT_INC rather than EXPAT_FLAGS.
---
My mailer is known to break inline patches, so I'm sending it as an
attachment. This patch is against the trunk.
Kind regards,
Jon
Jon Foster wrote:
> Hi,
>
> D.J. Heap wrote:
>
>> Jon Foster wrote:
>>
>>> Hi all,
>>>
>>> I've just built the Subversion trunk under Windows 2000, with MS Visual
>>> Studio .NET 2002. When building neon, the VS project runs
>>> build_neon.bat.
>>> This gave the error message:
>>>
>>> > Performing Makefile project actions
>>> > nmake /f neon.mak ALL EXPAT_FLAGS="/I
>>> >>> D:\My
>>> Documents\Jon\Prog\Subversion\Work\Subversion\apr-util/xml/expat/lib
>>> >>> /D HAVE_EXPAT /D HAVE_EXPAT_H" DEBUG_BUILD=Aye
>>> > NMAKE : fatal error U1073: don't know how to make 'D:\My'
>>> > Stop.
>>>
>>> The problem seems to be the space in the path; editing build_neon.bat
>>> to change "My Documents" to "MyDocu~1" fixes this.
>>>
>>> Is this a known bug?
>>>
>>> I can think of at least four ways to fix this:
>>> 1) Document "don't do that".
>>> 2) Come up with a way of quoting this properly.
>>> 3) Fix the python script that generates build_neon.bat to use the
>>> short file name.
>>> 4) Change Neon to allow the paths to be specified in some other way.
>>> (Would require changes to Neon as well as SVN).
>>
>> [snip]
>>
>> Can you try fixing it with quoting and posting a patch?
>>
>> DJ
>
> I tried, but I now believe it's impossible. The Neon makefile is
> just too broken. I just posted a couple of patches to the Neon
> list; if they get accepted then I'll provide the corresponding
> fixes to Subversion.
>
> Kind regards,
>
> Jon Foster
>