Issue 24075 - Build breaks with space in $USER and $USERNAME
Summary: Build breaks with space in $USER and $USERNAME
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: solenv (show other issues)
Version: current
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 1.1.5
Assignee: quetschke
QA Contact: issues@tools
URL:
Keywords: oooqa
Depends on: 27914
Blocks:
  Show dependency tree
 
Reported: 2004-01-04 09:35 UTC by frederikretsema
Modified: 2008-05-17 23:14 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Output of dmake (made by tee-ing the dmake) (703.72 KB, application/octet-stream)
2004-01-04 09:37 UTC, frederikretsema
no flags Details
Winenv.set (8.40 KB, text/plain)
2004-01-04 09:39 UTC, frederikretsema
no flags Details
Output of senenv in C-shell (2.46 KB, text/rtf)
2004-01-07 07:24 UTC, frederikretsema
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description frederikretsema 2004-01-04 09:35:56 UTC
The first time I build OpenOffice (with dmake) I got a strange error in
building. I did all the steps in 
http://tools.openoffice.org/dev_docs/build_windows_tcsh.html. 

Last lines of build ("Partitieeen Diskeen" is the username I use for admin):
=======================================================
Making: ../../../wntmsci9.pro/srs/iso.srs
echo iso.src
iso.src
guw.pl rsc -presponse @/tmp/mk610cb0cc.4
Command: rsc
PartitieeenDiskeen: No such file or directory
cpp: line 0, Error: Can't open input file "PartitieeenDiskeen"
VCL Resource Compiler 3.0
Preprocessor
commandline:  -I. -I. -I. -I..\inc -I..\..\..\inc -I..\..\..\WIN\inc -
I..\..\..\wntmsci9.pro\inc -I. -Ie:\oo_1.1_src\solver\645\wntmsci9.pro\inc\st
l -Ie:\oo_1.1_src\solver\645\wntmsci9.pro\inc\external -
Ie:\oo_1.1_src\solver\64
5\wntmsci9.pro\inc -Ie:\oo_1.1_src\solenv\wntmsci9\inc -
Ie:\oo_1.1_src\solenv\in
c -Ie:\oo_1.1_src\res -Ie:\oo_1.1_src\solver\645\wntmsci9.pro\inc\stl -Ic:\p
rogra~1\j2sdk1~1.1_0\include\win32 -Ic:\progra~1\j2sdk1~1.1_0\include -
Ic:\PROGRA~1\MICROS~3\include -Ic:\progra~1\micros~2\vc98\include -I. -
I..\..\..\res -I. -DWNT -DNT351 -DMSC -DMI200 -DSUPD=645 -DBUILD=8693 -
DSOLAR_JAVA -DFULL_DESK -DPRODUCT -DPRODUCT_FULL -DNDEBUG -DOSL_DEBUG_LEVEL=0 -
DOOO_VENDOR="Diskeen -DOOO_LICENSE="LGPL" -DUPDVER="645m19(Build;8693)" -
DUPDVER="645m19(Build;8693)"PartitieeenDiskeen c:\DOCUME~1\DISKEE~1\LOCALS~1
\Temp\3
Preprocessor startline:  rscpp @c:\DOCUME~1\DISKEE~1\LOCALS~1\Temp\4
Error starting preprocessor
dmake:  Error code 1, while making '../../../wntmsci9.pro/srs/iso.srs'
echo: No match.
dmake:  Error code 255, while making 'SRC1'
echo: No match.

ERROR: Error 65280 occurred while making
/cygdrive/e/oo_1.1_src/offmgr/source/of
fapp/intro
dmake:  Error code 1, while making 'build_all'
echo: No match.
=======================================

I will attach two files:
1) The full output (I used tee for this, so errors are not included, see these 
last lines)
2) winenv.set (I used configure for making this and didn't edit anything 
myself)

Volker, in your mail in dev@openoffice.org you told me that the last line 
doesn't look good. See the full output-file: other make-commands seem to have 
the same last line and do work???? Thanks a lot in advance for looking at this 
problem!
Comment 1 frederikretsema 2004-01-04 09:37:58 UTC
Created attachment 12247 [details]
Output of dmake (made by tee-ing the dmake)
Comment 2 frederikretsema 2004-01-04 09:39:12 UTC
Created attachment 12248 [details]
Winenv.set
Comment 3 quetschke 2004-01-06 17:01:26 UTC
Hi Frederic, I just came back from europe, I had a brief look
at your winenv.set, it looks good so far, there must be other
variables involved, I'll search for the OOO_VENDOR definition
soon, but can you please post the output of
$ senenv
in your tcsh shell before you source winenv.set.
Comment 4 frederikretsema 2004-01-07 07:24:25 UTC
Created attachment 12305 [details]
Output of senenv in C-shell
Comment 5 frederikretsema 2004-01-07 07:27:05 UTC
Thanks for looking at it so quick! Hope you'll find something in the attached 
senenv-output. Bye!
Comment 6 foskey 2004-01-10 06:43:01 UTC
This line:

echo: No match.

Is often related to this sort of line:

echo ******

which should be:

echo "*****"

to hide the * from the shell file expansion.
Comment 7 quetschke 2004-01-10 15:28:35 UTC
vq->ken: Ken, you are propably right with the "echo: No match." output, but one
gets this output for any error in the build, so this is definitly not related
to Frederiks problem.

But I found the root of Frederiks problem, in:
offmgr/source/offapp/intro/makefile.mk
there is this line:

