New bug in build process

Ted Neward ted at tedneward.com
Tue Jul 31 21:56:21 UTC 2007


I think the problem may be more subtle than this; I did a little
investigation, and missing functions are present in T2K.DLL, but not with
the leading underscores. I took a look at the exports from T2K.DLL, and
they're as follows:

C:\Prg\OpenJDK\BinaryPlugs>dumpbin /exports jdk1.7.0\jre\bin\t2k.dll
Microsoft (R) COFF/PE Dumper Version 7.10.3077
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file jdk1.7.0\jre\bin\t2k.dll

File Type: DLL

  Section contains the following exports for t2k.dll

    00000000 characteristics
    468CC934 time date stamp Thu Jul 05 03:34:28 2007
        0.00 version
           1 ordinal base
          22 number of functions
          22 number of names

    ordinal hint RVA      name

          1    0 0002306C
_Java_sun_font_FileFontStrike_createScalerContext at 44
          2    1 0002302E
_Java_sun_font_FileFontStrike_getNullScalerContext at 16
          3    2 00023F9F _Java_sun_font_FileFont_freeScaler at 16
          4    3 00024762 _Java_sun_font_FileFont_getFontMetrics at 16
          5    4 00024027 _Java_sun_font_FileFont_getGlyphAdvance at 20
          6    5 0002428C _Java_sun_font_FileFont_getGlyphImage at 20
          7    6 00024108 _Java_sun_font_FileFont_getGlyphMetrics at 24
          8    7 00025275 _Java_sun_font_FileFont_getGlyphOutline at 28
          9    8 000252CC _Java_sun_font_FileFont_getGlyphOutlineBounds at 20
         10    9 00025321 _Java_sun_font_FileFont_getGlyphVectorOutline at 32
         11    A 00022EE1 _Java_sun_font_FileFont_getNullScaler at 8
         12    B 00023D91 _Java_sun_font_FileFont_setNullScaler at 16
         13    C 000233A7 _Java_sun_font_TrueTypeFont_createScaler at 24
         14    D 0002463E _Java_sun_font_TrueTypeFont_getGlyphPoint at 24
         15    E 00022EEB _Java_sun_font_Type1Font_createScaler at 12
         16    F 00023F13 _Java_sun_font_Type1Font_getGlyphCode at 20
         17   10 00023EF8 _Java_sun_font_Type1Font_getMissingGlyphCode at 16
         18   11 00023EDB _Java_sun_font_Type1Font_getNumGlyphs at 16
         19   12 00023E20 getLayoutTables
         20   13 00023DBD getUnitsPerEmForLayout
         21   14 00023055 isNullScalerContext
         22   15 00022C03 setSunFontIDs

  Summary

        1000 .data
        7000 .rdata
        2000 .reloc
        1000 .rsrc
       25000 .text

As you can see, those missing four functions *are* there, in T2K.dll, but
don't have the leading underscore, which somehow the compiler thinks is
there. My guess is that there's a calling convention mixup here somehow, or
else the T2K.lib is somehow written to insert the leading underscores there.
(Which then implies it's not just a straightforward import library, I
think.) Is it possible that there's a macro somewhere in the native code
that's inserting an underscore when it shouldn't?

Ted Neward
Java, .NET, XML Services
Consulting, Teaching, Speaking, Writing
http://www.tedneward.com
 

