Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8459751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:24:56+00:00 2026-06-10T13:24:56+00:00

When I compile and link a .so file on my machine, it works. When

  • 0

When I compile and link a .so file on my machine, it works. When I try to distribute the file to someone, they are getting errors.

To be more specific, I am building on:

-bash-3.00# uname -a
SunOS bob 5.10 Generic_127127-11 sun4u sparc SUNW,Sun-Blade-1000
-bash-3.00# CC -V
CC: Sun C++ 5.9 SunOS_sparc Patch 124863-01 2007/07/25

In the makefile, I am using these flags:

CFLAGS=-m64 -library=stlport4 -KPIC
LDFLAGS=-m64 -L/usr/lib/sparcv9 -lCrun -library=stlport4 -G

I am not seeing any errors on my machine, but this error is being report

ld.so.1: batch: fatal: relocation error: file lqtbatch: symbol __1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___2G6Mpkc_r1_: referenced symbol not found

Having a little trouble tracking down the reason, but here are a few differences I am seeing. On my machine, ldd -r batch:

ldd -r batch 
    libstlport.so.1 =>       /opt/SUNWspro/lib/stlport4/v9/libstlport.so.1
    librt.so.1 =>    /lib/sparcv9/librt.so.1
    libCrun.so.1 =>  /opt/SUNWspro/prod/lib/stlport4/v9/../../../usr/lib/v9/libCrun.so.1
    libm.so.1 =>     /lib/64/libm.so.1
    libc.so.1 =>     /lib/64/libc.so.1
    libaio.so.1 =>   /lib/64/libaio.so.1
    libmd.so.1 =>    /lib/64/libmd.so.1
    /platform/SUNW,Sun-Blade-1000/lib/sparcv9/libc_psr.so.1
    libm.so.2 =>     /lib/64/libm.so.2
    /platform/SUNW,Sun-Blade-1000/lib/sparcv9/libmd_psr.so.1

Others are seeing this on the ldd -r command

libstlport.so.1 =>   /opt/SUNWspro/lib/stlport4/v9/libstlport.so.1
librt.so.1 =>    /lib/sparcv9/librt.so.1
libm.so.1 =>     /lib/64/libm.so.1
libc.so.1 =>     /lib/64/libc.so.1
libaio.so.1 =>   /lib/64/libaio.so.1
libmd.so.1 =>    /lib/64/libmd.so.1
symbol not found: __1cG__CrunKpure_error6F_v_       (./liblqtcr.so)
symbol not found: __1cG__CrunKpure_error6F_v_       (./liblqtcr.so)
...many of these...
symbol not found: __1cG__CrunKpure_error6F_v_       (./liblqtcr.so)
/platform/SUNW,SPARC-Enterprise-T2000/lib/sparcv9/libc_psr.so.1
symbol not found: __1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___2G6Mpkc_r1_        (./liblqtcr.so)
symbol not found: __1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___Gsubstr6kMLL_1_        (./liblqtcr.so)
libm.so.2 =>     /lib/64/libm.so.2
symbol not found: __1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___2G6Mrk1_r1_        (./liblqtcr.so)
symbol not found: __1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___Hreplace6MLLrk1_r1_        (./liblqtcr.so)
symbol not found: __1cDstdK_M_put_num4Ccn0ALchar_traits4Cc__Cb_6Frn0ANbasic_ostream3CTACTB__TC_4_       (./liblqtcr.so)
symbol not found: __1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___Gassign6MpkcL_r1_      (./liblqtcr.so)
/platform/SUNW,SPARC-Enterprise-T2000/lib/sparcv9/libmd_psr.so.1

My assumption is that I am incorrectly linking libCrun.so.1 which is causing these errors and causing the error on other machines.

Any help would be appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T13:24:57+00:00Added an answer on June 10, 2026 at 1:24 pm

    LDFLAGS=-m64 -L/usr/lib/sparcv9 -lCrun ...

    You should remove both the -L/usr/lib/sparcv9 and -lCrun from your LDFLAGS — SunStudio will add them correctly all on its own.

    My assumption is that I am incorrectly linking libCrun.so.1

    No: you are linking with it correctly. The problem is that on the problem machine libCrun.so.1 is (apparently) not installed at all. That library should be installed by default — no C++ application would normally run without it. You should find out what package libCrun.so.1 belongs to, and ask your client/customer to install it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, I should use gcc to compile a C file, then link
I try to compile and link my application in 2 steps : Compiling: g++
I followed the instructions given in the link: http://blog.avirtualhome.com/how-to-compile-a-new-ubuntu-11-04-natty-kernel/ for building a custom kernel
I can't for the life of me figure out how to compile and link
I do tutorial in following link: Java RMI Tutorial After I compile successfully three
I am trying to compile go file using gccgo , i installed on my
I am using CreateProcess to invoke cl and link to compile and link another
I am using CreateProcess to invoke cl to compile and link another C++ program
I try to using eclipse 3.7 cdt with visual c++ compiler to compile my
I'm trying to cross compile openldap-2.4.23 on my Ubuntu 10.10 development machine using the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.