XCode's C++ Linker and "Symbol Not Found"
I'm having trouble with the C++ Linker and it might have to do with how my project is set up:
Right now, I'm developing a simple C++ (command-line) problem in XCode 3.2.6, and while my sources compile, I'm getting a series of weird errors. Upon closer inspection, it appears that the "symbol not found" errors all relate to code in a file code.cpp, which calls functions declared in util.h, and for which the functions are declared in util.cpp; it appears that the object file code.o cannot find the symbols generated from util.o. How do I fix this?
Alright. A little bit more concrete than what I had before: First the "symbol not found" error:
"std::set<unsigned long, std::less<unsigned long>, std::allocator<unsigned long> > setIntersection<unsigned long>(std::set<unsigned long, std::less<unsigned long>, std::allocator<unsigned long> > const&, std::set<unsigned long, std::less<unsigned long>, std::allocator<unsigned long> > const&)", referenced from:
AnchorSet::evaluate(std::set<unsigned long, std::less<unsigned long>, std::allocator<unsigned long> > const&) constin AnchorSet.o
AnchorSet::evaluate() is declared in AnchorSet.h and defined in AnchorSet.cpp. setIntersection() is declared in utils.h and defined in utils.cpp.
In AnchorSet.h:
class AnchorSet {
public:
unsigned long evaluate(const Subset& B) const;
In utils.h:
template<class T>
std::set<T> setDifference(const std::set<T>& A, const std::set<T>& B);
Any specific code that is needed beyond this?
Similar Messages
-
Ld.so.1 problem - fatal: relocation error - "referenced symbol not found"
Hi, I've been trying to compile and run my application non Solaris using CC (detils below) but haven't got luck with running the application because of a linker error :
ld.so.1: java: fatal: relocation error: file ./libtest.so: symbol __1cDstdMbasic_string4Ccn0ALchar_traits4Cc__n0AJallocator4Cc___J__nullref_: referenced symbol not found
Here's what I'm trying to do :
I'm compieing one library to include another shared library whcih uses the "string" class (STL). The compilation of both the libraries proceeds perfectly fine. However, when i preload this library with LD_PRELOAD and run a JAVA application (which will have calls to some function in the preloaded library), the get the above linker error.
Here's what all I have tries to get thsi wroking : ( I understand that this error is due to a missing library that CC has not linked to and i've no idea what the library is!!!)
1.> # LD_LIBRARY_PATH=/usr/lib:$LD_LIBRARY_PATH
# export LD_LIBRARY_PATH - NO LUCK :-(
2.> linked to /opt/SUNWspro/lib/libCrun.so (found this from another forum on the net), but NO LUCK :-(
3.> export LD_DEBUG=bindings
export LD_DEBUG_OUTPUT=/home/log.txt (so that all sysmbols refered are logged!!!)
i did a grep on the log for the symbol but NO LUCK!!! :-(
Please can you help me with this? What is the library that is to be linked too, or is there something else?
Details About my system, compiler and compilation options :
1.> uname -a output : SunOS sh1sol9 5.9 Generic_117171-12 sun4u sparc SUNW,Sun-Fire-280R Solaris
2.> CC version : Sun WorkShop 6 update 2 C++ 5.3
3.> Compilation flags i've used to build the library :
FIRST LIBRARY : CC -G -xcode=pic32 -I../common/ -ldl ../common/logger.cpp helper_functions.cpp BCPEntries.cpp BCP_class.cpp -o libBCP.so
SECOND LIBRARY : CC -G -xcode=pic32 -I../common/ test_BCP_construct.cpp -lBCP -L. -o libtest.so
Please help me out of this,
Any and every help (or even a hint to it) will be appreciated!!!
Thanks in advance,
Madhur Kumar TanwaniRefer to the C++ Users Guide that comes with the compiler, the chapter on Building Libraries, which explains these points in more detail.
When you build a C++ shared library, you must explicitly list all the libraries that it depends on. Unlike building an executable, the CC -G command does not by default create dependencies on system libraries. Although not explained well in the Guide, you should be sure you get the shared (.so) versions of all libraries, not the static (.a) versions.
All C++ programs require at least libCrun and libc. Programs that use the C++ Standard library (using anything in the std namespace, like std::string) also need to link to the appropriate version of the library.
The default library is libCstd. If you compile using the optional STLport library, you need the libstlport instead. You cannot use both libCstd and libstlport in the same program.
In your case, the build command would look something like this, assuming you are using the default libCstd:
CC -G -o mylib.so ..... -library=Cstd,Crun -lc
Be sure that any preceeding -Bstaic option is followed by -Bdynamic before listing these system libraries.
To verify you have picked up the dynamic libraries, run the command
ldd mylib.so
to see a list of dependencies. If you don't see the following in the list
/usr/lib/libCstd
/usr/lib/libCrun
/usr/lib/libc (or /lib/libc)
something is wrong.
A note about LD_LIBRARY_PATH: don't use it.
Ideally, the environment variable should never be set. If you must set it to reach vendor-supplied libraries, never put the system directories /lib or /usr/lib on the path, and never put the compiler installation directory, like /opt/SUNWspro/... on the path. You can wind up forcing the runtime loader to seach directories in the wrong order and pick up inappropriate versions of libraries.
For more on LD_LIBRARY_PATH, read this note in Rod Evans' blog. He's the Sun linker expert. The material here is available in the manuals, but his blog has a nice summary.
http://blogs.sun.com/roller/page/rie/?anchor=tt_ld_library_path_tt -
Safari 7.0.6 crashes: Dyld Error Message: Symbol Not Found
After I did the latest MacOS update (10.9.5) Safari (7.0.6) no longer runs. I repaired permissions and also rebooted in safe mode so I could potentially remove any spurious plug-ins, but the last time I did this was with MaxOS 6 so I have no idea where to look in the current version.
The error message that pops up is:
Process: Safari [1279]
Path: /Applications/Safari.app/Contents/MacOS/Safari
Identifier: com.apple.Safari
Version: ???
Build Info: WebBrowser-7537085010017001~4
Code Type: X86-64 (Native)
Parent Process: launchd [194]
Responsible: Safari [1279]
User ID: 505
Date/Time: 2014-09-26 08:16:17.066 +1000
OS Version: Mac OS X 10.9.5 (13F34)
Report Version: 11
Anonymous UUID: 84ADDFB5-CAD4-0759-3667-8E0B47E8E995
Sleep/Wake UUID: 51EC656E-25AB-4167-810D-D7A644340E28
Crashed Thread: 0
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Application Specific Information:
dyld: launch, loading dependent libraries, ignoring DYLD_* env vars
Dyld Error Message:
Symbol not found: __ZN3JSC10JSDataView6s_infoE
Referenced from: /System/Library/StagedFrameworks/Safari/WebCore.framework/Versions/A/WebCore
Expected in: /System/Library/Frameworks/JavaScriptCore.framework/Versions/A/JavaScriptCore
in /System/Library/StagedFrameworks/Safari/WebCore.framework/Versions/A/WebCore
(insert a 'shed load' of other lines of log data which you probably don't need, right?)If you don't already have a current backup, back up all data, then reinstall the OS.* You don't need to erase the startup volume, and you won't need the backup unless something goes wrong. If the system was upgraded from an older version of OS X, you may need the Apple ID and password you used.
If you use FileVault 2, then before running the Installer you must launch Disk Utility and select the icon of the FileVault startup volume ("Macintosh HD," unless you gave it a different name.) It will be nested below another icon with the same name. Click the Unlock button in the toolbar and enter your login password when prompted. Then quit Disk Utility to be returned to the main Recovery screen.
There are ways to back up a computer that isn't fully functional. Ask if you need guidance.
If you installed the Java runtime distributed by Apple and still need it, you'll have to reinstall it. The same goes for Xcode. All other data will be preserved.
*The linked support article refers to OS X 10.9 ("Mavericks"), but the procedure is the same for OS X 10.7 ("Lion") and later. -
Avoiding Error: referenced symbol not found in STL matrix
Hi,
in Sun WorkShop 6 update 2 C++ 5.3 2001/05/15 there is a well known problem when STL classes are used. For example, the following code:
#include <vector>
int main()
std::vector<int> myVector;
myVector.push_back(1);
will cause a linking error:
symbol std::vector::__insert_aux : referenced symbol not found.
There is a workaround in:
http://forum.java.sun.com/thread.jspa?forumID=850&threadID=5069680
Some recommended link options are provided in:
http://forum.java.sun.com/thread.jspa?forumID=850&threadID=5104725
Once solved this problem, something similar happens when I try to build a matrix using nested templates std::vector:
// Matrix defined in my class.
class myClass
public:
std::vector<std::vector<double> > matrix;
Of course, I want to use the matrix dynamically:
int main ()
myClass object;
// Create a matrix with Nrows rows.
object.matrix = std::vector<std::vector<double> > (Nrows);
// etc ...
This code will cause the following referenced symbol not found error at linking:
$ echo __1cDstdGvector4n0AGvector4Cdn0AJallocator4Cd____n0AJallocator4n0C____2G6Mrk1_r1_ | c++filt
std::vector<std::vector<double,std::allocator<double> >,std::allocator<std::vector<double,std::allocator<double> > > >&std::vector<std::vector<double,std::allocator<double> >,std::allocator<std::vector<double,std::allocator<double> > > >::operator=(const std::vector<std::vector<double,std::allocator<double> >,std::allocator<std::vector<double,std::allocator<double> > > >&)
so the matter is that the operator = is not found for matrix as a nested template. std::vector::push_back method cannot also be used, as shown above.
I have found a workaround to avoid this linking error:
int main ()
myClass object;
// Create a matrix with Nrows rows.
std::vector<std::vector<double> > auxiliarMatrix (Nrows);
object.matrix.swap (auxiliarMatrix);
// Now matrix can be filled:
for(int nCont=0; nCont < Nrows; nCont++)
std::vector<double> auxiliarVector;
// Vector must be filled first...
object.matrix[nCont] = auxiliarVector;
// etc ...
std::vector::swap method exchanges auxiliarMatrix and object.matrix, so now I have a matrix with the required size. And, very important, doesn't cause linking error in my case.
Hope this may be useful for somebody.
Bye.Hi,
in Sun WorkShop 6 update 2 C++ 5.3 2001/05/15 there is a well known problem when STL classes are used. For example, the following code:
#include <vector>
int main()
std::vector<int> myVector;
myVector.push_back(1);
will cause a linking error:
symbol std::vector::__insert_aux : referenced symbol not found.
There is a workaround in:
http://forum.java.sun.com/thread.jspa?forumID=850&threadID=5069680
Some recommended link options are provided in:
http://forum.java.sun.com/thread.jspa?forumID=850&threadID=5104725
Once solved this problem, something similar happens when I try to build a matrix using nested templates std::vector:
// Matrix defined in my class.
class myClass
public:
std::vector<std::vector<double> > matrix;
Of course, I want to use the matrix dynamically:
int main ()
myClass object;
// Create a matrix with Nrows rows.
object.matrix = std::vector<std::vector<double> > (Nrows);
// etc ...
This code will cause the following referenced symbol not found error at linking:
$ echo __1cDstdGvector4n0AGvector4Cdn0AJallocator4Cd____n0AJallocator4n0C____2G6Mrk1_r1_ | c++filt
std::vector<std::vector<double,std::allocator<double> >,std::allocator<std::vector<double,std::allocator<double> > > >&std::vector<std::vector<double,std::allocator<double> >,std::allocator<std::vector<double,std::allocator<double> > > >::operator=(const std::vector<std::vector<double,std::allocator<double> >,std::allocator<std::vector<double,std::allocator<double> > > >&)
so the matter is that the operator = is not found for matrix as a nested template. std::vector::push_back method cannot also be used, as shown above.
I have found a workaround to avoid this linking error:
int main ()
myClass object;
// Create a matrix with Nrows rows.
std::vector<std::vector<double> > auxiliarMatrix (Nrows);
object.matrix.swap (auxiliarMatrix);
// Now matrix can be filled:
for(int nCont=0; nCont < Nrows; nCont++)
std::vector<double> auxiliarVector;
// Vector must be filled first...
object.matrix[nCont] = auxiliarVector;
// etc ...
std::vector::swap method exchanges auxiliarMatrix and object.matrix, so now I have a matrix with the required size. And, very important, doesn't cause linking error in my case.
Hope this may be useful for somebody.
Bye. -
Safari 4 won't load - Symbol not found: _WebActionFormKey
I'm really frustrated with this problem. I'm hoping someone from Apple monitors these posts, since I can't find any way to post a bug report. This is the family computer, and it doesn't have any add-ons or plug-ins for Safari. I have deliberately avoided geeking with this box, and I don't want to start now. I hope Apple will issue a patch promptly.
Host Name: Family-Computer
Date/Time: 2009-06-14 19:47:00.021 -0400
OS Version: 10.4.11 (Build 8S2167)
Report Version: 4
Command: Safari
Path: /Applications/Safari.app/Contents/MacOS/Safari
Parent: WindowServer [484]
Version: 4.0 (4530.17)
PID: 2525
Thread: Unknown
Link (dyld) error:
Symbol not found: _WebActionFormKey
Referenced from: /Applications/Safari.app/Contents/MacOS/Safari
Expected in: /System/Library/Frameworks/WebKit.framework/Versions/A/WebKitHi,
I'm hoping someone from Apple monitors these posts
Sorry, I'm afraid not, just us fellow users here.
I hope Apple will issue a patch promptly
There's nothing to patch in this case. It simply seems to be the case that the installation failed (for whatever reason - a problem with your hard disk maybe?).
If you still have the installation package, see if you can re-run it. If not try downloading a fresh copy from www.apple.com/safari/download.
I have a feeling the installer requires WebKit (which is the improperly installed part) so the installer may not run either. If that's the case, post back. -
Hi,
I'm trying to migrate a program from Solaris2.6 with the 4.2 C++ compiler to Solaris 2.8 with the 6.3 C++ compiler.
The compilation and link works fine. I then try to use a dynamic library obtained to run python test on my server and I get the following error:
ImportError: ld.so.1: python: fatal: relocation error: file /space4/users/bmicha/livr/sem/lib/libpy_oss_orp.so: symbol __1cDstd2l6Frn0ANbasic_ostream4Ccn0ALchar_traits4Cc____pkc_2_: referenced symbol not found
The symbol is defined in the libCstd.a library.
The compilation option I use are:
CC -c -library=rwtools7_std -I/opt/SUNWSPRO/WS6U2/include/CC -pto -I/space4/users/bmicha/sem/../brique/include -I/space2/integre/export/include -DSYSTEM_SunOS -DUSE_MULTITHREAD -D_REENTRANT -DCTBP_NDEBUG -DCTBO_NDEBUG -g -I/usr/local/include/python2.2 -D_REENTRANT -I/opt/iona/include
I'd be very greatfull if anyone could tell me how I can get this symbol defined in the dynamic library?
ThanksProblems like this one are usually caused by a bad LD_LIBRARY_PATH environment variable. Since the symbol for which your application is looking is in a standard library, you should not need to specifically reference the directory.
Try a couple things:
1) % ldd <application name>
This should give you a list of libraries that your application will try to dynamically load.
Example:
% ldd /usr/bin/strings
libelf.so.1 => /usr/lib/libelf.so.1
libc.so.1 => /usr/lib/libc.so.1
libdl.so.1 => /usr/lib/libdl.so.1
/usr/platform/SUNW,Ultra-250/lib/libc_psr.so.1
If any of the libraries are undefined, then your LD_LIBRARY_PATH is messed up.
2) unsetenv LD_LIBRARY_PATH
or
LD_LIBRARY_PATH=
export LD_LIBRARY_PATH
if you're running /bin/sh
3) Try the ldd again and see if the libraries are all
being picked up now. -
Referenced symbol not found error
Hello,
I am using Solaris 5.6 and CC(Sun native) compiler 5.0.
I build Xalan1.0 (C++ version) in Solaris and created necessary '.so' files. If I use this '.so' in my development environment, while runing my program it is showing the following error.
"/home/kvelu/EDP_R1_GA_1114/EDPSERVER/SOLARISDEBUG/Bin/EDPServer: fatal: relocation error: file /home/kvelu/EDP_R1_GA_1114/SOFTWARE/SOLARISDEBUG/BIN/libxalan-c1_0.so: symbol __1cDstdGvector4Cbn0AJallocator4Cb___M__insert_aux6Mn0CIiterator_b_v_: referenced symbol not found"
The demangling of this symbol is
void std::vector<bool,std::allocator<bool> >::__insert_aux(std::vector<bool,std::allocator<bool> >::iterator,bool)
Then I added some more options in the Xalan Makefile like "-library=iostream,Crun" compiler option and "-liostream -lCrun -lc -ltls7d" link option. Again I got the same error. Instead of "lc" I used "lCstd" also, again not solved.
Can any body give me which compiler option and link option I must use to avoid this problem?
Thanks
kalees.Hi Kalees,
I know this error quite well but I don't know if the cause is the same, because your environment seems to be different.
Anyway you can take a look on thread:
http://forum.java.sun.com/thread.jspa?forumID=850&threadID=5069680
If vectors causing the error are in your library you can try to solve it using the solution suggested there, but if those vectors are in external linked libraries maybe you have no chance, so you need to update the compiler or the Workshop environment (Sun Studio nowadays).
Good luck.
Bye. -
Hi All,
I got the following fatal error when running my application:
dlopen() failed:ld.so.1: delosd: fatal: relocation error: file libwellbuilder.so.1: symbol __1cDstdM__node_alloc4BiA_N_M_deallocate6FpvI_v_: referenced symbol not found
I compile and link with option -library=stlport4,Crun
I check the libwellbuilder.so.1 but don't see stlport lib at all. Not sure in what lib the undefined symbol is defined.
ldd libwellbuilder.so.1
libconfig.so.1 => /mnt/calnas02/home/zik31726/libs/server/libconfig.so.1
liblogging.so.1 => /mnt/calnas02/home/zik31726/libs/server/liblogging.so.1
libtiff.so.1 => (file not found)
libcdm.so.1 => (file not found)
libdelos.so.1 => /mnt/calnas02/home/zik31726/libs/server/libdelos.so.1
libdbaccess.so.1 => (file not found)
libxtiff.so.1 => (file not found)
libsrvutil.so.1 => /mnt/calnas02/home/zik31726/libs/server/libsrvutil.so.1
libdbprovider.so.1 => (file not found)
libsrvnet.so.1 => /mnt/calnas02/home/zik31726/libs/server/libsrvnet.so.1
libloader.so.1 => /mnt/calnas02/home/zik31726/libs/server/libloader.so.1
libiss_conf.so.1 => /mnt/calnas02/home/zik31726/libs/server/libiss_conf.so.1
libCrun.so.1 => /*usr/lib/libCrun.so.1*
libmd5.so.1 => /usr/lib/libmd5.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libc.so.1 => /usr/lib/libc.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/SUNW,Ultra-250/lib/libmd5_psr.so.1
/usr/platform/SUNW,Ultra-250/lib/libc_psr.so.1
My solaris system is as following:
CC -V: CC: Sun C++ 5.8 2005/10/13
uname -a: SunOS dlp001 5.9 Generic_122300-32 sun4u sparc SUNW,Ultra-250System = SunOS
If you know how to resolve this issue, please let me know.
Thanks,
IcemanThanks for your quick response.
Here is the compiling line, I cut off some due it exceed 5000 line:
/sw/opt/SUNWspro/bin/CC -KPIC -zdefs -library=stlport4 -library=stlport4,Crun -lm -lc -I/mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.lib.config/1.0 -I/mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.lib.logging/1.0 -I/mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.vendor.lib.libtiff/1.0 -I/mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/nsl/1.1 -I/usr/include/test -I/mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.lib.loader/1.0 -I/mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.lib.issconf/1.0 -DSunOS=900000 -g -DUNIX -I/mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.lib.config/1.0 -I/mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.lib.util/1.0 -I/mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.lib.dbprovider/1.0 -I/mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.lib.net/1.0 -I/mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.lib.loader/1.0 -I/mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.lib.issconf/1.0 -c CurveDigits.cpp -o CurveDigits.cpp_So.o
/usr/ccs/bin/ld -o CurveDigits.So -r CurveDigits.cpp_So.o
/bin/rm CurveDigits.cpp_So.o
And linking line:
/sw/opt/SUNWspro/bin/CC -Bdynamic -G -zdefs -library=stlport4 -library=stlport4,Crun -lm -lc -I/mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.lib.config/1.0 -I/mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.lib.logging/1.0 -I/mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.vendor.lib.libtiff/1.0 -I/mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.lib.loader/1.0 -I/mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.lib.issconf/1.0 -DSunOS=900000 -g -DUNIX -I/mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.lib.config/1.0 -I/mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.lib.logging/1.0 -I/mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.lib.loader/1.0 -I/mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.lib.issconf/1.0 -o libwellbuilder.so.1 -h libwellbuilder.so.1 *.So -L /mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.lib.config/1.0 -lconfig -L /mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.lib.logging/1.0 -llogging -lxtiff -L /mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.lib.util/1.0 -lsrvutil -L /mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.lib.dbprovider/1.0 -ldbprovider -L /mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.lib.net/1.0 -lsrvnet -L /mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.lib.loader/1.0 -lloader -L /mnt/calnas02/home/zik31726/devcm/workspaces/merge_server/inst/SunOS-5.9-sun4u/NativeLibrary/src.server.lib.issconf/1.0 -liss_conf -
Symbol __mt_MasterFunction_: referenced symbol not found
I am trying to build a matlab s-function using Sun Studio 10 compilers. The program compiles but when I try to load it into matlab I get
??? Invalid MEX-file '/export/ford/sl0473/u/jmccall4/+Work/GMP_data/Release_tests_6/gmp_cf_4_state_gui_redo/gmp_4_state_base_gmp_mex.mexsol': ld.so.1: /apps/avcae-fsabs/1.0/common/mathworks/matlab/14sp3.p/vendor/bin/sol2/MATLAB: fatal: relocation error: file /opt/SUNWspro/prod/lib/cpu/sparcv9+vis2/libfai_isa.so.3: symbol __mt_MasterFunction_: referenced symbol not found.
This is a mixed Fortran and C program.
The fortran code is compiled with
f90 -c -I/apps/matlab/14sp3.p/vendor/extern/include -I/apps/matlab/14sp3.p/vendor/simulink/include -KPIC -C -e -u -O2 -v -r8const -mt -xopenmp base_main.f
The C code with
cc -c -I/apps/matlab/14sp3.p/vendor/extern/include -I/apps/matlab/14sp3.p/vendor/simulink/include -DMATLAB_MEX_FILE -KPIC -xO2 -xlibmieee -D__EXTENSIONS__ -D_POSIX_C_SOURCE=199506L -mt -xopenmp -D_XOPEN_SOURCE=600 -xlibmil -DNDEBUG base_mex.c
and the link is done with
f90 -xO2 -G -mt -xopenmp -M/apps/matlab/14sp3.p/vendor/extern/lib/sol2/fexport.map -o base_mex.mexsol base_main.o base_mex.o /apps/matlab/14sp3.p/vendor/extern/lib/sol2/version4.o my_base_main.a -L/apps/matlab/14sp3.p/vendor/bin/sol2 -lmx -lmex -lmat -lm -lc -L/apps/matlab/14sp3.p/vendor/bin/sol2 -lmx -lmex -lmat -lfui -lfai -lfai2 -lfsumai -lfprodai -lfminlai -lfmaxlai -lfminvai -lfmaxvai -lfsu -lsunmath -lm -lc -lmtsk
an elfdump of the mtsk library leads me to believe the __mt_MasterFunction_ is defined in that library.
How can I compile this so it will run in Matlab?
James.I am running Solaris 2.8.
The output from ldd is
!ldd gmp_4_state_base_gmp_mex.mexsollibmx.so => /apps/avcae-fsabs/1.0/common/mathworks/matlab/14sp3.p/vendor/bin/sol2/libmx.so
libmex.so => /apps/avcae-fsabs/1.0/common/mathworks/matlab/14sp3.p/vendor/bin/sol2/libmex.so
libmat.so => /apps/avcae-fsabs/1.0/common/mathworks/matlab/14sp3.p/vendor/bin/sol2/libmat.so
libm.so.1 => /usr/lib/libm.so.1
libc.so.1 => /usr/lib/libc.so.1
libfui.so.2 => /opt/SUNWspro/lib/libfui.so.2
libfai.so.3 => /opt/SUNWspro/lib/v8plus/libfai.so.3
libfai2.so.3 => /opt/SUNWspro/lib/v8plus/libfai2.so.3
libfsumai.so.1 => /opt/SUNWspro/lib/v8plus/libfsumai.so.1
libfprodai.so.1 => /opt/SUNWspro/lib/v8plus/libfprodai.so.1
libfminlai.so.1 => /opt/SUNWspro/lib/v8plus/libfminlai.so.1
libfmaxlai.so.1 => /opt/SUNWspro/lib/v8plus/libfmaxlai.so.1
libfminvai.so.1 => /opt/SUNWspro/lib/v8plus/libfminvai.so.1
libfmaxvai.so.1 => /opt/SUNWspro/lib/v8plus/libfmaxvai.so.1
libfsu.so.1 => /apps/avcae-fsabs/1.0/common/mathworks/matlab/14sp3.p/vendor/sys/os/sol2/libfsu.so.1
libsunmath.so.1 => /apps/avcae-fsabs/1.0/common/mathworks/matlab/14sp3.p/vendor/sys/os/sol2/libsunmath.so.1
libmtsk.so.1 => /usr/lib/libmtsk.so.1
libut.so => /apps/avcae-fsabs/1.0/common/mathworks/matlab/14sp3.p/vendor/bin/sol2/libut.so
libicudata.so.32 => /apps/avcae-fsabs/1.0/common/mathworks/matlab/14sp3.p/vendor/bin/sol2/libicudata.so.32
libicuuc.so.32 => /apps/avcae-fsabs/1.0/common/mathworks/matlab/14sp3.p/vendor/bin/sol2/libicuuc.so.32
libicui18n.so.32 => /apps/avcae-fsabs/1.0/common/mathworks/matlab/14sp3.p/vendor/bin/sol2/libicui18n.so.32
libicuio.so.32 => /apps/avcae-fsabs/1.0/common/mathworks/matlab/14sp3.p/vendor/bin/sol2/libicuio.so.32
libw.so.1 => /usr/lib/libw.so.1
librt.so.1 => /usr/lib/librt.so.1
libz.so => /apps/avcae-fsabs/1.0/common/mathworks/matlab/14sp3.p/vendor/bin/sol2/libz.so
libpthread.so.1 => /usr/lib/libpthread.so.1
libCstd.so.1 => /usr/lib/libCstd.so.1
libCrun.so.1 => /usr/lib/libCrun.so.1
libmwmvalue.so => /apps/avcae-fsabs/1.0/common/mathworks/matlab/14sp3.p/vendor/bin/sol2/libmwmvalue.so
libmwservices.so => /apps/avcae-fsabs/1.0/common/mathworks/matlab/14sp3.p/vendor/bin/sol2/libmwservices.so
libmwmpath.so => /apps/avcae-fsabs/1.0/common/mathworks/matlab/14sp3.p/vendor/bin/sol2/libmwmpath.so
libmwm_dispatcher.so => /apps/avcae-fsabs/1.0/common/mathworks/matlab/14sp3.p/vendor/bin/sol2/libmwm_dispatcher.so
libdl.so.1 => /usr/lib/libdl.so.1
libMTwister.so => /apps/avcae-fsabs/1.0/common/mathworks/matlab/14sp3.p/vendor/bin/sol2/libMTwister.so
libaio.so.1 => /usr/lib/libaio.so.1
libxnet.so.1 => /usr/lib/libxnet.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libcurses.so.1 => /usr/lib/libcurses.so.1
libmwdatasvcs.so => /apps/avcae-fsabs/1.0/common/mathworks/matlab/14sp3.p/vendor/bin/sol2/libmwdatasvcs.so
libxerces-c.so.26 => /apps/avcae-fsabs/1.0/common/mathworks/matlab/14sp3.p/vendor/bin/sol2/libxerces-c.so.26
libmp.so.2 => /usr/lib/libmp.so.2
libsocket.so.1 => /usr/lib/libsocket.so.1
/usr/platform/SUNW,Sun-Blade-2500/lib/libc_psr.so.1
/opt/SUNWspro/prod/lib/cpu/sparcv9+vis2/libfai_isa.so.3
/opt/SUNWspro/prod/lib/cpu/sparcv9+vis2/libfai2_isa.so.3
/opt/SUNWspro/prod/lib/cpu/sparcv9+vis2/libfsumai_isa.so.1
/opt/SUNWspro/prod/lib/cpu/sparcv9+vis2/libfprodai_isa.so.1
/opt/SUNWspro/prod/lib/cpu/sparcv9+vis2/libfminlai_isa.so.1
/opt/SUNWspro/prod/lib/cpu/sparcv9+vis2/libfmaxlai_isa.so.1
/opt/SUNWspro/prod/lib/cpu/sparcv9+vis2/libfminvai_isa.so.1
/opt/SUNWspro/prod/lib/cpu/sparcv9+vis2/libfmaxvai_isa.so.1
/apps/avcae-fsabs/1.0/common/mathworks/matlab/14sp3.p/vendor/sys/os/sol2/cpu/sparcv8plus+vis/libfsu_isa.so.1
libthread.so.1 => /usr/lib/lwp/libthread.so.1
/usr/lib/cpu/sparcv8plus/libCstd_isa.so.1
libmtsk is in the ldd list, but it appears earlier in the list than libfai2_isa.so.3, which has the unresolved symbol. Is the list order relevant? -
Symbol exsltDateXpathCtxtRegister: referenced symbol not found
hello all,
i have to deploy an application that uses the lxml HTML parser (http://lxml.de). This lib compiles fine into a S11 zone, but i'm unable to use it due to this error:
from lxml import etreeTraceback (most recent call last):
File "<console>", line 1, in <module>
ImportError: ld.so.1: python: fatal: relocation error: file /local/django-projects/virt_env/solqual/lib/python2.6/site-packages/lxml/etree.so: symbol exsltDateXpathCtxtRegister: referenced symbol not found
ldd tells me the libs involved:
(solqual)develwww@solqual:/local/django-projects/virt_env/solqual/latp$ ldd /local/django-projects/virt_env/solqual/lib/python2.6/site-packages/lxml/etree.so
libxslt.so.1 => /usr/lib/libxslt.so.1
libexslt.so.0 => /usr/lib/libexslt.so.0
libxml2.so.2 => /lib/libxml2.so.2
libz.so.1 => /lib/libz.so.1
libm.so.2 => /lib/libm.so.2
libpython2.6.so.1.0 => /usr/lib/libpython2.6.so.1.0
libc.so.1 => /usr/lib/libc.so.1
libpthread.so.1 => /lib/libpthread.so.1
libsocket.so.1 => /lib/libsocket.so.1
libnsl.so.1 => /lib/libnsl.so.1
libdl.so.1 => /lib/libdl.so.1
libmp.so.2 => /lib/libmp.so.2
libmd.so.1 => /lib/libmd.so.1
and a search in the libexslt.so.0:
$ nm /usr/lib/libexslt.so.0|grep exsltDateXpathCtxtRegister
0000f878 t exsltDateXpathCtxtRegister
So the symblol seems to exist.
Anybody can help?
thanks in advance,
gerardWe do not use the symbols siguhandle and _sigactio directly in our
code but the code is linked with the archive library
/usr/ucblib/libucb.a and this is the cause of the problem.
We inherited this product and I have no idea why the original developers
of our product linked with the archive library, but they were able to do
this becuase Solaris provided the archive library ( and it is in Solaris
6, 7, 8 and 9).
Does anyone have any idea why someone would use the archive version of
libucb library?.
Solaris provided this archive library and provided the symbols
siguhandler and _sigaction in /lib/libc.so.1 as global in all version
except in Solaris 10.
In Solaris 6, 7, 8 and 9:
/usr/ccs/bin/nm /lib/libc.so.1 | egrep '_siguhandler|__sigaction'
[4720] | 640416| 56|FUNC |GLOB |0 |9 |__sigaction
[3156] | 789684| 188|OBJT |GLOB |0 |20 |_siguhandle
but then in Solaris 10 they changed this and have no _siguhandle
and __sigaction is local insteaad of global.
/usr/ccs/bin/nm /lib/libc.so.1 | egrep '_siguhandler|__sigaction'
[596] | 772436| 24|FUNC |LOCL |2 |9 |__sigaction
Changing a library in this way is not a good thing to do. May be Sun
have good reasons to do this and may be the original developers of our
product had their reasons to use the archive but they could do this
because Solaris provided those libraries.
I am still trying to justify that I need to change and fix our product
in the field, I am still strugling to justify my changes, eveybody see
this as Solaris failing to maintain compatibility becuase they provide
the libraries and we do not use those symbols directly. It is difficult
for me to explain that the original developers made a mistake and we
have to fix it. I hope you see my point here.
Thanks
aldo -
Symbol __sigaction: referenced symbol not found
Hi All,
We have an old product that was build on Solaris 6 (2.6), now running on Solaris 10 we get the error:
ld.so.1: get_rnum: fatal : relocation error: file tds272b.so: symbol __sigaction: referenced symbol not found.
I understand why this is happening and how to fix it but some of my colegues think this is a problem with Solaris and the support of backward compatibility, they think Solaris should have never remove or change symbols from libc.so that were global and accessible to any applications.
My friends almost convinced me but I would like to hear Solaris point of view, or someone who know about this. May be sometime in the past this was documented that it was going to happen and we just never knew about this.
Does anyone know if these changes were ever documented by Sun and when was this documented ?
Thanks
aldoWe do not use the symbols siguhandle and _sigactio directly in our
code but the code is linked with the archive library
/usr/ucblib/libucb.a and this is the cause of the problem.
We inherited this product and I have no idea why the original developers
of our product linked with the archive library, but they were able to do
this becuase Solaris provided the archive library ( and it is in Solaris
6, 7, 8 and 9).
Does anyone have any idea why someone would use the archive version of
libucb library?.
Solaris provided this archive library and provided the symbols
siguhandler and _sigaction in /lib/libc.so.1 as global in all version
except in Solaris 10.
In Solaris 6, 7, 8 and 9:
/usr/ccs/bin/nm /lib/libc.so.1 | egrep '_siguhandler|__sigaction'
[4720] | 640416| 56|FUNC |GLOB |0 |9 |__sigaction
[3156] | 789684| 188|OBJT |GLOB |0 |20 |_siguhandle
but then in Solaris 10 they changed this and have no _siguhandle
and __sigaction is local insteaad of global.
/usr/ccs/bin/nm /lib/libc.so.1 | egrep '_siguhandler|__sigaction'
[596] | 772436| 24|FUNC |LOCL |2 |9 |__sigaction
Changing a library in this way is not a good thing to do. May be Sun
have good reasons to do this and may be the original developers of our
product had their reasons to use the archive but they could do this
because Solaris provided those libraries.
I am still trying to justify that I need to change and fix our product
in the field, I am still strugling to justify my changes, eveybody see
this as Solaris failing to maintain compatibility becuase they provide
the libraries and we do not use those symbols directly. It is difficult
for me to explain that the original developers made a mistake and we
have to fix it. I hope you see my point here.
Thanks
aldo -
Firefox-bin fatal relocation error libthebes.so symbol round referenced symbol not found
I compiled Firefox 3.6.23 on Solaris 9. When I try to start firefox it exits with the following error.
ld.so.1 firefox-bin: fatal: relocation error: file /usr/local/lib/firefox-3.6.23/components/../libthebes.so: symbol round: referenced symbol not found killedIt is not in the java documentation because it is not a java problem.
When you write JNI code (or any other code for that matter) you probably should look at the documentation for the compilers and other tools that you are using for recommendations for how to use these third party tools.
What would have been surprizing to me, is if your C++ compiler manual did not recommend linking with the standard C++ library when you use code contained in the library. Which was the problem here. -
Hello,
I am trying to run my application (using Java) on windows which in turn calls the Remote Manager on Solaris(Solaris 9 on SPARC Processor).
It gives the following linker error:
ApiInitLocal():ApiInitLocal: START
ApiInitLocal():* * * A P I I N I T * * *
ld.so.1: java: fatal: relocation error: file /opt/rm902/remotemanager/soFile/libACEUser.so: symbol Sd_ApiInit: referenced symbol not found
Killed
I tried setting "LD_LIBRARY_PATH" , but that also didnt work.
Any help would be highly appreciated.
Thanks in advanceHello all
I am new to JNI and while trying to run my
to run my first program I am receiving an error in
compilation of the 'C' file. For ur clarity my taken
steps are given as follows:
a. First I created 'HelloNative.java'
Then I compiled it and after running created the
the HelloNative.h
b. Then I wrote the HelloNative.c file and when I
compile it using MS VC++ then it gives the
following error:
--------------------Configuration: helloNative -
- Win32 Debug--------------------
Compiling...
helloNative.c
f:\bin\hellonative.c(3) : fatal error C1083: Cannot
open include file: 'jni.h': No such file or directory
Error executing cl.exe.
helloNative.obj - 1 error(s), 0 warning(s)
PLZ HELP ME ON THIS.
So for a quick patch, copy the jni.h file from the include
directory of your java installation files to the include
files that your c complirer has and uses. -
Hi all,
I'm trying to update my old code in CS5.5 for building new CS6( Server build), i get the link error "file not found: @executable_path/ObjectModelLib.dylib " not sure what I missing in my project settings/items? Any thoughts or help would greatly appreciated.
Thanks,
Kamran
P.S I use Mac OS X 10.6.8 and Xcode 3.2.6. for Model & UI build for the same project it builds fine.Never mind guys, I can compile it fine now :-)
-Kamran -
10.4.7 Upgrade - WebKit.Framework error - Symbol not found
i get the following error whenever i start applications such as Yahoo Messenger 3.0 Beta, Mail, Software Installer.
Link (dyld) error:
Symbol not found: __ZN3KJS9ObjectImpC2Ev
Referenced from: /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.frame work/Versions/A/WebCore
Expected in: /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/JavaScriptCor e.framework/Versions/A/JavaScriptCore
1. i suppose i didn't restart properly after the update - i just switched off!
2. After then it took me two days to figure out that to boot in Safe mode - the system was nto allowing me to boot saying 'You need to restart the machine. Holder power button for several seconds or press restart'.
3. Once i started with Safe mode then i am able to boot and login in normal mode.
4. but the above error is reported whenever i start those applications.
5. i tried installing the 0.4.7 update again - but Software Installer.app fails again reporting the above error.
6. is there any way to replace the WebKit.FrameWork folder alone - or what am supposed to do now?
thanks
pRasannaUpdate.
Re-installed Quicktime 7.1.3
Re-installed OSX 10.4.7 updater (stand alone).
No change in problems.
1. Wigets gone
2. SW update crashes
3. Safari will not launch.
Dave
Maybe you are looking for
-
May i know how can i include a search filter box in Muse?
Hi, i'm going to set up a website which contain a lot of list and I would like to include a search filter box where user get to filter their search result in the list that I inserted. Is there any good tutorials or pre-post that i can refer? Thank yo
-
Purchase Order created for a Purcashe Contract
Hi Experts, I am an ABAPer , I need to fetch Purchase orders ,Purchase Requistioons created for a particular Purchase Contract. Thanks a Lot in Advance
-
Back Button with Anchor Link in Webview?
I use UIWebView (in a view controller) to display html pages stored locally on the device. This web view is the "leaf" view from a series of table views using a navigation controller that provides the appropriately-labeled "back" buttons to the table
-
Web JetAdmin client for Win XP
Team hello Please, clarify where I can find the previous version HP Web JetAdmin? I need to install the JetAdmin client on the WIN XP, but in the current version, I can not do that, because it require Net framework 4.5 (this framework not support XP)
-
What is the use of CM relevance field in DMS ?
Hi DMS gurus, What is the use CM relevance field in DMS ? Is there any specific scenario ? Regards, Sunny