You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Davanum Srinivas <da...@gmail.com> on 2007/10/22 15:31:26 UTC

[build] Update on my build progress

Folks,

Neex your help. Platform is Windows XP. Please see enclosed diff for
the changes i had to make to get this far.

Products:
- Microsoft Platform SDK for Windows Server 2003 R2
- Microsoft Visual C++ 2005 Express Edition
- Microsoft Macro Assembler 8.0 (MASM) Package (x86) /

Current failure:

     [exec]     link  /debug /opt:icf /opt:ref /INCREMENTAL:NO /NOLOGO
 -entry:_DllMainCRTStartup@12 -dll /BASE:0x13300000 -machine:i386
/comment:"LCMM Wrapper native code. (c) Copyright 2005 - 2006 The
Apache Software Foundation or its licensors, a
s applicable."  -subsystem:windows -out:..\lcmm.dll -map:..\lcmm.map
..\shared\cmmerror.obj  ..\shared\cmmio.obj  ..\shared\
cmmxforms.obj  ..\shared\NativeCMM.obj
..\shared\NativeImageFormat.obj lcmm.res
C:\APACHE\harmony\working_classlib\deploy\li
b\hycommon.lib C:\APACHE\harmony\working_classlib\deploy\lib\hythr.lib
C:\APACHE\harmony\working_classlib\deploy\lib\hysig.li
b  C:\APACHE\harmony\working_classlib\deploy\lib\hypool.lib
C:\APACHE\harmony\working_classlib\deploy\lib\vmi.lib C:\APACHE\h
armony\working_classlib\deploy\..\depends\libs\build\lcms\lcms114.lib
ws2_32.lib Iphlpapi.lib  kernel32.lib  ws2_32.lib advap
i32.lib user32.lib gdi32.lib  comdlg32.lib winspool.lib
C:\APACHE\harmony\working_classlib\deploy\lib\lcmm.exp
     [exec] LINK : warning LNK4224: /COMMENT is no longer supported;  ignored
     [exec] LIBCMT.lib(crtheap.obj) : error LNK2005: __malloc_crt