> -----Original Message-----
> From: Kelly.Ohair at Sun.COM [mailto:Kelly.Ohair at Sun.COM]
> Sent: Monday, July 30, 2007 7:02 AM
> To: Ted Neward
> Cc: build-dev at openjdk.java.net
> Subject: Re: New bug in build process
> 
> Is this t2k.lib file the one you created from t2k.dll?
> 
> I've never seen these errors before, but it looks like it's in the
> fastdebug build, which would mean you got past the product build,
> which is significant.
> 
> This is just a wild guess, but I wonder if the debug t2k.dll file has more
> external symbols than the product one? I'm not that familiar with
> the external list for this library.
> 
> ---
> 
> Keep in mind that although we regularly build the fastdebug bits (-g -O),
> and
> some developers build the debug bits (-g), neither are tested very
> extensively.
> With the exception of the Hotspot VM, which gets tested fairly well with
> VM type tests.
> It's the product built bits that get most of the formal JDK testing done
> to them.
> 
> Product .obj/.o files should end up in a obj directory (under
> build/*/tmp),
> fastdebug ones in obj_gO, and debug ones in obj_g. I'm curious why you are
> seeing
> some obj_gO references and some obj_g references. Maybe there is another
> bug in
> the BinaryPlugs.gmk file... :^(
> 
> -kto
> 
> Ted Neward wrote:
> > After doing a “nuke” of the build dir, and doing a fresh “make
> > debug_build DEV=1” (again, on Windows), I get this:
> >
> >
> >
> >    Creating library
> > c:/Prg/OpenJDK/openjdk/control/build/WINDOW~2/tmp/sun/sun.fo
> >
> > nt/fontmanager/obj_gO/fontmanager.lib and object
> > c:/Prg/OpenJDK/openjdk/control/
> >
> > build/WINDOW~2/tmp/sun/sun.font/fontmanager/obj_gO/fontmanager.exp
> >
> > sunFont.obj : error LNK2019: unresolved external symbol _setSunFontIDs
> > reference
> >
> > d in function _Java_sun_font_FontManager_initIDs at 8
> >
> > sunFont.obj : error LNK2019: unresolved external symbol
> > _isNullScalerContext ref
> >
> > erenced in function _Java_sun_font_StrikeCache_freeIntMemory at 20
> >
> > SunLayoutEngine.obj : error LNK2019: unresolved external symbol
> > _getUnitsPerEmFo
> >
> > rLayout referenced in function "public: virtual long __thiscall
> > FontInstanceAdap
> >
> > ter::getUnitsPerEM(void)const "
> (?getUnitsPerEM at FontInstanceAdapter@@UBEJXZ)
> >
> > FontInstanceAdapter.obj : error LNK2001: unresolved external symbol
> > _getUnitsPer
> >
> > EmForLayout
> >
> > FontInstanceAdapter.obj : error LNK2019: unresolved external symbol
> > _getLayoutTa
> >
> > bles referenced in function "public: __thiscall
> > FontInstanceAdapter::FontInstanc
> >
> > eAdapter(struct JNIEnv_ *,class _jobject *,class _jobject *,float
> > *,long,long)"
> >
> > (??0FontInstanceAdapter@@QAE at PAUJNIEnv_@@PAV_jobject@@1PAMJJ at Z)
> >
> >
> c:/Prg/OpenJDK/openjdk/control/build/WINDOW~2/tmp/sun/sun.font/fontmanager
> /obj_g
> >
> > O/fontmanager.dll : fatal error LNK1120: 4 unresolved externals
> >
> > make[5]: ***
> > [c:/Prg/OpenJDK/openjdk/control/build/WINDOW~2/bin/fontmanager.dll]
> >
> >  Error 96
> >
> > make[5]: Leaving directory
> > `/cygdrive/c/Prg/OpenJDK/openjdk/j2se/make/sun/font'
> >
> > make[4]: *** [all] Error 1
> >
> > make[4]: Leaving directory
> `/cygdrive/c/Prg/OpenJDK/openjdk/j2se/make/sun'
> >
> > make[3]: *** [all] Error 1
> >
> > make[3]: Leaving directory `/cygdrive/c/Prg/OpenJDK/openjdk/j2se/make'
> >
> > make[2]: *** [j2se-build] Error 2
> >
> > make[2]: Leaving directory
> `/cygdrive/c/Prg/OpenJDK/openjdk/control/make'
> >
> > make[1]: *** [generic_debug_build] Error 2
> >
> > make[1]: Leaving directory
> `/cygdrive/c/Prg/OpenJDK/openjdk/control/make'
> >
> > make: *** [fastdebug_build] Error 2
> >
> > CYGWIN:Ted at XPJAVA:/cygdrive/c/Prg/OpenJDK/openjdk/control/make
> >
> > $
> >
> >
> >
> > Apparently there’s some missing object files in the link step of
> > fontmanager.lib; any ideas? Intuition tells me this is t2k.lib-related
> > again, since we’re back in the silly font directory again, and yes, I
> > know, t2k is going away soon, but I’d like to see if it can be worked
> > around in the meantime. Legal issues have this annoying tendency to take
> > MUCH longer than engineers think they should… :-)
> >
> >
> >
> > The build output prior to this link line is pretty verbose, but I can
> > send it if it’ll help debug the problem….
> >
> >
> >
> > Ted Neward
> >
> > Java, .NET, XML Services
> >
> > Consulting, Teaching, Speaking, Writing
> >
> > http://www.tedneward.com
> >
> >
> >
> >
> >
> >
> > No virus found in this outgoing message.
> > Checked by AVG Free Edition.
> > Version: 7.5.476 / Virus Database: 269.10.23/924 - Release Date:
> > 7/28/2007 3:50 PM
> >
> 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.476 / Virus Database: 269.10.23/924 - Release Date: 7/28/2007
> 3:50 PM
> 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.11.0/929 - Release Date: 7/31/2007
5:26 PM
 




More information about the build-dev mailing list