Results 1 to 3 of 3

Thread: undefined reference from /lib/librt.so.1 on Linux

  1. #1
    JohnB is offline Registered User
    Name: John Basrai
    Organization: Northrop Grumman
    Project: Airborne Payload Command Control Interface
    Join Date
    Feb 2005
    Posts
    49

    Question undefined reference from /lib/librt.so.1 on Linux

    I'm trying to get a simple project to link on Linux and I'm getting the following errors.

    Code:
    slice2cpp --checksum arrow.ice
    g++ -c -I/usr/include/nptl -I. -fexceptions icemain.cpp ArrowSvc.cpp arrow.cpp
    g++ -o ArrowSvc *.o -L/usr/lib/nptl -lpthread -L/usr/lib -lIce -lIceUtil
    
    /lib/librt.so.1: undefined reference to `__librt_enable_asynccancel@GLIBC_PRIVATE'
    /lib/librt.so.1: undefined reference to `__librt_multiple_threads@GLIBC_PRIVATE'
    /lib/librt.so.1: undefined reference to `__librt_disable_asynccancel@GLIBC_PRIVATE'
    I checked if nptl is installed on this machine and this is what rpm says:
    rpm -query nptl-devel
    nptl-devel-2.3.4-2.39

    I think this is RHEL 4 but I do not know how to check.

    What am I doing wrong?

  2. #2
    mes's Avatar
    mes
    mes is offline ZeroC Staff
    Name: Mark Spruiell
    Organization: ZeroC, Inc.
    Project: Ice Developer
    Join Date
    Feb 2003
    Location
    California
    Posts
    1,445
    Hi John,

    Are you using the RPMs that we provide, or did you build Ice from source?

    If you're not sure which version of Linux you are using, check in /etc for a file whose name ends in release. This text file describes the distribution.

    For Linux distributions that we don't officially support, we strongly recommend compiling Ice from source. You can download the source code and patches for Ice's third-party dependencies on our web site.

    Regards,
    Mark

  3. #3
    bernard's Avatar
    bernard is offline ZeroC Staff
    Name: Bernard Normier
    Organization: ZeroC, Inc.
    Project: Ice
    Join Date
    Feb 2003
    Location
    Palm Beach Gardens, FL
    Posts
    1,294
    You may just need to add -lrt:

    Code:
    g++ -o ArrowSvc *.o -L/usr/lib/nptl -lpthread -lrt -L/usr/lib -lIce -lIceUtil
    If you're using RHEL 4 or a RHEL 4 clone (CentOS 4, Scientific Linux 4), the simplest is to install our RPMs for RHEL 4 ... the 3.3.1 RPMs since we no longer support RHEL 4 with Ice 3.4: ZeroC - Download - Ice 3.3.1

    Best regards,
    Bernard
    Bernard Normier
    ZeroC, Inc.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. PURE_CLIENT and iceecd.lib
    By jkidd in forum Comments
    Replies: 8
    Last Post: 12-17-2009, 02:43 PM
  2. Replies: 1
    Last Post: 11-11-2009, 01:27 PM
  3. Replies: 1
    Last Post: 02-05-2009, 06:49 AM
  4. vc static lib
    By hellocyf in forum Help Center
    Replies: 2
    Last Post: 08-04-2004, 10:53 PM
  5. Replies: 2
    Last Post: 05-30-2003, 03:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •