You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Charles Lee <li...@gmail.com> on 2009/11/05 07:30:01 UTC

Problems bulding with VS 2008

Hello guys,

I am trying to build harmony java6 using vs 2008 and a LINK ERROR occurred:

*LINK : warning LNK4044: unrecognized option '/comment:Platform port ......*
*
*
*It seems visual studio 2008 does not support /comment link option any
more. *
*1. Is it ok to delete the comment option?*
*2. Is there a way to add these comment some where?*

-- 
Yours sincerely,
Charles Lee

Re: Problems bulding with VS 2008

Posted by Regis <xu...@gmail.com>.
Charles Lee wrote:
> Hello guys,
> 
> I am trying to build harmony java6 using vs 2008 and a LINK ERROR occurred:
> 
> *LINK : warning LNK4044: unrecognized option '/comment:Platform port ......*
> *
> *
> *It seems visual studio 2008 does not support /comment link option any
> more. *
> *1. Is it ok to delete the comment option?*
> *2. Is there a way to add these comment some where?*
> 

Maybe there is another option to add comment in VS2008?

-- 
Best Regards,
Regis.

Re: Problems bulding with VS 2008

Posted by Tim Ellison <t....@gmail.com>.
On 10/Nov/2009 02:45, Charles Lee wrote:
> On Mon, Nov 9, 2009 at 5:31 PM, Tim Ellison <t....@gmail.com> wrote:
>> On 09/Nov/2009 04:20, Charles Lee wrote:
>>> Also I have noticed that in our build script, we do not specify the javac
>>> encoding. Is there any concern on this?
>> I looked at the ECJ options page, but it doesn't say what default
>> encoding will be used.  We could explicitly state it as "UTF-8" if you
>> are having trouble?
>
> Not having any trouble here. But I have noticed that some places in script
> are specified in UTF-8. I just wonder why not specify UTF-8 in other places
> :)

Feel free to submit a patch :-)

Regards,
Tim


Re: Problems bulding with VS 2008

Posted by Charles Lee <li...@gmail.com>.
Thanks Tim. Please see below.

On Mon, Nov 9, 2009 at 5:31 PM, Tim Ellison <t....@gmail.com> wrote:

> On 09/Nov/2009 04:20, Charles Lee wrote:
> > That's strange. I also encounter the same problem when I build federate.
>
> Ok, I'll go through and remove the /comment options from the link lines.
>  In the meantime I've just removed the comment pass through in our
> rules at repo revision r834004.
>
> FWIW I'm using "Microsoft (R) Incremental Linker Version 9.00.21022.08"
> and don't see the same problems.
>

I have the same version of Linker as you post. The problem I guess is the
different between our local default un-unicode language.
Comment in Unicode form  can avoid this problem.


>
> > Besides, there is also a tiny comment problem:
> >
> > diff --git modules/awt/src/main/native/fontlib/shared/Tables.h
> > modules/awt/src/main/native/fontlib/shared/Tables.h
> > index 61c8bed..02cf43d 100644
> > --- modules/awt/src/main/native/fontlib/shared/Tables.h
> > +++ modules/awt/src/main/native/fontlib/shared/Tables.h
> > @@ -167,7 +167,7 @@ typedef struct
> >         fshort ascender;                     /* typographic ascent */
> >         fshort descender;             /* typographic descent */
> >         fshort line_gap;              /* typographic line gap */
> > -       ufshort advance_width_max;    /* Maximum advance width value in
> > \221hmtx\222 table */
> > +       ufshort advance_width_max;    /* Maximum advance width value in
> > \u0060hmtx\u00B4 table */
> >         fshort min_left_sidebearing;
> >         fshort min_right_sidebearing; /* Min(aw - lsb - (xMax - xMin)) */
> >         fshort xMaxExtent;            /* Max(lsb + (xMax - xMin)) */
> >
> > The original one using a octal form, which will fail on my platform code
> > page (CP_936). I have changed it to the unicode one and it pass.
>
> I just replaced them with ' in repo revision r834003.
>
> > Also I have noticed that in our build script, we do not specify the javac
> > encoding. Is there any concern on this?
>
> I looked at the ECJ options page, but it doesn't say what default
> encoding will be used.  We could explicitly state it as "UTF-8" if you
> are having trouble?
>
>
Not having any trouble here. But I have noticed that some places in script
are specified in UTF-8. I just wonder why not specify UTF-8 in other places
:)


