- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- diffutils-2.8.7 __strtoull Unsatisfied Symbol
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
Discussions
Discussions
Forums
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
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
тАО06-01-2005 07:14 PM
тАО06-01-2005 07:14 PM
Thanks again for all your help.
If you are willing and able, would you please help me understand this root cause of this problem? I am compiling diffutils-2.8.7 and get this error:
gcc -O -o cmp cmp.o ../lib/libdiffutils.a
ld: Unsatisfied symbol "__strtoull" in file ../lib/libdiffutils.a[xstrtoumax.o]
I am using gcc 4.0.0:
gcc -v
Using built-in specs.
Target: hppa64-hp-hpux11.00
Configured with: ../gcc-4.0.0/configure --prefix=/usr/local/pa20_64 --enable-threads --enable-threads=posix95 --with-gnu-as --with-as=/usr/local/pa20_64/bin/as --disable-nls --with-gmp=/usr/local/pa20_64 --with-mpfr=/usr/local/pa20_64 --disable-shared --enable-languages=c,c++
Thread model: posix95
gcc version 4.0.0
on HP-UX 11.00:
uname -a
HP-UX voltaire B.11.00 U 9000/785 2015073023 unlimited-user license
I downloaded the HP-UX Porting and Archive Center source code for 11.11, and that code compiles with the HP ANSI C compiler...so I think that means that __strtoull exists (please correct me if I am mistaken).
nm -A on /usr/lib/libc.a returns:
sh # nm -A libc.a | grep __strtoull
libc.a:S$3$__strtoull| 1416|static|data |$LIT$
libc.a:__strtoull | 0|extern|entry |$CODE$
I think that is where strtoull is defined. Am I correct?
I wrote a small test program:
1 /* gcc -v % -I/usr/include -L/usr/lib -lc */
2 #include
3 #include
4
5 int main(int argc, char argv[])
6 {
7 __strtoull(NULL,NULL,0);
8 return 1;
9 }
When I run the file in my terminal window, I get this response:
:!gcc -v foo.c -I/usr/include -L/usr/lib -lc
Using built-in specs.
Target: hppa64-hp-hpux11.00
Configured with: ../gcc-4.0.0/configure --prefix=/usr/local/pa20_64 --enable-threads --enable-threads=posix95 --with-gnu-as --with-as=/usr/local/pa20_64/bin/as --disable-nls --with-gmp=/usr/local/pa20_64 --with-mpfr=/usr/local/pa20_64 --disable-shared --enable-languages=c,c++
Thread model: posix95
gcc version 4.0.0
/projects/local/pa20_64/bin/../libexec/gcc/hppa64-hp-hpux11.00/4.0.0/cc1 -quiet -v -I/usr/include -iprefix /projects/local/pa20_64/bin/../lib/gcc/hppa64-hp-hpux11.00/4.0.0/ foo.c -quiet -dumpbase foo.c -auxbase foo -version -o /var/tmp//ccLls3Kk.s
ignoring nonexistent directory "/projects/local/pa20_64/bin/../lib/gcc/hppa64-hp-hpux11.00/4.0.0/../../../../hppa64-hp-hpux11.00/include"
ignoring nonexistent directory "/usr/local/include"
ignoring duplicate directory "/usr/local/pa20_64/lib/gcc/hppa64-hp-hpux11.00/4.0.0/include"
ignoring nonexistent directory "/usr/local/pa20_64/lib/gcc/hppa64-hp-hpux11.00/4.0.0/../../../../hppa64-hp-hpux11.00/include"
ignoring duplicate directory "/usr/include"
as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
/projects/local/pa20_64/bin/../lib/gcc/hppa64-hp-hpux11.00/4.0.0/include
/usr/local/pa20_64/include
/usr/include
End of search list.
GNU C version 4.0.0 (hppa64-hp-hpux11.00)
compiled by GNU C version 4.0.0.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
/usr/local/pa20_64/bin/as --traditional-format -o /var/tmp//cciDAfJE.o /var/tmp//ccLls3Kk.s
/projects/local/pa20_64/bin/../libexec/gcc/hppa64-hp-hpux11.00/4.0.0/collect2 +Accept TypeMismatch -z -E -u main /usr/ccs/lib/pa20_64/crt0.o /projects/local/pa20_64/bin/../lib/gcc/hppa64-hp-hpux11.00/4.0.0/crtbegin.o -L/usr/lib -L/projects/local/pa20_64/bin/../lib/gcc/hppa64-hp-hpux11.00/4.0.0 -L/projects/local/pa20_64/bin/../lib/gcc -L/usr/local/pa20_64/lib/gcc/hppa64-hp-hpux11.00/4.0.0 -L/projects/local/pa20_64/bin/../lib/gcc/hppa64-hp-hpux11.00/4.0.0/../../../../hppa64-hp-hpux11.00/lib -L/usr/local/pa20_64/lib/gcc/hppa64-hp-hpux11.00/4.0.0/../../../../hppa64-hp-hpux11.00/lib -L/usr/ccs/bin -L/usr/ccs/lib/pa20_64 -L/opt/langtools/lib/pa20_64 -L/projects/local/pa20_64/bin/../lib/gcc/hppa64-hp-hpux11.00/4.0.0/../../.. -L/usr/local/pa20_64/lib/gcc/hppa64-hp-hpux11.00/4.0.0/../../.. -L/lib/pa20_64 -L/usr/lib/pa20_64 /var/tmp//cciDAfJE.o -lc -lgcc -lc /usr/lib/pa20_64/milli.a -lgcc /projects/local/pa20_64/bin/../lib/gcc/hppa64-hp-hpux11.00/4.0.0/crtend.o
ld: Unsatisfied symbol "__strtoull" in file /var/tmp//cciDAfJE.o
1 errors.
collect2: ld returned 1 exit status
shell returned 1
Thank you for any help.
Best regards,
Kevin
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-01-2005 08:05 PM
тАО06-01-2005 08:05 PM
Re: diffutils-2.8.7 __strtoull Unsatisfied Symbol
I mentioned above that the diffutils code compiled under HP ANSI C. This is true for 32-bit but not 64-bit, as I just verified. I forgot to pass the +DD64 flag the first time.
I am feeling confused because I want to understand what is going on. The stubs seem to exist in libc.a, but still no success.
Best regards,
Kevin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-01-2005 08:40 PM
тАО06-01-2005 08:40 PM
Re: diffutils-2.8.7 __strtoull Unsatisfied Symbol
Just had a realization that I was linking against 32-bit apps in /usr/lib. The libs I want are in /usr/lib/pa20_64. So feeling hopeful (because I want to succeed at this) I modified my test file:
1 /* gcc -v % -I/usr/include -L/usr/lib/pa20_64 -lc */
2 #include
3 #include
4
5 int main(int argc, char argv[])
6 {
7 __strtoull(NULL,NULL,0);
8 return 1;
9 }
yet this produced the same error:
:!gcc -v foo.c -I/usr/include -L/usr/lib/pa20_64 -lc
[No write since last change]
Using built-in specs.
Target: hppa64-hp-hpux11.00
Configured with: ../gcc-4.0.0/configure --prefix=/usr/local/pa20_64 --enable-threads --enable-threads=posix95 --with-gnu-as --with-as=/usr/local/pa20_64/bin/as --disable-nls --with-gmp=/usr/local/pa20_64 --with-mpfr=/usr/local/pa20_64 --disable-shared --enable-languages=c,c++
Thread model: posix95
gcc version 4.0.0
/projects/local/pa20_64/bin/../libexec/gcc/hppa64-hp-hpux11.00/4.0.0/cc1 -quiet -v -I/usr/include -iprefix /projects/local/pa20_64/bin/../lib/gcc/hppa64-hp-hpux11.00/4.0.0/ foo.c -quiet -dumpbase foo.c -auxbase foo -version -o /var/tmp//cchmo52h.s
ignoring nonexistent directory "/projects/local/pa20_64/bin/../lib/gcc/hppa64-hp-hpux11.00/4.0.0/../../../../hppa64-hp-hpux11.00/include"
ignoring nonexistent directory "/usr/local/include"
ignoring duplicate directory "/usr/local/pa20_64/lib/gcc/hppa64-hp-hpux11.00/4.0.0/include"
ignoring nonexistent directory "/usr/local/pa20_64/lib/gcc/hppa64-hp-hpux11.00/4.0.0/../../../../hppa64-hp-hpux11.00/include"
ignoring duplicate directory "/usr/include"
as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
/projects/local/pa20_64/bin/../lib/gcc/hppa64-hp-hpux11.00/4.0.0/include
/usr/local/pa20_64/include
/usr/include
End of search list.
GNU C version 4.0.0 (hppa64-hp-hpux11.00)
compiled by GNU C version 4.0.0.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
/usr/local/pa20_64/bin/as --traditional-format -o /var/tmp//ccS3amyN.o /var/tmp//cchmo52h.s
/projects/local/pa20_64/bin/../libexec/gcc/hppa64-hp-hpux11.00/4.0.0/collect2 +Accept TypeMismatch -z -E -u main /usr/ccs/lib/pa20_64/crt0.o /projects/local/pa20_64/bin/../lib/gcc/hppa64-hp-hpux11.00/4.0.0/crtbegin.o -L/usr/lib/pa20_64 -L/projects/local/pa20_64/bin/../lib/gcc/hppa64-hp-hpux11.00/4.0.0 -L/projects/local/pa20_64/bin/../lib/gcc -L/usr/local/pa20_64/lib/gcc/hppa64-hp-hpux11.00/4.0.0 -L/projects/local/pa20_64/bin/../lib/gcc/hppa64-hp-hpux11.00/4.0.0/../../../../hppa64-hp-hpux11.00/lib -L/usr/local/pa20_64/lib/gcc/hppa64-hp-hpux11.00/4.0.0/../../../../hppa64-hp-hpux11.00/lib -L/usr/ccs/bin -L/usr/ccs/lib/pa20_64 -L/opt/langtools/lib/pa20_64 -L/projects/local/pa20_64/bin/../lib/gcc/hppa64-hp-hpux11.00/4.0.0/../../.. -L/usr/local/pa20_64/lib/gcc/hppa64-hp-hpux11.00/4.0.0/../../.. -L/lib/pa20_64 -L/usr/lib/pa20_64 /var/tmp//ccS3amyN.o -lc -lgcc -lc /usr/lib/pa20_64/milli.a -lgcc /projects/local/pa20_64/bin/../lib/gcc/hppa64-hp-hpux11.00/4.0.0/crtend.o
ld: Unsatisfied symbol "__strtoull" in file /var/tmp//ccS3amyN.o
1 errors.
collect2: ld returned 1 exit status
shell returned 1
Yuck!
I felt even worse to find out that nm -A reports:
schultkl@voltaire: /usr/lib/pa20_64 $ nm -A libc.a | grep -i strtoll
schultkl@voltaire: /usr/lib/pa20_64 $ nm -A libc.a | grep -i strtoull
schultkl@voltaire: /usr/lib/pa20_64 $
No 64-bit libraries with strtoull in /usr/lib/pa20_64.
If you are willing, please let me know if you have any ideas or suggestions.
Best regards,
Kevin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-01-2005 09:58 PM
тАО06-01-2005 09:58 PM
Re: diffutils-2.8.7 __strtoull Unsatisfied Symbol
# gcc -O -o cmp cmp.o ../lib/libdiffutils.a -lc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2005 05:50 AM
тАО06-02-2005 05:50 AM
Re: diffutils-2.8.7 __strtoull Unsatisfied Symbol
Here is the result:
schultkl@voltaire: /projects/oss/pa20_64/objdir/src $ gcc -O -o cmp cmp.o ../lib/libdiffutils.a -lc
ld: Unsatisfied symbol "__strtoull" in file ../lib/libdiffutils.a[xstrtoumax.o]
1 errors.
collect2: ld returned 1 exit status
Best regards,
Kevin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2005 06:55 AM
тАО06-02-2005 06:55 AM
SolutionDownload and modify this source code:
http://darwinsource.opendarwin.org/10.3/tcl-14/tcl/compat/strtoul.c
All you need to do change the function from
unsigned long int
strtoul(string, endPtr, base)
to
unsigned long long strtoull(string, endPtr, base)
and
the variable declaration
from
register unsigned long int result = 0;
to
unsigned long long result = 0;
You then either add strtoull.o to a library or simply directly link strtoull.o to your other code.
I would also take the time to convert the K&R C to ANSI --- which should take you less than 2 minutes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2005 08:20 AM
тАО06-02-2005 08:20 AM
Re: diffutils-2.8.7 __strtoull Unsatisfied Symbol
Thanks for the tip, I am investigating now.
It seems like the root cause is that my HP-UX 11.00 libraries are out of date. Does HP supply patches to update C libraries?
Best regards,
Kevin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-02-2005 08:25 AM
тАО06-02-2005 08:25 AM
Re: diffutils-2.8.7 __strtoull Unsatisfied Symbol
You might also do a seach for strtoull in the patch database.
This may or may not help you because I remember sometime back a question similar to yours looking for a long long version of the atol() function (convert an ASCII string to a long long) called atoll() and there was no such animal. It was trivially easy to code from scratch and that was the solution.