Relocation error from JNI

Hi,
I am writing a java program which uses JNI to call old c++ libraries, and got error message:
ld.so.1:jdk/bin/sparc/native_threads/java:fatal relocaiton error:file /home/myhome/lib/libtest.so: symbol __xxxxx: referenced symbol not found
libtest.so is the shared library called indirectly by the java program. __xxxxx is the symbol of the function which is called in libtest.so and is defined in another library libcalledtest.so.
Both libraries libtest.so and lbcalledtest.so are in the same directory which is in LD_LIBRARY_PATH.
I am using SunOS 5.5.1, java 1.2.2 and SC++ 4.2. Please send response to [email protected]
thanks

I'm also getting a similar linking problem when I try to invoke a jni call to libtest.so. It was compiled with the following options:
CC -w -KPIC -Bdynamic -mt -I$HOME/bryce -I$HOME/j2sdk1.4.2/include -I$HOME/j2sdk1.4.2/include/solaris test.cpp -L/opt/SUNWspro/lib -L$HOME/bryce -L$HOME/j2sdk1.4.2/lib -o libtst.so -lnsl -lthread -lsocket -lrwtool -ltst2
It however works fine if I remove any RogueWave (RWCString) code and the -lrwtool option. It also works fien if I do use the ReogueWave code but invoke the shared lib from a C++ executable.
If you can help, please reply to [email protected]
Cheers,
Bryce.

