cURL / Mailing Lists / curl-library / Single Mail

curl-library

Problems on FreeBSD

From: Lucas Adamski <ladamski_at_yahoo.com>
Date: Thu, 6 Sep 2001 19:16:46 -0700

Hi all,

I've been trying to port over a program I've been working on in C/C++ using
libcurl from Solaris to FreeBSD, but I've run into numerous problems.

1) I had the same problem that other people mentioned with both libc and
libc_r being linked in... there was a bug report
(http://sourceforge.net/tracker/?func=detail&atid=100976&aid=441735&group_id
=976) regarding that, but I tried 7.9pre3 and it did not fix it. However,
replacing every instance of "openbsd" with "freebsd" in ltmain.sh fixed it..
I guess the OpenBSD folks already had a fix for that?

It has not, however, stopped the segfaults. I could post my code here, but
it sucks so instead I tried compiling the multithread.c example in the
distribution, and just like mine it segfaults after the first thread
terminates:

---------------- output -----------
Page updated September 04, 2001.<br>
Mail <a href="mailto:curl-web_at_haxx.se">curl-web</a> about this web!<br>
Read more about this site.
</font>
</td></tr></table></td></tr></table>
</div>
</BODY>
</HTML>
Thread 0 terminated
Segmentation fault (core dumped)
----------------------------

To confirm that libc isn't the problem now:
-----------------------
ldd multithread
multithread:
        libcurl.so.2 => /usr/local/lib/libcurl.so.2 (0x28065000)
        libcrypto.so.2 => /usr/lib/libcrypto.so.2 (0x28080000)
        libssl.so.2 => /usr/lib/libssl.so.2 (0x28136000)
        libc_r.so.4 => /usr/lib/libc_r.so.4 (0x28162000)
-----------------------

This is with libcurl 7.8.1, though I had the same problem with 7.9.pre3.
FreeBSD 4.3-RELEASE

Compiled with: gcc
1.c -Wall -L/usr/local/lib -pthread -D_THREAD_SAFE -I/usr/local/include -lc
url -lcrypto -lssl -o $1

Everything (libcurl and openssl) compiled with -D_THREAD_SAFE -pthread.

Anyone out there gotten multithread libcurl working on FBSD? Let me know if
I can provide any additional info, though I'm kinda new at the dev on Unix
thing, so some directional prodding wouldn't hurt. :) Otherwise, I'm rather
stuck! Thanks,
  Lucas.
Received on 2001-09-07