cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Segment fault when running the ftpget.c sample binary with libcurl and ftpget.c built for arm-linux

From: Ed Waldner <edwaldner_at_yahoo.com>
Date: Mon, 29 May 2006 19:25:36 -0700 (PDT)

Hello,

I got past the build issue for the ftpget.c sample
source using libcurl. Turns out I wasn't linking in
the right libraries. My test build command now looks
like:

 `curl-config --cc --cflags --libs` ftpget.c

That part worked (after defining TRUE).

I'm trying to get ftpupload.c to work and I've got
past some hurdles, but I've run up against another
segmentation fault while trying to transfer a file
from my embedded target to my host pc. I've attached
the verbose dump below. I see the while-uploading.txt
being generated on my host PC which validates the
connection success below, but the filesize remains 0.

I ran thru the process manually using the embedded
target's ftp util and the put command. If anyone has
any idea how to get past the segmentation fault I
would appreciate it.

-Ed.

* About to connect() to 192.168.0.5 port 21
* Trying 192.168.0.5... * connected
* Connected to 192.168.0.5 (192.168.0.5) port 21
< 220---------- Welcome to Pure-FTPd [privsep] [TLS]
----------
< 220-You are user number 1 of 50 allowed.
< 220-Local time is now 22:14. Server port: 21.
< 220-This is a private system - No anonymous login
< 220-IPv6 connections are also welcome on this
server.
< 220 You will be disconnected after 15 minutes of
inactivity.
> USER testuser
< 331 User testuser OK. Password required
> PASS testuser1
< 230-User testuser has group access to: testuser
< 230 OK. Current restricted directory is /
> PWD
< 257 "/" is your current location
* Entry path is '/'
> CWD /sandbox
< 250 OK. Current directory is /sandbox
> CWD uploaded
< 250 OK. Current directory is /sandbox/uploaded
> EPSV
* Connect data stream passively
< 229 Extended Passive mode OK (|||6302|)
* Trying 192.168.0.5... * connected
* Connecting to 192.168.0.5 (192.168.0.5) port 6302
> TYPE I
< 200 TYPE is now 8-bit binary
> STOR while-uploading.txt
< 150 Accepted data connection
Segmentation fault

--- Dan Fandrich <dan_at_coneharvesters.com> wrote:

> On Sun, May 21, 2006 at 06:55:42PM -0700, Ed Waldner
> wrote:
> > I'm trying to see how libcurl works on an Applied
> Data
> > Systems BitsyXb development kit running a PXA-270
> > Intel Xscale processor.
> [...
> > I transfered a.out to my target dev kit and ran
> it. I
> > got a segmentation fault. I modified the ftpget.c
> to
> > include some debug printf statements, but I didn't
> see
> > any of them - only the seg fault.
>
> If your app won't even start, then it's unlikely to
> be a curl problem. It's
> probably a mismatch between compiler switches on
> your app and the libraries
> you're liking against, or using incompatible
> processor switches. Try getting
> a "hello world" program working first before
> integrating curl. Or, try
> statically linking your application to all its
> libraries to try to narrow
> the source of the problem.
>
> >>> Dan
> --
> http://www.MoveAnnouncer.com The web
> change of address service
> Let webmasters know that your web site has
> moved
>
Received on 2006-05-30