already defined in MSVCRT.lib(MSVCR80.dll)
     [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit
already defined in MSVCRT.lib(MSVCR80.dll)
     [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e
already defined in MSVCRT.lib(MSVCR80.dll)
     [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already
defined in MSVCRT.lib(MSVCR80.dll)
     [exec] LIBCMT.lib(realloc.obj) : error LNK2005: _realloc already
defined in MSVCRT.lib(MSVCR80.dll)
     [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already
defined in MSVCRT.lib(cinitexe.obj)
     [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already
defined in MSVCRT.lib(cinitexe.obj)
     [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already
defined in MSVCRT.lib(cinitexe.obj)
     [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already
defined in MSVCRT.lib(cinitexe.obj)
     [exec] LIBCMT.lib(winxfltr.obj) : error LNK2005: ___CppXcptFilter
already defined in MSVCRT.lib(MSVCR80.dll)
     [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer
already defined in MSVCRT.lib(MSVCR80.dll)
     [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __encoded_null
already defined in MSVCRT.lib(MSVCR80.dll)
     [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer
already defined in MSVCRT.lib(MSVCR80.dll)
     [exec] LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already
defined in MSVCRT.lib(MSVCR80.dll)
     [exec] LIBCMT.lib(mlock.obj) : error LNK2005: __lock already
defined in MSVCRT.lib(MSVCR80.dll)
     [exec] LIBCMT.lib(stricmp.obj) : error LNK2005: __stricmp already
defined in MSVCRT.lib(MSVCR80.dll)
     [exec] LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with
use of other libs; use /NODEFAULTLIB:library
     [exec] LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with
use of other libs; use /NODEFAULTLIB:library
     [exec] LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external
symbol _main referenced in function ___tmainCRTStartup
     [exec] ..\lcmm.dll : fatal error LNK1120: 1 unresolved externals
     [exec] NMAKE : fatal error U1077: '"C:\Program Files\Microsoft
Visual Studio 8\VC\BIN\link.EXE"' : return code '0x460'
     [exec] Stop.

Any ideas?

thanks,
dims

-- 
Davanum Srinivas :: http://davanum.wordpress.com

Re: [build] Update on my build progress

Posted by Alexei Fedotov <al...@gmail.com>.
Great job, Dims! The changes are pretty neat to my personal point of
view. I wonder if it worth to file JIRA to improve VM build system by
means of your patch.

On 10/26/07, Oliver Deakin <ol...@googlemail.com> wrote:
> That's excellent Dims, well done!
>
> Regards,
> Oliver
>
> Davanum Srinivas wrote:
> > Team,
> >
> > Got DLRVM running :)  Please enclosed diff. I used CSimpleArray
> > instead of CAtlArray and patched the ATL headers in PSDK as mentioned
> > in article here:
> > http://www.codeproject.com/wtl/WTLExpress.asp?df=100&forumid=255873&exp=0&fr=26&select=1348720
> >
> > I also had to add #ifndef in apr.h in a couple of spots (line 63 and
> > line 521). But this could be better handled by the build scripts
> > itself.
> > #ifndef _CRT_SECURE_NO_DEPRECATE
> > #define _CRT_SECURE_NO_DEPRECATE
> > #endif
> >
> > Here's proof:
> >
> > C:\APACHE\harmony\working_vm\build\deploy\jdk\jre\bin>java Main
> > java.runtime.name=Apache Harmony
> > sun.boot.library.path=c:\apache\harmony\working_vm\build\de...
> > java.vm.version=11.2.0
> > vm.boot.library.path=c:\apache\harmony\working_vm\build\de...
> > vm.boot.class.path=c:\apache\harmony\working_vm\build\de...
> > java.vendor.url=http://harmony.apache.org
> > java.vm.vendor=Apache Software Foundation
> > path.separator=;
> > java.vm.name=DRLVM
> > user.country=US
> > org.apache.harmony.vm.vmdir=c:\apache\harmony\working_vm\build\de...
> > java.vm.specification.name=Java Virtual Machine Specification
> > user.dir=C:\APACHE\harmony\working_vm\build\de...
> > java.runtime.version=1.5.0
> > os.arch=x86
> > java.io.tmpdir=C:\DOCUME~1\dims\LOCALS~1\Temp
> > line.separator=
> >
> > java.vm.specification.vendor=Sun Microsystems Inc.
> > os.name=Windows XP
> > java.tmpdir=C:\DOCUME~1\dims\LOCALS~1\Temp
> > java.library.path=C:\APACHE\harmony\working_vm\build\de...
> > java.specification.name=Java Platform API Specification
> > java.class.version=50.0
> > java.util.prefs.PreferencesFactory=java.util.prefs.RegistryPreferencesFa...
> > os.version=5.1
> > user.home=C:\Documents and Settings\dims
> > user.timezone=America/New_York
> > file.encoding=8859_1
> > javax.xml.transform.TransformerFactory=org.apache.xalan.xsltc.trax.Transform...
> > java.specification.version=1.5
> > user.name=dims
> > java.class.path=.
> > java.vm.specification.version=1.0
> > java.home=C:\APACHE\harmony\working_vm\build\de...
> > user.language=en
> > java.specification.vendor=Sun Microsystems Inc.
> > java.vm.info=no info
> > java.version=1.5.0
> > java.ext.dirs=c:\apache\harmony\working_vm\build\de...
> > sun.boot.class.path=c:\apache\harmony\working_vm\build\de...
> > java.vendor=Apache Software Foundation
> > file.separator=\
> > java.compiler=client
> > org.apache.harmony.boot.class.path=C:\APACHE\harmony\working_vm\build\de...
> >
> > Here's the 3 line java class used :
> >
> > public class Main {
> >       public static void main(String[] args) {
> >               System.getProperties().list(System.out);
> >       }
> > }
> >
> > thanks,
> > dims
> >
> > On 10/25/07, Davanum Srinivas <da...@gmail.com> wrote:
> >
> >> Yep. More details later today!
> >>
> >> -- dims
> >>
> >> On 10/25/07, Oliver Deakin <ol...@googlemail.com> wrote:
> >>
> >>> Hi Dims,
> >>>
> >>> According to this article [1] you should be able to access the ATL
> >>> headers by installing the Platform SDK (linked from that page) and
> >>> adding C:\Program Files\Microsoft Platform SDK\include\atl to your
> >>> include path - is this something you have already tried?
> >>>
> >>> Regards,
> >>> Oliver
> >>>
> >>> [1] http://www.codeproject.com/wtl/WTLExpress.asp
> >>>
> >>>
> >>> Davanum Srinivas wrote:
> >>>
> >>>> Team,
> >>>>
> >>>> MSFT does not ship ATL with the express edition. But some enterprising
> >>>> person has posted info on how to use the old ATL stuff in PSDK.
> >>>>
> >>>> http://www.codeproject.com/wtl/WTLExpress.asp?df=100&forumid=255873&exp=0&fr=26&select=1348720
> >>>>
> >>>> But, we will have to still get rid of CAtlArray usage as that is not
> >>>> available in the old files in PSDK.
> >>>>
> >>>> So, is the ATL dependency a conscious decision? Since it makes harmony
> >>>> build dependent on access to non-free build environment? If not, how
> >>>> easy is it to get rid of the dependency or get it working with the
> >>>> older files in PSDK?
> >>>>
> >>>> Thoughts?
> >>>>
> >>>> -- dims
> >>>>
> >>>> On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
> >>>>
> >>>>
> >>>>> Actually found a way to get past this point using
> >>>>> /FORCE:UNRESOLVED...also threw in a /NODEFAULTLIB:LIBC to get past a
> >>>>> few more errors. Here's where i am stumped now...Basically "Microsoft
> >>>>> Visual C++ 2005 Express Edition" does not seem to support atl.
> >>>>>
> >>>>> -build-native-windows:
> >>>>>      [exec]     cl -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS
> >>>>> -FIsehmap.h -D_X86_=1  -DWIN32 -D_WIN32 -W3 -D_WIN95 -D_
> >>>>> WIN32_WINDOWS=0x0400 /D_WIN32_DCOM -D_WIN32_IE=0x0500 -DWINVER=0x0400
> >>>>> -Zi -Od -D_CRT_SECURE_NO_DEPRECATE  -D_CRT_SECURE_NO_W
> >>>>> ARNINGS  -WX -GF -Gs -MD -Zm400  -D_DLL -D_MT -D_WINSOCKAPI_
> >>>>> /IC:\APACHE\harmony\working_classlib\deploy\include /IC:\APAC
> >>>>> HE\harmony\working_classlib\deploy\jdk\include /I.
> >>>>> -FoWinDataTransfer.obj WinDataTransfer.cpp
> >>>>>      [exec] WinDataTransfer.cpp
> >>>>>      [exec] WinDataTransfer.cpp(23) : fatal error C1083: Cannot open
> >>>>> include file: 'atlbase.h': No such file or directory
> >>>>>      [exec] NMAKE : fatal error U1077: 'cl' : return code '0x2'
> >>>>>      [exec] Stop.
> >>>>>
> >>>>> BUILD FAILED
> >>>>> C:\APACHE\harmony\working_classlib\make\build-native.xml:77: The
> >>>>> following error occurred while executing this line:
> >>>>> C:\APACHE\harmony\working_classlib\modules\awt\build.xml:226: The
> >>>>> following error occurred while executing this line:
> >>>>> C:\APACHE\harmony\working_classlib\make\properties.xml:474: exec returned: 2
> >>>>>
> >>>>>
> >>>>> On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
> >>>>>
> >>>>>
> >>>>>> Looks like other people have similar issues:
> >>>>>> http://support.intel.com/support/performancetools/libraries/mkl/win/sb/CS-022853.htm
> >>>>>>
> >>>>>> And the answer seems to imply that one needs a version of lcms114.lib
> >>>>>> compiled with the latest tool chain :(
> >>>>>>
> >>>>>> -- dims
> >>>>>>
> >>>>>> On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
> >>>>>>
> >>>>>>
> >>>>>>> Oliver,
> >>>>>>>
> >>>>>>> Yep, tried that. Here's the current failure after that change and
> >>>>>>> current diff against latest svn.
> >>>>>>>
> >>>>>>>      [exec] LINK : warning LNK4224: /COMMENT is no longer supported;  ignored
> >>>>>>>      [exec] lcms114.lib(cmserr.obj) : error LNK2019: unresolved
> >>>>>>> external symbol __iob referenced in function _cmsSignalError
> >>>>>>>
> >>>>>>>      [exec] ..\lcmm.dll : fatal error LNK1120: 1 unresolved externals
> >>>>>>>      [exec] NMAKE : fatal error U1077: 'link' : return code '0x460'
> >>>>>>>      [exec] Stop.
> >>>>>>>
> >>>>>>> thanks,
> >>>>>>> dims
> >>>>>>>
> >>>>>>> On 10/22/07, Oliver Deakin <ol...@googlemail.com> wrote:
> >>>>>>>
> >>>>>>>
> >>>>>>>> Hi Dims,
> >>>>>>>>
> >>>>>>>> Looks like you're doing pretty well, that's quite far into the native
> >>>>>>>> build! Interestingly, when I build the natives with MSVC .NET 2003 I
> >>>>>>>> also get the warning:
> >>>>>>>> LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other
> >>>>>>>> libs; use /NODEFAULTLIB:library
> >>>>>>>>
> >>>>>>>> but it is not an error and the build continues, so I wonder if it has
> >>>>>>>> been promoted to an error for MSVC 2005. I looked at your link line and
> >>>>>>>> it is exactly the same as mine (which works) so Im guessing its a
> >>>>>>>> difference between linker versions. Having a google around it appears
> >>>>>>>> that libcmt.lib is the static version of the C runtime, whereas we want
> >>>>>>>> to link against the dynamic version msvcrt.lib. It's not entirely clear
> >>>>>>>> to me why it seems to be linking against both msvcrt.lib and libcmt.lib.
> >>>>>>>>
> >>>>>>>> If you specify /NODEFAULTLIB:"libcmt.lib" in rules.mak does this help?
> >>>>>>>> Adding it to the two "link" lines should do the job I think - i.e. the
> >>>>>>>> link line for DLLNAME and the link line for EXENAME. Adding this option
> >>>>>>>> to my .NET 2003 build doesn't seem to affect the build, and I can run
> >>>>>>>> the LUNI tests successfully so it doesn't appear to hurt.
> >>>>>>>>
> >>>>>>>> I wonder if we should have this flag always set so that we definitely
> >>>>>>>> don't link against the static C runtime library?
> >>>>>>>>
> >>>>>>>> Regards,
> >>>>>>>> Oliver
> >>>>>>>>
> >>>>>>>> Davanum Srinivas wrote:
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>> Folks,
> >>>>>>>>>
> >>>>>>>>> Neex your help. Platform is Windows XP. Please see enclosed diff for
> >>>>>>>>> the changes i had to make to get this far.
> >>>>>>>>>
> >>>>>>>>> Products:
> >>>>>>>>> - Microsoft Platform SDK for Windows Server 2003 R2
> >>>>>>>>> - Microsoft Visual C++ 2005 Express Edition
> >>>>>>>>> - Microsoft Macro Assembler 8.0 (MASM) Package (x86) /
> >>>>>>>>>
> >>>>>>>>> Current failure:
> >>>>>>>>>
> >>>>>>>>>      [exec]     link  /debug /opt:icf /opt:ref /INCREMENTAL:NO /NOLOGO
> >>>>>>>>>  -entry:_DllMainCRTStartup@12 -dll /BASE:0x13300000 -machine:i386
> >>>>>>>>> /comment:"LCMM Wrapper native code. (c) Copyright 2005 - 2006 The
> >>>>>>>>> Apache Software Foundation or its licensors, a
> >>>>>>>>> s applicable."  -subsystem:windows -out:..\lcmm.dll -map:..\lcmm.map
> >>>>>>>>> ..\shared\cmmerror.obj  ..\shared\cmmio.obj  ..\shared\
> >>>>>>>>> cmmxforms.obj  ..\shared\NativeCMM.obj
> >>>>>>>>> ..\shared\NativeImageFormat.obj lcmm.res
> >>>>>>>>> C:\APACHE\harmony\working_classlib\deploy\li
> >>>>>>>>> b\hycommon.lib C:\APACHE\harmony\working_classlib\deploy\lib\hythr.lib
> >>>>>>>>> C:\APACHE\harmony\working_classlib\deploy\lib\hysig.li
> >>>>>>>>> b  C:\APACHE\harmony\working_classlib\deploy\lib\hypool.lib
> >>>>>>>>> C:\APACHE\harmony\working_classlib\deploy\lib\vmi.lib C:\APACHE\h
> >>>>>>>>> armony\working_classlib\deploy\..\depends\libs\build\lcms\lcms114.lib
> >>>>>>>>> ws2_32.lib Iphlpapi.lib  kernel32.lib  ws2_32.lib advap
> >>>>>>>>> i32.lib user32.lib gdi32.lib  comdlg32.lib winspool.lib
> >>>>>>>>> C:\APACHE\harmony\working_classlib\deploy\lib\lcmm.exp
> >>>>>>>>>      [exec] LINK : warning LNK4224: /COMMENT is no longer supported;  ignored
> >>>>>>>>>      [exec] LIBCMT.lib(crtheap.obj) : error LNK2005: __malloc_crt
> >>>>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
> >>>>>>>>>      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit
> >>>>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
> >>>>>>>>>      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e
> >>>>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
> >>>>>>>>>      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already
> >>>>>>>>> defined in MSVCRT.lib(MSVCR80.dll)
> >>>>>>>>>      [exec] LIBCMT.lib(realloc.obj) : error LNK2005: _realloc already
> >>>>>>>>> defined in MSVCRT.lib(MSVCR80.dll)
> >>>>>>>>>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already
> >>>>>>>>> defined in MSVCRT.lib(cinitexe.obj)
> >>>>>>>>>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already
> >>>>>>>>> defined in MSVCRT.lib(cinitexe.obj)
> >>>>>>>>>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already
> >>>>>>>>> defined in MSVCRT.lib(cinitexe.obj)
> >>>>>>>>>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already
> >>>>>>>>> defined in MSVCRT.lib(cinitexe.obj)
> >>>>>>>>>      [exec] LIBCMT.lib(winxfltr.obj) : error LNK2005: ___CppXcptFilter
> >>>>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
> >>>>>>>>>      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer
> >>>>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
> >>>>>>>>>      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __encoded_null
> >>>>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
> >>>>>>>>>      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer
> >>>>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
> >>>>>>>>>      [exec] LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already
> >>>>>>>>> defined in MSVCRT.lib(MSVCR80.dll)
> >>>>>>>>>      [exec] LIBCMT.lib(mlock.obj) : error LNK2005: __lock already
> >>>>>>>>> defined in MSVCRT.lib(MSVCR80.dll)
> >>>>>>>>>      [exec] LIBCMT.lib(stricmp.obj) : error LNK2005: __stricmp already
> >>>>>>>>> defined in MSVCRT.lib(MSVCR80.dll)
> >>>>>>>>>      [exec] LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with
> >>>>>>>>> use of other libs; use /NODEFAULTLIB:library
> >>>>>>>>>      [exec] LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with
> >>>>>>>>> use of other libs; use /NODEFAULTLIB:library
> >>>>>>>>>      [exec] LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external
> >>>>>>>>> symbol _main referenced in function ___tmainCRTStartup
> >>>>>>>>>      [exec] ..\lcmm.dll : fatal error LNK1120: 1 unresolved externals
> >>>>>>>>>      [exec] NMAKE : fatal error U1077: '"C:\Program Files\Microsoft
> >>>>>>>>> Visual Studio 8\VC\BIN\link.EXE"' : return code '0x460'
> >>>>>>>>>      [exec] Stop.
> >>>>>>>>>
> >>>>>>>>> Any ideas?
> >>>>>>>>>
> >>>>>>>>> thanks,
> >>>>>>>>> dims
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>> --
> >>>>>>>> Oliver Deakin
> >>>>>>>> Unless stated otherwise above:
> >>>>>>>> IBM United Kingdom Limited - Registered in England and Wales with number 741598.
> >>>>>>>> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>> --
> >>>>>>> Davanum Srinivas :: http://davanum.wordpress.com
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>> --
> >>>>>> Davanum Srinivas :: http://davanum.wordpress.com
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>> --
> >>>>> Davanum Srinivas :: http://davanum.wordpress.com
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>> --
> >>> Oliver Deakin
> >>> Unless stated otherwise above:
> >>> IBM United Kingdom Limited - Registered in England and Wales with number 741598.
> >>> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
> >>>
> >>>
> >>>
> >> --
> >> Davanum Srinivas :: http://davanum.wordpress.com
> >>
> >>
> >
> >
> >
>
> --
> Oliver Deakin
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
>
>


-- 
With best regards,
Alexei,
ESSD, Intel

Re: [build] Update on my build progress

Posted by Oliver Deakin <ol...@googlemail.com>.
That's excellent Dims, well done!

Regards,
Oliver

Davanum Srinivas wrote:
> Team,
>
> Got DLRVM running :)  Please enclosed diff. I used CSimpleArray
> instead of CAtlArray and patched the ATL headers in PSDK as mentioned
> in article here:
> http://www.codeproject.com/wtl/WTLExpress.asp?df=100&forumid=255873&exp=0&fr=26&select=1348720
>
> I also had to add #ifndef in apr.h in a couple of spots (line 63 and
> line 521). But this could be better handled by the build scripts
> itself.
> #ifndef _CRT_SECURE_NO_DEPRECATE
> #define _CRT_SECURE_NO_DEPRECATE
> #endif
>
> Here's proof:
>
> C:\APACHE\harmony\working_vm\build\deploy\jdk\jre\bin>java Main
> java.runtime.name=Apache Harmony
> sun.boot.library.path=c:\apache\harmony\working_vm\build\de...
> java.vm.version=11.2.0
> vm.boot.library.path=c:\apache\harmony\working_vm\build\de...
> vm.boot.class.path=c:\apache\harmony\working_vm\build\de...
> java.vendor.url=http://harmony.apache.org
> java.vm.vendor=Apache Software Foundation
> path.separator=;
> java.vm.name=DRLVM
> user.country=US
> org.apache.harmony.vm.vmdir=c:\apache\harmony\working_vm\build\de...
> java.vm.specification.name=Java Virtual Machine Specification
> user.dir=C:\APACHE\harmony\working_vm\build\de...
> java.runtime.version=1.5.0
> os.arch=x86
> java.io.tmpdir=C:\DOCUME~1\dims\LOCALS~1\Temp
> line.separator=
>
> java.vm.specification.vendor=Sun Microsystems Inc.
> os.name=Windows XP
> java.tmpdir=C:\DOCUME~1\dims\LOCALS~1\Temp
> java.library.path=C:\APACHE\harmony\working_vm\build\de...
> java.specification.name=Java Platform API Specification
> java.class.version=50.0
> java.util.prefs.PreferencesFactory=java.util.prefs.RegistryPreferencesFa...
> os.version=5.1
> user.home=C:\Documents and Settings\dims
> user.timezone=America/New_York
> file.encoding=8859_1
> javax.xml.transform.TransformerFactory=org.apache.xalan.xsltc.trax.Transform...
> java.specification.version=1.5
> user.name=dims
> java.class.path=.
> java.vm.specification.version=1.0
> java.home=C:\APACHE\harmony\working_vm\build\de...
> user.language=en
> java.specification.vendor=Sun Microsystems Inc.
> java.vm.info=no info
> java.version=1.5.0
> java.ext.dirs=c:\apache\harmony\working_vm\build\de...
> sun.boot.class.path=c:\apache\harmony\working_vm\build\de...
> java.vendor=Apache Software Foundation
> file.separator=\
> java.compiler=client
> org.apache.harmony.boot.class.path=C:\APACHE\harmony\working_vm\build\de...
>
> Here's the 3 line java class used :
>
> public class Main {
> 	public static void main(String[] args) {
> 		System.getProperties().list(System.out);
> 	}
> }
>
> thanks,
> dims
>
> On 10/25/07, Davanum Srinivas <da...@gmail.com> wrote:
>   
>> Yep. More details later today!
>>
>> -- dims
>>
>> On 10/25/07, Oliver Deakin <ol...@googlemail.com> wrote:
>>     
>>> Hi Dims,
>>>
>>> According to this article [1] you should be able to access the ATL
>>> headers by installing the Platform SDK (linked from that page) and
>>> adding C:\Program Files\Microsoft Platform SDK\include\atl to your
>>> include path - is this something you have already tried?
>>>
>>> Regards,
>>> Oliver
>>>
>>> [1] http://www.codeproject.com/wtl/WTLExpress.asp
>>>
>>>
>>> Davanum Srinivas wrote:
>>>       
>>>> Team,
>>>>
>>>> MSFT does not ship ATL with the express edition. But some enterprising
>>>> person has posted info on how to use the old ATL stuff in PSDK.
>>>>
>>>> http://www.codeproject.com/wtl/WTLExpress.asp?df=100&forumid=255873&exp=0&fr=26&select=1348720
>>>>
>>>> But, we will have to still get rid of CAtlArray usage as that is not
>>>> available in the old files in PSDK.
>>>>
>>>> So, is the ATL dependency a conscious decision? Since it makes harmony
>>>> build dependent on access to non-free build environment? If not, how
>>>> easy is it to get rid of the dependency or get it working with the
>>>> older files in PSDK?
>>>>
>>>> Thoughts?
>>>>
>>>> -- dims
>>>>
>>>> On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
>>>>
>>>>         
>>>>> Actually found a way to get past this point using
>>>>> /FORCE:UNRESOLVED...also threw in a /NODEFAULTLIB:LIBC to get past a
>>>>> few more errors. Here's where i am stumped now...Basically "Microsoft
>>>>> Visual C++ 2005 Express Edition" does not seem to support atl.
>>>>>
>>>>> -build-native-windows:
>>>>>      [exec]     cl -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS
>>>>> -FIsehmap.h -D_X86_=1  -DWIN32 -D_WIN32 -W3 -D_WIN95 -D_
>>>>> WIN32_WINDOWS=0x0400 /D_WIN32_DCOM -D_WIN32_IE=0x0500 -DWINVER=0x0400
>>>>> -Zi -Od -D_CRT_SECURE_NO_DEPRECATE  -D_CRT_SECURE_NO_W
>>>>> ARNINGS  -WX -GF -Gs -MD -Zm400  -D_DLL -D_MT -D_WINSOCKAPI_
>>>>> /IC:\APACHE\harmony\working_classlib\deploy\include /IC:\APAC
>>>>> HE\harmony\working_classlib\deploy\jdk\include /I.
>>>>> -FoWinDataTransfer.obj WinDataTransfer.cpp
>>>>>      [exec] WinDataTransfer.cpp
>>>>>      [exec] WinDataTransfer.cpp(23) : fatal error C1083: Cannot open
>>>>> include file: 'atlbase.h': No such file or directory
>>>>>      [exec] NMAKE : fatal error U1077: 'cl' : return code '0x2'
>>>>>      [exec] Stop.
>>>>>
>>>>> BUILD FAILED
>>>>> C:\APACHE\harmony\working_classlib\make\build-native.xml:77: The
>>>>> following error occurred while executing this line:
>>>>> C:\APACHE\harmony\working_classlib\modules\awt\build.xml:226: The
>>>>> following error occurred while executing this line:
>>>>> C:\APACHE\harmony\working_classlib\make\properties.xml:474: exec returned: 2
>>>>>
>>>>>
>>>>> On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
>>>>>
>>>>>           
>>>>>> Looks like other people have similar issues:
>>>>>> http://support.intel.com/support/performancetools/libraries/mkl/win/sb/CS-022853.htm
>>>>>>
>>>>>> And the answer seems to imply that one needs a version of lcms114.lib
>>>>>> compiled with the latest tool chain :(
>>>>>>
>>>>>> -- dims
>>>>>>
>>>>>> On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
>>>>>>
>>>>>>             
>>>>>>> Oliver,
>>>>>>>
>>>>>>> Yep, tried that. Here's the current failure after that change and
>>>>>>> current diff against latest svn.
>>>>>>>
>>>>>>>      [exec] LINK : warning LNK4224: /COMMENT is no longer supported;  ignored
>>>>>>>      [exec] lcms114.lib(cmserr.obj) : error LNK2019: unresolved
>>>>>>> external symbol __iob referenced in function _cmsSignalError
>>>>>>>
>>>>>>>      [exec] ..\lcmm.dll : fatal error LNK1120: 1 unresolved externals
>>>>>>>      [exec] NMAKE : fatal error U1077: 'link' : return code '0x460'
>>>>>>>      [exec] Stop.
>>>>>>>
>>>>>>> thanks,
>>>>>>> dims
>>>>>>>
>>>>>>> On 10/22/07, Oliver Deakin <ol...@googlemail.com> wrote:
>>>>>>>
>>>>>>>               
>>>>>>>> Hi Dims,
>>>>>>>>
>>>>>>>> Looks like you're doing pretty well, that's quite far into the native
>>>>>>>> build! Interestingly, when I build the natives with MSVC .NET 2003 I
>>>>>>>> also get the warning:
>>>>>>>> LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other
>>>>>>>> libs; use /NODEFAULTLIB:library
>>>>>>>>
>>>>>>>> but it is not an error and the build continues, so I wonder if it has
>>>>>>>> been promoted to an error for MSVC 2005. I looked at your link line and
>>>>>>>> it is exactly the same as mine (which works) so Im guessing its a
>>>>>>>> difference between linker versions. Having a google around it appears
>>>>>>>> that libcmt.lib is the static version of the C runtime, whereas we want
>>>>>>>> to link against the dynamic version msvcrt.lib. It's not entirely clear
>>>>>>>> to me why it seems to be linking against both msvcrt.lib and libcmt.lib.
>>>>>>>>
>>>>>>>> If you specify /NODEFAULTLIB:"libcmt.lib" in rules.mak does this help?
>>>>>>>> Adding it to the two "link" lines should do the job I think - i.e. the
>>>>>>>> link line for DLLNAME and the link line for EXENAME. Adding this option
>>>>>>>> to my .NET 2003 build doesn't seem to affect the build, and I can run
>>>>>>>> the LUNI tests successfully so it doesn't appear to hurt.
>>>>>>>>
>>>>>>>> I wonder if we should have this flag always set so that we definitely
>>>>>>>> don't link against the static C runtime library?
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>> Oliver
>>>>>>>>
>>>>>>>> Davanum Srinivas wrote:
>>>>>>>>
>>>>>>>>                 
>>>>>>>>> Folks,
>>>>>>>>>
>>>>>>>>> Neex your help. Platform is Windows XP. Please see enclosed diff for
>>>>>>>>> the changes i had to make to get this far.
>>>>>>>>>
>>>>>>>>> Products:
>>>>>>>>> - Microsoft Platform SDK for Windows Server 2003 R2
>>>>>>>>> - Microsoft Visual C++ 2005 Express Edition
>>>>>>>>> - Microsoft Macro Assembler 8.0 (MASM) Package (x86) /
>>>>>>>>>
>>>>>>>>> Current failure:
>>>>>>>>>
>>>>>>>>>      [exec]     link  /debug /opt:icf /opt:ref /INCREMENTAL:NO /NOLOGO
>>>>>>>>>  -entry:_DllMainCRTStartup@12 -dll /BASE:0x13300000 -machine:i386
>>>>>>>>> /comment:"LCMM Wrapper native code. (c) Copyright 2005 - 2006 The
>>>>>>>>> Apache Software Foundation or its licensors, a
>>>>>>>>> s applicable."  -subsystem:windows -out:..\lcmm.dll -map:..\lcmm.map
>>>>>>>>> ..\shared\cmmerror.obj  ..\shared\cmmio.obj  ..\shared\
>>>>>>>>> cmmxforms.obj  ..\shared\NativeCMM.obj
>>>>>>>>> ..\shared\NativeImageFormat.obj lcmm.res
>>>>>>>>> C:\APACHE\harmony\working_classlib\deploy\li
>>>>>>>>> b\hycommon.lib C:\APACHE\harmony\working_classlib\deploy\lib\hythr.lib
>>>>>>>>> C:\APACHE\harmony\working_classlib\deploy\lib\hysig.li
>>>>>>>>> b  C:\APACHE\harmony\working_classlib\deploy\lib\hypool.lib
>>>>>>>>> C:\APACHE\harmony\working_classlib\deploy\lib\vmi.lib C:\APACHE\h
>>>>>>>>> armony\working_classlib\deploy\..\depends\libs\build\lcms\lcms114.lib
>>>>>>>>> ws2_32.lib Iphlpapi.lib  kernel32.lib  ws2_32.lib advap
>>>>>>>>> i32.lib user32.lib gdi32.lib  comdlg32.lib winspool.lib
>>>>>>>>> C:\APACHE\harmony\working_classlib\deploy\lib\lcmm.exp
>>>>>>>>>      [exec] LINK : warning LNK4224: /COMMENT is no longer supported;  ignored
>>>>>>>>>      [exec] LIBCMT.lib(crtheap.obj) : error LNK2005: __malloc_crt
>>>>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>>>>      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit
>>>>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>>>>      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e
>>>>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>>>>      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already
>>>>>>>>> defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>>>>      [exec] LIBCMT.lib(realloc.obj) : error LNK2005: _realloc already
>>>>>>>>> defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>>>>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already
>>>>>>>>> defined in MSVCRT.lib(cinitexe.obj)
>>>>>>>>>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already
>>>>>>>>> defined in MSVCRT.lib(cinitexe.obj)
>>>>>>>>>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already
>>>>>>>>> defined in MSVCRT.lib(cinitexe.obj)
>>>>>>>>>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already
>>>>>>>>> defined in MSVCRT.lib(cinitexe.obj)
>>>>>>>>>      [exec] LIBCMT.lib(winxfltr.obj) : error LNK2005: ___CppXcptFilter
>>>>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>>>>      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer
>>>>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>>>>      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __encoded_null
>>>>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>>>>      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer
>>>>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>>>>      [exec] LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already
>>>>>>>>> defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>>>>      [exec] LIBCMT.lib(mlock.obj) : error LNK2005: __lock already
>>>>>>>>> defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>>>>      [exec] LIBCMT.lib(stricmp.obj) : error LNK2005: __stricmp already
>>>>>>>>> defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>>>>      [exec] LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with
>>>>>>>>> use of other libs; use /NODEFAULTLIB:library
>>>>>>>>>      [exec] LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with
>>>>>>>>> use of other libs; use /NODEFAULTLIB:library
>>>>>>>>>      [exec] LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external
>>>>>>>>> symbol _main referenced in function ___tmainCRTStartup
>>>>>>>>>      [exec] ..\lcmm.dll : fatal error LNK1120: 1 unresolved externals
>>>>>>>>>      [exec] NMAKE : fatal error U1077: '"C:\Program Files\Microsoft
>>>>>>>>> Visual Studio 8\VC\BIN\link.EXE"' : return code '0x460'
>>>>>>>>>      [exec] Stop.
>>>>>>>>>
>>>>>>>>> Any ideas?
>>>>>>>>>
>>>>>>>>> thanks,
>>>>>>>>> dims
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                   
>>>>>>>> --
>>>>>>>> Oliver Deakin
>>>>>>>> Unless stated otherwise above:
>>>>>>>> IBM United Kingdom Limited - Registered in England and Wales with number 741598.
>>>>>>>> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                 
>>>>>>> --
>>>>>>> Davanum Srinivas :: http://davanum.wordpress.com
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>               
>>>>>> --
>>>>>> Davanum Srinivas :: http://davanum.wordpress.com
>>>>>>
>>>>>>
>>>>>>             
>>>>> --
>>>>> Davanum Srinivas :: http://davanum.wordpress.com
>>>>>
>>>>>
>>>>>           
>>>>
>>>>         
>>> --
>>> Oliver Deakin
>>> Unless stated otherwise above:
>>> IBM United Kingdom Limited - Registered in England and Wales with number 741598.
>>> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
>>>
>>>
>>>       
>> --
>> Davanum Srinivas :: http://davanum.wordpress.com
>>
>>     
>
>
>   

-- 
Oliver Deakin
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU


Re: [build] Update on my build progress

Posted by Tim Ellison <t....@gmail.com>.
Davanum Srinivas wrote:
> Can you please send me the AWT sample that fails?

The failure is actually in loading the modified Win32Wrapper DLL (which
just happens to be by AWT code).  So here's my simple test:

public class LoadDLL {
    public static void main(String[] args) {
        System.out.println("Loading Win32Wrapper...");
        System.loadLibrary("Win32Wrapper");
        System.out.println("Loaded!");
    }
}

when I run it with the modifications shown below [1], this is what I get
(running with the IBM VM):

Loading Win32Wrapper...
DLL debug: Running intialization
DLL debug: Running attach
DLL debug: Running intialization
DLL debug: Running attach
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at
java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:27)
        at java.lang.reflect.Method.invoke(Method.java:258)
        at com.ibm.oti.vm.JarRunner.main(JarRunner.java:42)
Caused by: java.lang.UnsatisfiedLinkError: Win32Wrapper (JVMPORT015E
Unable to resolve DLL references - a prerequisite DLL may be missing)
        at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:113)
        at
java.lang.ClassLoader.loadLibraryWithClassLoader(ClassLoader.java:977)
        at java.lang.System.loadLibrary(System.java:758)
        at LoadDLL.main(LoadDLL.java:6)
        at
java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)
        ... 2 more

(Strange that the DLL debug information shows it being initialized twice?)

The error implies that it may be a prereq DLL missing, but when I load
Win32Wrapper into the dependency checker everything looks fine to me.

Like I said, I'm still using Microsoft Visual Studio .NET 2003, and I
have not patched the ATL headers, so I'm not following exactly what you
were doing -- I'm trying to get the code to a point that will work for
both of us.  Unsuccessfully so far.

Regards,
Tim


[1] My patched file:

Index: WinDataTransfer.cpp
===================================================================
--- WinDataTransfer.cpp	(revision 592037)
+++ WinDataTransfer.cpp	(working copy)
@@ -21,8 +21,12 @@
 #include <windows.h>

 #include <atlbase.h>
+#include <objbase.h>
+
+extern CComModule _Module;
+
+#include <atlwin.h>
 #include <atlcom.h>
-#include <atlcoll.h>

 #include <oleidl.h>
 #include <shlobj.h>
@@ -32,9 +36,6 @@

 #pragma comment(lib, "gdi32.lib")

-class AtlModule : public CAtlModuleT<AtlModule{
-} _AtlModule;
-
 #include "WinDataTransfer.h"

 // Data format names
@@ -100,8 +101,19 @@
     return env;
 }

+extern "C"
+BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID
lpvReserved) {
+	printf("DLL debug: Running intialization\n");
+   if (fdwReason == DLL_PROCESS_ATTACH) {
+	   printf("DLL debug: Running attach\n");
+      _Module.Init(NULL, hInstDLL);
+   } else if (fdwReason == DLL_PROCESS_DETACH) {
+	   printf("DLL debug: Running detach\n");
+      _Module.Term();
+   }
+   return TRUE;
+}

-
 JNIEXPORT void JNICALL
 Java_org_apache_harmony_awt_nativebridge_windows_WinDataTransfer_init(
                JNIEnv * env, jclass clazz) {

Re: [build] Update on my build progress

Posted by Davanum Srinivas <da...@gmail.com>.
Tim,

Can you please send me the AWT sample that fails?

thanks,
dims

On 11/6/07, Tim Ellison <t....@gmail.com> wrote:
> Davanum Srinivas wrote:
> > I think i forgot to add code to init the _Module; Can you please try
> > adding this code to WinDataTransfer.cpp
> >
> > #ifdef WIN32
> > #include <windows.h>
> > BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpres) {
> >     if (dwReason == DLL_PROCESS_ATTACH) {
> >         _Module.Init(NULL, hInstance);
> >     } else if (dwReason == DLL_PROCESS_DETACH) {
> >         _Module.Term();
> >     }
> >     return TRUE;
> > }
> > #endif
> >
> > Please let me know if this works!
>
> I tried numerous variations and can't get it to work.  Just to be clear,
> I'm still using MS Visual Studio .NET 2003, but was hoping to get the
> AWT code into a shape that would with with both that and Express.
>
> ...but I don't think I'm going anywhere with it :-(
>
> Regards,
> Tim
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

Re: [build] Update on my build progress

Posted by Tim Ellison <t....@gmail.com>.
Davanum Srinivas wrote:
> I think i forgot to add code to init the _Module; Can you please try
> adding this code to WinDataTransfer.cpp
> 
> #ifdef WIN32
> #include <windows.h>
> BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpres) {
>     if (dwReason == DLL_PROCESS_ATTACH) {
>         _Module.Init(NULL, hInstance);
>     } else if (dwReason == DLL_PROCESS_DETACH) {
>         _Module.Term();
>     }
>     return TRUE;
> }
> #endif
> 
> Please let me know if this works!

I tried numerous variations and can't get it to work.  Just to be clear,
I'm still using MS Visual Studio .NET 2003, but was hoping to get the
AWT code into a shape that would with with both that and Express.

...but I don't think I'm going anywhere with it :-(

Regards,
Tim


Re: [build] Update on my build progress

Posted by Davanum Srinivas <da...@gmail.com>.
Tim,

I think i forgot to add code to init the _Module; Can you please try
adding this code to WinDataTransfer.cpp

#ifdef WIN32
#include <windows.h>
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpres) {
    if (dwReason == DLL_PROCESS_ATTACH) {
        _Module.Init(NULL, hInstance);
    } else if (dwReason == DLL_PROCESS_DETACH) {
        _Module.Term();
    }
    return TRUE;
}
#endif

Please let me know if this works!

thanks,
dims

PS: My environment broke, Will try to get it back up and running early
next week.

On 11/1/07, Tim Ellison <t....@gmail.com> wrote:
> Dims,
>
> I don't properly understand what you did here [1], though I'll readily
> admit I'm no COM expert.  When I applied those same changes I get a null
> pointer write in the AWT drag and drop code tests.
>
> Any insight (from anyone) about what you were doing here would be helpful.
>
> Thanks,
> Tim
>
> [1] This part of the code you had to tweak:
>
> Index:
> working_classlib/modules/awt/src/main/native/win32wrapper/windows/WinDataTransfer.cpp
> ===================================================================
> ---
> working_classlib/modules/awt/src/main/native/win32wrapper/windows/WinDataTransfer.cpp
> (revision 587081)
> +++
> working_classlib/modules/awt/src/main/native/win32wrapper/windows/WinDataTransfer.cpp
> (working copy)
> @@ -21,8 +21,12 @@
>  #include <windows.h>
>
>  #include <atlbase.h>
> +#include <objbase.h>
> +
> +extern CComModule _Module;
> +
> +#include <atlwin.h>
>  #include <atlcom.h>
> -#include <atlcoll.h>
>
>  #include <oleidl.h>
>  #include <shlobj.h>
> @@ -32,9 +36,6 @@
>
>  #pragma comment(lib, "gdi32.lib")
>
> -class AtlModule : public CAtlModuleT<AtlModule> {
> -} _AtlModule;
> -
>  #include "WinDataTransfer.h"
>
>  // Data format names
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

Re: [build] Update on my build progress

Posted by Tim Ellison <t....@gmail.com>.
Dims,

I don't properly understand what you did here [1], though I'll readily
admit I'm no COM expert.  When I applied those same changes I get a null
pointer write in the AWT drag and drop code tests.

Any insight (from anyone) about what you were doing here would be helpful.

Thanks,
Tim

[1] This part of the code you had to tweak:

Index:
working_classlib/modules/awt/src/main/native/win32wrapper/windows/WinDataTransfer.cpp
===================================================================
---
working_classlib/modules/awt/src/main/native/win32wrapper/windows/WinDataTransfer.cpp
(revision 587081)
+++
working_classlib/modules/awt/src/main/native/win32wrapper/windows/WinDataTransfer.cpp
(working copy)
@@ -21,8 +21,12 @@
 #include <windows.h>

 #include <atlbase.h>
+#include <objbase.h>
+
+extern CComModule _Module;
+
+#include <atlwin.h>
 #include <atlcom.h>
-#include <atlcoll.h>

 #include <oleidl.h>
 #include <shlobj.h>
@@ -32,9 +36,6 @@

 #pragma comment(lib, "gdi32.lib")

-class AtlModule : public CAtlModuleT<AtlModule> {
-} _AtlModule;
-
 #include "WinDataTransfer.h"

 // Data format names

Re: [build] Update on my build progress

Posted by Tim Ellison <t....@gmail.com>.
Good work Dims!

Davanum Srinivas wrote:
> Team,
> 
> Got DLRVM running :)  Please enclosed diff. I used CSimpleArray
> instead of CAtlArray and patched the ATL headers in PSDK as mentioned
> in article here:
> http://www.codeproject.com/wtl/WTLExpress.asp?df=100&forumid=255873&exp=0&fr=26&select=1348720
> 
> I also had to add #ifndef in apr.h in a couple of spots (line 63 and
> line 521). But this could be better handled by the build scripts
> itself.
> #ifndef _CRT_SECURE_NO_DEPRECATE
> #define _CRT_SECURE_NO_DEPRECATE
> #endif
> 
> Here's proof:
> 
> C:\APACHE\harmony\working_vm\build\deploy\jdk\jre\bin>java Main
> java.runtime.name=Apache Harmony
> sun.boot.library.path=c:\apache\harmony\working_vm\build\de...
> java.vm.version=11.2.0
> vm.boot.library.path=c:\apache\harmony\working_vm\build\de...
> vm.boot.class.path=c:\apache\harmony\working_vm\build\de...
> java.vendor.url=http://harmony.apache.org
> java.vm.vendor=Apache Software Foundation
> path.separator=;
> java.vm.name=DRLVM
> user.country=US
> org.apache.harmony.vm.vmdir=c:\apache\harmony\working_vm\build\de...
> java.vm.specification.name=Java Virtual Machine Specification
> user.dir=C:\APACHE\harmony\working_vm\build\de...
> java.runtime.version=1.5.0
> os.arch=x86
> java.io.tmpdir=C:\DOCUME~1\dims\LOCALS~1\Temp
> line.separator=
> 
> java.vm.specification.vendor=Sun Microsystems Inc.
> os.name=Windows XP
> java.tmpdir=C:\DOCUME~1\dims\LOCALS~1\Temp
> java.library.path=C:\APACHE\harmony\working_vm\build\de...
> java.specification.name=Java Platform API Specification
> java.class.version=50.0
> java.util.prefs.PreferencesFactory=java.util.prefs.RegistryPreferencesFa...
> os.version=5.1
> user.home=C:\Documents and Settings\dims
> user.timezone=America/New_York
> file.encoding=8859_1
> javax.xml.transform.TransformerFactory=org.apache.xalan.xsltc.trax.Transform...
> java.specification.version=1.5
> user.name=dims
> java.class.path=.
> java.vm.specification.version=1.0
> java.home=C:\APACHE\harmony\working_vm\build\de...
> user.language=en
> java.specification.vendor=Sun Microsystems Inc.
> java.vm.info=no info
> java.version=1.5.0
> java.ext.dirs=c:\apache\harmony\working_vm\build\de...
> sun.boot.class.path=c:\apache\harmony\working_vm\build\de...
> java.vendor=Apache Software Foundation
> file.separator=\
> java.compiler=client
> org.apache.harmony.boot.class.path=C:\APACHE\harmony\working_vm\build\de...
> 
> Here's the 3 line java class used :
> 
> public class Main {
> 	public static void main(String[] args) {
> 		System.getProperties().list(System.out);
> 	}
> }
> 
> thanks,
> dims
> 
> On 10/25/07, Davanum Srinivas <da...@gmail.com> wrote:
>> Yep. More details later today!
>>
>> -- dims
>>
>> On 10/25/07, Oliver Deakin <ol...@googlemail.com> wrote:
>>> Hi Dims,
>>>
>>> According to this article [1] you should be able to access the ATL
>>> headers by installing the Platform SDK (linked from that page) and
>>> adding C:\Program Files\Microsoft Platform SDK\include\atl to your
>>> include path - is this something you have already tried?
>>>
>>> Regards,
>>> Oliver
>>>
>>> [1] http://www.codeproject.com/wtl/WTLExpress.asp
>>>
>>>
>>> Davanum Srinivas wrote:
>>>> Team,
>>>>
>>>> MSFT does not ship ATL with the express edition. But some enterprising
>>>> person has posted info on how to use the old ATL stuff in PSDK.
>>>>
>>>> http://www.codeproject.com/wtl/WTLExpress.asp?df=100&forumid=255873&exp=0&fr=26&select=1348720
>>>>
>>>> But, we will have to still get rid of CAtlArray usage as that is not
>>>> available in the old files in PSDK.
>>>>
>>>> So, is the ATL dependency a conscious decision? Since it makes harmony
>>>> build dependent on access to non-free build environment? If not, how
>>>> easy is it to get rid of the dependency or get it working with the
>>>> older files in PSDK?
>>>>
>>>> Thoughts?
>>>>
>>>> -- dims
>>>>
>>>> On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
>>>>
>>>>> Actually found a way to get past this point using
>>>>> /FORCE:UNRESOLVED...also threw in a /NODEFAULTLIB:LIBC to get past a
>>>>> few more errors. Here's where i am stumped now...Basically "Microsoft
>>>>> Visual C++ 2005 Express Edition" does not seem to support atl.
>>>>>
>>>>> -build-native-windows:
>>>>>      [exec]     cl -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS
>>>>> -FIsehmap.h -D_X86_=1  -DWIN32 -D_WIN32 -W3 -D_WIN95 -D_
>>>>> WIN32_WINDOWS=0x0400 /D_WIN32_DCOM -D_WIN32_IE=0x0500 -DWINVER=0x0400
>>>>> -Zi -Od -D_CRT_SECURE_NO_DEPRECATE  -D_CRT_SECURE_NO_W
>>>>> ARNINGS  -WX -GF -Gs -MD -Zm400  -D_DLL -D_MT -D_WINSOCKAPI_
>>>>> /IC:\APACHE\harmony\working_classlib\deploy\include /IC:\APAC
>>>>> HE\harmony\working_classlib\deploy\jdk\include /I.
>>>>> -FoWinDataTransfer.obj WinDataTransfer.cpp
>>>>>      [exec] WinDataTransfer.cpp
>>>>>      [exec] WinDataTransfer.cpp(23) : fatal error C1083: Cannot open
>>>>> include file: 'atlbase.h': No such file or directory
>>>>>      [exec] NMAKE : fatal error U1077: 'cl' : return code '0x2'
>>>>>      [exec] Stop.
>>>>>
>>>>> BUILD FAILED
>>>>> C:\APACHE\harmony\working_classlib\make\build-native.xml:77: The
>>>>> following error occurred while executing this line:
>>>>> C:\APACHE\harmony\working_classlib\modules\awt\build.xml:226: The
>>>>> following error occurred while executing this line:
>>>>> C:\APACHE\harmony\working_classlib\make\properties.xml:474: exec returned: 2
>>>>>
>>>>>
>>>>> On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
>>>>>
>>>>>> Looks like other people have similar issues:
>>>>>> http://support.intel.com/support/performancetools/libraries/mkl/win/sb/CS-022853.htm
>>>>>>
>>>>>> And the answer seems to imply that one needs a version of lcms114.lib
>>>>>> compiled with the latest tool chain :(
>>>>>>
>>>>>> -- dims
>>>>>>
>>>>>> On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
>>>>>>
>>>>>>> Oliver,
>>>>>>>
>>>>>>> Yep, tried that. Here's the current failure after that change and
>>>>>>> current diff against latest svn.
>>>>>>>
>>>>>>>      [exec] LINK : warning LNK4224: /COMMENT is no longer supported;  ignored
>>>>>>>      [exec] lcms114.lib(cmserr.obj) : error LNK2019: unresolved
>>>>>>> external symbol __iob referenced in function _cmsSignalError
>>>>>>>
>>>>>>>      [exec] ..\lcmm.dll : fatal error LNK1120: 1 unresolved externals
>>>>>>>      [exec] NMAKE : fatal error U1077: 'link' : return code '0x460'
>>>>>>>      [exec] Stop.
>>>>>>>
>>>>>>> thanks,
>>>>>>> dims
>>>>>>>
>>>>>>> On 10/22/07, Oliver Deakin <ol...@googlemail.com> wrote:
>>>>>>>
>>>>>>>> Hi Dims,
>>>>>>>>
>>>>>>>> Looks like you're doing pretty well, that's quite far into the native
>>>>>>>> build! Interestingly, when I build the natives with MSVC .NET 2003 I
>>>>>>>> also get the warning:
>>>>>>>> LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other
>>>>>>>> libs; use /NODEFAULTLIB:library
>>>>>>>>
>>>>>>>> but it is not an error and the build continues, so I wonder if it has
>>>>>>>> been promoted to an error for MSVC 2005. I looked at your link line and
>>>>>>>> it is exactly the same as mine (which works) so Im guessing its a
>>>>>>>> difference between linker versions. Having a google around it appears
>>>>>>>> that libcmt.lib is the static version of the C runtime, whereas we want
>>>>>>>> to link against the dynamic version msvcrt.lib. It's not entirely clear
>>>>>>>> to me why it seems to be linking against both msvcrt.lib and libcmt.lib.
>>>>>>>>
>>>>>>>> If you specify /NODEFAULTLIB:"libcmt.lib" in rules.mak does this help?
>>>>>>>> Adding it to the two "link" lines should do the job I think - i.e. the
>>>>>>>> link line for DLLNAME and the link line for EXENAME. Adding this option
>>>>>>>> to my .NET 2003 build doesn't seem to affect the build, and I can run
>>>>>>>> the LUNI tests successfully so it doesn't appear to hurt.
>>>>>>>>
>>>>>>>> I wonder if we should have this flag always set so that we definitely
>>>>>>>> don't link against the static C runtime library?
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>> Oliver
>>>>>>>>
>>>>>>>> Davanum Srinivas wrote:
>>>>>>>>
>>>>>>>>> Folks,
>>>>>>>>>
>>>>>>>>> Neex your help. Platform is Windows XP. Please see enclosed diff for
>>>>>>>>> the changes i had to make to get this far.
>>>>>>>>>
>>>>>>>>> Products:
>>>>>>>>> - Microsoft Platform SDK for Windows Server 2003 R2
>>>>>>>>> - Microsoft Visual C++ 2005 Express Edition
>>>>>>>>> - Microsoft Macro Assembler 8.0 (MASM) Package (x86) /
>>>>>>>>>
>>>>>>>>> Current failure:
>>>>>>>>>
>>>>>>>>>      [exec]     link  /debug /opt:icf /opt:ref /INCREMENTAL:NO /NOLOGO
>>>>>>>>>  -entry:_DllMainCRTStartup@12 -dll /BASE:0x13300000 -machine:i386
>>>>>>>>> /comment:"LCMM Wrapper native code. (c) Copyright 2005 - 2006 The
>>>>>>>>> Apache Software Foundation or its licensors, a
>>>>>>>>> s applicable."  -subsystem:windows -out:..\lcmm.dll -map:..\lcmm.map
>>>>>>>>> ..\shared\cmmerror.obj  ..\shared\cmmio.obj  ..\shared\
>>>>>>>>> cmmxforms.obj  ..\shared\NativeCMM.obj
>>>>>>>>> ..\shared\NativeImageFormat.obj lcmm.res
>>>>>>>>> C:\APACHE\harmony\working_classlib\deploy\li
>>>>>>>>> b\hycommon.lib C:\APACHE\harmony\working_classlib\deploy\lib\hythr.lib
>>>>>>>>> C:\APACHE\harmony\working_classlib\deploy\lib\hysig.li
>>>>>>>>> b  C:\APACHE\harmony\working_classlib\deploy\lib\hypool.lib
>>>>>>>>> C:\APACHE\harmony\working_classlib\deploy\lib\vmi.lib C:\APACHE\h
>>>>>>>>> armony\working_classlib\deploy\..\depends\libs\build\lcms\lcms114.lib
>>>>>>>>> ws2_32.lib Iphlpapi.lib  kernel32.lib  ws2_32.lib advap
>>>>>>>>> i32.lib user32.lib gdi32.lib  comdlg32.lib winspool.lib
>>>>>>>>> C:\APACHE\harmony\working_classlib\deploy\lib\lcmm.exp
>>>>>>>>>      [exec] LINK : warning LNK4224: /COMMENT is no longer supported;  ignored
>>>>>>>>>      [exec] LIBCMT.lib(crtheap.obj) : error LNK2005: __malloc_crt
>>>>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>>>>      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit
>>>>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>>>>      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e
>>>>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>>>>      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already
>>>>>>>>> defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>>>>      [exec] LIBCMT.lib(realloc.obj) : error LNK2005: _realloc already
>>>>>>>>> defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>>>>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already
>>>>>>>>> defined in MSVCRT.lib(cinitexe.obj)
>>>>>>>>>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already
>>>>>>>>> defined in MSVCRT.lib(cinitexe.obj)
>>>>>>>>>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already
>>>>>>>>> defined in MSVCRT.lib(cinitexe.obj)
>>>>>>>>>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already
>>>>>>>>> defined in MSVCRT.lib(cinitexe.obj)
>>>>>>>>>      [exec] LIBCMT.lib(winxfltr.obj) : error LNK2005: ___CppXcptFilter
>>>>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>>>>      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer
>>>>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>>>>      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __encoded_null
>>>>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>>>>      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer
>>>>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>>>>      [exec] LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already
>>>>>>>>> defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>>>>      [exec] LIBCMT.lib(mlock.obj) : error LNK2005: __lock already
>>>>>>>>> defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>>>>      [exec] LIBCMT.lib(stricmp.obj) : error LNK2005: __stricmp already
>>>>>>>>> defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>>>>      [exec] LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with
>>>>>>>>> use of other libs; use /NODEFAULTLIB:library
>>>>>>>>>      [exec] LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with
>>>>>>>>> use of other libs; use /NODEFAULTLIB:library
>>>>>>>>>      [exec] LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external
>>>>>>>>> symbol _main referenced in function ___tmainCRTStartup
>>>>>>>>>      [exec] ..\lcmm.dll : fatal error LNK1120: 1 unresolved externals
>>>>>>>>>      [exec] NMAKE : fatal error U1077: '"C:\Program Files\Microsoft
>>>>>>>>> Visual Studio 8\VC\BIN\link.EXE"' : return code '0x460'
>>>>>>>>>      [exec] Stop.
>>>>>>>>>
>>>>>>>>> Any ideas?
>>>>>>>>>
>>>>>>>>> thanks,
>>>>>>>>> dims
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>> --
>>>>>>>> Oliver Deakin
>>>>>>>> Unless stated otherwise above:
>>>>>>>> IBM United Kingdom Limited - Registered in England and Wales with number 741598.
>>>>>>>> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> --
>>>>>>> Davanum Srinivas :: http://davanum.wordpress.com
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> --
>>>>>> Davanum Srinivas :: http://davanum.wordpress.com
>>>>>>
>>>>>>
>>>>> --
>>>>> Davanum Srinivas :: http://davanum.wordpress.com
>>>>>
>>>>>
>>>>
>>>>
>>> --
>>> Oliver Deakin
>>> Unless stated otherwise above:
>>> IBM United Kingdom Limited - Registered in England and Wales with number 741598.
>>> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
>>>
>>>
>>
>> --
>> Davanum Srinivas :: http://davanum.wordpress.com
>>
> 
> 

Re: [build] Update on my build progress

Posted by Davanum Srinivas <da...@gmail.com>.
Team,

Got DLRVM running :)  Please enclosed diff. I used CSimpleArray
instead of CAtlArray and patched the ATL headers in PSDK as mentioned
in article here:
http://www.codeproject.com/wtl/WTLExpress.asp?df=100&forumid=255873&exp=0&fr=26&select=1348720

I also had to add #ifndef in apr.h in a couple of spots (line 63 and
line 521). But this could be better handled by the build scripts
itself.
#ifndef _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_NO_DEPRECATE
#endif

