From Wiki-UX.info

How to manually solve Unsatisfied symbol errors
Jump to: navigation, search

How to manually solve Unsatisfied symbol errors

Abstract

Some kernel compilation may fail due to "Unsatisfied Symbol" errors, for example when SD-UX configuration scripts attempts to compile the new kernel or when manually building kernels.

Most of these errors are related to "installed" but not "configured" patches, in such case reinstalling or configuring (swconfig) the patch may solve the issue. Whenever it is necessary to find the specific patch that delivers a specific symbol, you can use the following procedure.

Contents


HP-UX

1. Change directory to /usr/conf/lib:

2. Use nm to check the libraries for the symbol:

# nm *.a | grep [SYMBOL_NAME]

For example:

# nm *.a | grep mlock_valid_args
[35]     |                    16|     240|FUNC |GLOB |0|   .text|mlock_valid_args
[26]     |                     0|       0|FUNC |GLOB |0|   UNDEF|mlock_valid_args

Note that in the previous output, the symbol is encountered in at least two entries.

3. You should get at least one line for each symbol. Then use nm to find exactly which library(ies) contains the symbol.

for i in $(ls -d /usr/conf/lib/*)
do
 nm $i 2> /dev/null | grep [SYMBOL_NAME] > /dev/null; COND=$?
 if [[ $COND -eq 0 ]]; then
  echo $i
 fi
done

For example:

for i in $(ls -d /usr/conf/lib/*)
do
 nm $i 2> /dev/null | grep mlock_valid_args > /dev/null; COND=$?
 if [[ $COND -eq 0 ]]; then
  echo $i
 fi
done

Returns:

/usr/conf/lib/libvm.a

4. Once you have determinate the name of the library, use nm to look at the library and find which object in that library defines the symbol.

# nm [LIB_NAME].a | grep -e "Symbols from" -e "mlock_valid_args"

For example:

nm /usr/conf/lib/libvm.a | grep -e "Symbols from" -e "mlock_valid_args"
Symbols from /usr/conf/lib/libvm.a[vm_vhand.o]:
Symbols from /usr/conf/lib/libvm.a[vm_tunables.o]:
Symbols from /usr/conf/lib/libvm.a[vm_stats.o]:
Symbols from /usr/conf/lib/libvm.a[vm_sched.o]:
Symbols from /usr/conf/lib/libvm.a[vm_locality.o]:
Symbols from /usr/conf/lib/libvm.a[vm_init_pik.o]:
Symbols from /usr/conf/lib/libvm.a[vm.modmeta.o]:
Symbols from /usr/conf/lib/libvm.a[libvm.modmeta.o]:
Symbols from /usr/conf/lib/libvm.a[vm_textcache.o]:
Symbols from /usr/conf/lib/libvm.a[vm_swp.o]:
Symbols from /usr/conf/lib/libvm.a[vm_pgcache.o]:
Symbols from /usr/conf/lib/libvm.a[vm_devswap.o]:
Symbols from /usr/conf/lib/libvm.a[vfs_vm.o]:
Symbols from /usr/conf/lib/libvm.a[ufs_vm.o]:
Symbols from /usr/conf/lib/libvm.a[remote_vm.o]:
Symbols from /usr/conf/lib/libvm.a[physio.o]:
Symbols from /usr/conf/lib/libvm.a[vm_io.o]:
Symbols from /usr/conf/lib/libvm.a[vm_fs.o]:
Symbols from /usr/conf/lib/libvm.a[vfddbd.o]:
Symbols from /usr/conf/lib/libvm.a[vasm_util.o]:
Symbols from /usr/conf/lib/libvm.a[vas_vnode.o]:
Symbols from /usr/conf/lib/libvm.a[vas_ubuf.o]:
Symbols from /usr/conf/lib/libvm.a[vas_proc.o]:
Symbols from /usr/conf/lib/libvm.a[vas_anon_shm.o]:
Symbols from /usr/conf/lib/libvm.a[vas.o]:
Symbols from /usr/conf/lib/libvm.a[skiplist.o]:
Symbols from /usr/conf/lib/libvm.a[region.o]:
Symbols from /usr/conf/lib/libvm.a[pregion.o]:
Symbols from /usr/conf/lib/libvm.a[preg_ubuf.o]:
Symbols from /usr/conf/lib/libvm.a[preg_uarea.o]:
Symbols from /usr/conf/lib/libvm.a[mem_window.o]:
Symbols from /usr/conf/lib/libvm.a[lockmap.o]:
Symbols from /usr/conf/lib/libvm.a[btree.o]:
Symbols from /usr/conf/lib/libvm.a[vm_swalloc.o]:
Symbols from /usr/conf/lib/libvm.a[vm_sw.o]:
Symbols from /usr/conf/lib/libvm.a[vm_swapmemreserve.o]:
Symbols from /usr/conf/lib/libvm.a[vm_pm.o]:
Symbols from /usr/conf/lib/libvm.a[vm_mrg.o]:
Symbols from /usr/conf/lib/libvm.a[vm_memreserve.o]:
Symbols from /usr/conf/lib/libvm.a[vm_lockmemreserve.o]:
Symbols from /usr/conf/lib/libvm.a[subr_mrg.o]:
Symbols from /usr/conf/lib/libvm.a[freemem_cache.o]:
Symbols from /usr/conf/lib/libvm.a[vm_unhash.o]:
Symbols from /usr/conf/lib/libvm.a[vm_superpage.o]:
Symbols from /usr/conf/lib/libvm.a[vm_pgsetup.o]:
Symbols from /usr/conf/lib/libvm.a[vm_pgalloc.o]:
Symbols from /usr/conf/lib/libvm.a[vm_page.o]:
Symbols from /usr/conf/lib/libvm.a[pfdat.o]:
Symbols from /usr/conf/lib/libvm.a[pdt.o]:
Symbols from /usr/conf/lib/libvm.a[earlyboot.o]:
Symbols from /usr/conf/lib/libvm.a[vm_vcache.o]:
Symbols from /usr/conf/lib/libvm.a[vm_tablealloc.o]:
Symbols from /usr/conf/lib/libvm.a[vm_kvm.o]:
Symbols from /usr/conf/lib/libvm.a[vm_kalloc_ktest.o]:
Symbols from /usr/conf/lib/libvm.a[vm_kalloc.o]:
Symbols from /usr/conf/lib/libvm.a[vm_async_list_mgmt.o]:
Symbols from /usr/conf/lib/libvm.a[vm_arena_trace.o]:
Symbols from /usr/conf/lib/libvm.a[vm_arena_mgmt.o]:
Symbols from /usr/conf/lib/libvm.a[vm_arena_mem.o]:
Symbols from /usr/conf/lib/libvm.a[vm_arena_leak.o]:
Symbols from /usr/conf/lib/libvm.a[vm_arena_ktest.o]:
Symbols from /usr/conf/lib/libvm.a[vm_arena_iface.o]:
Symbols from /usr/conf/lib/libvm.a[vm_arena_gc.o]:
Symbols from /usr/conf/lib/libvm.a[kmem_lpc.o]:
Symbols from /usr/conf/lib/libvm.a[vm_som.o]:
Symbols from /usr/conf/lib/libvm.a[vm_exec.o]:
Symbols from /usr/conf/lib/libvm.a[vm_elf.o]:
Symbols from /usr/conf/lib/libvm.a[uio.o]:
Symbols from /usr/conf/lib/libvm.a[ubuf_ktest.o]:
Symbols from /usr/conf/lib/libvm.a[ubuf.o]:
Symbols from /usr/conf/lib/libvm.a[sysV_shm_default.o]:
Symbols from /usr/conf/lib/libvm.a[shm_posix.o]:
Symbols from /usr/conf/lib/libvm.a[procdup_pik.o]:
Symbols from /usr/conf/lib/libvm.a[plock.o]:
Symbols from /usr/conf/lib/libvm.a[pas_ktest.o]:
Symbols from /usr/conf/lib/libvm.a[pas.o]:
Symbols from /usr/conf/lib/libvm.a[pa32core.o]:
Symbols from /usr/conf/lib/libvm.a[p2p_bcopy.o]:
Symbols from /usr/conf/lib/libvm.a[mprotect.o]:
Symbols from /usr/conf/lib/libvm.a[mmap.o]:
Symbols from /usr/conf/lib/libvm.a[mlock.o]:
[35]     |                    16|     240|FUNC |GLOB |0|   .text|mlock_valid_args
Symbols from /usr/conf/lib/libvm.a[kern_mman.o]:
Symbols from /usr/conf/lib/libvm.a[core.o]:
Symbols from /usr/conf/lib/libvm.a[clic.o]:
[26]     |                     0|       0|FUNC |GLOB |0|   UNDEF|mlock_valid_args
Symbols from /usr/conf/lib/libvm.a[vm_bitmap.o]:
Symbols from /usr/conf/lib/libvm.a[sysV_map.o]:
Symbols from /usr/conf/lib/libvm.a[ktest_vm_pageout.o]:
Symbols from /usr/conf/lib/libvm.a[ktest_physio.o]:
Symbols from /usr/conf/lib/libvm.a[ktest_iomap.o]:
Symbols from /usr/conf/lib/libvm.a[libvm_vers.o]:
Symbols from /usr/conf/lib/libvm.a[ktest_vm_info.o]:
Symbols from /usr/conf/lib/libvm.a[vm_pagezero.o]:
Symbols from /usr/conf/lib/libvm.a[vm_vpar.o]:

Note that the object library names precedes the symbol name:

...
Symbols from /usr/conf/lib/libvm.a[mlock.o]:   <-- Object
[35]     |                    16|     240|FUNC |GLOB |0|   .text|mlock_valid_args
...
Symbols from /usr/conf/lib/libvm.a[clic.o]:       <-- Object
[26]     |                     0|       0|FUNC |GLOB |0|   UNDEF|mlock_valid_args
...

5. Next, extract the object(s) from the library using the ar command.

# ar x [LIB_NAME].a [OBJ_NAME].o

For example:

# ar x /usr/conf/lib/libvm.a /tmp/mlock.o
# ar x /usr/conf/lib/libvm.a /tmp/clic.o
  • Note: This will not change the library. This command will save the object files [OBJ_NAME].o in /tmp directory.

6. Use the what to get information about the object. If a patch has changed that object, then, usually, the what command will report that. The output will indicate what patch has introduce the symbol:

# what /tmp/[OBJ_NAME].o

For example:

# what /tmp/mlock.o
/tmp/mlock.o:
         mlock.c $Date: 2007/07/13 18:14:51 $Revision: r11.23/2 PATCH_11.23 (PHKL_36669)
 
# what /tmp/clic.o
/tmp/clic.o:
         clic.c $Date: 2004/08/05 12:08:39 $Revision: i380/4 PATCH_11.23 (PHKL_31500)

Once it was determinate that the mlock_valid_args missing symbol was updated by PHKL_36669 and the PHKL_31500 patches, check the ITRC Patch Catalog to be find out if this patch has been already superseeded by a newer patch. In this case is the latest available at the time this article was wrote.

Re-installing or configuring the patch will resolve the Unsatisfied Symbols error message and allow a new kernel to be build.

References

Autors

This page was last modified on 9 July 2009, at 12:03. This page has been accessed 2,148 times.