- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- linking problem
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2002 07:17 AM
03-19-2002 07:17 AM
linking problem
I am trying to build httpd binary and I get the following undefined symbols.
/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (buildmark.o) was detected. The linked output may not run on a PA 1.x system.
/usr/ccs/bin/ld: Unsatisfied symbols:
__eprintf (code)
__udivdi3 (code)
__umoddi3 (code)
*** Error exit code 1
How can I find out where are those symbols are coming from? (nm -p doesn't give this information)
Also, is it possible to remove the above symbols from the generated binary file? The file is actually generated even though errors were encountered. When use the file, it core-dumps.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2002 07:39 AM
03-19-2002 07:39 AM
Re: linking problem
Let me give you my standard method for finding where these symbols are defined.
1) Cd to desired library directly, e.g. /usr/lib
2) nm lib* > /tmp/list
3) Search /tmp/list using grep or vi for your symbols. The file name listed immediately above these symbols (which may be only a few lines above or many lines above) will be the library that you need to include in your link.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2002 12:46 PM
03-19-2002 12:46 PM
Re: linking problem
Here is a script I use to find where
a symbol is defined. It uses the
odump command. You will understand how
to use it by trying it (and reading the
script)
It comes as an attachment as I am afraid
lines will be messed up otherwise.
Olav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2002 12:50 PM
03-19-2002 12:50 PM
Re: linking problem
Hi again.
Seems I did not get the script attached.
Try to include it here:
#!/bin/ksh
#
# Filename: /home/olav/scripts/findsym
#
#
# DESCRIPTION:
# This scripts runs through files in a given directory searching
# for a given symbol.
#
# It uses the odump command
# (not suported under hp-ux 10.x, but is found in the
# filset USRCONTRB. No man-page on 10.x
# Supported under hp-ux 11.x (with man-page)
#
#
# WRITTEN BY:
# This is an unsupported script written by:
# Olav Baadsvik 12/4-94
#
#
#
# Last modified:16/10-01
#
SCRIPT_NAME=`basename $0`
# 10.20 ODUMPPATH=/usr/contrib/bin
ODUMPPATH=/usr/ccs/bin
REQ_ARGUMENTS=3 # minumum number of arguments required
MAX_ARGUMENTS=3 # maximum number of arguments
print_usage()
{
echo ""
echo "Usage:"
echo " $SCRIPT_NAME directory extension symbol"
echo " "
echo " directory - directory to search in."
echo " extension - checks files matching *.extension"
echo " extension will normally be one of sl, o, a, 1, 2"
echo " symbol - symbol to search for"
echo ""
echo " Example of use:"
echo " $SCRIPT_NAME /usr/lib sl xdr_char"
echo ""
echo " An OB-product"
echo ""
}
##########################################################
# Section for testing of arguments
if [ $# -lt $REQ_ARGUMENTS -o $# -gt $MAX_ARGUMENTS ]
then
echo ""
echo "Wrong number of arguments"
echo "Minimum number of arguments: $REQ_ARGUMENTS"
echo "Maximum number of arguments: $MAX_ARGUMENTS"
print_usage
exit 1
fi
if [ ! -d $1 ]
then
echo ""
echo "$1 is not a directory"
print_usage
exit 1
fi
# end of section for testing arguments
#########################################################
STARTDIR=$1
cd $STARTDIR
filer=`ls -d *.$2 2> /dev/null`
if [ $? -ne 0 ]
then
echo ""
echo "No .$2-files found in $STARTDIR"
echo ""
print_usage
exit 1
fi
for i in $filer
do
if test -d $i # skip if directory
then
continue
fi
echo "Checking file $STARTDIR/$i"
if $ODUMPPATH/odump -symbols $i|grep Entry|grep Univ | grep -i $3
then
echo "Symbol $3 found in file $STARTDIR/$i"
if test -L $i
then
echo "NOTE!!! $i is a link:"
LINKTEXT=$(ls -l $i) # to avoid tab-expansion
echo $LINKTEXT
fi
echo ""
fi
done
Olav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2002 12:57 PM
03-19-2002 12:57 PM
Re: linking problem
t 0x000BB5B8 ./libdce.sl:rpc__svc_eprintf
l1:/usr/lib 104 >
the defs.nm, which lists the symbols that are *defined* in any module, is created - alongside libs.nm, which contains a list of *all* symbols, and libs.ar, which contains an object listing - by the attached perl script. I should run it after every system upgrade, either patches or applications, but I tend to forget, so maybe the umoddi3 is int there already.