Here's proof:

C:\APACHE\harmony\working_vm\build\deploy\jdk\jre\bin>java Main
java.runtime.name=Apache Harmony
sun.boot.library.path=c:\apache\harmony\working_vm\build\de...
java.vm.version=11.2.0
vm.boot.library.path=c:\apache\harmony\working_vm\build\de...
vm.boot.class.path=c:\apache\harmony\working_vm\build\de...
java.vendor.url=http://harmony.apache.org
java.vm.vendor=Apache Software Foundation
path.separator=;
java.vm.name=DRLVM
user.country=US
org.apache.harmony.vm.vmdir=c:\apache\harmony\working_vm\build\de...
java.vm.specification.name=Java Virtual Machine Specification
user.dir=C:\APACHE\harmony\working_vm\build\de...
java.runtime.version=1.5.0
os.arch=x86
java.io.tmpdir=C:\DOCUME~1\dims\LOCALS~1\Temp
line.separator=

java.vm.specification.vendor=Sun Microsystems Inc.
os.name=Windows XP
java.tmpdir=C:\DOCUME~1\dims\LOCALS~1\Temp
java.library.path=C:\APACHE\harmony\working_vm\build\de...
java.specification.name=Java Platform API Specification
java.class.version=50.0
java.util.prefs.PreferencesFactory=java.util.prefs.RegistryPreferencesFa...
os.version=5.1
user.home=C:\Documents and Settings\dims
user.timezone=America/New_York
file.encoding=8859_1
javax.xml.transform.TransformerFactory=org.apache.xalan.xsltc.trax.Transform...
java.specification.version=1.5
user.name=dims
java.class.path=.
java.vm.specification.version=1.0
java.home=C:\APACHE\harmony\working_vm\build\de...
user.language=en
java.specification.vendor=Sun Microsystems Inc.
java.vm.info=no info
java.version=1.5.0
java.ext.dirs=c:\apache\harmony\working_vm\build\de...
sun.boot.class.path=c:\apache\harmony\working_vm\build\de...
java.vendor=Apache Software Foundation
file.separator=\
java.compiler=client
org.apache.harmony.boot.class.path=C:\APACHE\harmony\working_vm\build\de...

