[kaffe] compiling for m68k with optimization works.

Dalibor Topic robilad at yahoo.com
Thu Apr 17 10:54:01 PDT 2003

Konichiwa Kiyo,

--- Kiyo Inaba <inaba at src.ricoh.co.jp> wrote:

> When I do (in bash)
> CC=m68k-linux-gcc NM=m68k-linux-nm AR=m68k-linux-ar CXX=m68k-linux-c++ \
>   $SOURCE/kaffe/configure --host=m68k-linux --build=i686-linux \
>   --with-staticbin --with-staticlib --with-staticvm --without-x
> and make, I got an error as
> -------------------------------------------------------------------------
> /bin/sh ../libtool --mode=compile m68k-linux-gcc -DHAVE_CONFIG_H -I.
> -I../../kaf
> fe-snap-030416/replace -I../config -I../include -I..
> -I../../kaffe-snap-030416
> -DKVER=1.1.x-cvs
> -I/home/inaba/oldhome/src/kaffe-snap-030416-m68k-1/../kaffe-sna
> p-030416/kaffe/kaffevm
> -I/home/inaba/oldhome/src/kaffe-snap-030416-m68k-1/../kaf
> fe-snap-030416/kaffe/kaffevm/systems/unix-jthreads
> -I../../kaffe-snap-030416/con
> fig -I../../kaffe-snap-030416/include   -g -O2 -fno-omit-frame-pointer -c
> ../../
> kaffe-snap-030416/replace/getifaddrs.c
> m68k-linux-gcc -DHAVE_CONFIG_H -I. -I../../kaffe-snap-030416/replace
> -I../config
>  -I../include -I.. -I../../kaffe-snap-030416 -DKVER=\"1.1.x-cvs\"
> -I/home/inaba/
> oldhome/src/kaffe-snap-030416-m68k-1/../kaffe-snap-030416/kaffe/kaffevm
> -I/home/
> stems/unix-jthreads -I../../kaffe-snap-030416/config
> -I../../kaffe-snap-030416/i
> nclude -g -O2 -fno-omit-frame-pointer -Wp,-MD,.deps/getifaddrs.pp -c
> ../../kaffe
> -snap-030416/replace/getifaddrs.c -o getifaddrs.o
> In file included from ../../kaffe-snap-030416/replace/getifaddrs.c:30:
> ../../kaffe-snap-030416/replace/ifaddrs_linux.c:42: linux/netlink.h: No such
> fil
> e or directory
> ../../kaffe-snap-030416/replace/ifaddrs_linux.c:43: linux/rtnetlink.h: No
> such f
> ile or directory
> In file included from ../../kaffe-snap-030416/replace/getifaddrs.c:30:
> ../../kaffe-snap-030416/replace/ifaddrs_linux.c:46: netpacket/packet.h: No
> such
> file or directory
> make[1]: *** [getifaddrs.lo] Error 1
> -----------------------------------------------------------------------
> If someone has already known why it happens, let me know.

I've merged in some network interface code from JanosVM. What seems to happen
is that HAVE_GETIFADDRS is not set in config.h as apparently configure can't
find getifaddrs. That's all right on linux, that's what the replacement code in
ifaddrs_linux.c is for. But the replacement code seems to have trouble locating
some headers on your system.

The linux/* headers are linux includes. I've got them in /usr/include/ on my
system (Debian, ix86-linux). The netpacket header is part of GNU C library. But
I haven't tried cross-compiling kaffe, so I don't know what directories the C
compiler adds (or leaves out) automatically when cross compiling. I'd assume
that copying these directories to your /usr/local/m68k-linux/include directory
should work (but make sure you have the right headers for the right versions of
the kernel and libc on your target platform).

> And second (but not last) problem is even though I specify --without-x,
> this configure tried to use 'awt'. So I have to both specify --without-x
> and --with-awt=no.

That's a bug. I'll look into configure.in to see what's happening.
> As far as m68k-netbsd is concerned,
> >> If possible, I will check it with netbsd, but I am not sure whether
> >> my old Sun-3/260 works or not...
> >That would be cool, I don't think there were any posts on m68k/NetBSD status
> >since 1998 on kaffe.org.
> Yes, I know that there are no active porter exist for this config. If
> my old Sun-3/260 does not work, I will try to purchase one more (old)
> Mac to install netbsd...

I'm wondering whether netbsd would run on an emulator like UAE [1] or Aranym
[2]. (I'm not aware of a MMU patch for basilik II). That sounds like a better
option to me, especially with todays fast CPUs.

Or maybe you can ask someone on m68k-netbsd mailing lists to give it a try.

dalibor topic

[1] http://www.freiburg.linux.de/~uae/ with MMU patches.
[2] http://aranym.sourceforge.net/features.html

Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo

More information about the kaffe mailing list