You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Matt Benson <gu...@yahoo.com> on 2006/06/28 00:08:38 UTC

[classlib] Can't build native on winXP

nmake seems to choke looking for a ntwin32.mak file. 
I don't care too much about the native stuff actually,
but I wanted to play with the build system, so I want
to make sure I don't break anything.  Does anyone have
any advice?

TIA,
Matt

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
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: [classlib] Can't build native on winXP

Posted by Vladimir Gorr <vv...@gmail.com>.
On 6/28/06, Matt Benson <gu...@yahoo.com> wrote:
>
> nmake seems to choke looking for a ntwin32.mak file.
> I don't care too much about the native stuff actually,
> but I wanted to play with the build system, so I want
> to make sure I don't break anything.  Does anyone have
> any advice?


Matt,

you will not have (I very hope) any problems (like nmake) when the build
process is run in the Visual Studio enviroment.
For this you need to activate the Command Prompt as follows:

All Programs/Microsoft Visual Studio .NET 2003/Visual Studio .NET
Tools/Visual Studio .NET 2003 Command Prompt

Thanks,
Vladimir.


TIA,
> Matt
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> 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: [classlib] Can't build native on winXP

Posted by Matt Benson <gu...@yahoo.com>.
--- Gregory Shimansky <gs...@gmail.com> wrote:

> On Friday 30 June 2006 01:27 Matt Benson wrote:
> > Definitely used to that.  I couldn't get your
> > cygwin.bat recipe to work, but just your having
> said
> > that had already gotten me thinking.  I finally
> got my
> > cygwin env. set up and can build there now. 
> Thanks
> > for the push.
> 
> There is no secret. It is very simple and you can
> add other bat files for 
> environment tweaks like to make includes from
> Platform SDK to go first before 
> includes from Visual Studio to avoid new "secure"
> calls:

For some reason, I had to call vcvars32.bat or the
compiler wasn't on my path.  Perhaps you keep VC\bin
in your path anyway.  I went ahead and created a
harmony.bat file so I didn't have to clutter my normal
cygwin batch file.  I also had to do some playing with
my paths in cygwin (I normally set them in
.bash_profile) so that the regular cygwin paths would
have lower priority than the MS paths; in particular
cygwin link was getting found instead of the MS
version.  Then I went ahead and set up the other stuff
I needed as well.  I ended up with (ignore any weird
line breaks):

@echo off

CD /D C:\cygwin

SET
PATH=%CD%\bin;%CD%\usr\bin;%CD%\usr\local\bin;C:\apache-ant-1.6.5\bin;C:\nasm-0.98.39;%PATH%

CALL "C:\Program Files\Microsoft Visual Studio
8\VC\bin\vcvars32.bat"

SET INETSDK=C:\Program Files\Microsoft Platform SDK
for Windows Server 2003 R2

rem I don't know that debug is necessary, but it
doesn't hurt:
CALL "%INETSDK%\SetEnv.Cmd" /XP32 /DEBUG

SET INCLUDE=%INETSDK%\Include\crt;%INCLUDE%

SET
ANT_OPTS=-Dbuild.compiler=org.eclipse.jdt.core.JDTCompilerAdapter
-Dant.regexp.regexpimpl=org.apache.tools.ant.util.regexp.JakartaOroRegexp

SET ANT_ARGS=-logger
org.apache.tools.ant.NoBannerLogger -lib
%CD%/depends/jars/ecj_3.2MAINT/ecj_3.2MAINT.jar

SET JAVA_HOME=%ProgramFiles%/Java/jdk1.5.0_05

CD /D C:\harmony

CLS

C:\cygwin\bin\bash --login -i

-Matt

> 
> c:\cygwin\cygwin.bat
> ------------------------------------
> @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
> ------------------------------------
> 
> -- 
> 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
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
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: [classlib] Can't build native on winXP

Posted by Gregory Shimansky <gs...@gmail.com>.
On Friday 30 June 2006 01:27 Matt Benson wrote:
> Definitely used to that.  I couldn't get your
> cygwin.bat recipe to work, but just your having said
> that had already gotten me thinking.  I finally got my
> cygwin env. set up and can build there now.  Thanks
> for the push.