Here's the 3 line java class used :

public class Main {
	public static void main(String[] args) {
		System.getProperties().list(System.out);
	}
}

thanks,
dims

On 10/25/07, Davanum Srinivas <da...@gmail.com> wrote:
> Yep. More details later today!
>
> -- dims
>
> On 10/25/07, Oliver Deakin <ol...@googlemail.com> wrote:
> > Hi Dims,
> >
> > According to this article [1] you should be able to access the ATL
> > headers by installing the Platform SDK (linked from that page) and
> > adding C:\Program Files\Microsoft Platform SDK\include\atl to your
> > include path - is this something you have already tried?
> >
> > Regards,
> > Oliver
> >
> > [1] http://www.codeproject.com/wtl/WTLExpress.asp
> >
> >
> > Davanum Srinivas wrote:
> > > Team,
> > >
> > > MSFT does not ship ATL with the express edition. But some enterprising
> > > person has posted info on how to use the old ATL stuff in PSDK.
> > >
> > > http://www.codeproject.com/wtl/WTLExpress.asp?df=100&forumid=255873&exp=0&fr=26&select=1348720
> > >
> > > But, we will have to still get rid of CAtlArray usage as that is not
> > > available in the old files in PSDK.
> > >
> > > So, is the ATL dependency a conscious decision? Since it makes harmony
> > > build dependent on access to non-free build environment? If not, how
> > > easy is it to get rid of the dependency or get it working with the
> > > older files in PSDK?
> > >
> > > Thoughts?
> > >
> > > -- dims
> > >
> > > On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
> > >
> > >> Actually found a way to get past this point using
> > >> /FORCE:UNRESOLVED...also threw in a /NODEFAULTLIB:LIBC to get past a
> > >> few more errors. Here's where i am stumped now...Basically "Microsoft
> > >> Visual C++ 2005 Express Edition" does not seem to support atl.
> > >>
> > >> -build-native-windows:
> > >>      [exec]     cl -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS
> > >> -FIsehmap.h -D_X86_=1  -DWIN32 -D_WIN32 -W3 -D_WIN95 -D_
> > >> WIN32_WINDOWS=0x0400 /D_WIN32_DCOM -D_WIN32_IE=0x0500 -DWINVER=0x0400
> > >> -Zi -Od -D_CRT_SECURE_NO_DEPRECATE  -D_CRT_SECURE_NO_W
> > >> ARNINGS  -WX -GF -Gs -MD -Zm400  -D_DLL -D_MT -D_WINSOCKAPI_
> > >> /IC:\APACHE\harmony\working_classlib\deploy\include /IC:\APAC
> > >> HE\harmony\working_classlib\deploy\jdk\include /I.
> > >> -FoWinDataTransfer.obj WinDataTransfer.cpp
> > >>      [exec] WinDataTransfer.cpp
> > >>      [exec] WinDataTransfer.cpp(23) : fatal error C1083: Cannot open
> > >> include file: 'atlbase.h': No such file or directory
> > >>      [exec] NMAKE : fatal error U1077: 'cl' : return code '0x2'
> > >>      [exec] Stop.
> > >>
> > >> BUILD FAILED
> > >> C:\APACHE\harmony\working_classlib\make\build-native.xml:77: The
> > >> following error occurred while executing this line:
> > >> C:\APACHE\harmony\working_classlib\modules\awt\build.xml:226: The
> > >> following error occurred while executing this line:
> > >> C:\APACHE\harmony\working_classlib\make\properties.xml:474: exec returned: 2
> > >>
> > >>
> > >> On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
> > >>
> > >>> Looks like other people have similar issues:
> > >>> http://support.intel.com/support/performancetools/libraries/mkl/win/sb/CS-022853.htm
> > >>>
> > >>> And the answer seems to imply that one needs a version of lcms114.lib
> > >>> compiled with the latest tool chain :(
> > >>>
> > >>> -- dims
> > >>>
> > >>> On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
> > >>>
> > >>>> Oliver,
> > >>>>
> > >>>> Yep, tried that. Here's the current failure after that change and
> > >>>> current diff against latest svn.
> > >>>>
> > >>>>      [exec] LINK : warning LNK4224: /COMMENT is no longer supported;  ignored
> > >>>>      [exec] lcms114.lib(cmserr.obj) : error LNK2019: unresolved
> > >>>> external symbol __iob referenced in function _cmsSignalError
> > >>>>
> > >>>>      [exec] ..\lcmm.dll : fatal error LNK1120: 1 unresolved externals
> > >>>>      [exec] NMAKE : fatal error U1077: 'link' : return code '0x460'
> > >>>>      [exec] Stop.
> > >>>>
> > >>>> thanks,
> > >>>> dims
> > >>>>
> > >>>> On 10/22/07, Oliver Deakin <ol...@googlemail.com> wrote:
> > >>>>
> > >>>>> Hi Dims,
> > >>>>>
> > >>>>> Looks like you're doing pretty well, that's quite far into the native
> > >>>>> build! Interestingly, when I build the natives with MSVC .NET 2003 I
> > >>>>> also get the warning:
> > >>>>> LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other
> > >>>>> libs; use /NODEFAULTLIB:library
> > >>>>>
> > >>>>> but it is not an error and the build continues, so I wonder if it has
> > >>>>> been promoted to an error for MSVC 2005. I looked at your link line and
> > >>>>> it is exactly the same as mine (which works) so Im guessing its a
> > >>>>> difference between linker versions. Having a google around it appears
> > >>>>> that libcmt.lib is the static version of the C runtime, whereas we want
> > >>>>> to link against the dynamic version msvcrt.lib. It's not entirely clear
> > >>>>> to me why it seems to be linking against both msvcrt.lib and libcmt.lib.
> > >>>>>
> > >>>>> If you specify /NODEFAULTLIB:"libcmt.lib" in rules.mak does this help?
> > >>>>> Adding it to the two "link" lines should do the job I think - i.e. the
> > >>>>> link line for DLLNAME and the link line for EXENAME. Adding this option
> > >>>>> to my .NET 2003 build doesn't seem to affect the build, and I can run
> > >>>>> the LUNI tests successfully so it doesn't appear to hurt.
> > >>>>>
> > >>>>> I wonder if we should have this flag always set so that we definitely
> > >>>>> don't link against the static C runtime library?
> > >>>>>
> > >>>>> Regards,
> > >>>>> Oliver
> > >>>>>
> > >>>>> Davanum Srinivas wrote:
> > >>>>>
> > >>>>>> Folks,
> > >>>>>>
> > >>>>>> Neex your help. Platform is Windows XP. Please see enclosed diff for
> > >>>>>> the changes i had to make to get this far.
> > >>>>>>
> > >>>>>> Products:
> > >>>>>> - Microsoft Platform SDK for Windows Server 2003 R2
> > >>>>>> - Microsoft Visual C++ 2005 Express Edition
> > >>>>>> - Microsoft Macro Assembler 8.0 (MASM) Package (x86) /
> > >>>>>>
> > >>>>>> Current failure:
> > >>>>>>
> > >>>>>>      [exec]     link  /debug /opt:icf /opt:ref /INCREMENTAL:NO /NOLOGO
> > >>>>>>  -entry:_DllMainCRTStartup@12 -dll /BASE:0x13300000 -machine:i386
> > >>>>>> /comment:"LCMM Wrapper native code. (c) Copyright 2005 - 2006 The
> > >>>>>> Apache Software Foundation or its licensors, a
> > >>>>>> s applicable."  -subsystem:windows -out:..\lcmm.dll -map:..\lcmm.map
> > >>>>>> ..\shared\cmmerror.obj  ..\shared\cmmio.obj  ..\shared\
> > >>>>>> cmmxforms.obj  ..\shared\NativeCMM.obj
> > >>>>>> ..\shared\NativeImageFormat.obj lcmm.res
> > >>>>>> C:\APACHE\harmony\working_classlib\deploy\li
> > >>>>>> b\hycommon.lib C:\APACHE\harmony\working_classlib\deploy\lib\hythr.lib
> > >>>>>> C:\APACHE\harmony\working_classlib\deploy\lib\hysig.li
> > >>>>>> b  C:\APACHE\harmony\working_classlib\deploy\lib\hypool.lib
> > >>>>>> C:\APACHE\harmony\working_classlib\deploy\lib\vmi.lib C:\APACHE\h
> > >>>>>> armony\working_classlib\deploy\..\depends\libs\build\lcms\lcms114.lib
> > >>>>>> ws2_32.lib Iphlpapi.lib  kernel32.lib  ws2_32.lib advap
> > >>>>>> i32.lib user32.lib gdi32.lib  comdlg32.lib winspool.lib
> > >>>>>> C:\APACHE\harmony\working_classlib\deploy\lib\lcmm.exp
> > >>>>>>      [exec] LINK : warning LNK4224: /COMMENT is no longer supported;  ignored
> > >>>>>>      [exec] LIBCMT.lib(crtheap.obj) : error LNK2005: __malloc_crt
> > >>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
> > >>>>>>      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit
> > >>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
> > >>>>>>      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e
> > >>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
> > >>>>>>      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already
> > >>>>>> defined in MSVCRT.lib(MSVCR80.dll)
> > >>>>>>      [exec] LIBCMT.lib(realloc.obj) : error LNK2005: _realloc already
> > >>>>>> defined in MSVCRT.lib(MSVCR80.dll)
> > >>>>>>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already
> > >>>>>> defined in MSVCRT.lib(cinitexe.obj)
> > >>>>>>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already
> > >>>>>> defined in MSVCRT.lib(cinitexe.obj)
> > >>>>>>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already
> > >>>>>> defined in MSVCRT.lib(cinitexe.obj)
> > >>>>>>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already
> > >>>>>> defined in MSVCRT.lib(cinitexe.obj)
> > >>>>>>      [exec] LIBCMT.lib(winxfltr.obj) : error LNK2005: ___CppXcptFilter
> > >>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
> > >>>>>>      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer
> > >>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
> > >>>>>>      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __encoded_null
> > >>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
> > >>>>>>      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer
> > >>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
> > >>>>>>      [exec] LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already
> > >>>>>> defined in MSVCRT.lib(MSVCR80.dll)
> > >>>>>>      [exec] LIBCMT.lib(mlock.obj) : error LNK2005: __lock already
> > >>>>>> defined in MSVCRT.lib(MSVCR80.dll)
> > >>>>>>      [exec] LIBCMT.lib(stricmp.obj) : error LNK2005: __stricmp already
> > >>>>>> defined in MSVCRT.lib(MSVCR80.dll)
> > >>>>>>      [exec] LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with
> > >>>>>> use of other libs; use /NODEFAULTLIB:library
> > >>>>>>      [exec] LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with
> > >>>>>> use of other libs; use /NODEFAULTLIB:library
> > >>>>>>      [exec] LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external
> > >>>>>> symbol _main referenced in function ___tmainCRTStartup
> > >>>>>>      [exec] ..\lcmm.dll : fatal error LNK1120: 1 unresolved externals
> > >>>>>>      [exec] NMAKE : fatal error U1077: '"C:\Program Files\Microsoft
> > >>>>>> Visual Studio 8\VC\BIN\link.EXE"' : return code '0x460'
> > >>>>>>      [exec] Stop.
> > >>>>>>
> > >>>>>> Any ideas?
> > >>>>>>
> > >>>>>> thanks,
> > >>>>>> dims
> > >>>>>>
> > >>>>>>
> > >>>>>>
> > >>>>> --
> > >>>>> Oliver Deakin
> > >>>>> Unless stated otherwise above:
> > >>>>> IBM United Kingdom Limited - Registered in England and Wales with number 741598.
> > >>>>> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
> > >>>>>
> > >>>>>
> > >>>>>
> > >>>> --
> > >>>> Davanum Srinivas :: http://davanum.wordpress.com
> > >>>>
> > >>>>
> > >>>>
> > >>> --
> > >>> Davanum Srinivas :: http://davanum.wordpress.com
> > >>>
> > >>>
> > >> --
> > >> Davanum Srinivas :: http://davanum.wordpress.com
> > >>
> > >>
> > >
> > >
> > >
> >
> > --
> > Oliver Deakin
> > Unless stated otherwise above:
> > IBM United Kingdom Limited - Registered in England and Wales with number 741598.
> > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
> >
> >
>
>
> --
> Davanum Srinivas :: http://davanum.wordpress.com
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

Re: [build] Update on my build progress

Posted by Davanum Srinivas <da...@gmail.com>.
Yep. More details later today!

-- dims

On 10/25/07, Oliver Deakin <ol...@googlemail.com> wrote:
> Hi Dims,
>
> According to this article [1] you should be able to access the ATL
> headers by installing the Platform SDK (linked from that page) and
> adding C:\Program Files\Microsoft Platform SDK\include\atl to your
> include path - is this something you have already tried?
>
> Regards,
> Oliver
>
> [1] http://www.codeproject.com/wtl/WTLExpress.asp
>
>
> Davanum Srinivas wrote:
> > Team,
> >
> > MSFT does not ship ATL with the express edition. But some enterprising
> > person has posted info on how to use the old ATL stuff in PSDK.
> >
> > http://www.codeproject.com/wtl/WTLExpress.asp?df=100&forumid=255873&exp=0&fr=26&select=1348720
> >
> > But, we will have to still get rid of CAtlArray usage as that is not
> > available in the old files in PSDK.
> >
> > So, is the ATL dependency a conscious decision? Since it makes harmony
> > build dependent on access to non-free build environment? If not, how
> > easy is it to get rid of the dependency or get it working with the
> > older files in PSDK?
> >
> > Thoughts?
> >
> > -- dims
> >
> > On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
> >
> >> Actually found a way to get past this point using
> >> /FORCE:UNRESOLVED...also threw in a /NODEFAULTLIB:LIBC to get past a
> >> few more errors. Here's where i am stumped now...Basically "Microsoft
> >> Visual C++ 2005 Express Edition" does not seem to support atl.
> >>
> >> -build-native-windows:
> >>      [exec]     cl -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS
> >> -FIsehmap.h -D_X86_=1  -DWIN32 -D_WIN32 -W3 -D_WIN95 -D_
> >> WIN32_WINDOWS=0x0400 /D_WIN32_DCOM -D_WIN32_IE=0x0500 -DWINVER=0x0400
> >> -Zi -Od -D_CRT_SECURE_NO_DEPRECATE  -D_CRT_SECURE_NO_W
> >> ARNINGS  -WX -GF -Gs -MD -Zm400  -D_DLL -D_MT -D_WINSOCKAPI_
> >> /IC:\APACHE\harmony\working_classlib\deploy\include /IC:\APAC
> >> HE\harmony\working_classlib\deploy\jdk\include /I.
> >> -FoWinDataTransfer.obj WinDataTransfer.cpp
> >>      [exec] WinDataTransfer.cpp
> >>      [exec] WinDataTransfer.cpp(23) : fatal error C1083: Cannot open
> >> include file: 'atlbase.h': No such file or directory
> >>      [exec] NMAKE : fatal error U1077: 'cl' : return code '0x2'
> >>      [exec] Stop.
> >>
> >> BUILD FAILED
> >> C:\APACHE\harmony\working_classlib\make\build-native.xml:77: The
> >> following error occurred while executing this line:
> >> C:\APACHE\harmony\working_classlib\modules\awt\build.xml:226: The
> >> following error occurred while executing this line:
> >> C:\APACHE\harmony\working_classlib\make\properties.xml:474: exec returned: 2
> >>
> >>
> >> On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
> >>
> >>> Looks like other people have similar issues:
> >>> http://support.intel.com/support/performancetools/libraries/mkl/win/sb/CS-022853.htm
> >>>
> >>> And the answer seems to imply that one needs a version of lcms114.lib
> >>> compiled with the latest tool chain :(
> >>>
> >>> -- dims
> >>>
> >>> On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
> >>>
> >>>> Oliver,
> >>>>
> >>>> Yep, tried that. Here's the current failure after that change and
> >>>> current diff against latest svn.
> >>>>
> >>>>      [exec] LINK : warning LNK4224: /COMMENT is no longer supported;  ignored
> >>>>      [exec] lcms114.lib(cmserr.obj) : error LNK2019: unresolved
> >>>> external symbol __iob referenced in function _cmsSignalError
> >>>>
> >>>>      [exec] ..\lcmm.dll : fatal error LNK1120: 1 unresolved externals
> >>>>      [exec] NMAKE : fatal error U1077: 'link' : return code '0x460'
> >>>>      [exec] Stop.
> >>>>
> >>>> thanks,
> >>>> dims
> >>>>
> >>>> On 10/22/07, Oliver Deakin <ol...@googlemail.com> wrote:
> >>>>
> >>>>> Hi Dims,
> >>>>>
> >>>>> Looks like you're doing pretty well, that's quite far into the native
> >>>>> build! Interestingly, when I build the natives with MSVC .NET 2003 I
> >>>>> also get the warning:
> >>>>> LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other
> >>>>> libs; use /NODEFAULTLIB:library
> >>>>>
> >>>>> but it is not an error and the build continues, so I wonder if it has
> >>>>> been promoted to an error for MSVC 2005. I looked at your link line and
> >>>>> it is exactly the same as mine (which works) so Im guessing its a
> >>>>> difference between linker versions. Having a google around it appears
> >>>>> that libcmt.lib is the static version of the C runtime, whereas we want
> >>>>> to link against the dynamic version msvcrt.lib. It's not entirely clear
> >>>>> to me why it seems to be linking against both msvcrt.lib and libcmt.lib.
> >>>>>
> >>>>> If you specify /NODEFAULTLIB:"libcmt.lib" in rules.mak does this help?
> >>>>> Adding it to the two "link" lines should do the job I think - i.e. the
> >>>>> link line for DLLNAME and the link line for EXENAME. Adding this option
> >>>>> to my .NET 2003 build doesn't seem to affect the build, and I can run
> >>>>> the LUNI tests successfully so it doesn't appear to hurt.
> >>>>>
> >>>>> I wonder if we should have this flag always set so that we definitely
> >>>>> don't link against the static C runtime library?
> >>>>>
> >>>>> Regards,
> >>>>> Oliver
> >>>>>
> >>>>> Davanum Srinivas wrote:
> >>>>>
> >>>>>> Folks,
> >>>>>>
> >>>>>> Neex your help. Platform is Windows XP. Please see enclosed diff for
> >>>>>> the changes i had to make to get this far.
> >>>>>>
> >>>>>> Products:
> >>>>>> - Microsoft Platform SDK for Windows Server 2003 R2
> >>>>>> - Microsoft Visual C++ 2005 Express Edition
> >>>>>> - Microsoft Macro Assembler 8.0 (MASM) Package (x86) /
> >>>>>>
> >>>>>> Current failure:
> >>>>>>
> >>>>>>      [exec]     link  /debug /opt:icf /opt:ref /INCREMENTAL:NO /NOLOGO
> >>>>>>  -entry:_DllMainCRTStartup@12 -dll /BASE:0x13300000 -machine:i386
> >>>>>> /comment:"LCMM Wrapper native code. (c) Copyright 2005 - 2006 The
> >>>>>> Apache Software Foundation or its licensors, a
> >>>>>> s applicable."  -subsystem:windows -out:..\lcmm.dll -map:..\lcmm.map
> >>>>>> ..\shared\cmmerror.obj  ..\shared\cmmio.obj  ..\shared\
> >>>>>> cmmxforms.obj  ..\shared\NativeCMM.obj
> >>>>>> ..\shared\NativeImageFormat.obj lcmm.res
> >>>>>> C:\APACHE\harmony\working_classlib\deploy\li
> >>>>>> b\hycommon.lib C:\APACHE\harmony\working_classlib\deploy\lib\hythr.lib
> >>>>>> C:\APACHE\harmony\working_classlib\deploy\lib\hysig.li
> >>>>>> b  C:\APACHE\harmony\working_classlib\deploy\lib\hypool.lib
> >>>>>> C:\APACHE\harmony\working_classlib\deploy\lib\vmi.lib C:\APACHE\h
> >>>>>> armony\working_classlib\deploy\..\depends\libs\build\lcms\lcms114.lib
> >>>>>> ws2_32.lib Iphlpapi.lib  kernel32.lib  ws2_32.lib advap
> >>>>>> i32.lib user32.lib gdi32.lib  comdlg32.lib winspool.lib
> >>>>>> C:\APACHE\harmony\working_classlib\deploy\lib\lcmm.exp
> >>>>>>      [exec] LINK : warning LNK4224: /COMMENT is no longer supported;  ignored
> >>>>>>      [exec] LIBCMT.lib(crtheap.obj) : error LNK2005: __malloc_crt
> >>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
> >>>>>>      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit
> >>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
> >>>>>>      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e
> >>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
> >>>>>>      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already
> >>>>>> defined in MSVCRT.lib(MSVCR80.dll)
> >>>>>>      [exec] LIBCMT.lib(realloc.obj) : error LNK2005: _realloc already
> >>>>>> defined in MSVCRT.lib(MSVCR80.dll)
> >>>>>>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already
> >>>>>> defined in MSVCRT.lib(cinitexe.obj)
> >>>>>>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already
> >>>>>> defined in MSVCRT.lib(cinitexe.obj)
> >>>>>>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already
> >>>>>> defined in MSVCRT.lib(cinitexe.obj)
> >>>>>>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already
> >>>>>> defined in MSVCRT.lib(cinitexe.obj)
> >>>>>>      [exec] LIBCMT.lib(winxfltr.obj) : error LNK2005: ___CppXcptFilter
> >>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
> >>>>>>      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer
> >>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
> >>>>>>      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __encoded_null
> >>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
> >>>>>>      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer
> >>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
> >>>>>>      [exec] LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already
> >>>>>> defined in MSVCRT.lib(MSVCR80.dll)
> >>>>>>      [exec] LIBCMT.lib(mlock.obj) : error LNK2005: __lock already
> >>>>>> defined in MSVCRT.lib(MSVCR80.dll)
> >>>>>>      [exec] LIBCMT.lib(stricmp.obj) : error LNK2005: __stricmp already
> >>>>>> defined in MSVCRT.lib(MSVCR80.dll)
> >>>>>>      [exec] LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with
> >>>>>> use of other libs; use /NODEFAULTLIB:library
> >>>>>>      [exec] LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with
> >>>>>> use of other libs; use /NODEFAULTLIB:library
> >>>>>>      [exec] LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external
> >>>>>> symbol _main referenced in function ___tmainCRTStartup
> >>>>>>      [exec] ..\lcmm.dll : fatal error LNK1120: 1 unresolved externals
> >>>>>>      [exec] NMAKE : fatal error U1077: '"C:\Program Files\Microsoft
> >>>>>> Visual Studio 8\VC\BIN\link.EXE"' : return code '0x460'
> >>>>>>      [exec] Stop.
> >>>>>>
> >>>>>> Any ideas?
> >>>>>>
> >>>>>> thanks,
> >>>>>> dims
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>> --
> >>>>> Oliver Deakin
> >>>>> Unless stated otherwise above:
> >>>>> IBM United Kingdom Limited - Registered in England and Wales with number 741598.
> >>>>> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
> >>>>>
> >>>>>
> >>>>>
> >>>> --
> >>>> Davanum Srinivas :: http://davanum.wordpress.com
> >>>>
> >>>>
> >>>>
> >>> --
> >>> Davanum Srinivas :: http://davanum.wordpress.com
> >>>
> >>>
> >> --
> >> Davanum Srinivas :: http://davanum.wordpress.com
> >>
> >>
> >
> >
> >
>
> --
> Oliver Deakin
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

Re: [build] Update on my build progress

Posted by Oliver Deakin <ol...@googlemail.com>.
Hi Dims,

According to this article [1] you should be able to access the ATL 
headers by installing the Platform SDK (linked from that page) and 
adding C:\Program Files\Microsoft Platform SDK\include\atl to your 
include path - is this something you have already tried?

Regards,
Oliver

[1] http://www.codeproject.com/wtl/WTLExpress.asp


Davanum Srinivas wrote:
> Team,
>
> MSFT does not ship ATL with the express edition. But some enterprising
> person has posted info on how to use the old ATL stuff in PSDK.
>
> http://www.codeproject.com/wtl/WTLExpress.asp?df=100&forumid=255873&exp=0&fr=26&select=1348720
>
> But, we will have to still get rid of CAtlArray usage as that is not
> available in the old files in PSDK.
>
> So, is the ATL dependency a conscious decision? Since it makes harmony
> build dependent on access to non-free build environment? If not, how
> easy is it to get rid of the dependency or get it working with the
> older files in PSDK?
>
> Thoughts?
>
> -- dims
>
> On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
>   
>> Actually found a way to get past this point using
>> /FORCE:UNRESOLVED...also threw in a /NODEFAULTLIB:LIBC to get past a
>> few more errors. Here's where i am stumped now...Basically "Microsoft
>> Visual C++ 2005 Express Edition" does not seem to support atl.
>>
>> -build-native-windows:
>>      [exec]     cl -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS
>> -FIsehmap.h -D_X86_=1  -DWIN32 -D_WIN32 -W3 -D_WIN95 -D_
>> WIN32_WINDOWS=0x0400 /D_WIN32_DCOM -D_WIN32_IE=0x0500 -DWINVER=0x0400
>> -Zi -Od -D_CRT_SECURE_NO_DEPRECATE  -D_CRT_SECURE_NO_W
>> ARNINGS  -WX -GF -Gs -MD -Zm400  -D_DLL -D_MT -D_WINSOCKAPI_
>> /IC:\APACHE\harmony\working_classlib\deploy\include /IC:\APAC
>> HE\harmony\working_classlib\deploy\jdk\include /I.
>> -FoWinDataTransfer.obj WinDataTransfer.cpp
>>      [exec] WinDataTransfer.cpp
>>      [exec] WinDataTransfer.cpp(23) : fatal error C1083: Cannot open
>> include file: 'atlbase.h': No such file or directory
>>      [exec] NMAKE : fatal error U1077: 'cl' : return code '0x2'
>>      [exec] Stop.
>>
>> BUILD FAILED
>> C:\APACHE\harmony\working_classlib\make\build-native.xml:77: The
>> following error occurred while executing this line:
>> C:\APACHE\harmony\working_classlib\modules\awt\build.xml:226: The
>> following error occurred while executing this line:
>> C:\APACHE\harmony\working_classlib\make\properties.xml:474: exec returned: 2
>>
>>
>> On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
>>     
>>> Looks like other people have similar issues:
>>> http://support.intel.com/support/performancetools/libraries/mkl/win/sb/CS-022853.htm
>>>
>>> And the answer seems to imply that one needs a version of lcms114.lib
>>> compiled with the latest tool chain :(
>>>
>>> -- dims
>>>
>>> On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
>>>       
>>>> Oliver,
>>>>
>>>> Yep, tried that. Here's the current failure after that change and
>>>> current diff against latest svn.
>>>>
>>>>      [exec] LINK : warning LNK4224: /COMMENT is no longer supported;  ignored
>>>>      [exec] lcms114.lib(cmserr.obj) : error LNK2019: unresolved
>>>> external symbol __iob referenced in function _cmsSignalError
>>>>
>>>>      [exec] ..\lcmm.dll : fatal error LNK1120: 1 unresolved externals
>>>>      [exec] NMAKE : fatal error U1077: 'link' : return code '0x460'
>>>>      [exec] Stop.
>>>>
>>>> thanks,
>>>> dims
>>>>
>>>> On 10/22/07, Oliver Deakin <ol...@googlemail.com> wrote:
>>>>         
>>>>> Hi Dims,
>>>>>
>>>>> Looks like you're doing pretty well, that's quite far into the native
>>>>> build! Interestingly, when I build the natives with MSVC .NET 2003 I
>>>>> also get the warning:
>>>>> LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other
>>>>> libs; use /NODEFAULTLIB:library
>>>>>
>>>>> but it is not an error and the build continues, so I wonder if it has
>>>>> been promoted to an error for MSVC 2005. I looked at your link line and
>>>>> it is exactly the same as mine (which works) so Im guessing its a
>>>>> difference between linker versions. Having a google around it appears
>>>>> that libcmt.lib is the static version of the C runtime, whereas we want
>>>>> to link against the dynamic version msvcrt.lib. It's not entirely clear
>>>>> to me why it seems to be linking against both msvcrt.lib and libcmt.lib.
>>>>>
>>>>> If you specify /NODEFAULTLIB:"libcmt.lib" in rules.mak does this help?
>>>>> Adding it to the two "link" lines should do the job I think - i.e. the
>>>>> link line for DLLNAME and the link line for EXENAME. Adding this option
>>>>> to my .NET 2003 build doesn't seem to affect the build, and I can run
>>>>> the LUNI tests successfully so it doesn't appear to hurt.
>>>>>
>>>>> I wonder if we should have this flag always set so that we definitely
>>>>> don't link against the static C runtime library?
>>>>>
>>>>> Regards,
>>>>> Oliver
>>>>>
>>>>> Davanum Srinivas wrote:
>>>>>           
>>>>>> Folks,
>>>>>>
>>>>>> Neex your help. Platform is Windows XP. Please see enclosed diff for
>>>>>> the changes i had to make to get this far.
>>>>>>
>>>>>> Products:
>>>>>> - Microsoft Platform SDK for Windows Server 2003 R2
>>>>>> - Microsoft Visual C++ 2005 Express Edition
>>>>>> - Microsoft Macro Assembler 8.0 (MASM) Package (x86) /
>>>>>>
>>>>>> Current failure:
>>>>>>
>>>>>>      [exec]     link  /debug /opt:icf /opt:ref /INCREMENTAL:NO /NOLOGO
>>>>>>  -entry:_DllMainCRTStartup@12 -dll /BASE:0x13300000 -machine:i386
>>>>>> /comment:"LCMM Wrapper native code. (c) Copyright 2005 - 2006 The
>>>>>> Apache Software Foundation or its licensors, a
>>>>>> s applicable."  -subsystem:windows -out:..\lcmm.dll -map:..\lcmm.map
>>>>>> ..\shared\cmmerror.obj  ..\shared\cmmio.obj  ..\shared\
>>>>>> cmmxforms.obj  ..\shared\NativeCMM.obj
>>>>>> ..\shared\NativeImageFormat.obj lcmm.res
>>>>>> C:\APACHE\harmony\working_classlib\deploy\li
>>>>>> b\hycommon.lib C:\APACHE\harmony\working_classlib\deploy\lib\hythr.lib
>>>>>> C:\APACHE\harmony\working_classlib\deploy\lib\hysig.li
>>>>>> b  C:\APACHE\harmony\working_classlib\deploy\lib\hypool.lib
>>>>>> C:\APACHE\harmony\working_classlib\deploy\lib\vmi.lib C:\APACHE\h
>>>>>> armony\working_classlib\deploy\..\depends\libs\build\lcms\lcms114.lib
>>>>>> ws2_32.lib Iphlpapi.lib  kernel32.lib  ws2_32.lib advap
>>>>>> i32.lib user32.lib gdi32.lib  comdlg32.lib winspool.lib
>>>>>> C:\APACHE\harmony\working_classlib\deploy\lib\lcmm.exp
>>>>>>      [exec] LINK : warning LNK4224: /COMMENT is no longer supported;  ignored
>>>>>>      [exec] LIBCMT.lib(crtheap.obj) : error LNK2005: __malloc_crt
>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit
>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e
>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already
>>>>>> defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>      [exec] LIBCMT.lib(realloc.obj) : error LNK2005: _realloc already
>>>>>> defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already
>>>>>> defined in MSVCRT.lib(cinitexe.obj)
>>>>>>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already
>>>>>> defined in MSVCRT.lib(cinitexe.obj)
>>>>>>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already
>>>>>> defined in MSVCRT.lib(cinitexe.obj)
>>>>>>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already
>>>>>> defined in MSVCRT.lib(cinitexe.obj)
>>>>>>      [exec] LIBCMT.lib(winxfltr.obj) : error LNK2005: ___CppXcptFilter
>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer
>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __encoded_null
>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer
>>>>>> already defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>      [exec] LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already
>>>>>> defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>      [exec] LIBCMT.lib(mlock.obj) : error LNK2005: __lock already
>>>>>> defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>      [exec] LIBCMT.lib(stricmp.obj) : error LNK2005: __stricmp already
>>>>>> defined in MSVCRT.lib(MSVCR80.dll)
>>>>>>      [exec] LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with
>>>>>> use of other libs; use /NODEFAULTLIB:library
>>>>>>      [exec] LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with
>>>>>> use of other libs; use /NODEFAULTLIB:library
>>>>>>      [exec] LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external
>>>>>> symbol _main referenced in function ___tmainCRTStartup
>>>>>>      [exec] ..\lcmm.dll : fatal error LNK1120: 1 unresolved externals
>>>>>>      [exec] NMAKE : fatal error U1077: '"C:\Program Files\Microsoft
>>>>>> Visual Studio 8\VC\BIN\link.EXE"' : return code '0x460'
>>>>>>      [exec] Stop.
>>>>>>
>>>>>> Any ideas?
>>>>>>
>>>>>> thanks,
>>>>>> dims
>>>>>>
>>>>>>
>>>>>>             
>>>>> --
>>>>> Oliver Deakin
>>>>> Unless stated otherwise above:
>>>>> IBM United Kingdom Limited - Registered in England and Wales with number 741598.
>>>>> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
>>>>>
>>>>>
>>>>>           
>>>> --
>>>> Davanum Srinivas :: http://davanum.wordpress.com
>>>>
>>>>
>>>>         
>>> --
>>> Davanum Srinivas :: http://davanum.wordpress.com
>>>
>>>       
>> --
>> Davanum Srinivas :: http://davanum.wordpress.com
>>
>>     
>
>
>   

-- 
Oliver Deakin
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU


Re: [build] Update on my build progress

Posted by Spark Shen <sm...@gmail.com>.
Hi

I once tried to build using Microsoft Visual C++ 2005. IIRC, using Microsoft
Visual C++ 2003 & Windows AMD 64 XP
will lead to build failure. I naturally using 2005 express instead and
encounter same problem.
And finally switched to a trail Enterprise Edition. It provides a X86_64
environment
(I could not remember precisely the name the environment), under which the
build is successful.


I think many developers (if not most) on the same platform will encounter
the problem. So, at least
provides an alternative to allow customers to build under free environment
will be valuable.

2 possible alternatives are:

1. Uses other structures than CAtlArray
2. Uses Cygwin environment

Correct me if I am wrong.



2007/10/23, Davanum Srinivas <da...@gmail.com>:
>
> Team,
>
> MSFT does not ship ATL with the express edition. But some enterprising
> person has posted info on how to use the old ATL stuff in PSDK.
>
>
> http://www.codeproject.com/wtl/WTLExpress.asp?df=100&forumid=255873&exp=0&fr=26&select=1348720
>
> But, we will have to still get rid of CAtlArray usage as that is not
> available in the old files in PSDK.
>
> So, is the ATL dependency a conscious decision? Since it makes harmony
> build dependent on access to non-free build environment? If not, how
> easy is it to get rid of the dependency or get it working with the
> older files in PSDK?
>
> Thoughts?
>
> -- dims
>
> On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
> > Actually found a way to get past this point using
> > /FORCE:UNRESOLVED...also threw in a /NODEFAULTLIB:LIBC to get past a
> > few more errors. Here's where i am stumped now...Basically "Microsoft
> > Visual C++ 2005 Express Edition" does not seem to support atl.
> >
> > -build-native-windows:
> >      [exec]     cl -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS
> > -FIsehmap.h -D_X86_=1  -DWIN32 -D_WIN32 -W3 -D_WIN95 -D_
> > WIN32_WINDOWS=0x0400 /D_WIN32_DCOM -D_WIN32_IE=0x0500 -DWINVER=0x0400
> > -Zi -Od -D_CRT_SECURE_NO_DEPRECATE  -D_CRT_SECURE_NO_W
> > ARNINGS  -WX -GF -Gs -MD -Zm400  -D_DLL -D_MT -D_WINSOCKAPI_
> > /IC:\APACHE\harmony\working_classlib\deploy\include /IC:\APAC
> > HE\harmony\working_classlib\deploy\jdk\include /I.
> > -FoWinDataTransfer.obj WinDataTransfer.cpp
> >      [exec] WinDataTransfer.cpp
> >      [exec] WinDataTransfer.cpp(23) : fatal error C1083: Cannot open
> > include file: 'atlbase.h': No such file or directory
> >      [exec] NMAKE : fatal error U1077: 'cl' : return code '0x2'
> >      [exec] Stop.
> >
> > BUILD FAILED
> > C:\APACHE\harmony\working_classlib\make\build-native.xml:77: The
> > following error occurred while executing this line:
> > C:\APACHE\harmony\working_classlib\modules\awt\build.xml:226: The
> > following error occurred while executing this line:
> > C:\APACHE\harmony\working_classlib\make\properties.xml:474: exec
> returned: 2
> >
> >
> > On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
> > > Looks like other people have similar issues:
> > >
> http://support.intel.com/support/performancetools/libraries/mkl/win/sb/CS-022853.htm
> > >
> > > And the answer seems to imply that one needs a version of lcms114.lib
> > > compiled with the latest tool chain :(
> > >
> > > -- dims
> > >
> > > On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
> > > > Oliver,
> > > >
> > > > Yep, tried that. Here's the current failure after that change and
> > > > current diff against latest svn.
> > > >
> > > >      [exec] LINK : warning LNK4224: /COMMENT is no longer
> supported;  ignored
> > > >      [exec] lcms114.lib(cmserr.obj) : error LNK2019: unresolved
> > > > external symbol __iob referenced in function _cmsSignalError
> > > >
> > > >      [exec] ..\lcmm.dll : fatal error LNK1120: 1 unresolved
> externals
> > > >      [exec] NMAKE : fatal error U1077: 'link' : return code '0x460'
> > > >      [exec] Stop.
> > > >
> > > > thanks,
> > > > dims
> > > >
> > > > On 10/22/07, Oliver Deakin <ol...@googlemail.com> wrote:
> > > > > Hi Dims,
> > > > >
> > > > > Looks like you're doing pretty well, that's quite far into the
> native
> > > > > build! Interestingly, when I build the natives with MSVC .NET 2003
> I
> > > > > also get the warning:
> > > > > LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of
> other
> > > > > libs; use /NODEFAULTLIB:library
> > > > >
> > > > > but it is not an error and the build continues, so I wonder if it
> has
> > > > > been promoted to an error for MSVC 2005. I looked at your link
> line and
> > > > > it is exactly the same as mine (which works) so Im guessing its a
> > > > > difference between linker versions. Having a google around it
> appears
> > > > > that libcmt.lib is the static version of the C runtime, whereas we
> want
> > > > > to link against the dynamic version msvcrt.lib. It's not entirely
> clear
> > > > > to me why it seems to be linking against both msvcrt.lib and
> libcmt.lib.
> > > > >
> > > > > If you specify /NODEFAULTLIB:"libcmt.lib" in rules.mak does this
> help?
> > > > > Adding it to the two "link" lines should do the job I think - i.e.
> the
> > > > > link line for DLLNAME and the link line for EXENAME. Adding this
> option
> > > > > to my .NET 2003 build doesn't seem to affect the build, and I can
> run
> > > > > the LUNI tests successfully so it doesn't appear to hurt.
> > > > >
> > > > > I wonder if we should have this flag always set so that we
> definitely
> > > > > don't link against the static C runtime library?
> > > > >
> > > > > Regards,
> > > > > Oliver
> > > > >
> > > > > Davanum Srinivas wrote:
> > > > > > Folks,
> > > > > >
> > > > > > Neex your help. Platform is Windows XP. Please see enclosed diff
> for
> > > > > > the changes i had to make to get this far.
> > > > > >
> > > > > > Products:
> > > > > > - Microsoft Platform SDK for Windows Server 2003 R2
> > > > > > - Microsoft Visual C++ 2005 Express Edition
> > > > > > - Microsoft Macro Assembler 8.0 (MASM) Package (x86) /
> > > > > >
> > > > > > Current failure:
> > > > > >
> > > > > >      [exec]     link  /debug /opt:icf /opt:ref /INCREMENTAL:NO
> /NOLOGO
> > > > > >  -entry:_DllMainCRTStartup@12 -dll /BASE:0x13300000
> -machine:i386
> > > > > > /comment:"LCMM Wrapper native code. (c) Copyright 2005 - 2006
> The
> > > > > > Apache Software Foundation or its licensors, a
> > > > > > s applicable."  -subsystem:windows -out:..\lcmm.dll
> -map:..\lcmm.map
> > > > > > ..\shared\cmmerror.obj  ..\shared\cmmio.obj  ..\shared\
> > > > > > cmmxforms.obj  ..\shared\NativeCMM.obj
> > > > > > ..\shared\NativeImageFormat.obj lcmm.res
> > > > > > C:\APACHE\harmony\working_classlib\deploy\li
> > > > > > b\hycommon.lib
> C:\APACHE\harmony\working_classlib\deploy\lib\hythr.lib
> > > > > > C:\APACHE\harmony\working_classlib\deploy\lib\hysig.li
> > > > > > b  C:\APACHE\harmony\working_classlib\deploy\lib\hypool.lib
> > > > > > C:\APACHE\harmony\working_classlib\deploy\lib\vmi.lib
> C:\APACHE\h
> > > > > >
> armony\working_classlib\deploy\..\depends\libs\build\lcms\lcms114.lib
> > > > > > ws2_32.lib Iphlpapi.lib  kernel32.lib  ws2_32.lib advap
> > > > > > i32.lib user32.lib gdi32.lib  comdlg32.lib winspool.lib
> > > > > > C:\APACHE\harmony\working_classlib\deploy\lib\lcmm.exp
> > > > > >      [exec] LINK : warning LNK4224: /COMMENT is no longer
> supported;  ignored
> > > > > >      [exec] LIBCMT.lib(crtheap.obj) : error LNK2005:
> __malloc_crt
> > > > > > already defined in MSVCRT.lib(MSVCR80.dll)
> > > > > >      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit
> > > > > > already defined in MSVCRT.lib(MSVCR80.dll)
> > > > > >      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005:
> __initterm_e
> > > > > > already defined in MSVCRT.lib(MSVCR80.dll)
> > > > > >      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit
> already
> > > > > > defined in MSVCRT.lib(MSVCR80.dll)
> > > > > >      [exec] LIBCMT.lib(realloc.obj) : error LNK2005: _realloc
> already
> > > > > > defined in MSVCRT.lib(MSVCR80.dll)
> > > > > >      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a
> already
> > > > > > defined in MSVCRT.lib(cinitexe.obj)
> > > > > >      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z
> already
> > > > > > defined in MSVCRT.lib(cinitexe.obj)
> > > > > >      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a
> already
> > > > > > defined in MSVCRT.lib(cinitexe.obj)
> > > > > >      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z
> already
> > > > > > defined in MSVCRT.lib(cinitexe.obj)
> > > > > >      [exec] LIBCMT.lib(winxfltr.obj) : error LNK2005:
> ___CppXcptFilter
> > > > > > already defined in MSVCRT.lib(MSVCR80.dll)
> > > > > >      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005:
> __encode_pointer
> > > > > > already defined in MSVCRT.lib(MSVCR80.dll)
> > > > > >      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005:
> __encoded_null
> > > > > > already defined in MSVCRT.lib(MSVCR80.dll)
> > > > > >      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005:
> __decode_pointer
> > > > > > already defined in MSVCRT.lib(MSVCR80.dll)
> > > > > >      [exec] LIBCMT.lib(mlock.obj) : error LNK2005: __unlock
> already
> > > > > > defined in MSVCRT.lib(MSVCR80.dll)
> > > > > >      [exec] LIBCMT.lib(mlock.obj) : error LNK2005: __lock
> already
> > > > > > defined in MSVCRT.lib(MSVCR80.dll)
> > > > > >      [exec] LIBCMT.lib(stricmp.obj) : error LNK2005: __stricmp
> already
> > > > > > defined in MSVCRT.lib(MSVCR80.dll)
> > > > > >      [exec] LINK : warning LNK4098: defaultlib 'MSVCRT'
> conflicts with
> > > > > > use of other libs; use /NODEFAULTLIB:library
> > > > > >      [exec] LINK : warning LNK4098: defaultlib 'LIBCMT'
> conflicts with
> > > > > > use of other libs; use /NODEFAULTLIB:library
> > > > > >      [exec] LIBCMT.lib(crt0.obj) : error LNK2019: unresolved
> external
> > > > > > symbol _main referenced in function ___tmainCRTStartup
> > > > > >      [exec] ..\lcmm.dll : fatal error LNK1120: 1 unresolved
> externals
> > > > > >      [exec] NMAKE : fatal error U1077: '"C:\Program
> Files\Microsoft
> > > > > > Visual Studio 8\VC\BIN\link.EXE"' : return code '0x460'
> > > > > >      [exec] Stop.
> > > > > >
> > > > > > Any ideas?
> > > > > >
> > > > > > thanks,
> > > > > > dims
> > > > > >
> > > > > >
> > > > >
> > > > > --
> > > > > Oliver Deakin
> > > > > Unless stated otherwise above:
> > > > > IBM United Kingdom Limited - Registered in England and Wales with
> number 741598.
> > > > > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire
> PO6 3AU
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Davanum Srinivas :: http://davanum.wordpress.com
> > > >
> > > >
> > >
> > >
> > > --
> > > Davanum Srinivas :: http://davanum.wordpress.com
> > >
> >
> >
> > --
> > Davanum Srinivas :: http://davanum.wordpress.com
> >
>
>
> --
> Davanum Srinivas :: http://davanum.wordpress.com
>



-- 
Spark Shen
China Software Development Lab, IBM

Re: [build] Update on my build progress

Posted by Davanum Srinivas <da...@gmail.com>.
Team,

MSFT does not ship ATL with the express edition. But some enterprising
person has posted info on how to use the old ATL stuff in PSDK.

http://www.codeproject.com/wtl/WTLExpress.asp?df=100&forumid=255873&exp=0&fr=26&select=1348720

But, we will have to still get rid of CAtlArray usage as that is not
available in the old files in PSDK.

So, is the ATL dependency a conscious decision? Since it makes harmony
build dependent on access to non-free build environment? If not, how
easy is it to get rid of the dependency or get it working with the
older files in PSDK?

Thoughts?

-- dims

On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
> Actually found a way to get past this point using
> /FORCE:UNRESOLVED...also threw in a /NODEFAULTLIB:LIBC to get past a
> few more errors. Here's where i am stumped now...Basically "Microsoft
> Visual C++ 2005 Express Edition" does not seem to support atl.
>
> -build-native-windows:
>      [exec]     cl -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS
> -FIsehmap.h -D_X86_=1  -DWIN32 -D_WIN32 -W3 -D_WIN95 -D_
> WIN32_WINDOWS=0x0400 /D_WIN32_DCOM -D_WIN32_IE=0x0500 -DWINVER=0x0400
> -Zi -Od -D_CRT_SECURE_NO_DEPRECATE  -D_CRT_SECURE_NO_W
> ARNINGS  -WX -GF -Gs -MD -Zm400  -D_DLL -D_MT -D_WINSOCKAPI_
> /IC:\APACHE\harmony\working_classlib\deploy\include /IC:\APAC
> HE\harmony\working_classlib\deploy\jdk\include /I.
> -FoWinDataTransfer.obj WinDataTransfer.cpp
>      [exec] WinDataTransfer.cpp
>      [exec] WinDataTransfer.cpp(23) : fatal error C1083: Cannot open
> include file: 'atlbase.h': No such file or directory
>      [exec] NMAKE : fatal error U1077: 'cl' : return code '0x2'
>      [exec] Stop.
>
> BUILD FAILED
> C:\APACHE\harmony\working_classlib\make\build-native.xml:77: The
> following error occurred while executing this line:
> C:\APACHE\harmony\working_classlib\modules\awt\build.xml:226: The
> following error occurred while executing this line:
> C:\APACHE\harmony\working_classlib\make\properties.xml:474: exec returned: 2
>
>
> On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
> > Looks like other people have similar issues:
> > http://support.intel.com/support/performancetools/libraries/mkl/win/sb/CS-022853.htm
> >
> > And the answer seems to imply that one needs a version of lcms114.lib
> > compiled with the latest tool chain :(
> >
> > -- dims
> >
> > On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
> > > Oliver,
> > >
> > > Yep, tried that. Here's the current failure after that change and
> > > current diff against latest svn.
> > >
> > >      [exec] LINK : warning LNK4224: /COMMENT is no longer supported;  ignored
> > >      [exec] lcms114.lib(cmserr.obj) : error LNK2019: unresolved
> > > external symbol __iob referenced in function _cmsSignalError
> > >
> > >      [exec] ..\lcmm.dll : fatal error LNK1120: 1 unresolved externals
> > >      [exec] NMAKE : fatal error U1077: 'link' : return code '0x460'
> > >      [exec] Stop.
> > >
> > > thanks,
> > > dims
> > >
> > > On 10/22/07, Oliver Deakin <ol...@googlemail.com> wrote:
> > > > Hi Dims,
> > > >
> > > > Looks like you're doing pretty well, that's quite far into the native
> > > > build! Interestingly, when I build the natives with MSVC .NET 2003 I
> > > > also get the warning:
> > > > LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other
> > > > libs; use /NODEFAULTLIB:library
> > > >
> > > > but it is not an error and the build continues, so I wonder if it has
> > > > been promoted to an error for MSVC 2005. I looked at your link line and
> > > > it is exactly the same as mine (which works) so Im guessing its a
> > > > difference between linker versions. Having a google around it appears
> > > > that libcmt.lib is the static version of the C runtime, whereas we want
> > > > to link against the dynamic version msvcrt.lib. It's not entirely clear
> > > > to me why it seems to be linking against both msvcrt.lib and libcmt.lib.
> > > >
> > > > If you specify /NODEFAULTLIB:"libcmt.lib" in rules.mak does this help?
> > > > Adding it to the two "link" lines should do the job I think - i.e. the
> > > > link line for DLLNAME and the link line for EXENAME. Adding this option
> > > > to my .NET 2003 build doesn't seem to affect the build, and I can run
> > > > the LUNI tests successfully so it doesn't appear to hurt.
> > > >
> > > > I wonder if we should have this flag always set so that we definitely
> > > > don't link against the static C runtime library?
> > > >
> > > > Regards,
> > > > Oliver
> > > >
> > > > Davanum Srinivas wrote:
> > > > > Folks,
> > > > >
> > > > > Neex your help. Platform is Windows XP. Please see enclosed diff for
> > > > > the changes i had to make to get this far.
> > > > >
> > > > > Products:
> > > > > - Microsoft Platform SDK for Windows Server 2003 R2
> > > > > - Microsoft Visual C++ 2005 Express Edition
> > > > > - Microsoft Macro Assembler 8.0 (MASM) Package (x86) /
> > > > >
> > > > > Current failure:
> > > > >
> > > > >      [exec]     link  /debug /opt:icf /opt:ref /INCREMENTAL:NO /NOLOGO
> > > > >  -entry:_DllMainCRTStartup@12 -dll /BASE:0x13300000 -machine:i386
> > > > > /comment:"LCMM Wrapper native code. (c) Copyright 2005 - 2006 The
> > > > > Apache Software Foundation or its licensors, a
> > > > > s applicable."  -subsystem:windows -out:..\lcmm.dll -map:..\lcmm.map
> > > > > ..\shared\cmmerror.obj  ..\shared\cmmio.obj  ..\shared\
> > > > > cmmxforms.obj  ..\shared\NativeCMM.obj
> > > > > ..\shared\NativeImageFormat.obj lcmm.res
> > > > > C:\APACHE\harmony\working_classlib\deploy\li
> > > > > b\hycommon.lib C:\APACHE\harmony\working_classlib\deploy\lib\hythr.lib
> > > > > C:\APACHE\harmony\working_classlib\deploy\lib\hysig.li
> > > > > b  C:\APACHE\harmony\working_classlib\deploy\lib\hypool.lib
> > > > > C:\APACHE\harmony\working_classlib\deploy\lib\vmi.lib C:\APACHE\h
> > > > > armony\working_classlib\deploy\..\depends\libs\build\lcms\lcms114.lib
> > > > > ws2_32.lib Iphlpapi.lib  kernel32.lib  ws2_32.lib advap
> > > > > i32.lib user32.lib gdi32.lib  comdlg32.lib winspool.lib
> > > > > C:\APACHE\harmony\working_classlib\deploy\lib\lcmm.exp
> > > > >      [exec] LINK : warning LNK4224: /COMMENT is no longer supported;  ignored
> > > > >      [exec] LIBCMT.lib(crtheap.obj) : error LNK2005: __malloc_crt
> > > > > already defined in MSVCRT.lib(MSVCR80.dll)
> > > > >      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit
> > > > > already defined in MSVCRT.lib(MSVCR80.dll)
> > > > >      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e
> > > > > already defined in MSVCRT.lib(MSVCR80.dll)
> > > > >      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already
> > > > > defined in MSVCRT.lib(MSVCR80.dll)
> > > > >      [exec] LIBCMT.lib(realloc.obj) : error LNK2005: _realloc already
> > > > > defined in MSVCRT.lib(MSVCR80.dll)
> > > > >      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already
> > > > > defined in MSVCRT.lib(cinitexe.obj)
> > > > >      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already
> > > > > defined in MSVCRT.lib(cinitexe.obj)
> > > > >      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already
> > > > > defined in MSVCRT.lib(cinitexe.obj)
> > > > >      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already
> > > > > defined in MSVCRT.lib(cinitexe.obj)
> > > > >      [exec] LIBCMT.lib(winxfltr.obj) : error LNK2005: ___CppXcptFilter
> > > > > already defined in MSVCRT.lib(MSVCR80.dll)
> > > > >      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer
> > > > > already defined in MSVCRT.lib(MSVCR80.dll)
> > > > >      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __encoded_null
> > > > > already defined in MSVCRT.lib(MSVCR80.dll)
> > > > >      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer
> > > > > already defined in MSVCRT.lib(MSVCR80.dll)
> > > > >      [exec] LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already
> > > > > defined in MSVCRT.lib(MSVCR80.dll)
> > > > >      [exec] LIBCMT.lib(mlock.obj) : error LNK2005: __lock already
> > > > > defined in MSVCRT.lib(MSVCR80.dll)
> > > > >      [exec] LIBCMT.lib(stricmp.obj) : error LNK2005: __stricmp already
> > > > > defined in MSVCRT.lib(MSVCR80.dll)
> > > > >      [exec] LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with
> > > > > use of other libs; use /NODEFAULTLIB:library
> > > > >      [exec] LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with
> > > > > use of other libs; use /NODEFAULTLIB:library
> > > > >      [exec] LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external
> > > > > symbol _main referenced in function ___tmainCRTStartup
> > > > >      [exec] ..\lcmm.dll : fatal error LNK1120: 1 unresolved externals
> > > > >      [exec] NMAKE : fatal error U1077: '"C:\Program Files\Microsoft
> > > > > Visual Studio 8\VC\BIN\link.EXE"' : return code '0x460'
> > > > >      [exec] Stop.
> > > > >
> > > > > Any ideas?
> > > > >
> > > > > thanks,
> > > > > dims
> > > > >
> > > > >
> > > >
> > > > --
> > > > Oliver Deakin
> > > > Unless stated otherwise above:
> > > > IBM United Kingdom Limited - Registered in England and Wales with number 741598.
> > > > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
> > > >
> > > >
> > >
> > >
> > > --
> > > Davanum Srinivas :: http://davanum.wordpress.com
> > >
> > >
> >
> >
> > --
> > Davanum Srinivas :: http://davanum.wordpress.com
> >
>
>
> --
> Davanum Srinivas :: http://davanum.wordpress.com
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

Re: [build] Update on my build progress

Posted by Davanum Srinivas <da...@gmail.com>.
Actually found a way to get past this point using
/FORCE:UNRESOLVED...also threw in a /NODEFAULTLIB:LIBC to get past a
few more errors. Here's where i am stumped now...Basically "Microsoft
Visual C++ 2005 Express Edition" does not seem to support atl.

-build-native-windows:
     [exec]     cl -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS
-FIsehmap.h -D_X86_=1  -DWIN32 -D_WIN32 -W3 -D_WIN95 -D_
WIN32_WINDOWS=0x0400 /D_WIN32_DCOM -D_WIN32_IE=0x0500 -DWINVER=0x0400
-Zi -Od -D_CRT_SECURE_NO_DEPRECATE  -D_CRT_SECURE_NO_W
ARNINGS  -WX -GF -Gs -MD -Zm400  -D_DLL -D_MT -D_WINSOCKAPI_
/IC:\APACHE\harmony\working_classlib\deploy\include /IC:\APAC
HE\harmony\working_classlib\deploy\jdk\include /I.
-FoWinDataTransfer.obj WinDataTransfer.cpp
     [exec] WinDataTransfer.cpp
     [exec] WinDataTransfer.cpp(23) : fatal error C1083: Cannot open
include file: 'atlbase.h': No such file or directory
     [exec] NMAKE : fatal error U1077: 'cl' : return code '0x2'
     [exec] Stop.

BUILD FAILED
C:\APACHE\harmony\working_classlib\make\build-native.xml:77: The
following error occurred while executing this line:
C:\APACHE\harmony\working_classlib\modules\awt\build.xml:226: The
following error occurred while executing this line:
C:\APACHE\harmony\working_classlib\make\properties.xml:474: exec returned: 2


On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
> Looks like other people have similar issues:
> http://support.intel.com/support/performancetools/libraries/mkl/win/sb/CS-022853.htm
>
> And the answer seems to imply that one needs a version of lcms114.lib
> compiled with the latest tool chain :(
>
> -- dims
>
> On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
> > Oliver,
> >
> > Yep, tried that. Here's the current failure after that change and
> > current diff against latest svn.
> >
> >      [exec] LINK : warning LNK4224: /COMMENT is no longer supported;  ignored
> >      [exec] lcms114.lib(cmserr.obj) : error LNK2019: unresolved
> > external symbol __iob referenced in function _cmsSignalError
> >
> >      [exec] ..\lcmm.dll : fatal error LNK1120: 1 unresolved externals
> >      [exec] NMAKE : fatal error U1077: 'link' : return code '0x460'
> >      [exec] Stop.
> >
> > thanks,
> > dims
> >
> > On 10/22/07, Oliver Deakin <ol...@googlemail.com> wrote:
> > > Hi Dims,
> > >
> > > Looks like you're doing pretty well, that's quite far into the native
> > > build! Interestingly, when I build the natives with MSVC .NET 2003 I
> > > also get the warning:
> > > LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other
> > > libs; use /NODEFAULTLIB:library
> > >
> > > but it is not an error and the build continues, so I wonder if it has
> > > been promoted to an error for MSVC 2005. I looked at your link line and
> > > it is exactly the same as mine (which works) so Im guessing its a
> > > difference between linker versions. Having a google around it appears
> > > that libcmt.lib is the static version of the C runtime, whereas we want
> > > to link against the dynamic version msvcrt.lib. It's not entirely clear
> > > to me why it seems to be linking against both msvcrt.lib and libcmt.lib.
> > >
> > > If you specify /NODEFAULTLIB:"libcmt.lib" in rules.mak does this help?
> > > Adding it to the two "link" lines should do the job I think - i.e. the
> > > link line for DLLNAME and the link line for EXENAME. Adding this option
> > > to my .NET 2003 build doesn't seem to affect the build, and I can run
> > > the LUNI tests successfully so it doesn't appear to hurt.
> > >
> > > I wonder if we should have this flag always set so that we definitely
> > > don't link against the static C runtime library?
> > >
> > > Regards,
> > > Oliver
> > >
> > > Davanum Srinivas wrote:
> > > > Folks,
> > > >
> > > > Neex your help. Platform is Windows XP. Please see enclosed diff for
> > > > the changes i had to make to get this far.
> > > >
> > > > Products:
> > > > - Microsoft Platform SDK for Windows Server 2003 R2
> > > > - Microsoft Visual C++ 2005 Express Edition
> > > > - Microsoft Macro Assembler 8.0 (MASM) Package (x86) /
> > > >
> > > > Current failure:
> > > >
> > > >      [exec]     link  /debug /opt:icf /opt:ref /INCREMENTAL:NO /NOLOGO
> > > >  -entry:_DllMainCRTStartup@12 -dll /BASE:0x13300000 -machine:i386
> > > > /comment:"LCMM Wrapper native code. (c) Copyright 2005 - 2006 The
> > > > Apache Software Foundation or its licensors, a
> > > > s applicable."  -subsystem:windows -out:..\lcmm.dll -map:..\lcmm.map
> > > > ..\shared\cmmerror.obj  ..\shared\cmmio.obj  ..\shared\
> > > > cmmxforms.obj  ..\shared\NativeCMM.obj
> > > > ..\shared\NativeImageFormat.obj lcmm.res
> > > > C:\APACHE\harmony\working_classlib\deploy\li
> > > > b\hycommon.lib C:\APACHE\harmony\working_classlib\deploy\lib\hythr.lib
> > > > C:\APACHE\harmony\working_classlib\deploy\lib\hysig.li
> > > > b  C:\APACHE\harmony\working_classlib\deploy\lib\hypool.lib
> > > > C:\APACHE\harmony\working_classlib\deploy\lib\vmi.lib C:\APACHE\h
> > > > armony\working_classlib\deploy\..\depends\libs\build\lcms\lcms114.lib
> > > > ws2_32.lib Iphlpapi.lib  kernel32.lib  ws2_32.lib advap
> > > > i32.lib user32.lib gdi32.lib  comdlg32.lib winspool.lib
> > > > C:\APACHE\harmony\working_classlib\deploy\lib\lcmm.exp
> > > >      [exec] LINK : warning LNK4224: /COMMENT is no longer supported;  ignored
> > > >      [exec] LIBCMT.lib(crtheap.obj) : error LNK2005: __malloc_crt
> > > > already defined in MSVCRT.lib(MSVCR80.dll)
> > > >      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit
> > > > already defined in MSVCRT.lib(MSVCR80.dll)
> > > >      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e
> > > > already defined in MSVCRT.lib(MSVCR80.dll)
> > > >      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already
> > > > defined in MSVCRT.lib(MSVCR80.dll)
> > > >      [exec] LIBCMT.lib(realloc.obj) : error LNK2005: _realloc already
> > > > defined in MSVCRT.lib(MSVCR80.dll)
> > > >      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already
> > > > defined in MSVCRT.lib(cinitexe.obj)
> > > >      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already
> > > > defined in MSVCRT.lib(cinitexe.obj)
> > > >      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already
> > > > defined in MSVCRT.lib(cinitexe.obj)
> > > >      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already
> > > > defined in MSVCRT.lib(cinitexe.obj)
> > > >      [exec] LIBCMT.lib(winxfltr.obj) : error LNK2005: ___CppXcptFilter
> > > > already defined in MSVCRT.lib(MSVCR80.dll)
> > > >      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer
> > > > already defined in MSVCRT.lib(MSVCR80.dll)
> > > >      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __encoded_null
> > > > already defined in MSVCRT.lib(MSVCR80.dll)
> > > >      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer
> > > > already defined in MSVCRT.lib(MSVCR80.dll)
> > > >      [exec] LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already
> > > > defined in MSVCRT.lib(MSVCR80.dll)
> > > >      [exec] LIBCMT.lib(mlock.obj) : error LNK2005: __lock already
> > > > defined in MSVCRT.lib(MSVCR80.dll)
> > > >      [exec] LIBCMT.lib(stricmp.obj) : error LNK2005: __stricmp already
> > > > defined in MSVCRT.lib(MSVCR80.dll)
> > > >      [exec] LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with
> > > > use of other libs; use /NODEFAULTLIB:library
> > > >      [exec] LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with
> > > > use of other libs; use /NODEFAULTLIB:library
> > > >      [exec] LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external
> > > > symbol _main referenced in function ___tmainCRTStartup
> > > >      [exec] ..\lcmm.dll : fatal error LNK1120: 1 unresolved externals
> > > >      [exec] NMAKE : fatal error U1077: '"C:\Program Files\Microsoft
> > > > Visual Studio 8\VC\BIN\link.EXE"' : return code '0x460'
> > > >      [exec] Stop.
> > > >
> > > > Any ideas?
> > > >
> > > > thanks,
> > > > dims
> > > >
> > > >
> > >
> > > --
> > > Oliver Deakin
> > > Unless stated otherwise above:
> > > IBM United Kingdom Limited - Registered in England and Wales with number 741598.
> > > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
> > >
> > >
> >
> >
> > --
> > Davanum Srinivas :: http://davanum.wordpress.com
> >
> >
>
>
> --
> Davanum Srinivas :: http://davanum.wordpress.com
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

Re: [build] Update on my build progress

Posted by Davanum Srinivas <da...@gmail.com>.
Looks like other people have similar issues:
http://support.intel.com/support/performancetools/libraries/mkl/win/sb/CS-022853.htm

And the answer seems to imply that one needs a version of lcms114.lib
compiled with the latest tool chain :(

-- dims

On 10/22/07, Davanum Srinivas <da...@gmail.com> wrote:
> Oliver,
>
> Yep, tried that. Here's the current failure after that change and
> current diff against latest svn.
>
>      [exec] LINK : warning LNK4224: /COMMENT is no longer supported;  ignored
>      [exec] lcms114.lib(cmserr.obj) : error LNK2019: unresolved
> external symbol __iob referenced in function _cmsSignalError
>
>      [exec] ..\lcmm.dll : fatal error LNK1120: 1 unresolved externals
>      [exec] NMAKE : fatal error U1077: 'link' : return code '0x460'
>      [exec] Stop.
>
> thanks,
> dims
>
> On 10/22/07, Oliver Deakin <ol...@googlemail.com> wrote:
> > Hi Dims,
> >
> > Looks like you're doing pretty well, that's quite far into the native
> > build! Interestingly, when I build the natives with MSVC .NET 2003 I
> > also get the warning:
> > LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other
> > libs; use /NODEFAULTLIB:library
> >
> > but it is not an error and the build continues, so I wonder if it has
> > been promoted to an error for MSVC 2005. I looked at your link line and
> > it is exactly the same as mine (which works) so Im guessing its a
> > difference between linker versions. Having a google around it appears
> > that libcmt.lib is the static version of the C runtime, whereas we want
> > to link against the dynamic version msvcrt.lib. It's not entirely clear
> > to me why it seems to be linking against both msvcrt.lib and libcmt.lib.
> >
> > If you specify /NODEFAULTLIB:"libcmt.lib" in rules.mak does this help?
> > Adding it to the two "link" lines should do the job I think - i.e. the
> > link line for DLLNAME and the link line for EXENAME. Adding this option
> > to my .NET 2003 build doesn't seem to affect the build, and I can run
> > the LUNI tests successfully so it doesn't appear to hurt.
> >
> > I wonder if we should have this flag always set so that we definitely
> > don't link against the static C runtime library?
> >
> > Regards,
> > Oliver
> >
> > Davanum Srinivas wrote:
> > > Folks,
> > >
> > > Neex your help. Platform is Windows XP. Please see enclosed diff for
> > > the changes i had to make to get this far.
> > >
> > > Products:
> > > - Microsoft Platform SDK for Windows Server 2003 R2
> > > - Microsoft Visual C++ 2005 Express Edition
> > > - Microsoft Macro Assembler 8.0 (MASM) Package (x86) /
> > >
> > > Current failure:
> > >
> > >      [exec]     link  /debug /opt:icf /opt:ref /INCREMENTAL:NO /NOLOGO
> > >  -entry:_DllMainCRTStartup@12 -dll /BASE:0x13300000 -machine:i386
> > > /comment:"LCMM Wrapper native code. (c) Copyright 2005 - 2006 The
> > > Apache Software Foundation or its licensors, a
> > > s applicable."  -subsystem:windows -out:..\lcmm.dll -map:..\lcmm.map
> > > ..\shared\cmmerror.obj  ..\shared\cmmio.obj  ..\shared\
> > > cmmxforms.obj  ..\shared\NativeCMM.obj
> > > ..\shared\NativeImageFormat.obj lcmm.res
> > > C:\APACHE\harmony\working_classlib\deploy\li
> > > b\hycommon.lib C:\APACHE\harmony\working_classlib\deploy\lib\hythr.lib
> > > C:\APACHE\harmony\working_classlib\deploy\lib\hysig.li
> > > b  C:\APACHE\harmony\working_classlib\deploy\lib\hypool.lib
> > > C:\APACHE\harmony\working_classlib\deploy\lib\vmi.lib C:\APACHE\h
> > > armony\working_classlib\deploy\..\depends\libs\build\lcms\lcms114.lib
> > > ws2_32.lib Iphlpapi.lib  kernel32.lib  ws2_32.lib advap
> > > i32.lib user32.lib gdi32.lib  comdlg32.lib winspool.lib
> > > C:\APACHE\harmony\working_classlib\deploy\lib\lcmm.exp
> > >      [exec] LINK : warning LNK4224: /COMMENT is no longer supported;  ignored
> > >      [exec] LIBCMT.lib(crtheap.obj) : error LNK2005: __malloc_crt
> > > already defined in MSVCRT.lib(MSVCR80.dll)
> > >      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit
> > > already defined in MSVCRT.lib(MSVCR80.dll)
> > >      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e
> > > already defined in MSVCRT.lib(MSVCR80.dll)
> > >      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already
> > > defined in MSVCRT.lib(MSVCR80.dll)
> > >      [exec] LIBCMT.lib(realloc.obj) : error LNK2005: _realloc already
> > > defined in MSVCRT.lib(MSVCR80.dll)
> > >      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already
> > > defined in MSVCRT.lib(cinitexe.obj)
> > >      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already
> > > defined in MSVCRT.lib(cinitexe.obj)
> > >      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already
> > > defined in MSVCRT.lib(cinitexe.obj)
> > >      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already
> > > defined in MSVCRT.lib(cinitexe.obj)
> > >      [exec] LIBCMT.lib(winxfltr.obj) : error LNK2005: ___CppXcptFilter
> > > already defined in MSVCRT.lib(MSVCR80.dll)
> > >      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer
> > > already defined in MSVCRT.lib(MSVCR80.dll)
> > >      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __encoded_null
> > > already defined in MSVCRT.lib(MSVCR80.dll)
> > >      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer
> > > already defined in MSVCRT.lib(MSVCR80.dll)
> > >      [exec] LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already
> > > defined in MSVCRT.lib(MSVCR80.dll)
> > >      [exec] LIBCMT.lib(mlock.obj) : error LNK2005: __lock already
> > > defined in MSVCRT.lib(MSVCR80.dll)
> > >      [exec] LIBCMT.lib(stricmp.obj) : error LNK2005: __stricmp already
> > > defined in MSVCRT.lib(MSVCR80.dll)
> > >      [exec] LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with
> > > use of other libs; use /NODEFAULTLIB:library
> > >      [exec] LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with
> > > use of other libs; use /NODEFAULTLIB:library
> > >      [exec] LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external
> > > symbol _main referenced in function ___tmainCRTStartup
> > >      [exec] ..\lcmm.dll : fatal error LNK1120: 1 unresolved externals
> > >      [exec] NMAKE : fatal error U1077: '"C:\Program Files\Microsoft
> > > Visual Studio 8\VC\BIN\link.EXE"' : return code '0x460'
> > >      [exec] Stop.
> > >
> > > Any ideas?
> > >
> > > thanks,
> > > dims
> > >
> > >
> >
> > --
> > Oliver Deakin
> > Unless stated otherwise above:
> > IBM United Kingdom Limited - Registered in England and Wales with number 741598.
> > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
> >
> >
>
>
> --
> Davanum Srinivas :: http://davanum.wordpress.com
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

Re: [build] Update on my build progress

Posted by Davanum Srinivas <da...@gmail.com>.
Oliver,

Yep, tried that. Here's the current failure after that change and
current diff against latest svn.

     [exec] LINK : warning LNK4224: /COMMENT is no longer supported;  ignored
     [exec] lcms114.lib(cmserr.obj) : error LNK2019: unresolved
external symbol __iob referenced in function _cmsSignalError

     [exec] ..\lcmm.dll : fatal error LNK1120: 1 unresolved externals
     [exec] NMAKE : fatal error U1077: 'link' : return code '0x460'
     [exec] Stop.

thanks,
dims

On 10/22/07, Oliver Deakin <ol...@googlemail.com> wrote:
> Hi Dims,
>
> Looks like you're doing pretty well, that's quite far into the native
> build! Interestingly, when I build the natives with MSVC .NET 2003 I
> also get the warning:
> LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other
> libs; use /NODEFAULTLIB:library
>
> but it is not an error and the build continues, so I wonder if it has
> been promoted to an error for MSVC 2005. I looked at your link line and
> it is exactly the same as mine (which works) so Im guessing its a
> difference between linker versions. Having a google around it appears
> that libcmt.lib is the static version of the C runtime, whereas we want
> to link against the dynamic version msvcrt.lib. It's not entirely clear
> to me why it seems to be linking against both msvcrt.lib and libcmt.lib.
>
> If you specify /NODEFAULTLIB:"libcmt.lib" in rules.mak does this help?
> Adding it to the two "link" lines should do the job I think - i.e. the
> link line for DLLNAME and the link line for EXENAME. Adding this option
> to my .NET 2003 build doesn't seem to affect the build, and I can run
> the LUNI tests successfully so it doesn't appear to hurt.
>
> I wonder if we should have this flag always set so that we definitely
> don't link against the static C runtime library?
>
> Regards,
> Oliver
>
> Davanum Srinivas wrote:
> > Folks,
> >
> > Neex your help. Platform is Windows XP. Please see enclosed diff for
> > the changes i had to make to get this far.
> >
> > Products:
> > - Microsoft Platform SDK for Windows Server 2003 R2
> > - Microsoft Visual C++ 2005 Express Edition
> > - Microsoft Macro Assembler 8.0 (MASM) Package (x86) /
> >
> > Current failure:
> >
> >      [exec]     link  /debug /opt:icf /opt:ref /INCREMENTAL:NO /NOLOGO
> >  -entry:_DllMainCRTStartup@12 -dll /BASE:0x13300000 -machine:i386
> > /comment:"LCMM Wrapper native code. (c) Copyright 2005 - 2006 The
> > Apache Software Foundation or its licensors, a
> > s applicable."  -subsystem:windows -out:..\lcmm.dll -map:..\lcmm.map
> > ..\shared\cmmerror.obj  ..\shared\cmmio.obj  ..\shared\
> > cmmxforms.obj  ..\shared\NativeCMM.obj
> > ..\shared\NativeImageFormat.obj lcmm.res
> > C:\APACHE\harmony\working_classlib\deploy\li
> > b\hycommon.lib C:\APACHE\harmony\working_classlib\deploy\lib\hythr.lib
> > C:\APACHE\harmony\working_classlib\deploy\lib\hysig.li
> > b  C:\APACHE\harmony\working_classlib\deploy\lib\hypool.lib
> > C:\APACHE\harmony\working_classlib\deploy\lib\vmi.lib C:\APACHE\h
> > armony\working_classlib\deploy\..\depends\libs\build\lcms\lcms114.lib
> > ws2_32.lib Iphlpapi.lib  kernel32.lib  ws2_32.lib advap
> > i32.lib user32.lib gdi32.lib  comdlg32.lib winspool.lib
> > C:\APACHE\harmony\working_classlib\deploy\lib\lcmm.exp
> >      [exec] LINK : warning LNK4224: /COMMENT is no longer supported;  ignored
> >      [exec] LIBCMT.lib(crtheap.obj) : error LNK2005: __malloc_crt
> > already defined in MSVCRT.lib(MSVCR80.dll)
> >      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit
> > already defined in MSVCRT.lib(MSVCR80.dll)
> >      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e
> > already defined in MSVCRT.lib(MSVCR80.dll)
> >      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already
> > defined in MSVCRT.lib(MSVCR80.dll)
> >      [exec] LIBCMT.lib(realloc.obj) : error LNK2005: _realloc already
> > defined in MSVCRT.lib(MSVCR80.dll)
> >      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already
> > defined in MSVCRT.lib(cinitexe.obj)
> >      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already
> > defined in MSVCRT.lib(cinitexe.obj)
> >      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already
> > defined in MSVCRT.lib(cinitexe.obj)
> >      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already
> > defined in MSVCRT.lib(cinitexe.obj)
> >      [exec] LIBCMT.lib(winxfltr.obj) : error LNK2005: ___CppXcptFilter
> > already defined in MSVCRT.lib(MSVCR80.dll)
> >      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer
> > already defined in MSVCRT.lib(MSVCR80.dll)
> >      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __encoded_null
> > already defined in MSVCRT.lib(MSVCR80.dll)
> >      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer
> > already defined in MSVCRT.lib(MSVCR80.dll)
> >      [exec] LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already
> > defined in MSVCRT.lib(MSVCR80.dll)
> >      [exec] LIBCMT.lib(mlock.obj) : error LNK2005: __lock already
> > defined in MSVCRT.lib(MSVCR80.dll)
> >      [exec] LIBCMT.lib(stricmp.obj) : error LNK2005: __stricmp already
> > defined in MSVCRT.lib(MSVCR80.dll)
> >      [exec] LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with
> > use of other libs; use /NODEFAULTLIB:library
> >      [exec] LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with
> > use of other libs; use /NODEFAULTLIB:library
> >      [exec] LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external
> > symbol _main referenced in function ___tmainCRTStartup
> >      [exec] ..\lcmm.dll : fatal error LNK1120: 1 unresolved externals
> >      [exec] NMAKE : fatal error U1077: '"C:\Program Files\Microsoft
> > Visual Studio 8\VC\BIN\link.EXE"' : return code '0x460'
> >      [exec] Stop.
> >
> > Any ideas?
> >
> > thanks,
> > dims
> >
> >
>
> --
> Oliver Deakin
> Unless stated otherwise above:
> IBM United Kingdom Limited - Registered in England and Wales with number 741598.
> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

Re: [build] Update on my build progress

Posted by Oliver Deakin <ol...@googlemail.com>.
Hi Dims,

Looks like you're doing pretty well, that's quite far into the native 
build! Interestingly, when I build the natives with MSVC .NET 2003 I 
also get the warning:
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other 
libs; use /NODEFAULTLIB:library

but it is not an error and the build continues, so I wonder if it has 
been promoted to an error for MSVC 2005. I looked at your link line and 
it is exactly the same as mine (which works) so Im guessing its a 
difference between linker versions. Having a google around it appears 
that libcmt.lib is the static version of the C runtime, whereas we want 
to link against the dynamic version msvcrt.lib. It's not entirely clear 
to me why it seems to be linking against both msvcrt.lib and libcmt.lib.

If you specify /NODEFAULTLIB:"libcmt.lib" in rules.mak does this help? 
Adding it to the two "link" lines should do the job I think - i.e. the 
link line for DLLNAME and the link line for EXENAME. Adding this option 
to my .NET 2003 build doesn't seem to affect the build, and I can run 
the LUNI tests successfully so it doesn't appear to hurt.

I wonder if we should have this flag always set so that we definitely 
don't link against the static C runtime library?

Regards,
Oliver

Davanum Srinivas wrote:
> Folks,
>
> Neex your help. Platform is Windows XP. Please see enclosed diff for
> the changes i had to make to get this far.
>
> Products:
> - Microsoft Platform SDK for Windows Server 2003 R2
> - Microsoft Visual C++ 2005 Express Edition
> - Microsoft Macro Assembler 8.0 (MASM) Package (x86) /
>
> Current failure:
>
>      [exec]     link  /debug /opt:icf /opt:ref /INCREMENTAL:NO /NOLOGO
>  -entry:_DllMainCRTStartup@12 -dll /BASE:0x13300000 -machine:i386
> /comment:"LCMM Wrapper native code. (c) Copyright 2005 - 2006 The
> Apache Software Foundation or its licensors, a
> s applicable."  -subsystem:windows -out:..\lcmm.dll -map:..\lcmm.map
> ..\shared\cmmerror.obj  ..\shared\cmmio.obj  ..\shared\
> cmmxforms.obj  ..\shared\NativeCMM.obj
> ..\shared\NativeImageFormat.obj lcmm.res
> C:\APACHE\harmony\working_classlib\deploy\li
> b\hycommon.lib C:\APACHE\harmony\working_classlib\deploy\lib\hythr.lib
> C:\APACHE\harmony\working_classlib\deploy\lib\hysig.li
> b  C:\APACHE\harmony\working_classlib\deploy\lib\hypool.lib
> C:\APACHE\harmony\working_classlib\deploy\lib\vmi.lib C:\APACHE\h
> armony\working_classlib\deploy\..\depends\libs\build\lcms\lcms114.lib
> ws2_32.lib Iphlpapi.lib  kernel32.lib  ws2_32.lib advap
> i32.lib user32.lib gdi32.lib  comdlg32.lib winspool.lib
> C:\APACHE\harmony\working_classlib\deploy\lib\lcmm.exp
>      [exec] LINK : warning LNK4224: /COMMENT is no longer supported;  ignored
>      [exec] LIBCMT.lib(crtheap.obj) : error LNK2005: __malloc_crt
> already defined in MSVCRT.lib(MSVCR80.dll)
>      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit
> already defined in MSVCRT.lib(MSVCR80.dll)
>      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e
> already defined in MSVCRT.lib(MSVCR80.dll)
>      [exec] LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already
> defined in MSVCRT.lib(MSVCR80.dll)
>      [exec] LIBCMT.lib(realloc.obj) : error LNK2005: _realloc already
> defined in MSVCRT.lib(MSVCR80.dll)
>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already
> defined in MSVCRT.lib(cinitexe.obj)
>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already
> defined in MSVCRT.lib(cinitexe.obj)
>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already
> defined in MSVCRT.lib(cinitexe.obj)
>      [exec] LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already
> defined in MSVCRT.lib(cinitexe.obj)
>      [exec] LIBCMT.lib(winxfltr.obj) : error LNK2005: ___CppXcptFilter
> already defined in MSVCRT.lib(MSVCR80.dll)
>      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer
> already defined in MSVCRT.lib(MSVCR80.dll)
>      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __encoded_null
> already defined in MSVCRT.lib(MSVCR80.dll)
>      [exec] LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer
> already defined in MSVCRT.lib(MSVCR80.dll)
>      [exec] LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already
> defined in MSVCRT.lib(MSVCR80.dll)
>      [exec] LIBCMT.lib(mlock.obj) : error LNK2005: __lock already
> defined in MSVCRT.lib(MSVCR80.dll)
>      [exec] LIBCMT.lib(stricmp.obj) : error LNK2005: __stricmp already
> defined in MSVCRT.lib(MSVCR80.dll)
>      [exec] LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with
> use of other libs; use /NODEFAULTLIB:library
>      [exec] LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with
> use of other libs; use /NODEFAULTLIB:library
>      [exec] LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external
> symbol _main referenced in function ___tmainCRTStartup
>      [exec] ..\lcmm.dll : fatal error LNK1120: 1 unresolved externals
>      [exec] NMAKE : fatal error U1077: '"C:\Program Files\Microsoft
> Visual Studio 8\VC\BIN\link.EXE"' : return code '0x460'
>      [exec] Stop.
>
> Any ideas?
>
> thanks,
> dims
>
>   

-- 
Oliver Deakin
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU