• Topic
  • Discussion
  • UdaWikiWeb.UnresolvedSymbolX(Last) -- Owiki? , 2016-08-19 15:01:31 Edit owiki 2016-08-19 15:01:31

    Unresolved symbol <symbol> or Undefined reference to <symbol>



    General Guidance

    To resolve these errors, start by finding where the missing symbols are defined:

    1. Access the machine, which contains your OpenLink server components installation.
    2. cd into your database's /lib sub-directory.
    3. Run the following command:

      nm -A *.so | grep <symbol>


      For example, if the error you got was "Unresolved symbol xsendto" or "Undefined reference to xsendto", the command would be

      nm -A *.so | grep xsendto


    4. If the symbol does not exist, stop and contact OpenLink Product Support. Otherwise,....
    5. Record the names of the files which contain your symbols. The filename will be the first item in the nm output.

    If the error messages came up during a Multi-Tier Generic Client installation

    Add the directory/ies that contains the library/ies found above to the shared library environment variable for your OS (i.e., LD_LIBRARY_PATH, LIBPATH, or SHLIB_PATH). For example:

    set LIBPATH=/app/product/oracle/8.0.4/lib:$LIBPATH

    If the error messages came up while relinking a Multi-Tier Database Agent or Single-Tier Lite Driver for Progress, on Linux

    For errors regarding __ctype_b, __ctype_tolower, and __ctype_toupper, follow the guidance in this section. For other errors, proceed to the next section below.

    Instructions in this section were based on Progress Knowledgebase Article ID#P101259.

    32-bit OpenEdge 10.1B and earlier, including Progress 9.1x and earlier, are built on RedHat 2.1, with an older version of glibc (2.3.2-5 or earlier). These older versions of glibc contain definitions of __ctype_b, __ctype_tolower, and __ctype_toupper.

    These definitions are not contained in more recent versions of glibc -- but they remain necessary for Database Agent or Lite Driver relinking. You can either relink on a Linux machine which has such an older version of glibc (again, 2.3.2-5 or earlier), or follow the instructions below.

    1. Create a file named "libctype.c" with these contents --


      #include <stdlib.h> #include <ctype.h> __const unsigned short int * __ctype_b; __const __int32_t * __ctype_tolower; __const __int32_t * __ctype_toupper; void __attribute__((constructor)) my_init() { __ctype_b = * __ctype_b_loc(); __ctype_tolower = * __ctype_tolower_loc(); __ctype_toupper = * __ctype_toupper_loc(); } void __attribute__((destructor)) my_clean() { }

    2. Compile that with the command --


      gcc -O2 -shared -o libctype.so libctype.c

    3. Amend your ldpro script, or build_rx.sh for OpenEdge 10, to include a reference to the newly created libctype.so library.
    4. Execute the ldpro script, or build_rx.sh for OpenEdge 10; the build should now succeed.
    5. Be sure to deploy the new libctype.so along with the executable you just built, as the executable now depends on this library.

    If the error messages came up while relinking any other Multi-Tier Database Agent or Single-Tier Lite Driver

    1. cd into the /lib sub-directory of your OpenLink installation.
    2. Open the script which produced the error in your favorite text editor (vi, emacs, etc.).
    3. Determine where to add the new library. Most often, it is added to the cc -s -o line. Oracle users must add it to the make -f line. Progress users who encounter errors with mkdlc must add it to $PRO_EXTRA. For example:

      $PRO_EXTRA \ $PROLOAD/4gl/<missing file>.o \


    4. Save your changes and exit your relink script.
    5. Relink your database agent.

    Evidence

    • Database Agent Version String
    • DBMS Version
    • Relink Script(s)
    • Output of uname -a

    Referenced by...