There is no secret. It is very simple and you can add other bat files for 
environment tweaks like to make includes from Platform SDK to go first before 
includes from Visual Studio to avoid new "secure" calls:

c:\cygwin\cygwin.bat
------------------------------------
@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
------------------------------------

-- 
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: [classlib] Can't build native on winXP

Posted by Matt Benson <gu...@yahoo.com>.
--- Gregory Shimansky <gs...@gmail.com> wrote:
[SNIP]
> 
> I've written already how to change cygwin.bat to set
> up VS.NET environment for 

I had missed where you wrote it up.  :)

> cygwin window. The cmd shell is so less usable than
> bash. 

Amen.

> You just have to 
> remember to use windows paths when dealing with
> windows native progs and 
> java.
> 

Definitely used to that.  I couldn't get your
cygwin.bat recipe to work, but just your having said
that had already gotten me thinking.  I finally got my
cygwin env. set up and can build there now.  Thanks
for the push.

-Matt

> -- 
> 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
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
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: [classlib] Can't build native on winXP

Posted by Gregory Shimansky <gs...@gmail.com>.
On Thursday 29 June 2006 16:57 Matt Benson wrote:
> Right... I was going to ask, are(n't) the modified
> sources still compatible with ml.exe?  If so, there
> shouldn't be much reason -not- to adopt a
> least-common-denominator approach (applying your
> changes), should there?  I'm not much on makefiles,
> but it might be nice to be able to parameterize the
> assembler in some way.

The reason I used NASM was that it uses Intel's instruction notations 
(compared to gas which uses AT&T) so port was easier. But no, the syntax of 
instructions is not the only difference. The main difference is compiler 
directives which every assermbler invents on its own. Also NASM has different 
syntax for memory operations. So if there is a common denominator I don't 
know about it.

> I will have to go back and try to reassemble those
> conversations; I intend to have a look at making all
> the Ant build stuff as performant as possible, but I
> suppose I will need to know what's on the horizon wrt
> the structure of the native stuff.  In any event, I
> hope cygwin is supported soon (I doubt I personally
> could get it working in anything like a reasonable
> amount of time)... currently I open a VC window, run
> the MS SDK SetEnv /XP32 /DEBUG, run another batch file
> to make all the other env. changes I need, and use
> that CMD prompt to run Ant.  Then I do everything else
> in a cygwin window.  Annoying.  :)

I've written already how to change cygwin.bat to set up VS.NET environment for 
cygwin window. The cmd shell is so less usable than bash. You just have to 
remember to use windows paths when dealing with windows native progs and 
java.

-- 
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: [classlib] Can't build native on winXP

Posted by Matt Benson <gu...@yahoo.com>.
--- Gregory Shimansky <gs...@gmail.com> wrote:

> 2006/6/29, Matt Benson <gu...@yahoo.com>:
[SNIP]
> > using nasmw in place of ml, and I simply changed
> the
> > definition in depends/build/rules.mak .
> 
> 
> Good to know it has worked for you!
> 
> Is there a
> > better place to put this change so I'm not
> altering
> > versioned files?
> >
> 
> I am afraid no, at the moment classlib build does
> not support different
> assembly compilers out of the box, so the NASM port
> really requires changing
> makefiles directly. The sources have to be replaced
> as well for the same
> reason, there are no places for different assembly
> sources in the current
> classlib layout.
> 
Right... I was going to ask, are(n't) the modified
sources still compatible with ml.exe?  If so, there
shouldn't be much reason -not- to adopt a
least-common-denominator approach (applying your
changes), should there?  I'm not much on makefiles,
but it might be nice to be able to parameterize the
assembler in some way.

> I think it will be improved when someone seriously
> tries to port classlib to
> Cygwin on MinGW toolchain which will probably happen
> after native code is
> restructured to modules. Then it will be possibly to
> improve every module
> separately as Mark wrote recently.

I will have to go back and try to reassemble those
conversations; I intend to have a look at making all
the Ant build stuff as performant as possible, but I
suppose I will need to know what's on the horizon wrt
the structure of the native stuff.  In any event, I
hope cygwin is supported soon (I doubt I personally
could get it working in anything like a reasonable
amount of time)... currently I open a VC window, run
the MS SDK SetEnv /XP32 /DEBUG, run another batch file
to make all the other env. changes I need, and use
that CMD prompt to run Ant.  Then I do everything else
in a cygwin window.  Annoying.  :)