> Regards,
> Tim
>
> > On Thu, Nov 5, 2009 at 6:40 PM, Tim Ellison <t....@gmail.com>
> wrote:
> >
> >> On 05/Nov/2009 06:30, Charles Lee wrote:
> >>> I am trying to build harmony java6 using vs 2008 and a LINK ERROR
> >> occurred:
> >>> *LINK : warning LNK4044: unrecognized option '/comment:Platform port
> >> ......*
> >>> *
> >>> *
> >>> *It seems visual studio 2008 does not support /comment link option any
> >>> more. *
> >>> *1. Is it ok to delete the comment option?*
> >>> *2. Is there a way to add these comment some where?*
> >> Strange, I can compile the Java 5 branch ok with VS2008 using the same
> >> command lines.
> >>
> >> Anyway, I suggest that we remove the /comment linker option and ensure
> >> that the VS_VERSION_INFO block is up to date in the DLL's .rc file.
> >>
> >> Regards,
> >> Tim
> >>
> >>
> >
> >
>



-- 
Yours sincerely,
Charles Lee

Re: Problems bulding with VS 2008

Posted by Charles Lee <li...@gmail.com>.
About comment option, I have no idea now :-(

On Mon, Nov 9, 2009 at 5:31 PM, Tim Ellison <t....@gmail.com> wrote:

> On 09/Nov/2009 04:20, Charles Lee wrote:
> > That's strange. I also encounter the same problem when I build federate.
>
> Ok, I'll go through and remove the /comment options from the link lines.
>  In the meantime I've just removed the comment pass through in our
> rules at repo revision r834004.
>
> FWIW I'm using "Microsoft (R) Incremental Linker Version 9.00.21022.08"
> and don't see the same problems.
>
> > Besides, there is also a tiny comment problem:
> >
> > diff --git modules/awt/src/main/native/fontlib/shared/Tables.h
> > modules/awt/src/main/native/fontlib/shared/Tables.h
> > index 61c8bed..02cf43d 100644
> > --- modules/awt/src/main/native/fontlib/shared/Tables.h
> > +++ modules/awt/src/main/native/fontlib/shared/Tables.h
> > @@ -167,7 +167,7 @@ typedef struct
> >         fshort ascender;                     /* typographic ascent */
> >         fshort descender;             /* typographic descent */
> >         fshort line_gap;              /* typographic line gap */
> > -       ufshort advance_width_max;    /* Maximum advance width value in
> > \221hmtx\222 table */
> > +       ufshort advance_width_max;    /* Maximum advance width value in
> > \u0060hmtx\u00B4 table */
> >         fshort min_left_sidebearing;
> >         fshort min_right_sidebearing; /* Min(aw - lsb - (xMax - xMin)) */
> >         fshort xMaxExtent;            /* Max(lsb + (xMax - xMin)) */
> >
> > The original one using a octal form, which will fail on my platform code
> > page (CP_936). I have changed it to the unicode one and it pass.
>
> I just replaced them with ' in repo revision r834003.
>
> > Also I have noticed that in our build script, we do not specify the javac
> > encoding. Is there any concern on this?
>
> I looked at the ECJ options page, but it doesn't say what default
> encoding will be used.  We could explicitly state it as "UTF-8" if you
> are having trouble?
>
> Regards,
> Tim
>
> > On Thu, Nov 5, 2009 at 6:40 PM, Tim Ellison <t....@gmail.com>
> wrote:
> >
> >> On 05/Nov/2009 06:30, Charles Lee wrote:
> >>> I am trying to build harmony java6 using vs 2008 and a LINK ERROR
> >> occurred:
> >>> *LINK : warning LNK4044: unrecognized option '/comment:Platform port
> >> ......*
> >>> *
> >>> *
> >>> *It seems visual studio 2008 does not support /comment link option any
> >>> more. *
> >>> *1. Is it ok to delete the comment option?*
> >>> *2. Is there a way to add these comment some where?*
> >> Strange, I can compile the Java 5 branch ok with VS2008 using the same
> >> command lines.
> >>
> >> Anyway, I suggest that we remove the /comment linker option and ensure
> >> that the VS_VERSION_INFO block is up to date in the DLL's .rc file.
> >>
> >> Regards,
> >> Tim
> >>
> >>
> >
> >
>



-- 
Yours sincerely,
Charles Lee

Re: Problems bulding with VS 2008

Posted by Tim Ellison <t....@gmail.com>.
On 09/Nov/2009 04:20, Charles Lee wrote:
> That's strange. I also encounter the same problem when I build federate.

Ok, I'll go through and remove the /comment options from the link lines.
  In the meantime I've just removed the comment pass through in our
rules at repo revision r834004.

FWIW I'm using "Microsoft (R) Incremental Linker Version 9.00.21022.08"
and don't see the same problems.

> Besides, there is also a tiny comment problem:
> 
> diff --git modules/awt/src/main/native/fontlib/shared/Tables.h
> modules/awt/src/main/native/fontlib/shared/Tables.h
> index 61c8bed..02cf43d 100644
> --- modules/awt/src/main/native/fontlib/shared/Tables.h
> +++ modules/awt/src/main/native/fontlib/shared/Tables.h
> @@ -167,7 +167,7 @@ typedef struct
>         fshort ascender;                     /* typographic ascent */
>         fshort descender;             /* typographic descent */
>         fshort line_gap;              /* typographic line gap */
> -       ufshort advance_width_max;    /* Maximum advance width value in
> \221hmtx\222 table */
> +       ufshort advance_width_max;    /* Maximum advance width value in
> \u0060hmtx\u00B4 table */
>         fshort min_left_sidebearing;
>         fshort min_right_sidebearing; /* Min(aw - lsb - (xMax - xMin)) */
>         fshort xMaxExtent;            /* Max(lsb + (xMax - xMin)) */
> 
> The original one using a octal form, which will fail on my platform code
> page (CP_936). I have changed it to the unicode one and it pass.

I just replaced them with ' in repo revision r834003.

> Also I have noticed that in our build script, we do not specify the javac
> encoding. Is there any concern on this?

I looked at the ECJ options page, but it doesn't say what default
encoding will be used.  We could explicitly state it as "UTF-8" if you
are having trouble?

Regards,
Tim

> On Thu, Nov 5, 2009 at 6:40 PM, Tim Ellison <t....@gmail.com> wrote:
> 
>> On 05/Nov/2009 06:30, Charles Lee wrote:
>>> I am trying to build harmony java6 using vs 2008 and a LINK ERROR
>> occurred:
>>> *LINK : warning LNK4044: unrecognized option '/comment:Platform port
>> ......*
>>> *
>>> *
>>> *It seems visual studio 2008 does not support /comment link option any
>>> more. *
>>> *1. Is it ok to delete the comment option?*
>>> *2. Is there a way to add these comment some where?*
>> Strange, I can compile the Java 5 branch ok with VS2008 using the same
>> command lines.
>>
>> Anyway, I suggest that we remove the /comment linker option and ensure
>> that the VS_VERSION_INFO block is up to date in the DLL's .rc file.
>>
>> Regards,
>> Tim
>>
>>
> 
> 

Re: Problems bulding with VS 2008

Posted by Charles Lee <li...@gmail.com>.
That's strange. I also encounter the same problem when I build federate.
Besides, there is also a tiny comment problem:

diff --git modules/awt/src/main/native/fontlib/shared/Tables.h
modules/awt/src/main/native/fontlib/shared/Tables.h
index 61c8bed..02cf43d 100644
--- modules/awt/src/main/native/fontlib/shared/Tables.h
+++ modules/awt/src/main/native/fontlib/shared/Tables.h
@@ -167,7 +167,7 @@ typedef struct
        fshort ascender;                     /* typographic ascent */
        fshort descender;             /* typographic descent */
        fshort line_gap;              /* typographic line gap */
-       ufshort advance_width_max;    /* Maximum advance width value in
\221hmtx\222 table */
+       ufshort advance_width_max;    /* Maximum advance width value in
\u0060hmtx\u00B4 table */
        fshort min_left_sidebearing;
        fshort min_right_sidebearing; /* Min(aw - lsb - (xMax - xMin)) */
        fshort xMaxExtent;            /* Max(lsb + (xMax - xMin)) */

The original one using a octal form, which will fail on my platform code
page (CP_936). I have changed it to the unicode one and it pass.
Also I have noticed that in our build script, we do not specify the javac
encoding. Is there any concern on this?


On Thu, Nov 5, 2009 at 6:40 PM, Tim Ellison <t....@gmail.com> wrote:

> On 05/Nov/2009 06:30, Charles Lee wrote:
> > I am trying to build harmony java6 using vs 2008 and a LINK ERROR
> occurred:
> >
> > *LINK : warning LNK4044: unrecognized option '/comment:Platform port
> ......*
> > *
> > *
> > *It seems visual studio 2008 does not support /comment link option any
> > more. *
> > *1. Is it ok to delete the comment option?*
> > *2. Is there a way to add these comment some where?*
>
> Strange, I can compile the Java 5 branch ok with VS2008 using the same
> command lines.
>
> Anyway, I suggest that we remove the /comment linker option and ensure
> that the VS_VERSION_INFO block is up to date in the DLL's .rc file.
>
> Regards,
> Tim
>
>


-- 
Yours sincerely,
Charles Lee

Re: Problems bulding with VS 2008

Posted by Tim Ellison <t....@gmail.com>.
On 05/Nov/2009 10:40, Tim Ellison wrote:
> On 05/Nov/2009 06:30, Charles Lee wrote:
>> I am trying to build harmony java6 using vs 2008 and a LINK ERROR occurred:
>>
>> *LINK : warning LNK4044: unrecognized option '/comment:Platform port ......*
>> *
>> *
>> *It seems visual studio 2008 does not support /comment link option any
>> more. *
>> *1. Is it ok to delete the comment option?*
>> *2. Is there a way to add these comment some where?*
> 
> Strange, I can compile the Java 5 branch ok with VS2008 using the same
> command lines.
> 
> Anyway, I suggest that we remove the /comment linker option and ensure
> that the VS_VERSION_INFO block is up to date in the DLL's .rc file.

p.s. Of course, the quick fix for you to make progress is to remove the
COMMENT var from the makefile rules, i.e.

Index: depends/build/rules.mak
===================================================================
--- depends/build/rules.mak	(revision 832793)
+++ depends/build/rules.mak	(working copy)
@@ -49,7 +49,6 @@
 	link $(VMLINK) /debug /opt:icf /opt:ref /INCREMENTAL:NO /NOLOGO \
 	/NODEFAULTLIB:libcmt /NODEFAULTLIB:libc /FORCE:UNRESOLVED \
 	-entry:_DllMainCRTStartup$(DLLENTRY) -dll /BASE:$(DLLBASE)
-machine:$(CPU) \
-	$(COMMENT) \
 	-subsystem:windows -out:$@ \
 	-map:$(LIBPATH)$(*F).map -pdb:$(DBGPATH)$(*F).pdb \
         -manifestfile:$(LIBPATH)$(*F).manifest \

and we can tidy up the makefiles lazily.

Tim

Re: Problems bulding with VS 2008

Posted by Tim Ellison <t....@gmail.com>.
On 05/Nov/2009 06:30, Charles Lee wrote:
> I am trying to build harmony java6 using vs 2008 and a LINK ERROR occurred:
> 
> *LINK : warning LNK4044: unrecognized option '/comment:Platform port ......*
> *
> *
> *It seems visual studio 2008 does not support /comment link option any
> more. *
> *1. Is it ok to delete the comment option?*
> *2. Is there a way to add these comment some where?*

Strange, I can compile the Java 5 branch ok with VS2008 using the same
command lines.

Anyway, I suggest that we remove the /comment linker option and ensure
that the VS_VERSION_INFO block is up to date in the DLL's .rc file.

Regards,
Tim