On Fri, Aug 22, 2008 at 4:41 PM, Rene Gollent <anevilyak@xxxxxxxxx> wrote: > On Fri, Aug 22, 2008 at 11:31 AM, scott mc <scottmc2@xxxxxxxxx> wrote: >> I've been working on the port of cmake for Haiku and have made some >> progress, but it's not yet working. >> Seems there's still an issue in the cmcurl code. >> Here's the port log entry for it on HaikuPorts, which also links to the >> patch I've created for it so far: >> http://ports.haiku-files.org/wiki/dev-util/cmake >> And the ticket I filed with cmake: >> http://www.vtk.org/Bug/view.php?id=7425&nbn=6 >> Something to do with recv function. Can anyone point me in the right >> direction on this? Perhaps write a small simple program that uses recv() on >> haiku? >> -scottmc >> >> > > recv() is the syscall for receiving data on a network socket. In order > to use it you'll need a) a socket file descriptor, b) sys/socket.h, > and c) to link to libnetwork.so. > > As for sample code, there's quite a few things in the haiku tree that > use it, though I'm not sure how many of them would qualify as a simple > example. It can't really do much on its own without someone on the > other end sending it data in any case. > > Regards, > > Rene > > Thanks Rene, that got us past that part. I added a check for libnetwork and it now correctly uses -lnetwork when it builds cmcurl. Now it's having a differet issue. It's getting stuck in a loop or something it seems. Here's the strace output from it, see any red flags here? Note that this is on Haiku r26943, but I'm seeing the same thing on a fresher image as well. -scottmc ... [ 1225] _kern_acquire_sem(0x333f) = 0x00000000 No error (4 us) [ 1225] _kern_fork() = 0x000004d1 (15543 us) [ 1225] _kern_release_sem(0x333f) = 0x00000000 No error (5 us) [ 1225] _kern_close(0xa) = 0x00000000 No error (20 us) [ 1225] _kern_read(0x9, 0xffffffffffffffff, 0x180a0be8, 0x400) = 0x00000000 (12 us) [ 1225] _kern_close(0x9) = 0x00000000 No error (79 us) [ 1225] _kern_close(0x8) = 0x00000000 No error (6 us) [ 1225] _kern_fcntl(0x7, 0x8, 0x80) = 0x00000000 No error (6 us) [ 1225] _kern_fcntl(0x7, 0x10, 0x80) = 0x00000000 No error (9 us) [ 1225] _kern_close(0x6) = 0x00000000 No error (4 us) [ 1225] _kern_setcwd(0xffffffff, "/boot/home/cmake-2.6.1") = 0x00000000 No error (81 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_snooze_etc(0x41cbaf59, 0x0, 0x10) = 0x00000000 No error (2216 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (12 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (10 us) [ 1225] _kern_snooze_etc(0x41cdb053, 0x0, 0x10) = 0x00000000 No error (1092 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (11 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (14 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (383 us) [ 1225] _kern_snooze_etc(0x41cf9ede, 0x0, 0x10) = 0x00000000 No error (1711 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (14 us) [ 1225] _kern_snooze_etc(0x41d184b6, 0x0, 0x10) = 0x00000000 No error (1038 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (11 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_snooze_etc(0x41d38778, 0x0, 0x10) = 0x00000000 No error (5279 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (11 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (9 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (10 us) [ 1225] _kern_snooze_etc(0x41d52e0a, 0x0, 0x10) = 0x00000000 No error (4880 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (12 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (335 us) [ 1225] _kern_snooze_etc(0x41d78d3e, 0x0, 0x10) = 0x00000000 No error (2544 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_snooze_etc(0x41d99f50, 0x0, 0x10) = 0x00000000 No error (1244 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (12 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (10 us) [ 1225] _kern_snooze_etc(0x41db7394, 0x0, 0x10) = 0x00000000 No error (11123 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (9 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (12 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (14 us) [ 1225] _kern_snooze_etc(0x41ddb9b1, 0x0, 0x10) = 0x00000000 No error (8825 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_snooze_etc(0x41df704e, 0x0, 0x10) = 0x00000000 No error (2171 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (9 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (9 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (14 us) [ 1225] _kern_snooze_etc(0x41e20eed, 0x0, 0x10) = 0x00000000 No error (6052 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (16 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (14 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (10 us) [ 1225] _kern_snooze_etc(0x41e40ae3, 0x0, 0x10) = 0x00000000 No error (7949 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (12 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (10 us) [ 1225] _kern_snooze_etc(0x41e62dbd, 0x0, 0x10) = 0x00000000 No error (3724 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (9 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (9 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_snooze_etc(0x41e84f17, 0x0, 0x10) = 0x00000000 No error (1253 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (11 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (10 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (10 us) [ 1225] _kern_snooze_etc(0x41ea4612, 0x0, 0x10) = 0x00000000 No error (5267 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (9 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (10 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_snooze_etc(0x41ec81ad, 0x0, 0x10) = 0x00000000 No error (1756 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (11 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_snooze_etc(0x41ee51d5, 0x0, 0x10) = 0x00000000 No error (2864 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (12 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_snooze_etc(0x41f06c33, 0x0, 0x10) = 0x00000000 No error (2571 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (11 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (9 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (9 us) [ 1225] _kern_snooze_etc(0x41f1f565, 0x0, 0x10) = 0x00000000 No error (16029 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (9 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (9 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (12 us) [ 1225] _kern_snooze_etc(0x41f40c72, 0x0, 0x10) = 0x00000000 No error (32937 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (9 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (9 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (12 us) [ 1225] _kern_snooze_etc(0x41f69084, 0x0, 0x10) = 0x00000000 No error (3801 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (11 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (12 us) [ 1225] _kern_snooze_etc(0x41f89002, 0x0, 0x10) = 0x00000000 No error (5870 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (10 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (8 us) [ 1225] _kern_snooze_etc(0x41fac810, 0x0, 0x10) = 0x00000000 No error (2688 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (9 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (11 us) [ 1225] _kern_snooze_etc(0x41fcaeee, 0x0, 0x10) = 0x00000000 No error (8083 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (9 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (10 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (10 us) [ 1225] _kern_snooze_etc(0x41fea6a0, 0x0, 0x10) = 0x00000000 No error (1165 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (9 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (9 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (10 us) [ 1225] _kern_snooze_etc(0x420080b8, 0x0, 0x10) = 0x00000000 No error (2037 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (12 us) [ 1225] _kern_snooze_etc(0x420242b8, 0x0, 0x10) = 0x00000000 No error (29899 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (9 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (9 us) [ 1225] _kern_snooze_etc(0x42046651, 0x0, 0x10) = 0x00000000 No error (5224 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (12 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (11 us) [ 1225] _kern_snooze_etc(0x4206fb55, 0x0, 0x10) = 0x00000000 No error (2897 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (10 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_snooze_etc(0x420921fd, 0x0, 0x10) = 0x00000000 No error (5849 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (11 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_snooze_etc(0x420ac3f0, 0x0, 0x10) = 0x00000000 No error (3976 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (9 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x0000005d (13 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (12 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (9 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (10 us) [ 1225] _kern_snooze_etc(0x420f3053, 0x0, 0x10) = 0x8000000a Interrupted system call (23431 us) [ 1225] --- SIGCHLD (Child exited) --- [ 1225] _kern_snooze_etc(0x420f3053, 0x0, 0x10) = 0x8000000a Interrupted system call (7 us) [ 1225] _kern_read(0x7, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x00000000 (12 us) [ 1225] _kern_close(0x7) = 0x00000000 No error (64 us) [ 1225] _kern_read(0x5, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x00000000 (12 us) [ 1225] _kern_close(0x5) = 0x00000000 No error (88 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (15 us) [ 1225] _kern_snooze_etc(0x4213672f, 0x0, 0x10) = 0x00000000 No error (100420 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_snooze_etc(0x4215e225, 0x0, 0x10) = 0x00000000 No error (100614 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_snooze_etc(0x42183ee7, 0x0, 0x10) = 0x00000000 No error (100985 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_snooze_etc(0x421aafb5, 0x0, 0x10) = 0x00000000 No error (100238 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_snooze_etc(0x421d1733, 0x0, 0x10) = 0x00000000 No error (100953 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (14 us) [ 1225] _kern_snooze_etc(0x421f9958, 0x0, 0x10) = 0x00000000 No error (100371 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (9 us) [ 1225] _kern_snooze_etc(0x422223f4, 0x0, 0x10) = 0x00000000 No error (100990 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_snooze_etc(0x42242561, 0x0, 0x10) = 0x00000000 No error (100937 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (13 us) [ 1225] _kern_snooze_etc(0x4226a2e6, 0x0, 0x10) = 0x00000000 No error (101239 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (51 us) [ 1225] _kern_snooze_etc(0x4228ee7c, 0x0, 0x10) = 0x00000000 No error (100241 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (14 us) [ 1225] _kern_snooze_etc(0x422b684e, 0x0, 0x10) = 0x00000000 No error (102129 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (11 us) [ 1225] _kern_snooze_etc(0x422df25d, 0x0, 0x10) = 0x00000000 No error (101741 us) [ 1225] _kern_read(0x3, 0xffffffffffffffff, 0x180a0798, 0x400) = 0x8000000b (11 us)