Thanks again,
Matt

> 
> -- 
> Gregory Shimansky, Intel Middleware Products
> Division
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
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: [classlib] Can't build native on winXP

Posted by Gregory Shimansky <gs...@gmail.com>.
2006/6/29, Matt Benson <gu...@yahoo.com>:
>
> --- Gregory Shimansky <gs...@gmail.com> wrote:
> [SNIP]
> > You can also take a look at this [1] discussion, a
> > very similar question was
> > asked just recently.
> >
>
> Gregory:
>
> Thanks for all the pointers.  I have not touched C
> since (2 year!) college other than to run make on
> stuff here and there and it took me awhile to wade
> through all this stuff.  Plus I didn't read your links
> well enough and ended up figuring out e.g. the secure
> getenv etc. calls on my own before rereading and
> realizing I'd duplicated work!  :)  Currently I am
> using nasmw in place of ml, and I simply changed the
> definition in depends/build/rules.mak .


Good to know it has worked for you!

Is there a
> better place to put this change so I'm not altering
> versioned files?
>

I am afraid no, at the moment classlib build does not support different
assembly compilers out of the box, so the NASM port really requires changing
makefiles directly. The sources have to be replaced as well for the same
reason, there are no places for different assembly sources in the current
classlib layout.

I think it will be improved when someone seriously tries to port classlib to
Cygwin on MinGW toolchain which will probably happen after native code is
restructured to modules. Then it will be possibly to improve every module
separately as Mark wrote recently.

-- 
Gregory Shimansky, Intel Middleware Products Division

Re: [classlib] Can't build native on winXP

Posted by Oliver Deakin <ol...@googlemail.com>.
Never seen that before - thanks!

Regards,
Oliver

Dmitry M. Kononov wrote:
> There is another way to use gmane:
>
> http://news.gmane.org/gmane.comp.java.harmony.devel
>
> On 6/28/06, Oliver Deakin <ol...@googlemail.com> wrote:
>> There are archives of the mailing list on gmane [1] - you can get a
>> single thread
>> view by clicking on the "comments" link at the bottom of the post you 
>> are
>> interested in. I havnt really used this much before, just stumbled
>> across it once
>> by chance.
>>
>> Regards,
>> Oliver
>>
>> [1] http://blog.gmane.org/gmane.comp.java.harmony.devel
>
> Thanks.

-- 
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: [classlib] Can't build native on winXP

Posted by "Dmitry M. Kononov" <dm...@gmail.com>.
There is another way to use gmane:

http://news.gmane.org/gmane.comp.java.harmony.devel

On 6/28/06, Oliver Deakin <ol...@googlemail.com> wrote:
> There are archives of the mailing list on gmane [1] - you can get a
> single thread
> view by clicking on the "comments" link at the bottom of the post you are
> interested in. I havnt really used this much before, just stumbled
> across it once
> by chance.
>
> Regards,
> Oliver
>
> [1] http://blog.gmane.org/gmane.comp.java.harmony.devel

Thanks.
-- 
Dmitry M. Kononov
Intel Managed Runtime 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: [classlib] Can't build native on winXP

