cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: compile question Solaris 5.8, curl 7.15.4

From: Kevin Martin <kevintm_at_ameritech.net>
Date: Wed, 09 Aug 2006 15:00:30 -0500

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ok, so now it all compiles (after adding the dlstub stuff) but when I run it it segfaults! Trussing the run shows this:

 truss ./curl http://www.yahoo.com

execve("./curl", 0xFFBEFBA4, 0xFFBEFBB0) argc = 2
pipe() = 3 [4]
close(3) = 0
close(4) = 0
brk(0x001A68A0) = 0
brk(0x001A88A0) = 0
getpid() = 24817 [24816]
brk(0x001A88A0) = 0
brk(0x001AA8A0) = 0
brk(0x001AA8A0) = 0
brk(0x001AC8A0) = 0
brk(0x001AC8A0) = 0
brk(0x001AE8A0) = 0
brk(0x001AE8A0) = 0
brk(0x001B08A0) = 0
brk(0x001B08A0) = 0
brk(0x001B28A0) = 0
brk(0x001B28A0) = 0
brk(0x001B48A0) = 0
brk(0x001B48A0) = 0
brk(0x001B68A0) = 0
open64("/home/user/.curlrc", O_RDONLY) Err#2 ENOENT
brk(0x001B68A0) = 0
brk(0x001BE8A0) = 0
ioctl(1, TCGETA, 0xFFBEF584) = 0
sigaction(SIGPIPE, 0xFFBEF3E8, 0xFFBEF468) = 0
getcontext(0xFFBEEAE8)
so_socket(26, 1, 0, "", 1) = 3
close(3) = 0
open("/etc/netconfig", O_RDONLY|O_LARGEFILE) = 3
fcntl(3, F_DUPFD, 0x00000100) Err#22 EINVAL
read(3, " # p r a g m a i d e n".., 1024) = 1024
read(3, " t s t p i _ c".., 1024) = 215
read(3, 0x001BDEF0, 1024) = 0
lseek(3, 0, SEEK_SET) = 0
read(3, " # p r a g m a i d e n".., 1024) = 1024
read(3, " t s t p i _ c".., 1024) = 215
read(3, 0x001BDEF0, 1024) = 0
close(3) = 0
open("/dev/udp", O_RDONLY) = 3
ioctl(3, 0xC00C6982, 0xFFBEE82C) = 0
close(3) = 0
brk(0x001BE8A0) = 0
brk(0x001C08A0) = 0
open("/etc/nsswitch.conf", O_RDONLY) = 3
fcntl(3, F_DUPFD, 0x00000100) Err#22 EINVAL
read(3, " #\n # / e t c / n s s".., 1024) = 804
read(3, 0x001BECC8, 1024) = 0
close(3) = 0
    Incurred fault #6, FLTBOUNDS %pc = 0x7D78B48C
      siginfo: SIGSEGV SEGV_MAPERR addr=0x7D78B48C
    Received signal #11, SIGSEGV [default]
      siginfo: SIGSEGV SEGV_MAPERR addr=0x7D78B48C
        *** process killed ***

So this stinks!!! ideas welcome!

Thanks.

Kevin

Kevin Martin wrote:
> Dan,
>
> Ok, started everything from scratch, only exporting LD_LIBRARY_PATH and PATH. reran the config (yay, it worked!!) and ran a make
> (yay, that worked too!) but, there's always a but, when I tried to link curl statically, it failed because of Sun not having a
> libdl.a file. So I had to compile up the dlstub.c stuff and link statically to that and it looks like it's all working now.
>
> Thanks for all of your help.
>
> Kevin
>
> Daniel Stenberg wrote:
>>> On Thu, 27 Jul 2006, Kevin Martin wrote:
>>>
>>>> And I did the configure this way:
>>>>
>>>> export
>>>> LD_LIBRARY_PATH=/usr/local/lib/gcc/sparc-sun-solaris2.8/3.4.2:/usr/local/ssl/lib:/usr/local/lib:/usr/lib:/usr/ccs/lib:$LD_LIBRARY_PATH
>>>>
>>>> export PATH=/usr/local/bin:$PATH
>>>> export CPPFLAGS="-I/usr/include/sys -I/usr/local/ssl/include"
>>> Why do you set these to CPPFLAGS? I suspect at least the first is
>>> plainly confusing to the build process and the second just redundant.
>>>
>>>> export LIBS="-lnsl -lssl -lcrypto -ldl -lsocket"
>>> Why do you set these? configure should figure out by itself if it needs
>>> these and set LIBS accordingly.
>>>
>>>> ./configure --prefix=/opt/curl --disable-ldap --enable-http
>>>> --enable-manual --enable-thread --enable-verbose --enable-debug -
>>>> --enable-cookies --enable-static --disable-shared
>>>> --with-ssl=/usr/local/ssl
>>> Note that you probably won't want --enable-debug on a production system.
>>>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE2j7eaXZlxDxYaM4RAtA9AKClOHYfzA2coo3/qJ2kb/+SEyl91wCg5pQm
Ae0unlbv8cNXX4T1vq5doKM=
=pzXy
-----END PGP SIGNATURE-----
Received on 2006-08-09