Re: [Gems-users] Failed to load module 'opal' "undefined symbol: _ZN22generic_cache_templateI21generic_cache_block_tE18registerCheckpointEP8confio_t"


Date: Wed, 25 Mar 2009 00:49:48 +0800
From: Sitos Lin <sitos.lin@xxxxxxxxx>
Subject: Re: [Gems-users] Failed to load module 'opal' "undefined symbol: _ZN22generic_cache_templateI21generic_cache_block_tE18registerCheckpointEP8confio_t"
Hi all:
  I can answer one of my questions now. When I try to move the failing function from cache.C to cache.h, there are three functions needed to be moved: registerCheckpoint, OracleAccess, and Warmup. I copied the entire functions definition. For example, to copy registerCheckpoint, the following lines are copied from cache.C to cache.h.

template < class BlockType > int generic_cache_template < BlockType >::registerCheckpoint(confio_t * conf)
{
    int rc;
    rc = conf->register_attribute(name, generic_cache_template < BlockType >::get_cache_data, (void *) this, generic_cache_template < BlockType >::set_cache_data, (void *) this);
    return rc;
}

  other functions are also copied entirely. The function definitions in cache.C is eliminated, because they are not needed any more. Besides copying the function definitions, the "confio.h" should be included in cache.h, because registerCheckpoint uses the structure confio_t which is declared in confio.h.

  After moving the functions, I compiled opal module again. Then, I can successfully load opal in Simics. If somebody encountered this problem, he/she can try this approach.

Best regards,
  Sitos

2009/3/24 Sitos Lin <sitos.lin@xxxxxxxxx>
Hi all:
 I have downloaded Simics 3.0.31 and Gems 2.1 and installed/compiled
them. When I follow the instructions in the QuickStart to load ruby
and opal modules, I encounter the problem, "Error loading module
'opal': Failed to load module 'opal'
('my_path_to_workspace/x86-linux/lib/opal.so'):"undefined symbol:
_ZN22generic_cache_templateI21generic_cache_block_tE18registerCheckpointEP8confio_t".
I have checked the mailing list to try to find out the solution. There
are many people encounter this problem, and there are several possible
solutions as follows. However, I still have many questions.
 1. Copy libstdc++ files to the simics directory (as explained in the
wiki page): (a) Does anyone tell me what files should be copied into
the 'simics' directory? For example, /lib/libgcc_s.so.1?
/usr/lib/libstdc++.so.*? (b) Which one is the 'simics' directory? The
simics root (includes bin/workspace-setup) or the symbolic link
'simics' in gems which links to the workspace?
 2. Use gcc3.4.6 to compile opal module: However, I can only compile
opal module by g++ 4.2.4. Should I change some settings to compile
opal module by gcc3.4.6? There are a lot of errors when I compile opal
with gcc-3.4 or g++-3.4.
 3. Move the failing function definition from cache.C to cache.h: I
am not sure how and where to move the function from and to. Is there a
more precise instruction?
Thanks in advance
 Sitos

[← Prev in Thread] Current Thread [Next in Thread→]