Problem with gcc on HPUX11.11 - HP UX

This is a discussion on Problem with gcc on HPUX11.11 - HP UX ; Hi I'm new to this group, and if I'm at the wrong group or of topic I apologize. I have installed gcc4.1.1 that I've downloaded from the following link "http://hpux.connect.org.uk/hppd/answers/4-5.html" with all the programs mentioned on the page. When I ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Problem with gcc on HPUX11.11

  1. Problem with gcc on HPUX11.11

    Hi I'm new to this group, and if I'm at the wrong group or of topic I
    apologize.
    I have installed gcc4.1.1 that I've downloaded from the following link
    "http://hpux.connect.org.uk/hppd/answers/4-5.html" with all the programs
    mentioned on the page.
    When I try to compile a simple program I get the following error

    /usr/lib/dld.sl: Unresolved symbol: pthread_mutex_lock (code)
    from /usr/local/libexec/gcc/hppa2.0w-hp-hpux11.11/4.1.1/cc1
    gcc: Internal error: Aborted (program cc1)

    Any help will be appreciated
    Thank in advance
    --
    Chris du Preez

  2. Re: Problem with gcc on HPUX11.11

    Chris wrote:
    : When I try to compile a simple program I get the following error
    : /usr/lib/dld.sl: Unresolved symbol: pthread_mutex_lock (code)
    : from /usr/local/libexec/gcc/hppa2.0w-hp-hpux11.11/4.1.1/cc1

    Can you do: chatr /usr/local/libexec/gcc/hppa2.0w-hp-hpux11.11/4.1.1/cc1
    what /usr/lib/libc.sl

    What version of HP-UX are you using, 11.11 should have the stubs.
    There should be stubs in libc for pthread_mutex_lock.
    The real version is in libpthread.

  3. Re: Problem with gcc on HPUX11.11

    Dennis Handly wrote:

    > Chris wrote:
    > : When I try to compile a simple program I get the following error
    > : /usr/lib/dld.sl: Unresolved symbol: pthread_mutex_lock (code)
    > : from /usr/local/libexec/gcc/hppa2.0w-hp-hpux11.11/4.1.1/cc1
    >
    > Can you do: chatr /usr/local/libexec/gcc/hppa2.0w-hp-hpux11.11/4.1.1/cc1
    > what /usr/lib/libc.sl
    >
    > What version of HP-UX are you using, 11.11 should have the stubs.
    > There should be stubs in libc for pthread_mutex_lock.
    > The real version is in libpthread.


    Hi Dennis thank you for the reply. I am using HPUX 11.i v1
    Here is the output of chatr

    chatr /usr/local/libexec/gcc/hppa2.0w-hp-hpux11.11/4.1.1/cc1
    /usr/local/libexec/gcc/hppa2.0w-hp-hpux11.11/4.1.1/cc1:
    shared executable
    shared library dynamic path search:
    SHLIB_PATH enabled first
    embedded path enabled second /usr/local/lib
    shared library list:
    static /usr/local/lib/libintl.sl
    static /usr/local/lib/libiconv.sl
    dynamic /usr/lib/libc.2
    shared library binding:
    deferred
    global hash table disabled
    plabel caching disabled
    global hash array size:1103
    global hash array nbuckets:3
    shared vtable support disabled
    explicit unloading enabled
    static branch prediction disabled
    executable from stack: D (default)
    kernel assisted branch prediction enabled
    lazy swap allocation disabled
    text segment locking disabled
    data segment locking disabled
    third quadrant private data space disabled
    fourth quadrant private data space disabled
    third quadrant global data space disabled
    data page size: D (default)
    instruction page size: D (default)
    nulptr references enabled
    shared library private mapping disabled
    shared library text merging disabled

    and this is the output of what /usr/lib/libc.sl

    what /usr/lib/libc.sl
    /usr/lib/libc.sl:
    $ B.11.11_LR Oct 27 2000 00:49:39 $

    --
    Chris du Preez

  4. Re: Problem with gcc on HPUX11.11

    Chris wrote:
    : /usr/local/libexec/gcc/hppa2.0w-hp-hpux11.11/4.1.1/cc1:
    : shared library list:
    : static /usr/local/lib/libintl.sl
    : static /usr/local/lib/libiconv.sl
    : dynamic /usr/lib/libc.2

    I don't know why cc1 thinks it needs pthread_mutex_lock but isn't linked
    with libpthread?

    : and this is the output of what /usr/lib/libc.sl
    : /usr/lib/libc.sl:
    : $ B.11.11_LR Oct 27 2000 00:49:39 $

    You need a later version of libc. Eventually they added the pthread_*
    stubs to libc.

    Any libc patch from PHCO_23093 to the latest PHCO_34275, would have them:
    ( SR:8606102984 CR:JAGab69119 )
    On HP-UX if a nonthreaded application links to a
    thread-safed library the link will fail due to
    unresolved symbols.To resolve these symbols, it is
    necessary to link the nonthreaded application to the
    threads library libpthread.But linking to that library
    makes the application threaded even if it creates
    no threads. Providing POSIX 1c thread "stubs" in HP-UX
    C language library have two direct effects for
    nonthreaded applications. a) POSIX 1c threads symbols
    are resolved if a nonthreaded application links to a
    thread-safed library
    b)...

+ Reply to Thread