cURL / Mailing Lists / curl-library / Single Mail

curl-library

Buildroot - libCurl/cURL Segmentation Fault

From: Conan Huang (Intern) <conan.huang_at_autodesk.com>
Date: Tue, 25 May 2010 15:08:15 -0700

Hi all,

      I'm fairly new to libcURL/cURL and buildroot. I recently built a kernel image for Phidget SBC (which uses a using ARM920t) using Buildroot. In Buildroot I configured to install cURL and libcURL (Buildroot installed cURL 7.17.1). After loading the kernel image on the Phidget SBC everything looks fine, cURL exists, libcURL exist. I started to test cURL and libcURL, both crashes with segmentation fault or illegal instruction.

      What I did is I ran the simple.c code from cURl.haxx example codes . Instead of the default URL I changed it to google.com here is the output:

<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.ca/">here</A>.
</BODY></HTML>
Segmentation fault

   Sometimes instead of Segmentation fault, the error would be Illegal Instruction.

Simple.c:

#include "phidget21.h"
#include "curl/curl.h"

int main(int argc, char* argv[])
{
                CURL *curl;
                CURLcode res;

                curl = curl_easy_init();
                if(curl) {
                                curl_easy_setopt(curl, CURLOPT_URL, "http://google.ca");
                                res = curl_easy_perform(curl);

                                /* always cleanup */
                                curl_easy_cleanup(curl);
                }

                return 0;
}

      When I tried cURL in Putty (ssh), similar result:

   curl google.ca
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.ca/">here</A>.
</BODY></HTML>
Illegal instruction

     I'm not sure if there is any compatibility issues with Buildroot, ARM or cURL. OR if there is any bypass or solutions.

  Thank you all for any support.

Regards,

Conan

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-05-26