Sun Solaris C++ Compiling Error


 
Thread Tools Search this Thread
Top Forums Programming Sun Solaris C++ Compiling Error
# 1  
Old 07-08-2010
Sun Solaris C++ Compiling Error

Hello. I'm using SunStudio 12 Update 1. When compiling for x86, everything works fine. When compiling for SPARC, I get the following errors. I linked libCstd.so.1 explicitly, but I get the same errors. Would anyone be kind enough to step me through resolving this? Thank you very much.

Code:
** Linking binary camaAlpha_Agw
CC -lrt -mt -xarch=v9 -DCOMPILE_SOL_SPARC -ftrap=%none -xlibmil  -xchip=ultra2 -xbuiltin -xO4 -D_REENTRANT -DNDEBUG
  -instances=static -I. -I/home/Alpha/release64/include -I/home/Alpha/release64/include  -I/home/Alpha/src/emapi/common
  -I/home/Alpha/src/emapi/emapi -o /home/Alpha/release64/obj/camaAlpha_Agw/CompileDate.o
CC -lrt -mt -xarch=v9 -DCOMPILE_SOL_SPARC -ftrap=%none -xlibmil  -xchip=ultra2 -xbuiltin -xO4 -D_REENTRANT -DNDEBUG
  -instances=static -I. -I/home/Alpha/release64/include -I/home/Alpha/release64/include  -I/home/Alpha/src/emapi/common
  -I/home/Alpha/src/emapi/emapi -xildoff -norunpath -lrt -o /home/Alpha/release64/bin/camaAlpha_Agw /home/Alpha/release64/obj/camaAlpha_Agw/AgwApp.o
  /home/Alpha/release64/obj/camaAlpha_Agw/AgwCallBack.o /home/Alpha/release64/obj/camaAlpha_Agw/AgwHealth.o
  /home/Alpha/release64/obj/camaAlpha_Agw/AgwLink.o /home/Alpha/release64/obj/camaAlpha_Agw/AgwMain.o
  /home/Alpha/release64/obj/camaAlpha_Agw/AgwMessageQueue.o /home/Alpha/release64/obj/camaAlpha_Agw/AgwSession.o
  /home/Alpha/release64/obj/camaAlpha_Agw/AgwSortString.o /home/Alpha/release64/obj/camaAlpha_Agw/AgwUtility.o \
        /home/Alpha/release64/obj/camaAlpha_Agw/CompileDate.o -L/home/Alpha/release64/lib -L/home/Alpha/src/emapi/lib/SOL_SPARC
  -lFidApp -lFidInf -lFidCore -lFidevm -lAlphaDb  -lemapi -ldl -lsocket -ldemangle -lm -lnsl -lz -lsched -R /usr/lib/lwp/64
Undefined                        first referenced
 symbol                              in file
unsigned long std::basic_string<char,std::char_traits<char>,std::allocator<char> >::size()const
  /home/Alpha/src/emapi/lib/SOL_SPARC/libemapi.a(EmapiSessionImpl.o) 
  (symbol belongs to implicit dependency /usr/lib/sparcv9/libCstd.so.1)
void std::basic_string<char,std::char_traits<char>,std::allocator<char> >::clear()
  /home/Alpha/src/emapi/lib/SOL_SPARC/libemapi.a(MessageQueueItems.o)
  (symbol belongs to implicit dependency /usr/lib/sparcv9/libCstd.so.1)
char*__rwstd::__rw_basis<char*,std::allocator<char> >::data()const
  /home/Alpha/src/emapi/lib/SOL_SPARC/libemapi.a(EmapiTypes.o)
  (symbol belongs to implicit dependency /usr/lib/sparcv9/libCstd.so.1)
...
...
...


Last edited by acheong87; 07-08-2010 at 10:57 AM.. Reason: better formatting, thanks pluri
# 2  
Old 07-08-2010
This might help you understand the problem: Sun Studio C++ - Linking Error : Undefined Symbols
This User Gave Thanks to fpmurphy For This Post:
# 3  
Old 07-13-2010
Resolved, thank you!

I emailed the system administrators to create the following symlinks, as suggested in the Sun Workshop[tm] 6 update 2 C++ Compiler Readme:

