Re: [Gems-users] opal.so problem


Date: Fri, 17 Mar 2006 13:42:51 -0600 (CST)
From: Mike Marty <mikem@xxxxxxxxxxx>
Subject: Re: [Gems-users] opal.so problem
FYI-- we avoid bleeding-edge compiler releases.  They often have problems.
We use GCC 3.4.x here at Wisconsin

--Mike


> I've upgraded to gcc version 4.0.2 20051125 (Red Hat 4.0.2-8) to resolve the undefined symbol problem mentioned below. But now, I get the following error:
>
> Compiling module_id.c
> `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
> Linking opal.so
> /home/GEMS/simics-2.2.19/x86-linux/lib/opal.so: /home/GEMS/simics-2.2.19/x86-linux/lib/opal.so: undefined symbol: _ZN22generic_cache_templateI21generic_cache_block_tE6AccessEP6miss_t
> gmake[2]: *** [/home/GEMS/simics-2.2.19/x86-linux/lib/opal.so] Error 1
> gmake[2]: *** Deleting file `/home/GEMS/simics-2.2.19/x86-linux/lib/opal.so'
> make[1]: *** [opal] Error 2
> make[1]: Leaving directory `/home/GEMS/simics-2.2.19/x86-linux/lib'
> make: *** [module] Error 2
>
> I thought the undefined symbol should be in opal/x86-linux/obj/cache.o, but it's not. What could be the problem?
>
> Thank you.
>
> Dave
>
> "Min Xu (Hsu)" <xu@xxxxxxxxxxx> wrote: Dave,
>
> Now, I see. It is likely your error was caused by the compiler.
> The function in question was not defined in your cache.o, but
> in my cache.o it was defined.
>
> A little google search revealed that gcc 4.0.0 has a bug that
> ignores template instantiation. Please try upgrade your compiler
> to a newer version.
>
> Or, you perhaps can work around this problem by changing this line
>
> template class generic_cache_template;
>
> to this line
>
> class generic_cache_template foo;
>
> Hope this helps,
> -Min
>
> On Wed, 15 Mar 2006 Dave wrote :
> > Yes I do. Attached you will find the nm output from cache.o. I'm using gcc version 4.0.0 20050519 (Red Hat 4.0.0-8).
> >
> > Thanks,
> >
> > Dave
> >
> > "Min Xu (Hsu)"  wrote: Do you have these two lines in Cache.C?
> >
> > // C++ template: explicit instantiation
> > template class generic_cache_template;
> >
> > If yes, can you dump the nm output from Cache.o to me?
> >
> > On Mon, 13 Mar 2006 Dave wrote :
> > > OK.
> > >
> > > The undefined symbol _ZN22generic_cache_templateI21generic_cache_block_tE9TagSearchEybbPPS0_Pj is in opal/x86-linux/obj/cache.o.
> > >
> > > Dave
> > >
> > > "Min Xu (Hsu)"  wrote: The .o files are in opal/x86_linux/obj, or a similar directory under
> > > opal/x86-linux.
> > >
> > > On Mon, 13 Mar 2006 Dave wrote :
> > > > Min,
> > > >
> > > > "nm" returns an error because it cannot find "a.out". There is no ".o" files in that directory (/home/GEMS/simics-2.2.19/x86-linux/lib/). I'm copying the output from opal compilation, maybe it helps to see at what step it fails.
> > > >
> > > > > make module DESTINATION=MOSI_SMP_bcast
> > > > Opal: building module
> > > > make generated/generated
> > > > make[1]: Entering directory `/home/GEMS/opal'
> > > > make[1]: `generated/generated' is up to date.
> > > > make[1]: Leaving directory `/home/GEMS/opal'
> > > > make BUILD_FLAGS=-DSIMICS module_go
> > > > make[1]: Entering directory `/home/GEMS/opal'
> > > > Made module
> > > > make[1]: Leaving directory `/home/GEMS/opal'
> > > > Opal: Linking simics module
> > > > cd ../simics/x86-linux/lib; make opal
> > > > make[1]: Entering directory `/home/GEMS/simics-2.2.19/x86-linux/lib'
> > > > === Building module "opal" using the 2.0 API ===
> > > > gmake[2]: Circular /home/GEMS/simics/x86-linux/obj/include/simics/module_id.c <- /home/GEMS/simics/x86-linux/obj/include/simics/module_id.c dependency dropped.
> > > > Creating dependencies: module_id.c
> > > > Creating dependencies: opal.c
> > > > gmake[2]: Circular /home/GEMS/simics/x86-linux/obj/include/simics/module_id.c <- /home/GEMS/simics/x86-linux/obj/include/simics/module_id.c dependency dropped.
> > > > Creating exportmap.elf
> > > > Compiling opal.c
> > > > `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
> > > > /home/GEMS/simics/src/extensions/opal/opal.c:110: warning: ? defined but not used
> > > > Compiling module_id.c
> > > > `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
> > > > Linking opal.so
> > > > /home/GEMS/simics-2.2.19/x86-linux/lib/opal.so: /home/GEMS/simics-2.2.19/x86-linux/
> > > > lib/opal.so: undefined symbol: _ZN22generic_cache_templateI21generic_cache_block_tE9TagSearchEy
> > > > bbPPS0_Pj
> > > > gmake[2]: *** [/home/GEMS/simics-2.2.19/x86-linux/lib/opal.so] Error 1
> > > > gmake[2]: *** Deleting file `/home/GEMS/simics-2.2.19/x86-linux/lib/opal.so'
> > > > make[1]: *** [opal] Error 2
> > > > make[1]: Leaving directory `/home/GEMS/simics-2.2.19/x86-linux/lib'
> > > > make: *** [module] Error 2
> > > >
> > > > Thanks,
> > > >
> > > > Dave
> > > >
> > > > "Min Xu (Hsu)"  wrote: Dave,
> > > >
> > > > The error seems to be related to generic_cache_template not being
> > > > instantiated in none of the .C file, but still being called.
> > > > Perhaps we have a bug that we may missed an instantiation statement
> > > > (this is unlikely because the same code works here), or (more likely)
> > > > we have a compiler incompatibility problem.
> > > >
> > > > To further determine the cause of the problem, can you use "nm"
> > > > to find our which .o file calls the undefined the symbol?
> > > >
> > > > -Min
> > > >
> > > > On Sun, 12 Mar 2006 Dave wrote :
> > > > > Hello All,
> > > > >
> > > > > I'm trying to compile opal on a x86 Linux machine (make module DESTINATION=MOSI_SMP_bcast). (gems 1.2, simics 2.2.19, gcc 4.0.0). I'm getting some errors with the opal compilation as follows:
> > > > >
> > > > > === Building module "opal" using the 2.0 API ===
> > > > > gmake[2]: Circular /home/GEMS/simics/x86-linux/obj/include/simics/module_id.c <- /home/GEMS/simics/x86-linux/obj/include/simics/module_id.c dependency dropped.
> > > > > Linking opal.so
> > > > > /home/GEMS/simics-2.2.19/x86-linux/lib/opal.so: /home/GEMS/simics-2.2.19/x86-linux/lib/opal.so: undefined symbol: _ZN22generic_cache_templateI21generic_cache_block_tE9TagSearchEybbPPS0_Pj
> > > > > gmake[2]: *** [/home/GEMS/simics-2.2.19/x86-linux/lib/opal.so] Error 1
> > > > > gmake[2]: *** Deleting file `/home/GEMS/simics-2.2.19/x86-linux/lib/opal.so'
> > > > > make[1]: *** [opal] Error 2
> > > > > make[1]: Leaving directory `/home/GEMS/simics-2.2.19/x86-linux/lib'
> > > > > make: *** [module] Error 2
> > > > >
> > > > >
> > > > > Thank you for your help!
> > > > >
> > > > > Dave
> > > > >
> > > > >
> > > > > ---------------------------------
> > > > > Yahoo! Mail
> > > > > Bring photos to life! New PhotoMail  makes sharing a breeze.
> > > > > _______________________________________________
> > > > > Gems-users mailing list
> > > > > Gems-users@xxxxxxxxxxx
> > > > > https://lists.cs.wisc.edu/mailman/listinfo/gems-users
> > > > _______________________________________________
> > > > Gems-users mailing list
> > > > Gems-users@xxxxxxxxxxx
> > > > https://lists.cs.wisc.edu/mailman/listinfo/gems-users
> > > >
> > > >
> > > >
> > > > ---------------------------------
> > > > Yahoo! Mail
> > > > Bring photos to life! New PhotoMail  makes sharing a breeze.
> > > > _______________________________________________
> > > > Gems-users mailing list
> > > > Gems-users@xxxxxxxxxxx
> > > > https://lists.cs.wisc.edu/mailman/listinfo/gems-users
> > > _______________________________________________
> > > Gems-users mailing list
> > > Gems-users@xxxxxxxxxxx
> > > https://lists.cs.wisc.edu/mailman/listinfo/gems-users
> > >
> > >
> > >
> > > ---------------------------------
> > > Brings words and photos together (easily) with
> > >  PhotoMail  - it's free and works with Yahoo! Mail.
> > > _______________________________________________
> > > Gems-users mailing list
> > > Gems-users@xxxxxxxxxxx
> > > https://lists.cs.wisc.edu/mailman/listinfo/gems-users
> > _______________________________________________
> > Gems-users mailing list
> > Gems-users@xxxxxxxxxxx
> > https://lists.cs.wisc.edu/mailman/listinfo/gems-users
> >
> >
> >
> > ---------------------------------
> > Yahoo! Travel
> >  Find  great deals to the top 10 hottest destinations!
> Content-Description: 1619165544-cache.txt
> >          U __cxa_atexit
> >          U __cxa_pure_virtual
> >          U __dso_handle
> > 000004b4 t _GLOBAL__I__ZN7cache_tC2EPKcP6mshr_tP11scheduler_t
> >          U __gxx_personality_v0
> > 0000045a t __tcf_0
> > 0000046e t _Z41__static_initialization_and_destruction_0ii
> >          U _ZN10out_intf_t8out_infoEPKcz
> >          U _ZN22generic_cache_templateI21generic_cache_block_tE11DoAfterFillEPS0_j
> > 00000000 W _ZN22generic_cache_templateI21generic_cache_block_tE12BlockAddressEy
> > 00000000 W _ZN22generic_cache_templateI21generic_cache_block_tE12getBlockSizeEv
> >          U _ZN22generic_cache_templateI21generic_cache_block_tE15DoBeforeReplaceEPS0_j
> >          U _ZN22generic_cache_templateI21generic_cache_block_tE15DoWhenAccessHitEPS0_bb
> > 00000000 W _ZN22generic_cache_templateI21generic_cache_block_tE15getBlockAddressERS0_
> >          U _ZN22generic_cache_templateI21generic_cache_block_tE16DoWhenAccessMissEybb
> > 00000000 W _ZN22generic_cache_templateI21generic_cache_block_tE3SetEy
> > 00000000 W _ZN22generic_cache_templateI21generic_cache_block_tE3TagEy
> >          U _ZN22generic_cache_templateI21generic_cache_block_tE4FillEybPbb
> >          U _ZN22generic_cache_templateI21generic_cache_block_tE4ReadEyP8waiter_tbPb
> >          U _ZN22generic_cache_templateI21generic_cache_block_tE5WriteEyP8waiter_t
> > 00000000 W _ZN22generic_cache_templateI21generic_cache_block_tE7IsDirtyERS0_
> > 00000000 W _ZN22generic_cache_templateI21generic_cache_block_tE7IsValidERS0_
> > 00000000 W _ZN22generic_cache_templateI21generic_cache_block_tE8getStateERS0_
> >          U _ZN22generic_cache_templateI21generic_cache_block_tE8PrefetchEy
> > 00000000 W _ZN22generic_cache_templateI21generic_cache_block_tE8TagCheckEy
> > 00000000 W _ZN22generic_cache_templateI21generic_cache_block_tE9same_lineEyy
> >          U _ZN22generic_cache_templateI21generic_cache_block_tE9TagSearchEybbPPS0_Pj
> >          U _ZN22generic_cache_templateI21generic_cache_block_tED0Ev
> >          U _ZN22generic_cache_templateI21generic_cache_block_tED1Ev
> > 00000188 T _ZN7cache_t10printStatsEP6pseq_t
> > 000000c4 T _ZN7cache_tC1EPKcP6mshr_tP11scheduler_t
> > 00000000 T _ZN7cache_tC2EPKcP6mshr_tP11scheduler_t
> >          U _ZNSt8ios_base4InitC1Ev
> >          U _ZNSt8ios_base4InitD1Ev
> > 00000000 b _ZSt8__ioinit
> > 00000000 V _ZTI22generic_cache_templateI21generic_cache_block_tE
> > 00000000 V _ZTI7cache_t
> > 00000000 V _ZTS22generic_cache_templateI21generic_cache_block_tE
> > 00000000 V _ZTS7cache_t
> > 00000000 V _ZTV22generic_cache_templateI21generic_cache_block_tE
> > 00000000 V _ZTV7cache_t
> >          U _ZTVN10__cxxabiv117__class_type_infoE
> >          U _ZTVN10__cxxabiv120__si_class_type_infoE
>
> > _______________________________________________
> > Gems-users mailing list
> > Gems-users@xxxxxxxxxxx
> > https://lists.cs.wisc.edu/mailman/listinfo/gems-users
> _______________________________________________
> Gems-users mailing list
> Gems-users@xxxxxxxxxxx
> https://lists.cs.wisc.edu/mailman/listinfo/gems-users
>
>
>
> ---------------------------------
> Yahoo! Travel
>  Find  great deals to the top 10 hottest destinations!
[← Prev in Thread] Current Thread [Next in Thread→]