Posted by Oliver Deakin <ol...@googlemail.com>.
Gregory Shimansky wrote:
> On Wednesday 28 June 2006 02:08 Matt Benson wrote:
>   
>> nmake seems to choke looking for a ntwin32.mak file.
>> I don't care too much about the native stuff actually,
>> but I wanted to play with the build system, so I want
>> to make sure I don't break anything.  Does anyone have
>> any advice?
>>     
>
> The file ntwin32.mak and win32.mak can be found in Microsoft Platform SDK. 
> When you install it, it will have SetEnv.Cmd script which sets up INCLUDE, 
> LIB and PATH variables to have necessary paths which nmake also uses 
> (INCLUDE) to find the necessary files such as ntwin32.mak.
>
> You can also take a look at this [1] discussion, a very similar question was 
> asked just recently.
>
> Unfortunately the mail-archives.apache.org have a very inconvenient interface 
> to read a thread of replies (is there a good way to do it with a web 
> interface?).
>   

There are archives of the mailing list on gmane [1] - you can get a 
single thread
view by clicking on the "comments" link at the bottom of the post you are
interested in. I havnt really used this much before, just stumbled 
across it once
by chance.

Regards,
Oliver

[1] http://blog.gmane.org/gmane.comp.java.harmony.devel

> [1] 
> http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200606.mbox/%3c44A03845.7040607@gmail.com%3e
>
>   

-- 
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: [classlib] Can't build native on winXP

Posted by Matt Benson <gu...@yahoo.com>.
--- Gregory Shimansky <gs...@gmail.com> wrote:
[SNIP]
> You can also take a look at this [1] discussion, a
> very similar question was 
> asked just recently.
> 

Gregory:

Thanks for all the pointers.  I have not touched C
since (2 year!) college other than to run make on
stuff here and there and it took me awhile to wade
through all this stuff.  Plus I didn't read your links
well enough and ended up figuring out e.g. the secure
getenv etc. calls on my own before rereading and
realizing I'd duplicated work!  :)  Currently I am
using nasmw in place of ml, and I simply changed the
definition in depends/build/rules.mak .  Is there a
better place to put this change so I'm not altering
versioned files?

Thanks,
Matt


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
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: [classlib] Can't build native on winXP

Posted by Matt Benson <gu...@yahoo.com>.
Thanks, Gregory... my embarrassed apologies for having
managed to skim those messages without retaining
anything useful!

-Matt

--- Gregory Shimansky <gs...@gmail.com> wrote:

> On Wednesday 28 June 2006 02:08 Matt Benson wrote:
> > nmake seems to choke looking for a ntwin32.mak
> file.
> > I don't care too much about the native stuff
> actually,
> > but I wanted to play with the build system, so I
> want
> > to make sure I don't break anything.  Does anyone
> have
> > any advice?
> 
> The file ntwin32.mak and win32.mak can be found in
> Microsoft Platform SDK. 
> When you install it, it will have SetEnv.Cmd script
> which sets up INCLUDE, 
> LIB and PATH variables to have necessary paths which
> nmake also uses 
> (INCLUDE) to find the necessary files such as
> ntwin32.mak.
> 
> You can also take a look at this [1] discussion, a
> very similar question was 
> asked just recently.
> 
> Unfortunately the mail-archives.apache.org have a
> very inconvenient interface 
> to read a thread of replies (is there a good way to
> do it with a web 
> interface?).
> 
> [1] 
>
http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200606.mbox/%3c44A03845.7040607@gmail.com%3e
> 
> -- 
> 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
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
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: [classlib] Can't build native on winXP

Posted by Gregory Shimansky <gs...@gmail.com>.
On Wednesday 28 June 2006 02:08 Matt Benson wrote:
> nmake seems to choke looking for a ntwin32.mak file.
> I don't care too much about the native stuff actually,
> but I wanted to play with the build system, so I want
> to make sure I don't break anything.  Does anyone have
> any advice?

The file ntwin32.mak and win32.mak can be found in Microsoft Platform SDK. 
When you install it, it will have SetEnv.Cmd script which sets up INCLUDE, 
LIB and PATH variables to have necessary paths which nmake also uses 
(INCLUDE) to find the necessary files such as ntwin32.mak.

You can also take a look at this [1] discussion, a very similar question was 
asked just recently.

Unfortunately the mail-archives.apache.org have a very inconvenient interface 
to read a thread of replies (is there a good way to do it with a web 
interface?).

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

-- 
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