You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Mark Hindess <ma...@googlemail.com> on 2006/06/26 21:57:45 UTC

Re: Using Visual Studio C++ Express to compile classlib - fails.

On 26 June 2006 at 21:40, =?ISO-8859-1?Q?Thorbj=F8rn_Ravn_Andersen?= <th...@gmail.com> wrote:
>
> I have now tried fiddling with Visual Studio C++ Express (free download
> for the time being from Microsoft, which would enable me to participate)
> to see if I could build classlib with it under Windows XP, but have
> failed so far.
> 
> I made some progress however.  Nmake initially complains that it cannot
> find an ntwin32.mak which I then put in native-src/win.IA32 as an empty
> file.  Then win32.mak was missing - throwing liberal amount of empty
> win32.mak files all over made nmake happy, but then the actual compiler
> invocation fails:
> 
>   [exec] Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
>      [exec] Copyright (C) Microsoft Corporation.  All rights reserved.
>      [exec] cd sig
>      [exec] "C:\Program Files\Microsoft Visual Studio
> 8\VC\bin\nmake.exe" /NOLOGO
>      [exec] -Ogityb1 -WX -GF -Gs -MD -Zi -Zm400  -D_DLL -D_MT -DWIN32
> -D_WIN32_WINNT=3D0x0400 -D_WINSOCKAPI_ -DWINVER=3D0x0400   /IC:\Documents
> and Settings\TRA\workspace-harmony\Harmony\deploy\include /IC:\Documents 
> and Settings\TRA\workspace-harmony\Harmony\deploy\jdk\include /I.
> /I..\..\..\modules\luni\src\main\native\include\shared
> /I..\..\..\modules\luni\src\main\native\include\windows
> -Fo..\..\shared\sig\hysig_copyright.obj ..\..\shared\sig\hysig_copyright.c
>      [exec] '-Ogityb1' is not recognized as an internal or external command,
>      [exec] operable program or batch file.
>      [exec] NMAKE : fatal error U1077: '-Ogityb1' : return code '0x1'
>      [exec] Stop.
>      [exec] NMAKE : fatal error U1077: '"C:\Program Files\Microsoft
> Visual Studio 8\VC\bin\nmake.exe"' : return code '0x2'
>      [exec] Stop.
> 
> The question is then where this is defined.  I have worked quite a bit
> with gcc but am completely green with this environment.
> 
> What would a feasible path be from here?

Looks like one of the variables set in one of those "empty" included 
makefiles should be CC set to cl ?

-Mark.





---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: Using Visual Studio C++ Express to compile classlib - fails.

Posted by Tim Ellison <t....@gmail.com>.
Thorbjørn Ravn Andersen wrote:
> Oliver Deakin skrev  den 27-06-2006 12:25:
>> Do you mean the header files in deploy/include? If so, the reason they
>> are copied
>> there is so that they are in a shared location for all modules. (In
>> fact it's the same
>> reason that libs are built into deploy/lib and makefile includes are
>> copied into
>> deploy/build/make).
> So it is basically a platform agnostic symbolic link?
> Personally I do not like doing it so, would it be possible to do it with
> -I's instead so we do not have redundant copies lying around?

No, the idea is that the deploy/include and deploy/lib directories
contain the build time dependencies between modules.

You can start with a pre-built deploy directory, which we are calling
the Harmony Development Kit (HDK), and work on a single classlib module.

We wanted to avoid the need for somebody working on a given module to be
forced to check-out/build the entire class library; and have
well-defined interfaces between modules so that they can be replaced or
evolve at different rates, etc.

Regards,
Tim

>> As a consequence, they could also *only* checkout the module they are
>> interested in, rather than the whole of classlib/trunk, and still be
>> able to rebuild
>> their altered code.
> I have heard this discussion, but I am not convinced that having lots of
> different building enviroments is a good idea.

Do you consider that we have 'lots of different building environments' now?

Regards,
Tim

> I can however also appreciate tolerable build times :)
> 

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: Using Visual Studio C++ Express to compile classlib - fails.

Posted by Thorbjørn Ravn Andersen <th...@gmail.com>.
Oliver Deakin skrev  den 27-06-2006 12:25:
> Do you mean the header files in deploy/include? If so, the reason they 
> are copied
> there is so that they are in a shared location for all modules. (In 
> fact it's the same
> reason that libs are built into deploy/lib and makefile includes are 
> copied into
> deploy/build/make).
So it is basically a platform agnostic symbolic link? 