Similar Messages

  • Relocation error from JNI program

    Hi,
    I am writing a java program which uses JNI to call old c++ libraries, and got error message:
    ld.so.1:jdk/bin/sparc/native_threads/java:fatal relocation error:file /home/myhome/lib/libtest.so: symbol __xxxxx: referenced symbol not found
    libtest.so is the shared library called indirectly by the java program. __xxxxx is the symbol of the function which is called in libtest.so and is defined in another library libcalledtest.so.
    Both libraries libtest.so and lbcalledtest.so are in the same directory which is in LD_LIBRARY_PATH.
    I am using SunOS 5.5.1, java 1.2.2 and SC++ 4.2. Please send response to [email protected]
    thanks

    I'm also getting a similar linking problem when I try to invoke a jni call to libtest.so. It was compiled with the following options:
    CC -w -KPIC -Bdynamic -mt -I$HOME/bryce -I$HOME/j2sdk1.4.2/include -I$HOME/j2sdk1.4.2/include/solaris test.cpp -L/opt/SUNWspro/lib -L$HOME/bryce -L$HOME/j2sdk1.4.2/lib -o libtst.so -lnsl -lthread -lsocket -lrwtool -ltst2
    It however works fine if I remove any RogueWave (RWCString) code and the -lrwtool option. It also works fien if I do use the ReogueWave code but invoke the shared lib from a C++ executable.
    If you can help, please reply to [email protected]
    Cheers,
    Bryce.

  • Error from JNI.ADD_OBJECT_ARG when trying to access web service

    Hi,
    I'm hoping someone can help me with this. I am very new to Java and my lack of experience is probably killing me...
    Trying to be very explicit probably caused me to create a very lengthy post..my apologies...
    My issue:
    I've created a post_database_commit trigger to access my web service (written in C# .NET). I used JDeveloper 10.3.3.1 to create the wrapper code using my WSDL file. I am receiving an error message "Unable to call out to Java, invalid object type for argument 1" when the code line 'rv := UIDItemSvcSoap12Client.addUidItem(my_object, a0);' is executed in the trigger. I do not see the reason for the error.
    Here are code excerpts:
    (Post_database_commit trigger)
    rv varchar2(1000);
    ex ora_java.jobject;
    a0 ora_java.jobject;
    my_object ORA_JAVA.jOBJECT;
    BEGIN
    my_object := UIDItemSvcSoap12Client.new() ;
    ---create args list (Varchar2 in, jobject out)
    a0 := Exception_.new(:uid_table.uid_no);
    UIDItemSvcSoap12Client.main(a0);
    rv := UIDItemSvcSoap12Client.addUidItem(my_object, a0);
    (Package spec)
    -- Method: addUidItem (Luidwebsvcproject/proxy/UIDItem;)Ljava/lang/String;
    FUNCTION addUidItem(
    obj ORA_JAVA.JOBJECT,
    a0 ORA_JAVA.JOBJECT) RETURN VARCHAR2;
    (Entire Package body created by Jdeveloper)
    PACKAGE BODY UIDItemSvcSoap12Client IS
    -- DO NOT EDIT THIS FILE - it is machine generated!
    args JNI.ARGLIST;
    -- Constructor for signature ()V
    FUNCTION new RETURN ORA_JAVA.JOBJECT IS
    BEGIN
    args := NULL;
    RETURN (JNI.NEW_OBJECT('uidwebsvcproject/proxy/UIDItemSvcSoap12Client', '()V', args));
    END;
    -- Method: main ([Ljava/lang/String;)V
    PROCEDURE main(
    a0 ORA_JAVA.JARRAY) IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(1);
    JNI.ADD_OBJECT_ARG(args, a0, '[Ljava/lang/String;');
    JNI.CALL_VOID_METHOD(TRUE, NULL, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'main', '([Ljava/lang/String;)V', args);
      END;
      -- Method: getPort ()Luidwebsvcproject/proxy/UIDItemSvcSoap;
      FUNCTION getPort(
        obj   ORA_JAVA.JOBJECT) RETURN ORA_JAVA.JOBJECT IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_OBJECT_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'getPort', '()Luidwebsvcproject/proxy/UIDItemSvcSoap;', args);
      END;
      -- Method: getClientTransport ()Loracle/webservices/transport/ClientTransport;
      FUNCTION getClientTransport(
        obj   ORA_JAVA.JOBJECT) RETURN ORA_JAVA.JOBJECT IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_OBJECT_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'getClientTransport', '()Loracle/webservices/transport/ClientTransport;', args);
      END;
      -- Method: addUidItem (Luidwebsvcproject/proxy/UIDItem;)Ljava/lang/String;
      FUNCTION addUidItem(
        obj   ORA_JAVA.JOBJECT,
        a0    ORA_JAVA.JOBJECT) RETURN VARCHAR2 IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_OBJECT_ARG(args, a0, 'uidwebsvcproject/proxy/UIDItem');
        RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'addUidItem', '(Luidwebsvcproject/proxy/UIDItem;)Ljava/lang/String;', args);
      END;
      -- Method: getEndpoint ()Ljava/lang/String;
      FUNCTION getEndpoint(
        obj   ORA_JAVA.JOBJECT) RETURN VARCHAR2 IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'getEndpoint', '()Ljava/lang/String;', args);
      END;
      -- Method: getMaintainSession ()Z
      FUNCTION getMaintainSession(
        obj   ORA_JAVA.JOBJECT) RETURN BOOLEAN IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_BOOLEAN_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'getMaintainSession', '()Z', args);
      END;
      -- Method: setMaintainSession (Z)V
      PROCEDURE setMaintainSession(
        obj   ORA_JAVA.JOBJECT,
        a0    BOOLEAN) IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_BOOLEAN_ARG(args, a0);
        JNI.CALL_VOID_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'setMaintainSession', '(Z)V', args);
      END;
      -- Method: setUsername (Ljava/lang/String;)V
      PROCEDURE setUsername(
        obj   ORA_JAVA.JOBJECT,
        a0    VARCHAR2) IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_STRING_ARG(args, a0);
        JNI.CALL_VOID_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'setUsername', '(Ljava/lang/String;)V', args);
      END;
      -- Method: getUsername ()Ljava/lang/String;
      FUNCTION getUsername(
        obj   ORA_JAVA.JOBJECT) RETURN VARCHAR2 IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'getUsername', '()Ljava/lang/String;', args);
      END;
      -- Method: setPassword (Ljava/lang/String;)V
      PROCEDURE setPassword(
        obj   ORA_JAVA.JOBJECT,
        a0    VARCHAR2) IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_STRING_ARG(args, a0);
        JNI.CALL_VOID_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'setPassword', '(Ljava/lang/String;)V', args);
      END;
      -- Method: getPassword ()Ljava/lang/String;
      FUNCTION getPassword(
        obj   ORA_JAVA.JOBJECT) RETURN VARCHAR2 IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'getPassword', '()Ljava/lang/String;', args);
      END;
      -- Method: setEndpoint (Ljava/lang/String;)V
      PROCEDURE setEndpoint(
        obj   ORA_JAVA.JOBJECT,
        a0    VARCHAR2) IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_STRING_ARG(args, a0);
        JNI.CALL_VOID_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'setEndpoint', '(Ljava/lang/String;)V', args);
      END;
      -- Method: hashCode ()I
      FUNCTION hashCode(
        obj   ORA_JAVA.JOBJECT) RETURN NUMBER IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_INT_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'hashCode', '()I', args);
      END;
      -- Method: getClass ()Ljava/lang/Class;
      FUNCTION getClass(
        obj   ORA_JAVA.JOBJECT) RETURN ORA_JAVA.JOBJECT IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_OBJECT_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'getClass', '()Ljava/lang/Class;', args);
      END;
      -- Method: wait (JI)V
      PROCEDURE wait(
        obj   ORA_JAVA.JOBJECT,
        a0    NUMBER,
        a1    NUMBER) IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(2);
        JNI.ADD_LONG_ARG(args, a0);
        JNI.ADD_INT_ARG(args, a1);
        JNI.CALL_VOID_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'wait', '(JI)V', args);
      END;
      -- Method: wait ()V
      PROCEDURE wait(
        obj   ORA_JAVA.JOBJECT) IS
      BEGIN
        args := NULL;
        JNI.CALL_VOID_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'wait', '()V', args);
      END;
      -- Method: wait (J)V
      PROCEDURE wait(
        obj   ORA_JAVA.JOBJECT,
        a0    NUMBER) IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_LONG_ARG(args, a0);
        JNI.CALL_VOID_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'wait', '(J)V', args);
      END;
      -- Method: equals (Ljava/lang/Object;)Z
      FUNCTION equals(
        obj   ORA_JAVA.JOBJECT,
        a0    ORA_JAVA.JOBJECT) RETURN BOOLEAN IS
      BEGIN
        args := JNI.CREATE_ARG_LIST(1);
        JNI.ADD_OBJECT_ARG(args, a0, 'java/lang/Object');
        RETURN JNI.CALL_BOOLEAN_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'equals', '(Ljava/lang/Object;)Z', args);
      END;
      -- Method: notify ()V
      PROCEDURE notify(
        obj   ORA_JAVA.JOBJECT) IS
      BEGIN
        args := NULL;
        JNI.CALL_VOID_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'notify', '()V', args);
      END;
      -- Method: notifyAll ()V
      PROCEDURE notifyAll(
        obj   ORA_JAVA.JOBJECT) IS
      BEGIN
        args := NULL;
        JNI.CALL_VOID_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'notifyAll', '()V', args);
      END;
      -- Method: toString ()Ljava/lang/String;
      FUNCTION toString(
        obj   ORA_JAVA.JOBJECT) RETURN VARCHAR2 IS
      BEGIN
        args := NULL;
        RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'uidwebsvcproject/proxy/UIDItemSvcSoap12Client', 'toString', '()Ljava/lang/String;', args);
      END;
    BEGIN
      NULL;
    END;
    (Code from JDeveloper)
        public String addUidItem(UIDItem UIDItem) throws java.rmi.RemoteException {
            return _port.addUidItem(UIDItem);
        }

    That's a network or server issue, not a problem with your Mac.

  • Accessing third party code from JNI. URGENT !!!!

    Hi,
    I have to use a .so library (Solaris) from another company. As this library has not the correct syntax to be accessed from JNI, I made another .so that calls it.
    For compile this library I just need the header file and I can compile it succesfully, but when I run it, throws an error:
    relocation error: file /usuarios/davidj/java/jnitest/libtmlog.so: symbol lgprnERRPar: referenced symbol not found
    where lgprnERRPar is a function in the 3 party library.
    Can anybdy helps me, please???
    This is very urgent for me.
    Thanks in advance

    Hi,
    I've found
    http://forums.java.sun.com/thread.jsp?forum=52&thread=94378
    http://forums.java.sun.com/thread.jsp?forum=52&thread=95551
    http://forums.java.sun.com/thread.jsp?forum=52&thread=95531
    http://forums.java.sun.com/thread.jsp?forum=52&thread=95577
    http://forums.java.sun.com/thread.jsp?forum=52&thread=95549
    http://forums.java.sun.com/thread.jsp?forum=52&thread=95567
    http://forums.java.sun.com/thread.jsp?forum=52&thread=91606
    http://forums.java.sun.com/thread.jsp?forum=52&thread=93411
    http://forums.java.sun.com/thread.jsp?forum=52&thread=95728
    Hope it helps,
    Klaus

  • Ld.so.1: java: fatal: relocation error: file :referenced symbol not found

    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 advance

    Hello 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.

  • Relocation Error In Solaris - Symbol 0FI__rtbi_fv not found

    Hi!,
    I get the following error, when i try to load a library using JNI, (jdk 1.3.0_02) in Solaris 2.6 :
    It cribs about symbol __0FI__rtbi_fv not found.
    I used nm on the .so and got the following output -
    [123762] | 0| 0|NOTY |GLOB |0 |UNDEF |__0FI__rtbi_fv
    Kindly help me in overcoming this problem. Its bit urgent.
    Exception in thread "main" java.lang.UnsatisfiedLinkError: /disk1/anuj/Sinu/usrtool/obj/libusrtool.so:
    ld.so.1: /disk1/sriram/java1.3/bin/../bin/sparc/native_threads/java:
    fatal: relocation error: file /disk1/anuj/Sinu/usrtool/obj/libusrtool.so:
    symbol __0FI__rtbi_fv: referenced symbol not found
         at java.lang.ClassLoader$NativeLibrary.load(Native Method)
         at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1382)
         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1306)
         at java.lang.Runtime.loadLibrary0(Runtime.java:749)
         at java.lang.Runtime.loadLibrary(Runtime.java:737)
    regards
    Sriram

    It 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.

  • 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 Tanwani

    Refer 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

  • Instant client 10.2.0.2 - Solaris 32 bit - sqlplus relocation error

    Did anyone use the sqlplus that comes with Instant Client 10.2.0.2 - Solaris 32 bit to connect to a remote Oracle database?
    I am unable to get it working.
    More info below:
    I unpacked these two packages onto my Solaris 9 box into a directory called /space/OracleClient10g/instantclient_10_2
    a) instantclient-basic-solaris32-10.2.0.2-20060303.zip
    b) instantclient-sqlplus-solaris32-10.2.0.2-20060303.zip
    I have set the following environment variables (csh):
    setenv ORACLIENT /space/OracleClient10g/instantclient_10_2
    setenv LD_LIBRARY_PATH "$ORACLIENT":"$LD_LIBRARY_PATH"
    set path = ($ORACLIENT $path)
    setenv SQLPATH $ORACLIENT
    setenv TNS_ADMIN $ORACLIENT
    setenv NLS_LANG AMERICAN_AMERICA.UTF8
    The tnsnames.ora file is in the $TNS_ADMIN directory and it has the tns entry that I need.
    When I run sqlplus using the tnsentry, I get a "relocation error" as below:
    $ sqlplus user1/pwd1@tnsentry
    ld.so.1: sqlplus: fatal: relocation error:
    file /space/OracleClient10g/instantclient_10_2/libsqlplus.so: symbol
    lnxqebc_chars: referenced symbol not found
    (The same tns entry is used from a different Solaris 9 machine where I have a full Oracle 9i client installed and sqlplus connects fine using this tns entry - so I do not think there is anything wrong with this tns entry. Besides, the error message that I am getting when I run sqlplus can be reproduced even by simply running 'sqlplus' without any arguments. )
    When I do an 'ldd' on sqlplus, every library needed by sqlplus is loaded correctly.
    $ ldd /space/OracleClient10g/instantclient_10_2/sqlplus
    libsqlplus.so => /space/OracleClient10g/instantclient_10_2/libsqlplus.so
    libclntsh.so.10.1 => /space/OracleClient10g/instantclient_10_2/libclntsh.so.10.1
    libnnz10.so => /space/OracleClient10g/instantclient_10_2/libnnz10.so
    libkstat.so.1 => /usr/lib/libkstat.so.1
    libnsl.so.1 => /usr/lib/libnsl.so.1
    libsocket.so.1 => /usr/lib/libsocket.so.1
    libgen.so.1 => /usr/lib/libgen.so.1
    libdl.so.1 => /usr/lib/libdl.so.1
    libsched.so.1 => /usr/lib/libsched.so.1
    libc.so.1 => /usr/lib/libc.so.1
    libaio.so.1 => /usr/lib/libaio.so.1
    libm.so.1 => /usr/lib/libm.so.1
    libthread.so.1 => /usr/lib/libthread.so.1
    libmp.so.2 => /usr/lib/libmp.so.2
    librt.so.1 => /usr/lib/librt.so.1
    libmd5.so.1 => /usr/lib/libmd5.so.1
    /usr/platform/SUNW,Ultra-Enterprise/lib/libc_psr.so.1
    /usr/platform/SUNW,Ultra-Enterprise/lib/libmd5_psr.so.1
    Any ideas on the cause of this error?

    I'd say that there is a problem loading the shared library libsqlplus.so.
    Try 'ldd /space/OracleClient10g/instantclient_10_2/libsqlplus.so' and see which libraries are referenced.
    It seems like they are all found, but at least one of them is missing an entry that should be there.
    - Trace sqlplus with 'strace' or 'truss' (I don't know which of the two exists on Solaris) to
    find out which library has the problem.
    - Check the versions and compare them with the versions required by the installation guide for the Oracle client.
    Yours,
    Laurenz Albe

  • HELP! Relocation error: file /usr/lib/librt.so: symbol priocntl not found

    Hi,
    I've just installed a Solaris 9 and gcc-3.4.2 (from sunfreeware.com) on a Sun Blade 1500.
    #uname -a
    SunOS dove 5.9 Generic_117171-07 sun4u sparc SUNW,Sun-Blade-1500
    Upon running my application, a runtime error occured.
    ld.so.1: CMC: fatal: relocation error: file /usr/lib/librt.so: symbol priocntl: referenced symbol not found
    I've traced my code to were it had encountered a problem. It seems that the error occured whenever a pthread_create() function is executed.
    Originally my application was developed under a Solaris 8 environment. No runtime errors occured during that time.
    I think there's a problem with the Solaris 9 /usr/lib/librt.so.1 file.
    Could you please help me.
    I deeply appreciate it.

    hi, take a look at:
    http://bbs.archlinux.org/viewtopic.php?id=47981

  • Solaris 10 Gives Error (ld: fatal: relocation error: R_386_32) w/ gcc-4.2.3

    I am attempting to run a build of a system known as nauticus under Solaris 10 but I am getting the following error:
    ld: fatal: relocation error: R_386_32: file .rel.debug_info: section: /home/dmclaug/trees/gcctree/trunk/build-solaris-4.2.3/src-nauticus/bin/solaris/libsmftypes.o: offset: 0x23e3d6: relocation requires reference symbol
    collect2: ld returned 1 exit status
    This system has been successfully built using gcc-3.2.3 under Solaris 10, but the error above is generated now that we have installed gcc-4.2.3. Does anyone have any idea what might be causing the problem here? Are there additional flags or switches that are required?
    Some additional background on my system:
    Sun Microsystems Inc. SunOS 5.10 Generic January 2005
    Sun Streaming Server Development Package for Solaris Update 4.
    PackageVersion=2.0
    cat /etc/release
    Solaris 10 8/07 s10x_u4wos_12b X86
    Copyright 2007 Sun Microsystems, Inc. All Rights Reserved.
    Use is subject to license terms.
    Assembled 16 August 2007
    isainfo -x
    amd64: sse3 sse2 sse fxsr amd_3dnowx amd_3dnow amd_mmx mmx cmov amd_sysc cx8 tsc fpu
    i386: sse3 sse2 sse fxsr amd_3dnowx amd_3dnow amd_mmx mmx cmov amd_sysc cx8 tsc fpu
    isalist
    amd64 pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86

    The bootstrap compiler is GCC 3.4.3.
    I tried Sun's assembler (/usr/ccs/bin/as) too and got another error (below)
    I also tried bootstrapping with Sun's Studio 12 compiler but that too failed.
    *$ pkginfo -x SUNWbinutils SMCbinut*
    SMCbinut binutils
    (x86) 2.17
    SUNWbinutils binutils - GNU binutils
    (i386) 11.10.0,REV=2005.01.08.01.09
    *$ whence gcc*
    /usr/sfw/bin/gcc
    *$ gcc -v*
    Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/specs
    Configured with: /builds/sfw10-gate/usr/src/cmd/gcc/gcc-3.4.3/configure prefix=/usr/sfw with-as=/usr/sfw/bin/gas with-gnu-as with-ld=/usr/ccs/bin/ld without-gnu-ld enable-languages=c,c++ --enable-shared
    Thread model: posix
    gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
    The error this time is:
    /big1/usr.local.src/gcc-4.3.1/s10i/./gcc/xgcc -B/big1/usr.local.src/gcc-4.3.1/s10i/./gcc/ -B/usr/local/i386-pc-solaris2.10/bin/ -B/usr/local/i386-pc-solaris2.10/lib/ -isystem /usr/local/i386-pc-solaris2.10/include -isystem /usr/local/i386-pc-solaris2.10/sys-include -g -fkeep-inline-functions -m64 -O2 -O2 -g -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../.././gcc -I../../../../gcc-4.3.1/libgcc -I../../../../gcc-4.3.1/libgcc/. -I../../../../gcc-4.3.1/libgcc/../gcc -I../../../../gcc-4.3.1/libgcc/../include -DHAVE_CC_TLS -o gcov.o -MT gcov.o -MD -MP -MF gcov.dep -DLgcov -c ../../../../gcc-4.3.1/libgcc/../gcc/libgcov.c
    Assembler: libgcov.c
    "/var/tmp//ccYcw90K.s", line 1936 : Syntax error
    Near line: " repz cmpsb"

  • Error when compiling the native c method: error in jni.h

    Hello friends,
    I am using windows 2000, JDK1.4 and Borland Turbo C++ Comipler.
    I am learing JNI. And therefore I followd instruction on creating a simp,e JNI call from "Sun Java Tutorial"
    But I am getting problem during compiling of the C program.
    there are about 26 errors in jni.h and jni_md.h
    Here are the errors:
        Error JNI_MD.H 16: , expected
        Error JNI_MD.H 108: Declaration missing ;
        Error ../JNI.H 193: ) expected
        Error ../JNI.H 195: ) expected
        Error ../JNI.H 198: ) expected
        Error ../JNI.H 201: ) expected............ and so on.
    Can anyone help me.

    The basic problem is that Borland C and VC++ define some things differently, and the header files are geared to VC++.
    The way I got around this is to make some adjustments to my C code to impose the Borland definitions in place of the VC++ definitions. I do this creating a .h file that
    o Includes my definitions.
    o Includes jni.h
    I then #include my .h file instead of directly including jni.h. That way, I don't need to change jni.h or jni.md.h
    Here is roughly what it looks like. (Can't give you the exact code - the files are proprietary and include a lot not-relevant stuff.)
    If you run into troubles with some files compiling, and some not, then I suggest you move some of the macro redefinitions to a .cpp file, and just # include that into your own .cpp file.
    (file shell.h)
    #ifndef ShellH
    #define ShellH
    // This file is used to make Borland-specific settings.
    // Normal kinds of stuff.
    #define WIN32
    #define HAS_BOOL
    // Suppress dll code.
    #ifdef jdecl
    #undef jdecl
    #endif
    #define jdecl
    // Borland has seen fit to specially-define toString();
    #ifdef toString
    #undef toString
    #endif
    #define toString jToString
    // Define functions and constants per Borland (vs Microsoft).
    #define _chdir chdir
    #define _cwd cwd
    //#define _getcwd getcwd
    #define _getpid getpid
    //#define _stat stat
    #define SHDENYWR SH_DENYWR
    #include "jni.h"
    #endif

  • Pragma pack(1) - relocation Error

    Hi,
    I am trying to use the #pragma pack(1) with Forte C++.
    I do use the -misalign option both at compilation and link.
    However, when I use a in this context, a class with virtual functions I get compilation errors at code generation ("location counter not on word boundary"). I get rid of these by compiling in debug mode, but then when linking I got the following error :
    "ld: fatal: relocation error: R_SPARC_DISP32: file foo.o: symbol <unknown>: offset
    0xfd8ea37b is non-aligned" as many times as I have virtual functions in my class.
    Has anyone used virtual functions in classes compiled with pragma pack(1)? and faced the same problem ?
    Am I missing an option ?
    Is there a workaround ?
    Thanks in advance.

    We've had the same problem with #pragma pack(1).
    When a class or a struct is not 'plain old data' (POD), it packs with 'normal' alignment instead of pack(1) apparently.
    You can make the class 'POD' by:
    - removing constructors
    - removing private data
    Other functions (as operator overloaders) are allowed, as we found out by trail/error.
    Anyway, you will find out if you remove the constructor from your class (and make e.g. an operator overloader for the assignment operator) that the packing will work as expected.

  • Ld.so.1: tar: fatal: relocation error: file /usr/sbin/tar: symbol fstatat64

    Hi Gurus.
    Please help in this one.
    When I try to use tar the following output is displayed:
    tar cvf 123.tar 123.txt
    ld.so.1: tar: fatal: relocation error: file /usr/sbin/tar: symbol fstatat64
    tar xvf 123.tar
    ld.so.1: tar: fatal: relocation error: file /usr/sbin/tar: symbol fchownat: referenced symbol not found
    Killed
    Check output ldd:
    ldd -r /usr/bin/tar
    libcmd.so.1 => /usr/lib/libcmd.so.1
    libsec.so.1 => /usr/lib/libsec.so.1
    libc.so.1 => /usr/lib/libc.so.1
    libdl.so.1 => /usr/lib/libdl.so.1
    /usr/platform/SUNW,Sun-Fire-xxx/lib/libc_psr.so.1
    symbol not found: attropen64 (/usr/sbin/tar)
    symbol not found: fstatat64 (/usr/sbin/tar)
    symbol not found: openat64 (/usr/sbin/tar)
    symbol not found: fchownat (/usr/sbin/tar)
    symbol not found: unlinkat (/usr/sbin/tar)
    symbol not found: futimesat (/usr/sbin/tar)
    symbol not found: fdopendir (/usr/sbin/tar)
    Output of: LD_LIBRARY_PATH
    echo $LD_LIBRARY_PATH
    /usr/lib:/usr/dt/lib:/opt/app/lib
    already try unset LD_LIBRARY_PATH
    Any ideas.
    I can tell You that tar was working fine 2 months ago.
    I suspect data corruption
    Many thanks
    Allrounder

    Hi,
    Is Vi functional on your system? If you havent already tried this you may want to try removing /usr/ucb/lib from LD_LIBRARY_PATH environment variable, or put /usr/lib in LD_LIBRARY_PATH before /usr/ucblib. This might clear up some of the problems you are having.
    Regards,
    Andrew
    Sun Developer Technical Support
    I got this message when i tried to install remedy on
    Solaris 7. T
    ld.so.1: vi: fatal: relocation error: file vi: symbol
    cur_term: referenced
    symbol not found
    Killed
    Then i took advices from others and set the
    LD_LIBRARY_PATH to
    "/usr/openwin/lib:/usr/dt/lib:/usr/ucblib", seemed it
    worked for others, but i still get the same error
    messages.
    Any1 has any idea how to fix it?
    thanks

  • Ld.so.1: lsnrctl: fatal: relocation error: lsnrctl: symbol nngrsmd symbol

    ld.so.1: lsnrctl: fatal: relocation error: file /u05/oradev/devdb/8.1.7/bin/lsnrctl: symbol nngrsmd: referenced symbol not found
    Hi,
    i tried to start the listener
    database version: 8.1.7.4 @ sun solaris sparc
    this instance is working, down the system yesterday.
    as we tried to bring up, it shows the following error
    Looking the valuable to make up this instance
    ld.so.1: lsnrctl: fatal: relocation error: file /u05/oradev/devdb/8.1.7/bin/lsnrctl: symbol nngrsmd: referenced symbol not found
    Killed
    advanced thanks for your time and vaulable reply
    awaiting for your reply
    Thanks
    regards
    selvan
    [email protected]

    It's not related to SQL or PL/SQL at all (apart from they are all part of Oracle databases).
    You should try the Database General forum: General Database Discussions

  • "java -version" fails in Solaris 5.9 with relocation error

    Hi all,
    Appologies for the Java 'newbie-ness' of this query from the outset... But here goes. My current configuration is ...
    SunOS 5.9 Generic_112233-11 sun4u sparc SUNW,UltraAX-i2
    and I'm trying to run with Java 2 SDK, Standard Edition Version 1.4.1
    As far as I know, local support has fed me with the required patches to get me up and running so as I can use 'jar' to upgrade a jarfile. But if I try to do this (or even just try "java -version"), I just get...
    Error: failed /usr/j2se/jre/lib/sparc/client/libjvm.so, because ld.so.1: java: fatal: relocation error: file /usr/j2se/jre/lib/sparc/client/libjvm.so: symbol __1cG__CrunSregister_exit_code6FpG_v_v_: referenced symbol not found
    I can only find this bug (?) referencing Solaris 5.7 at most recent. Am I missing something obvious?
    I've got...
    setenv JAVA_HOME /usr/j2se
    setenv LD_LIBRARY_PATH $JAVA_HOME/jre/lib/sparc/server:$JAVA_HOME/jre/lib/sparc
    Are the solaris 7 patches not necessarilly in the patch bundle I've had stuffed on here...?

    It looks like that the likely cause of this error is some failed library dependancy. You can manually check if all libraries libjvm.so depends on are actually present on the system by running the following commands:
    $ cd /usr/j2se/jre/lib/sparc/client/
    $ ldd libjvm.so
    The output of the ldd command should look something like the following with possible slight deviations:
    libCrun.so.1 => /usr/lib/libCrun.so.1
    libdl.so.1 => /usr/lib/libdl.so.1
    libthread.so.1 => /usr/lib/libthread.so.1
    libsocket.so.1 => /usr/lib/libsocket.so.1
    libnsl.so.1 => /usr/lib/libnsl.so.1
    libm.so.1 => /usr/lib/libm.so.1
    libw.so.1 => /usr/lib/libw.so.1
    libc.so.1 => /usr/lib/libc.so.1
    librt.so.1 => /usr/lib/librt.so.1
    libmp.so.2 => /usr/lib/libmp.so.2
    libaio.so.1 => /usr/lib/libaio.so.1
    libmd5.so.1 => /usr/lib/libmd5.so.1
    /usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1
    /usr/platform/SUNW,Ultra-60/lib/libmd5_psr.so.1
    Check if all library path's are actually present on the system, otherwise you will need to satisfy the missing dependencies.

Maybe you are looking for

  • How do I move apps from an old mac to a new one

    I am purchasing a new Macbook Pro after having my old one for six years. I have numerous apps that I have purchased and downloaded over the years. I don't want to loose them and really don't want to have to purchase them again. Can I and how can I mo

  • Web Service client authorization error: HTTP status 401

    .NETters, My .NET client program is invoking a simple "Hello World" Web Service written in ABAP. Here is the code:   Z_HWWSDServiceWse svc = new Z_HWWSDServiceWse();   try {     string msg = svc.ZHelloworld();     Console.WriteLine(msg);   }catch(Exc

  • What is a heap zone

    I have an iMovie ready to 'finalize' or share, but I keep getting an error message regarding not enough space in the heap zone. Is there a setting for this? What do I need to do? My project resides on a 2 T drive.

  • Labview is using stale command line arguments

    I've created a vi to test passing command line arguments to Labview. I've attached it below. All it does is display the 1st and 2nd arguments. Also in VI Properties in the Execution category, it's set to 'Run when opened'. In the command prompt I'm e

  • Statistics in WL6

    Since BEA dropped the Java console app that we had in 5.1, the statistics available for JDBC are rather paltry in comparison. One of the biggest things that is missing is the ability to know how many connections have been granted/released in each poo