[kaffe] whats wrong with ltdl.c in kaffe-1.0.7

Jim Pick jim at kaffe.org
Mon Oct 28 07:53:52 PST 2002


Looking at the code, my guess is that the configure script in the
libltdl directory couldn't figure out where your malloc in your
cross-compile toolchain lives.

Looking at ltdl.c, I see a "#ifdef HAVE_MALLOC_H" block at the top. 
Check the libltdl/config.h file (generated by the libltdl/configure
script) to make sure it's defined.  It probably isn't (but it should
be).  Look at libltdl/config.log to see why it failed.  It might be
something obvious.

You might have to tweak something in your toolchain, or modify
libltdl/configure.in to fix the configure test.  If it's a fix that
seems generally applicable, please tell us about it.

Cheers,

 - Jim

On Fri, 2002-10-25 at 08:43, Sanjeev Manral wrote:
> Hi all,
> 
> I'm tryiong to port kaffe-1.0.7 to ppc.I'm also getting the same error. were
> u able to get the solution ?
> 
> I'm configuring with-
> 
> CC=ppc_405-gcc AS=ppc_405-as LS=-ppc_405-ld AR=ppc_405-ar CPP=ppc_405-g++
> STRIP=ppc_405-strip RANLIB=ppc_405-ranlib ./configure --with-x --without-awt
> --with-libraries=/opt/hardhat/devkit/ppc/405/target/usr/lib
> --with-includes=/opt/hardhat/devkit/ppc/405/target/usr/include
> --prefix=/usr/local/crossppc/kaffe --target=ppc
> 
> I'm getting this error-
> 
> /**********ERROR***********/
> /bin/sh ./libtool --mode=compile ppc_405-gcc -DHAVE_CONFIG_H -I. -I. -I.  -g
> -O2 -c -o ltdl.lo `test -f ltdl.c || echo './'`ltdl.c
> rm -f .libs/ltdl.lo
> ppc_405-gcc -DHAVE_CONFIG_H -I. -I. -I -g -O2 -c ltdl.c   -fPIC -DPIC
> 
> ltdl.c:165: `malloc' undeclared here (not in a function)
> ltdl.c:169: `free' undeclared here (not in a function)
> ltdl.c: In function `sys_dl_open':
> ltdl.c:976: warning: initialization makes pointer from integer without a
> cast
> ltdl.c:980: warning: passing arg 1 of pointer to function makes pointer from
> integer without a cast
> ltdl.c:980: warning: assignment makes pointer from integer without a cast
> ltdl.c: In function `sys_dl_close':
> ltdl.c:995: warning: passing arg 1 of pointer to function makes pointer from
> integer without a cast
> ltdl.c:995: warning: assignment makes pointer from integer without a cast
> ltdl.c: In function `sys_dl_sym':
> tdl.c:2760: `libdir' undeclared (first use in this function)
> =----------------------
> ltdl.c:2880: `NULL' undeclared (first use in this function)
> ltdl.c: In function `lt_dlopenext':
> ltdl.c:2966: warning: assignment makes pointer from integer without a cast
> ltdl.c: In function `lt_argz_insert':
> ltdl.c:3048: `ENOMEM' undeclared (first use in this function)
> ltdl.c:3049: warning: unreachable code at beginning of switch statement
> ltdl.c: In function `lt_argz_insertinorder':
> ltdl.c:3074: warning: assignment makes pointer from integer without a cast
> ltdl.c: In function `foreachfile_callback':
> ltdl.c:3209: warning: assignment makes pointer from integer without a cast
> ltdl.c: In function `lt_dlforeachfile':
> ltdl.c:3250: warning: passing arg 1 of `foreach_dirinpath' makes pointer
> from integer without a cast
> ltdl.c:3257: warning: passing arg 1 of `foreach_dirinpath' makes pointer
> from integer without a cast
> ltdl.c:3264: warning: passing arg 1 of `foreach_dirinpath' makes pointer
> from integer without a cast
> make[2]: *** [ltdl.lo] Error 1
> /************* Error *********************/
> 
> 
> I've tried all the tricks I could find in mailing lsit. even if I change
> DEFAULT INCLUDES in libitdl/Makefile same error is comming
> 
> 
> /bin/sh ./libtool --mode=compile ppc_405-gcc -DHAVE_CONFIG_H -I. -I.
> -I/usr/include     -g -O2 -c -o ltdl.lo `test -f ltdl.c || echo './'`ltdl.c
> rm -f .libs/ltdl.lo
> ppc_405-gcc -DHAVE_CONFIG_H -I. -I. -I/usr/include -g -O2 -c ltdl.c   -fPIC
> -DPIC
> tdl.c:165: `malloc' undeclared here (not in a function)
> ltdl.c:169: `free' undeclared here (not in a function)
> ltdl.c: In function `sys_dl_open':
> 
> 
> could somebody help
> 
> Thanks in advance,
> Sanjeev
> 
> 
> 
> 
>  
> 
> _______________________________________________
> kaffe mailing list
> kaffe at kaffe.org
> http://kaffe.org/cgi-bin/mailman/listinfo/kaffe





More information about the kaffe mailing list