chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] dlopen on solaris


From: tonyg
Subject: [Chicken-users] dlopen on solaris
Date: Mon, 29 Jul 2002 15:20:12 +0000 (GMT)

Hi...

I'm still having problems getting csc to run on Solaris. Looks to me
like a bug in dlopen(). I've narrowed it down to a test case, which
I've attached.

Sven, and any other Solaris-chicken users out there, could you run
"make" in the directory unpacked by this tarball, and post the results
to me or the list?

Here's the output I get on my Solaris machine. The problem (and this
is exactly the symptom I see when running csc) is that if the
dlopen()ing process is invoked via a shebang (#!), the dlopen()
returns a non-NULL handle even though its argument isn't a
dlopen()able object!

srf:~/dev/dlopen-bug-test$ gmake
gcc -o test-dlopen test-dlopen.c -ldl -lm
./test-dlopen ./test-dlopen
        argv[1] is ./test-dlopen
        h is ff3a14c0 for ./test-dlopen
        foo_p is 0
./test-script
        argv[1] is ./test-script
        h is ff3a1d0c for ./test-script
        foo_p is 0
./test-dlopen ./test-script
        argv[1] is ./test-script
        h is 0 for ./test-script
        foo_p is 0

What I *should* be seeing is "h is 0" for both "./test-script" and
"./test-dlopen ./test-script". (The other case is dlopen()ing itself,
so may or may not work, depending on linker, linker flags, operating
system etc.)

Here's some information about my system, in the hope that if anyone
gets results different to mine, their system will differ in some
obvious way from mine:

        srf:~/dev/dlopen-bug-test$ uname -a
        SunOS srf.g8labs.co.uk 5.7 Generic_106541-08 sun4u sparc SUNW,Ultra-60

        srf:~/dev/dlopen-bug-test$ gcc -v
        Reading specs from 
/usr/local/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/specs
        gcc version 2.95.2 19991024 (release)

        srf:~/dev/dlopen-bug-test$ ld --version
        GNU ld 2.10.1
        Copyright 2000 Free Software Foundation, Inc.
        This program is free software; you may redistribute it under the terms 
of
        the GNU General Public License.  This program has absolutely no 
warranty.
          Supported emulations:
           elf32_sparc
           elf64_sparc

        srf:~/dev/dlopen-bug-test$ ldd test-dlopen
                libdl.so.1 =>    /lib/libdl.so.1
                libm.so.1 =>     /lib/libm.so.1
                libc.so.1 =>     /lib/libc.so.1
                /usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1

Sven, you haven't applied any patches to the OS that I might have
missed, have you?

Thanks,
  Tony
-- 
"Rather than go see a real small town for free, he had paid money to
see a pretend one, and rather than see it with the naked eye he was
watching it on television. And rather than stay home and read a book,
I was watching him."  -- Neal Stephenson, command.txt

Attachment: dlopen-bug-test.tar.gz
Description: gzip compressed data, deflated, original filename, `dlopen-bug-test.tar', last modified: Mon Jul 29 14:01:03 2002, os: Unix


reply via email to

[Prev in Thread] Current Thread [Next in Thread]