Re: compilation difficulties on BeOS
I looks like stdlib isn't being included, so the compiler is assuming that malloc is defined as int malloc(int), but it has to return a void *, so it is complaining. Could you look in apr_private.h, and ensure that HAVE_STDLIB_H is being defined to be 1. Thanks, Ryan On Fri, 1 Dec 2000, Sam TH wrote: I was trying to compile apr on a powerpc-apple-beos machine, and ran into the following quite strange error: ake[1]: Entering directory `/boot/home/apr/lib' cc -DBEOS -DBEOS -c -I../include -I../include/arch/beos apr_pools.c ### mwcc Compiler Error: # return malloc(reqsize); # ^ # cannot convert # 'int' to # 'void *' #-- File /boot/home/apr/lib/apr_pools.c; Line 905 #-- What's strange about this is that malloc is defined in posix/stdlib.h as void *malloc(size_t size); so I really can't see what's being converted that the compiler doesn't like. Has anyone seen this before? sam th [EMAIL PROTECTED] http://www.abisource.com/~sam/ GnuPG Key: http://www.abisource.com/~sam/key ___ Ryan Bloom [EMAIL PROTECTED] 406 29th St. San Francisco, CA 94131 ---
Re: compilation difficulties on BeOS
On Sat, Dec 02, 2000 at 12:57:01AM -0800, Greg Stein wrote: That is generated by ./buildconf in the APR directory. It is created by autoconf or autoheader (I forget which). Something must have happened to it after you ran buildconf. Thanks. My problem was not running buildconf. Too bad this isn't documented, maybe I'l write something. Is there a way for configure to tell if buildconf has been run? Then we wouldn't have to document it. On Sat, Dec 02, 2000 at 10:06:28AM -, David Reid wrote: Power PC has a lot of problems with various aspects of APR and I haven't been able to find anyone who can give me reliable and frequent access to a Power PC BeOS to keep things up to date. If you can help then that'll be great. BTW, R5 or BONE? Well, if APR doesn't work on BeOS/PPC, then I won't be able to switch from CVS. And I wouldn't want that. So sure, I'll help. R4.5, sadly. If I had actually ever seen the machine, I would probably install R5 on it. :-) Ok, now to the next problem. That was that it couldn't find stderr. The attched patch fixes this. The next problem. When trying to compile socketcommon.c, I get about 50 error messages. They all basically look like this ### mwcc Compiler Error: # if (sock-local_port_unknown) { # ^^ # 'local_port_unknown' is not a struct/union/class member Or some other problem with the declaration of sock (it finds lots). It seems that apr_socket_t is being defined improperly. In fact, local_port_unknown isn't a member of apr_socket_t as defined in beos/network_io.h. It is defined in include/arch/[unix,win32,os2]/network_io.h however. There are lots of other problems with the declaration of sock too. It doesn't find various members of [local,remote]_addr either, among other problems. I suspect that this is either a result of horrible bitrot (which seems unlikely) or that there's some simple includes that aren't happening correctly. I hope that was comprehensible. sam th [EMAIL PROTECTED] http://www.abisource.com/~sam/ GnuPG Key: http://www.abisource.com/~sam/key pgpkgvZgOCHyu.pgp Description: PGP signature
Re: compilation difficulties on BeOS
On Sat, Dec 02, 2000 at 04:51:46AM -0600, Sam TH wrote: On Sat, Dec 02, 2000 at 12:57:01AM -0800, Greg Stein wrote: That is generated by ./buildconf in the APR directory. It is created by autoconf or autoheader (I forget which). Something must have happened to it after you ran buildconf. Thanks. My problem was not running buildconf. Too bad this isn't documented, maybe I'l write something. Is there a way for configure to tell if buildconf has been run? Then we wouldn't have to document it. Hrm. ./configure doesn't exist in CVS. It gets created by buildconf, just like apr_private.h.in. Ah! I bet you ran autoconf to create ./configure, but missed the autoheader step. I would think that configure would barf when it tries to use apr_private.h.in, but I could easily imagine that it got buried in some output and just wasn't easily seen. It wouldn't be hard to add a test, but it is important to recognize that only developers need to use buildconf. When APR gets distributed, it will have had buildconf run already (so end users don't need the autoconf tool). IOW, the right answer is to expect the developers to know, or to have a README.dev or something. ... Ok, now to the next problem. That was that it couldn't find stderr. The attched patch fixes this. The attached patch is missing :-) ... can you resend? The next problem. When trying to compile socketcommon.c, I get about 50 error messages. They all basically look like this ... I suspect that this is either a result of horrible bitrot (which seems unlikely) or that there's some simple includes that aren't happening correctly. Bitrot. The socket code is being revamped for two purposes: 1) provide for both IPv4 and IPv6 2) shift more of the per-platform duplicated code to common code David is the BeOS guy, but I don't think he has been patching as fast as Jeff has been changing the code :-) Cheers, -g -- Greg Stein, http://www.lyra.org/
Re: compilation difficulties on BeOS
On Sat, Dec 02, 2000 at 03:38:02AM -0800, Greg Stein wrote: I would think that configure would barf when it tries to use apr_private.h.in, but I could easily imagine that it got buried in some output and just wasn't easily seen. It wouldn't be hard to add a test, but it is important to recognize that only developers need to use buildconf. When APR gets distributed, it will have had buildconf run already (so end users don't need the autoconf tool). IOW, the right answer is to expect the developers to know, or to have a README.dev or something. I'll write a short one. ... Ok, now to the next problem. That was that it couldn't find stderr. The attched patch fixes this. The attached patch is missing :-) ... can you resend? Now it's really attached. sam th [EMAIL PROTECTED] http://www.abisource.com/~sam/ GnuPG Key: http://www.abisource.com/~sam/key Index: passwd//apr_getpass.c === RCS file: /home/cvspublic/apr/passwd/apr_getpass.c,v retrieving revision 1.3 diff -u -r1.3 apr_getpass.c --- passwd//apr_getpass.c 2000/10/16 06:04:48 1.3 +++ passwd//apr_getpass.c 2000/12/02 10:31:40 @@ -73,6 +73,9 @@ #if HAVE_STDLIB_H #include stdlib.h #endif +#if HAVE_STDIO_H +#include stdio.h +#endif #if defined(HAVE_TERMIOS_H) !defined(HAVE_GETPASS) #include termios.h pgpljbmTgKSRA.pgp Description: PGP signature
Re: compilation difficulties on BeOS
On Sat, Dec 02, 2000 at 03:38:02AM -0800, Greg Stein wrote: users don't need the autoconf tool). IOW, the right answer is to expect the developers to know, or to have a README.dev or something. Attached is just such a README.dev file. sam th [EMAIL PROTECTED] http://www.abisource.com/~sam/ GnuPG Key: http://www.abisource.com/~sam/key Apache Portable Runtime === Right now, if you are building APR, it means that you are probably a developer. If you are building it as a standalone package, however, this means using a slightly non-standard build process. 1) ./buildconf 2) ./configure 3) make Currently, there is no make install step, as APR is not yet installable. pgpbd6ISAJRba.pgp Description: PGP signature
Re: compilation difficulties on BeOS
Sam TH [EMAIL PROTECTED] writes: Then I encounter this error: cc -DBEOS -DBEOS -c -I../../include -Imm shmem.c ### mwcc Compiler Error: # MM *newmm = mm_create(reqsize + sizeof(*newmm), file, MM_ALLOCATE_ENOUGH); # ^ # illegal type Yep... this bug crept in last night; it showed up in a gcc warning on FreeBSD in the wee hours... sizeof(* void *) is undefined. You can't do void *x; sizeof(*x) -- Jeff Trawick | [EMAIL PROTECTED] | PGP public key at web site: http://www.geocities.com/SiliconValley/Park/9289/ Born in Roswell... married an alien...
Re: compilation difficulties on BeOS
Yep... this bug crept in last night; it showed up in a gcc warning on FreeBSD in the wee hours... sizeof(* void *) is undefined. You can't do void *x; sizeof(*x) ARGH! This is my fault. It compiled cleanly on my Linux box. I'll try to get to it today unless somebody beats me to it. Ryan ___ Ryan Bloom [EMAIL PROTECTED] 406 29th St. San Francisco, CA 94131 ---