dMZX Forums: Megazeux SVN on FreeBSD (r1068) - dMZX Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Megazeux SVN on FreeBSD (r1068) Some fixes needed to make it compile.

#1 User is offline   iamgreaser 

  • cats.py
  • PipPip
  • Group: Members
  • Posts: 141
  • Joined: 24-March 08
  • Gender:Male
  • Location:Not Australia

Posted 10 December 2008 - 01:15 AM

OK, here's a couple of fixes needed to compile MegaZeux under FreeBSD.

1. config.sh
elif [ "$PLATFORM" = "unix" -o "$PLATFORM" = "unix-devel" ]; then
	OS="`uname -o`"
	MACH="`uname -m`"
	if [ "$OS" = "" ]; then
		OS="`uname -s`"
	fi

	if [ "$OS" = "GNU/Linux" -o "$OS" = "FreeBSD" ]; then
		if [ "$MACH" = "x86_64" ]; then
			echo "#define PLATFORM \"linux-amd64\"" > src/config.h
			LIBDIR=lib64
			if [ "$MODULAR" = "true" ]; then
				echo "ARCH_CFLAGS+=-fPIC" >> platform.inc
				echo "ARCH_CXXFLAGS+=-fPIC" >> platform.inc
			fi
		elif [ "`echo $MACH | sed 's,i.86,x86,'`" = "x86" ]; then
			echo "#define PLATFORM \"linux-i386\"" > src/config.h
			LIBDIR=lib
		else
			echo "Add a friendly Linux ARCH name to config.sh."
			exit 1
		fi
	else
		echo "Unknown UNIX, config.sh needs updating."
		exit 1
	fi

	echo "PLATFORM=unix" >> platform.inc


2. src/network/host.c
This requires another #include:
#include <netinet/in.h>

Oh yeah, for some weird reason, megazeux segfails if you attempt to run the main "megazeux" file when installed; "mzxrun" must be called.
blah blah raycasters blah blah blah

<Stephen> are you dozing
<gm|lap> totally
<Stephen> good
<Stephen> i will bury you
0

#2 User is offline   mzxgiant 

  • DigitalMZX Server Ninja & Code Monkey
  • Group: DigiStaff
  • Posts: 1,127
  • Joined: 02-January 01
  • Gender:Male
  • Location:Rochester, NY

Posted 10 December 2008 - 01:47 AM

Can you stick the segfault error into the bug tracker? It's accessible from the upper right of the site.
0

#3 User is offline   ajs 

  • carpe diem
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,614
  • Joined: 21-October 00
  • Gender:Male
  • Location:United Kingdom

Posted 10 December 2008 - 10:43 AM

The fixes were wrong, but I've committed alternatives to SVN. Please see if you have any build issues as of r1070.

As for debugging the crash, install GDB and do a --disable-release build of MegaZeux (the default) and run it inside GDB:
gdb megazeux
r

When it starts up, it should crash as you described (probably in the updater code, that's least tested). Type "bt full" and paste the contents either here or, as MZXGiant said, on the bug tracker.

--ajs.
0

#4 User is offline   ajs 

  • carpe diem
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,614
  • Joined: 21-October 00
  • Gender:Male
  • Location:United Kingdom

Posted 10 December 2008 - 03:03 PM

I couldn't reproduce the crash, fwiw here's a screenshot of the "megazeux" binary loaded:

http://mzx.devzero.c...ebsd-7.1-rc.png

--ajs.
0

#5 User is offline   iamgreaser 

  • cats.py
  • PipPip
  • Group: Members
  • Posts: 141
  • Joined: 24-March 08
  • Gender:Male
  • Location:Not Australia

Posted 11 December 2008 - 08:52 AM

I have renamed "megazeux" to "mzxsvn" before copying to /usr/local/bin.

The crash, I believe, is due to it not linking to libnetwork.so, which would explain why doing mzxsvn outside of the original directory doesn't give me the editor. It is still there.

It appears to work fine if I punch the *exact* path to mzxsvn, rather than just leaving it up to the shell to decide. Due to this, I cannot replicate the crash in qdb. But with a core dump...

(gdb) bt full 5
#0  0x00000000 in ?? ()
No symbol table info available.
#1  0x280b769f in update_screen () at src/graphics.c:576
		ticks = Variable "ticks" is not available.

(gdb) bt
#0  0x00000000 in ?? ()
#1  0x280b769f in update_screen () at src/graphics.c:576
#2  0x280a8d84 in error (
	string=0x804b858 "Failed to change into install directory.",
	type=1 '\001', options=8 '\b', code=0) at src/error.c:111
#3  0x0804a017 in swivel_current_dir () at src/updater.c:238
#4  0x0804a0fa in updater_init (argv=0xbfbfec68) at src/updater.c:777
#5  0x08049ba8 in main (argc=1, argv=0xbfbfec68) at src/main.c:130

blah blah raycasters blah blah blah

<Stephen> are you dozing
<gm|lap> totally
<Stephen> good
<Stephen> i will bury you
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users