RSCUPDVERMAC+=-DOOO_VENDOR="$(USER)$(USERNAME)" -DOOO_LICENSE="LGPL"

In Frederiks environment he has:
USER=Diskeen Partitieeen
USERNAME=Diskeen Partitieeen
so something chokes on this variables with spaces.

vq->Frederik: Try setting USER and USERNAME to something without space
before starting the build.

This is only a workaround, normaly the quoting around "$(USER)$(USERNAME)"
should catch this problem, so there is a bug somewhere.
Comment 8 frederikretsema 2004-01-14 22:59:47 UTC
Okay, I set up my PC again with all programs, this time with a user "Compiler" 
(one word, no quotes). This compiled well (I got one warning which has nothing 
to do with this issue, see dev@openoffice.org for details). 

This works for me. Feel free to keep this one open to solve the spacingproblem. 
I am quite easy able to assist you with testing any changes (I have a Ghost-
file containing the previous configuration). If you want me doing this you can 
contact me via this issue or via the mailinglist dev@openoffice.org.

Thanks again for the good and fast work you did!
Comment 9 quetschke 2004-01-15 14:02:04 UTC
Ok, I changed the subject to reflect the real problem.

cc'ing ause

vq->ause: Do you have an idea where we loose the quoting? It should work
with spaces in USER/USERNAME.
Comment 10 hjs 2004-01-16 13:21:31 UTC
let's follow the path of this string. is the commandline produced by "guw.pl"
still quoted?
Comment 11 quetschke 2004-01-16 15:38:03 UTC
vq->ause: Ahh, thanks. I'll investigate.

Setting target.
Comment 12 fa 2004-02-08 03:14:39 UTC
There's more that will be affected by this, since there are things in solenv that use $(USER):

./solenv/inc/_tg_app.mk:        @+$(TYPE) $(TMP)$/$(PRJNAME)$(USER).tmp
./solenv/inc/_tg_app.mk:        @+$(RM) $(TMP)$/$(PRJNAME)$(USER).tmp
...
./solenv/inc/tg_jar.mk: @+-find . -type d -user $(USER) ! -perm -5 -print | xargs test "$$1" != "" && 
chmod +r $$1 
./solenv/inc/tg_java.mk:        +-find $(CLASSDIR) -type d -user $(USER) \! -perm -5 -print | xargs 
chmod a+r $$1 >& $(NULLDEV)

etc.  These can probably all be quoted just fine though.
Comment 13 quetschke 2004-02-08 05:42:33 UTC
Urgh, so it's not only a guw.pl problem. But Windows users often have
user names with spaces and so are the most likely to run into this problem.

I'm just thinking about changing the $USER variable by configure / *env.set
and replace " " with "_". This would avoid the quoting.

Better, let settings.mk do this replacement.
Comment 14 hjs 2004-03-16 11:35:14 UTC
in the special case of the find command, $(USER) must match the username known
by the system. otherwise it would be quite useless. to support usernames
containing blanks, manipulating the username doesn't look like an option to me.
Comment 15 quetschke 2004-03-16 14:42:23 UTC
Hi!

@fs: Hi Frank, can you check if this is the problem for your w32-tcsh build,
I mean ause's last comment.

@hjs: This means basically that builds with usernames with space are broken
at the moment. We can fix it for w32-4nt builds by putting quotes around
the $USER.

I guess I have to enhance guw.pl a bit to honor/keep the quotes.
Comment 16 Frank Schönheit 2004-03-16 16:03:06 UTC
> in the special case of the find command, $(USER) must match the username known
> by the system
Dumb question: Is "the user name know by the system" the login name?
Comment 17 quetschke 2004-03-16 17:25:04 UTC
vq->fs: Try echo %username% in cmd or echo %USERNAME in bash. Note the normal
vs. capital letters.
Comment 18 quetschke 2004-04-16 17:26:15 UTC
Mental Note: When guw executes something with "exec( "$command", @params)"
and @params are really parameter, then there is no extra quoting needed, the
parameter evaluation is normally done by the shell, and slightly modified
by guw.pl here. No problem, *but* if guw.pl rewrites an @parameterfile, then
the parameters are evaluated again. (How else should one distinguish

a b

from

"a b"

in a line of an @file.)

I'll try something tonight.
Comment 19 quetschke 2004-04-17 02:27:29 UTC
Nope, guw.pl works as desired and also keeps quotes. rsc.exe is the problem,
see issue 27914.
Comment 20 Martin Hollmichel 2004-05-06 16:47:01 UTC
set target to 1.1.3
Comment 21 quetschke 2004-08-31 20:32:24 UTC
This problem is propably fixed with issue 27914, but this is not verified, so
I retarget to 1.1.4.
Comment 22 Martin Hollmichel 2004-11-03 09:27:53 UTC
retarget to 1.1.5
Comment 23 Martin Hollmichel 2005-06-06 15:57:33 UTC
so setting this to fixed.
Comment 24 ace_dent 2008-05-17 21:11:52 UTC
The Issue you raised has been marked as 'Resolved' and not updated within the
last 1 year+. I am therefore setting this issue to 'Verified' as the first step
towards Closing it. If you feel this is incorrect, please re-open the issue and
add any comments.

Many thanks,
Andrew
 
Cleaning-up and Closing old Issues
~ The Grand Bug Squash, pre v3 ~
http://marketing.openoffice.org/3.0/announcementbeta.html
Comment 25 ace_dent 2008-05-17 23:14:09 UTC
As per previous posting: Verified -> Closed.
A Closed Issue is a Happy Issue (TM).

Regards,
Andrew