Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] BasiliskII-JIT
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
jgpallack
n00b
n00b


Joined: 21 Nov 2007
Posts: 33

PostPosted: Sun Mar 30, 2008 7:05 am    Post subject: [SOLVED] BasiliskII-JIT Reply with quote

Any chance this will ever get ported to amd64? Right now, it's just listed as being for x86 and ppc.

Out of curiosity, I put the ebuild in my overlay and added the amd64 keyword, but it fails to compile. Are there any plans from the devs to port it? Or should I just unmask the non-JIT BasiliskII ebuild?

If anyone's interested, here's the error.

Code:

c++ -I../include -I. -I../uae_cpu -DHAVE_CONFIG_H  -DOS_linux -DCPU_x86_64 -DDIRECT_ADDRESSING -DUSE_JIT -DUSE_JIT_FPU -DFPU_IEEE -D_REENTRANT -DDATADIR=\"/usr/share/BasiliskII\"  -march=nocona -Os -pipe -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib64/glib/include -fno-merge-constants -c ../ether.cpp -o obj/ether.o
../ether.cpp: In function ‘void ether_udp_read(uint8*, int, sockaddr_in*)’:
../ether.cpp:443: error: cast from ‘uint8*’ to ‘uint32’ loses precision
make: *** [obj/ether.o] Error 1


Last edited by jgpallack on Sat Apr 05, 2008 5:12 am; edited 1 time in total
Back to top
View user's profile Send private message
Carnildo
Guru
Guru


Joined: 17 Jun 2004
Posts: 594

PostPosted: Mon Mar 31, 2008 11:31 pm    Post subject: Reply with quote

The error message indicates that a port won't be a trivial task: someone's assuming that a pointer is 32 bits -- which is manifestly untrue on a 64-bit system. Any port will need to go through the code with a fine-toothed comb to locate similar assumptions.
Back to top
View user's profile Send private message
shanoah
n00b
n00b


Joined: 09 Apr 2007
Posts: 4

PostPosted: Tue Apr 01, 2008 12:28 pm    Post subject: Reply with quote

Here, you might try this heavily modified ebuild I made for my own personal use that pulls from cvs. As far as I can tell, the jit and non-jit must have merged at some point, so just make sure to have jit as a keyword.

As a warning, I haven't done many e-builds, and this has not been extensively tested. It does compile with jit on for my amd64 system, though:

Code:
# basilisk-999.ebuild
#
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/basiliskII/basiliskII-1.0.0_pre20050412.ebuild,v 1.7 2007/07/12 06:39:56 mr_bones_ Exp $

inherit flag-o-matic eutils cvs

### This package requires a Mac II/Classic ROM, A Mac OS Image
### Mac OS 7.5.3r2 is available freely from the Apple Homepage
### System ROMS can be retreived from a 'real' Mac, See info/man pages

DESCRIPTION="Basilisk II Macintosh Emulator"
HOMEPAGE="http://basilisk.cebix.net/"
#SRC_URI="mirror://gentoo/${P}.tar.bz2"
ECVS_SERVER="cvs.cebix.net/home/cvs/cebix"
ECVS_MODULE="BasiliskII"
ECVS_USER="anoncvs"
ECVS_PASS="anoncvs"

#$ cvs -d :pserver:anoncvs@cvs.cebix.net:/home/cvs/cebix login
#(password is "anoncvs")
#$ cvs -d :pserver:anoncvs@cvs.cebix.net:/home/cvs/cebix checkout BasiliskII


LICENSE="|| ( GPL-2 LGPL-2.1 )"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="dga esd gtk nls sdl jit"

### We'll set $S Manually, it's version dependant, and nested strangely.
S=${WORKDIR}/BasiliskII/src/Unix

### fbdev support in the stable release...  the cvs branch is broken, period!
### gtk and esd support are compile time options, we'll check the usual
### use variables here and set ./configure options accordingly

RDEPEND="esd? ( media-sound/esound )
   gtk? ( >=x11-libs/gtk+-2 gnome-base/libgnomeui )
   !sdl? ( dga? ( x11-libs/libXxf86dga ) )
   sdl? ( media-libs/libsdl )
   nls? ( virtual/libintl )
   x11-libs/libSM
   x11-libs/libXi
   x11-libs/libXxf86vm
   !app-emulation/basiliskII-jit"