Personally I do not like doing it so, would it be possible to do it with 
-I's instead so we do not have redundant copies lying around?

> As a consequence, they could also *only* checkout the module they are
> interested in, rather than the whole of classlib/trunk, and still be 
> able to rebuild
> their altered code.
I have heard this discussion, but I am not convinced that having lots of 
different building enviroments is a good idea.

I can however also appreciate tolerable build times :)

-- 
  Thorbjørn

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: Using Visual Studio C++ Express to compile classlib - fails.

Posted by Oliver Deakin <ol...@googlemail.com>.

Thorbjørn Ravn Andersen wrote:
> Mark Hindess skrev  den 26-06-2006 21:57:
>> What would a feasible path be from here?
>>   
>>
>> Looks like one of the variables set in one of those "empty" included 
>> makefiles should be CC set to cl ?
>>   
> I forgot to state that I somewhat arbitrarily tried doing exactly 
> that, but without any success in locating the right one.   I therefore 
> hoped to hear from a person who knows more about this build system.
>
> BTW Do you know if there is any particular reason that files are 
> copied over to the deploy directory instead of being read directly 
> from their original location and the compiled output written to deploy?

Do you mean the header files in deploy/include? If so, the reason they 
are copied
there is so that they are in a shared location for all modules. (In fact 
it's the same
reason that libs are built into deploy/lib and makefile includes are 
copied into
deploy/build/make).

A little while ago there were a couple of threads where we discussed a 
Harmony
Development Kit (HDK) [1] which would allow a developer to build any
individual module without necessarily having the other modules present in
their workspace.
To this end we have set up the deploy directory to contain all the 
resources
required to rebuild a single module standalone - that means any shared 
header
files, any libs used to link against and any makefile includes. The 
header files
you see in deploy/include are those required to be shared between multiple
modules, and (loosely) define a native API between modules.

The idea is that eventually we will package HDKs up and make them available
as a downloadable bundle (in a similar way to the current classlib 
snapshots).
Then a developer can just download the HDK, unpack it somewhere and
rebuild any individual module against it that they are interested in 
working on.
As a consequence, they could also *only* checkout the module they are
interested in, rather than the whole of classlib/trunk, and still be 
able to rebuild
their altered code.

Regards,
Oliver

[1] http://incubator.apache.org/harmony/subcomponents/classlibrary/hdk.html

>
> -- 
>   Thorbjørn
>

-- 
Oliver Deakin
IBM United Kingdom Limited


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: Using Visual Studio C++ Express to compile classlib - fails.

Posted by Rana Dasgupta <rd...@gmail.com>.
On 6/27/06, Gregory Shimansky <gs...@gmail.com> wrote:
>
> 2006/6/27, Rana Dasgupta <rd...@gmail.com>:
> >
> > >
> >>   I also read your interesting experiments on the other linked
> >>thread. Microsoft appears to have a new tool mt.exe to embed these
> >>manifests:
> >>     mt.exe -manifest someapp.exe.manifest -outputresource:someapp.exe;1
> >>     ( 1 for .exe and 2 for .dll )
> >>
> >>     Could be added as a post-build step.
>
> >Sure. I thought I'd have to  experiment with rc or windres utilities so I
> >gave up at that stage. I didn't know they've invented a special utility
> >right for the purpose of embedding manifests into executables and dlls.


 That ( using a resource file )actually would be a better way, if possible.
The above directly edits the output file and potentially causes a full
recompile? It may be possible to convert the manifest  into a resource file
like:

$(MANIFEST_BASENAME).auto.res :$(MANIFEST_BASENAME).auto.rc

$(MANIFEST_BASENAME).auto.rc : $(MANIFEST_BASENAME).auto.manifest
    type <<$@
#include <winuser.h>
1RT_MANIFEST"$(MANIFEST_BASENAME).auto.manifest"
<< KEEP


 , use rc to compile the resource, and then relink the resource
incrementally into the executable using the /incremental LDFLAGS etc.

Rana

Re: Using Visual Studio C++ Express to compile classlib - fails.

Posted by Geir Magnusson Jr <ge...@pobox.com>.

Thorbjørn Ravn Andersen wrote:
> Geir Magnusson Jr skrev  den 28-06-2006 10:25:
>>
>>> Next step - dlrvm :)
>>>
>>>     
>>
>> That's excellent.  Did all the tests pass for classlib?
>>   
> Working on it... Doesn't get much done these days.
> 
>> Can you document this procedure either on the wiki or send as a patch
>> for the website?
>>   
> Yes.  I think the wiki will work the best.

eh...  :)

> 
> Currently still working on the plain classlib, in order to make it 100%
> reproducible.

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: Using Visual Studio C++ Express to compile classlib - fails.

Posted by Thorbjørn Ravn Andersen <th...@gmail.com>.
Geir Magnusson Jr skrev  den 28-06-2006 10:25:
>
>> Next step - dlrvm :)
>>
>>     
>
> That's excellent.  Did all the tests pass for classlib?
>   
Working on it... Doesn't get much done these days.

> Can you document this procedure either on the wiki or send as a patch
> for the website?
>   
Yes.  I think the wiki will work the best.

Currently still working on the plain classlib, in order to make it 100% 
reproducible.
-- 
  Thorbjørn


Re: Using Visual Studio C++ Express to compile classlib - fails.

Posted by Geir Magnusson Jr <ge...@pobox.com>.

Thorbjørn Ravn Andersen wrote:
> Gregory Shimansky skrev  den 27-06-2006 14:23:
>>
>> Cool! Thanks for the pointer. This is something new. The date
>> published is
>> June 7 2006 which is pretty recent. It happened after I've written my
>> email
>> about MASM not available.
> Thank you all for your help. I have now managed to build classlib with
> Visual Studio C++ Express (and MASM addon) plus the SDK headers, after
> removing the -WX option and that only.
> I ran the SDK setenv.bat command before running the "\Program
> Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat".
> 
> Noticed that "ant -q" only takes 2:17 and "ant" takes 3:45 on my
> machine.   Console output really is slow under XP.

Most things are.

> 
> Next step - dlrvm :)
> 

That's excellent.  Did all the tests pass for classlib?

Can you document this procedure either on the wiki or send as a patch
for the website?

geir

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: Using Visual Studio C++ Express to compile classlib - fails.

Posted by Thorbjørn Ravn Andersen <th...@gmail.com>.
Gregory Shimansky skrev  den 27-06-2006 14:23:
>
> Cool! Thanks for the pointer. This is something new. The date 
> published is
> June 7 2006 which is pretty recent. It happened after I've written my 
> email
> about MASM not available.
Thank you all for your help. I have now managed to build classlib with 
Visual Studio C++ Express (and MASM addon) plus the SDK headers, after 
removing the -WX option and that only. 

I ran the SDK setenv.bat command before running the "\Program 
Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat".

Noticed that "ant -q" only takes 2:17 and "ant" takes 3:45 on my 
machine.   Console output really is slow under XP.

Next step - dlrvm :)

-- 
  Thorbjørn

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: Using Visual Studio C++ Express to compile classlib - fails.

Posted by Gregory Shimansky <gs...@gmail.com>.
2006/6/27, Rana Dasgupta <rd...@gmail.com>:
>
> On 6/26/06, Gregory Shimansky <gs...@gmail.com> wrote:
>
> > >I used to build classlib successfully on WinXP with completely free
> > >environment, that is MS VS.NET <http://vs.net/> 2005 Express, MS
> Platform
> > SDK Server 2003 R2
> > >and NASM from Cygwin (there is no free MASM with license which allows
> OSS
> > >development, it can be found for local experiments on quite many
> sites).
>
>
> Gregory,
>     Not sure what you mean by "no free masm with license which allows OSS
> development"...Version 8.0, compatible with VC++ 2005 Express is
> downloadable for free from the Microsoft Download site...
>
>
>
> http://www.microsoft.com/downloads/details.aspx?familyid=7A1C9DA0-0510-44A2-B042-7EF370530C64&displaylang=en
>
>    The clck-thru license does say something about not using it for
> developing software to be commercially distributed, does that violate ?


Cool! Thanks for the pointer. This is something new. The date published is
June 7 2006 which is pretty recent. It happened after I've written my email
about MASM not available.

Anyway, I hope my NASM port will not be discarded because it may be used to
compile Harmony with free as in speech Cygwin or MinGW toolchains.


    I also read your interesting experiments on the other linked
> thread. Microsoft appears to have a new tool mt.exe to embed these
> manifests:
>     mt.exe -manifest someapp.exe.manifest -outputresource:someapp.exe;1
>     ( 1 for .exe and 2 for .dll )
>
>     Could be added as a post-build step.
>
> Rana



Sure. I thought I'd have to  experiment with rc or windres utilities so I
gave up at that stage. I didn't know they've invented a special utility
right for the purpose of embedding manifests into executables and dlls.

-- 
Gregory Shimansky, Intel Middleware Products Division

Re: Using Visual Studio C++ Express to compile classlib - fails.

Posted by Rana Dasgupta <rd...@gmail.com>.
On 6/26/06, Gregory Shimansky <gs...@gmail.com> wrote:

> >I used to build classlib successfully on WinXP with completely free
> >environment, that is MS VS.NET <http://vs.net/> 2005 Express, MS Platform
> SDK Server 2003 R2
> >and NASM from Cygwin (there is no free MASM with license which allows OSS
> >development, it can be found for local experiments on quite many sites).


Gregory,
    Not sure what you mean by "no free masm with license which allows OSS
development"...Version 8.0, compatible with VC++ 2005 Express is
downloadable for free from the Microsoft Download site...


http://www.microsoft.com/downloads/details.aspx?familyid=7A1C9DA0-0510-44A2-B042-7EF370530C64&displaylang=en

   The clck-thru license does say something about not using it for
developing software to be commercially distributed, does that violate ?

    I also read your interesting experiments on the other linked
thread. Microsoft appears to have a new tool mt.exe to embed these
manifests:
    mt.exe -manifest someapp.exe.manifest -outputresource:someapp.exe;1
    ( 1 for .exe and 2 for .dll )

    Could be added as a post-build step.

Rana


> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>

Re: Using Visual Studio C++ Express to compile classlib - fails.

Posted by Gregory Shimansky <gs...@gmail.com>.
On Tuesday 27 June 2006 00:29 Thorbjørn Ravn Andersen wrote:
> Mark Hindess skrev  den 26-06-2006 21:57:
> > What would a feasible path be from here?
> >
> >
> > Looks like one of the variables set in one of those "empty" included
> > makefiles should be CC set to cl ?
>
> I forgot to state that I somewhat arbitrarily tried doing exactly that,
> but without any success in locating the right one.   I therefore hoped
> to hear from a person who knows more about this build system.
>
> BTW Do you know if there is any particular reason that files are copied
> over to the deploy directory instead of being read directly from their
> original location and the compiled output written to deploy?

I used to build classlib successfully on WinXP with completely free 
environment, that is MS VS.NET 2005 Express, MS Platform SDK Server 2003 R2 
and NASM from Cygwin (there is no free MASM with license which allows OSS 
development, it can be found for local experiments on quite many sites).

Overall the impression is that neither classlib nor drlvm are really ready to 
be built with VS.NET 2005. It has too much new stuff incompatible with older 
versions.

You can try to use my instructions in [1]. The NASM port of assembly can be 
found in [2]. To set initial MS development environment I changed c:
\cygwin\cygwin.bat like this:

@echo off
rem call "C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat" x86
call "c:\Program Files\Microsoft Platform SDK for Windows Server 2003 
R2\SetEnv.Cmd" /XP32
C:
chdir C:\cygwin\bin
bash --login -i

[1] 
http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200606.mbox/%3C208da7a50606011434i405b7d5ao4be8a9fefc52e183@mail.gmail.com%3E

[2] http://issues.apache.org/jira/browse/HARMONY-566

-- 
Gregory Shimansky, Intel Middleware Products Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: Using Visual Studio C++ Express to compile classlib - fails.

Posted by Thorbjørn Ravn Andersen <th...@gmail.com>.
Mark Hindess skrev  den 26-06-2006 21:57:
> What would a feasible path be from here?
>   
>
> Looks like one of the variables set in one of those "empty" included 
> makefiles should be CC set to cl ?
>   
I forgot to state that I somewhat arbitrarily tried doing exactly that, 
but without any success in locating the right one.   I therefore hoped 
to hear from a person who knows more about this build system.

BTW Do you know if there is any particular reason that files are copied 
over to the deploy directory instead of being read directly from their 
original location and the compiled output written to deploy?

-- 
  Thorbjørn