Code:
 
ln -s /usr/lib/libCstd.so.1 /opt/SUNWSpro/lib/libCstd.so
ln -s /usr/lib/libCstd.so.1 /opt/SUNWSpro/lib/v8plus/libCstd.so
ln -s /usr/lib/sparcv9/libCstd.so.1 /opt/SUNWSpro/lib/v9/libCstd.so


Last edited by acheong87; 07-13-2010 at 01:02 PM.. Reason: Typo and formatting.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Fsck: alignment error Solaris 8, SUN Netra AX11505

Hello all, I recently powered on my Netra AX1105 server only to be greeted with the following error message. I am not sure what to do here, I cant fun fsck on OK prompt.. did ok>boot -r and now it keeps booting from net, then I run ok>boot disk then outputs the following message... and keeps... (3 Replies)
Discussion started by: br1an
3 Replies

2. UNIX Benchmarks

error compiling bm software under Solaris 10

anyone tried it , under Solaris 10 using make (part of SUNWsprot) and gcc 4.6 compiler.. got an error complaining about the Makefile script syntax... I don't think that's compatible at all... (2 Replies)
Discussion started by: ppchu99
2 Replies

3. Shell Programming and Scripting

awk script Error in Sun Solaris

Hi Friends, the below script has been through the errors in sun solaris. awk '/%s/{f=0 ;n++; print >(file="OUT_" n); close("OUT_" n-1)} f{ print > file}; /%s/{f=1}' $BASE_DIR/concat.TXT awk: syntax error near line 1 awk: bailing out near line 1 And ls $MERGE_DIR/*.R | awk ' { ... (2 Replies)
Discussion started by: krbala1985
2 Replies

4. Solaris

Compiling Error in Samba 3.4.1 on Solaris 10

Hi all, I am getting the following error While installing Samba 3.4.1 on Solaris 10. #./autogen.sh ./autogen.sh : autoheader : not found ./autogen.sh : test : argument expected Please help me as I am in a critical state of the project. Warm regards, Sathya (10 Replies)
Discussion started by: sathya47
10 Replies

5. Solaris

useful links and help resources for Sun's products and Sun's Solaris

Hi all, Those links might help anyone Knowledge base Video tutorials (0 Replies)
Discussion started by: h@foorsa.biz
0 Replies

6. Solaris

Sun Fire 280R Sun Solaris CRT/Monitor requirements

I am new to Sun. I brought Sun Fire 280R to practice UNIX. What are the requirements for the monitor/CRT? Will it burn out old non-Sun CRTs? Does it need LCD monitor? Thanks. (3 Replies)
Discussion started by: bramptonmt
3 Replies

7. UNIX for Dummies Questions & Answers

Sun Solaris 10: How do I create a bootup disc? The Sun website confuses me

Hey there, I am starting a Computer Science Foundation year at the end of this month and am trying to get a little bit ahead of the game. I have always wanted to learn Unix and am currently struggling with creating a boot disc to run Solaris (I have chosen to study this) from as opposed to... (0 Replies)
Discussion started by: Jupiter
0 Replies

8. Solaris

sun solaris 10 make error

i am new to solaris 10 just installed the entire DVD i have the make and gmake installed in the right postions but even when logged in as root when i run make i get "a command not found " do i have to specify a sepecial path in solaris am trying to compile postfix for a mail server i have... (9 Replies)
Discussion started by: sunrise
9 Replies

9. Solaris

Error on compiling php for GD on SOLARIS 10

Hi everyone, I have SUn E250 server running solaris 10. I have installed apache 2 + MySQL + PHP-5.1.4 following the guidelines on this website http://meljr.com/~meljr/AMPSolaris10.html Excellent document for first time installation. Now, because I wanted to use Coppermine Photo Gallery, I... (9 Replies)
Discussion started by: callingrohit
9 Replies

10. Programming

CC LInker Error UNIX Sun Solaris

Hi Together, while compiling my program with CC I get the following Error message from the Linker: Undefined first referenced symbol in file std::basic_string<char,std::char_traits<char>,std::allocator<char>... (2 Replies)
Discussion started by: nik
2 Replies
Login or Register to Ask a Question