DEPEND="${RDEPEND}
   !sdl? ( dga? ( x11-proto/xf86dgaproto ) )
   nls? ( sys-devel/gettext )
   x11-proto/xf86vidmodeproto
   x11-proto/xextproto
   x11-proto/xproto"

src_unpack() {
   cvs_src_unpack
   cd "${S}"
   
   #prevent prestripped binary
   sed -i -e '/^INSTALL_PROGRAM/s/-s//' Makefile.in

   if use sdl && use dga ; then
      elog "SDL support was requested, DGA will be disabled"
   fi
}

src_compile() {
   #fpu_x86 doesnt compile properly if -O3 or greater :(
   replace-flags -O[3-9] -O2
   strip-flags -mpowerpc-gfxopt

   local myflags

### Default ./configure options are all =yes by default. we'll check for
### and use -values and switch them accordingly

   use esd || myflags="${myflags} --with-esd=no"
   use gtk || myflags="${myflags} --with-gtk=no"
   use dga || myflags="${myflags} --enable-xf86-dga=no"
   use nls || myflags="${myflags} --disable-nls"
   use jit && myflags="${myflags} --enable-jit-compiler"
   use sdl && myflags="${myflags} \
      --enable-sdl-video=yes \
      --enable-sdl-audio=yes"

   NOCONFIGURE=blah ./autogen.sh \
      --host=${CHOST} \
      --prefix=/usr \
      --infodir=/usr/share/info \
      --mandir=/usr/share/man \
      ${myflags} || die "BasiliskII ./configure Failed"

   #hack to link against libstdc++ for gcc3.x compatibility
   sed -i -e 's:-o $(OBJ_DIR)/gencpu:-lstdc++ -o $(OBJ_DIR)/gencpu:' Makefile

   emake -j1 || die "BasiliskII Make Failed"
}

src_install() {
   make \
      prefix=${D}/usr \
      mandir=${D}/usr/share/man \
      infodir=${D}/usr/share/info \
      install || die "BasiliskII Make Install Failed"

### Networking is _disabled_ in this revision,  hopefully -r2 will
### resolve the permissions issue / linux src compilation problem
### that prevents it's inclusion

### Uncomment the following, and read the manual _carefully_ if you really
### need networking, this will create a sheep_net.o kernel module that
### provides (effectivly) an ethernet bridge between basliskII and the kernel

#   make modules
}
Back to top
View user's profile Send private message
jgpallack
n00b
n00b


Joined: 21 Nov 2007
Posts: 33

PostPosted: Sat Apr 05, 2008 5:12 am    Post subject: Reply with quote

Thank you, shanoah! This works.
Back to top
View user's profile Send private message
shanoah
n00b
n00b


Joined: 09 Apr 2007
Posts: 4

PostPosted: Sat Apr 05, 2008 8:46 am    Post subject: Reply with quote

No problem. You may want to keep this e-build around; the one in portage doesn't have an ebuild maintainer, and the non-jit version, anyways, has been masked as a dead application. (I stuck this ebuild on one of the bugs as an attachment, anyways...)

Admittedly, Basilisk II hasn't has a release since 2005, but the cvs is still being updated, and I think they are starting to approach a new release.

Oh, and if anyone wants to adopt this ebuild for use in an overlay, feel free; just let me know so I can add that overlay to my system... :)
Back to top
View user's profile Send private message
alexbuell
Guru
Guru


Joined: 18 Jul 2002
Posts: 490
Location: "Hemp"shire, UK

PostPosted: Wed Sep 22, 2010 7:32 am    Post subject: Reply with quote

shanoah wrote:
No problem. You may want to keep this e-build around; the one in portage doesn't have an ebuild maintainer, and the non-jit version, anyways, has been masked as a dead application. (I stuck this ebuild on one of the bugs as an attachment, anyways...)

Admittedly, Basilisk II hasn't has a release since 2005, but the cvs is still being updated, and I think they are starting to approach a new release.

Oh, and if anyone wants to adopt this ebuild for use in an overlay, feel free; just let me know so I can add that overlay to my system... :)


Have you got a more up to date ebuild of this? Thanks!
_________________
Cheers,
Alex.

Linux - the best text adventure game ever.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum