Is there a way to run/compile residual on ppc Mac G4?

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Jon God
Posts: 34
Joined: Sat Oct 27, 2007 9:13 pm

Post by Jon God »

somaen wrote:How new is your source? try

Code: Select all

git pull origin master
to check that you're updated.
Did that:

Code: Select all

remote: Counting objects: 33, done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 23 (delta 19), reused 4 (delta 0)
Unpacking objects: 100% (23/23), done.
From git://github.com/residualvm/residualvm
 * branch            master     -> FETCH_HEAD
Updating 4340d66..4fb9bfc
Fast-forward
 engines/grim/actor.cpp   |   18 +-----------------
 engines/grim/costume.cpp |   10 ++++++++++
 engines/grim/costume.h   |    2 +-
 engines/grim/grim.cpp    |    1 +
 engines/grim/lua_v1.cpp  |    2 +-
 engines/grim/scene.cpp   |    4 ++++
 engines/grim/scene.h     |    1 +
 7 files changed, 19 insertions(+), 19 deletions(-)
Then tried another build:

Code: Select all

    C++      engines/grim/imuse/imuse.o
    C++      engines/grim/imuse/imuse_mcmp_mgr.o
    C++      engines/grim/imuse/imuse_music.o
    C++      engines/grim/imuse/imuse_script.o
    C++      engines/grim/imuse/imuse_sndmgr.o
    C++      engines/grim/imuse/imuse_track.o
    C++      engines/grim/lua/liolib.o
    C++      engines/grim/lua/lrestore.o
    C++      engines/grim/lua/lsave.o
    C++      engines/grim/lua/lstate.o
    C++      engines/grim/movie/bink.o
In file included from /usr/include/sys/time.h:235,
                 from /usr/include/sys/select.h:148,
                 from /usr/include/unistd.h:483,
                 from /usr/include/zconf.h:289,
                 from /usr/include/zlib.h:34,
                 from ./engines/grim/movie/movie.h:26,
                 from ./engines/grim/movie/bink.h:34,
                 from engines/grim/movie/bink.cpp:41:
/usr/include/time.h:127:19: error: macro "clock" passed 1 arguments, but takes just 0
/usr/include/time.h:126: error: expected initializer before 'SYMBOL'
/usr/include/time.h:128: error: expected initializer before 'SYMBOL'
/usr/include/time.h:129: error: expected initializer before 'SYMBOL'
/usr/include/time.h:130: error: expected initializer before 'SYMBOL'
/usr/include/time.h:131: error: expected initializer before 'SYMBOL'
/usr/include/time.h:132: error: expected initializer before 'SYMBOL'
/usr/include/time.h:133: error: expected initializer before 'SYMBOL'
/usr/include/time.h:136: error: expected initializer before 'SYMBOL'
make: *** [engines/grim/movie/bink.o] Error 1
User avatar
somaen
ScummVM Developer
Posts: 372
Joined: Thu Apr 21, 2011 7:31 pm
Location: Trondheim, NO

Post by somaen »

Oh wait, 10.4 that's gonna be a bit more tricky. I don't even have a machine to test that against. (Nor do I know if it will even be supported at any point).

I _do_ have a PPC-mac capable of running 10.4, but it's a real hassle to downgrade it.

It seems the zlib-version that came with that machine is rather old though, try to see if you can get a newer one from macports.
User avatar
joostp
ScummVM Developer
Posts: 490
Joined: Wed Sep 21, 2005 3:55 pm

Post by joostp »

Try adding

Code: Select all

FORBIDDEN_SYMBOL_EXCEPTION_clock
to the top of engines/grim/movie/bink.cpp
Jon God
Posts: 34
Joined: Sat Oct 27, 2007 9:13 pm

Post by Jon God »

joostp wrote:Try adding

Code: Select all

FORBIDDEN_SYMBOL_EXCEPTION_clock
to the top of engines/grim/movie/bink.cpp

Code: Select all

    C++      engines/grim/movie/bink.o
In file included from /usr/include/sys/time.h:235,
                 from /usr/include/sys/select.h:148,
                 from /usr/include/unistd.h:483,
                 from /usr/include/zconf.h:289,
                 from /usr/include/zlib.h:34,
                 from ./engines/grim/movie/movie.h:26,
                 from ./engines/grim/movie/bink.h:34,
                 from engines/grim/movie/bink.cpp:43:
/usr/include/time.h:127:19: error: macro "clock" passed 1 arguments, but takes just 0
/usr/include/ppc/_types.h:31: error: expected constructor, destructor, or type conversion before 'typedef'
/usr/include/time.h:126: error: expected initializer before 'SYMBOL'
/usr/include/time.h:128: error: expected initializer before 'SYMBOL'
/usr/include/time.h:129: error: expected initializer before 'SYMBOL'
/usr/include/time.h:130: error: expected initializer before 'SYMBOL'
/usr/include/time.h:131: error: expected initializer before 'SYMBOL'
/usr/include/time.h:132: error: expected initializer before 'SYMBOL'
/usr/include/time.h:133: error: expected initializer before 'SYMBOL'
/usr/include/time.h:136: error: expected initializer before 'SYMBOL'
make: *** [engines/grim/movie/bink.o] Error 1
That's the result I got.
User avatar
joostp
ScummVM Developer
Posts: 490
Joined: Wed Sep 21, 2005 3:55 pm

Post by joostp »

Oh, right.

Try: FORBIDDEN_SYMBOL_EXCEPTION_time_h (or: FORBIDDEN_SYMBOL_ALLOW_ALL ).
Jon God
Posts: 34
Joined: Sat Oct 27, 2007 9:13 pm

Post by Jon God »

After hectic life, I am going to give this a shot again.

Looking back at my bink.ccp, it looks like this:

Code: Select all

FORBIDDEN_SYMBOL_ALLOW_ALL

/* ResidualVM - A 3D game interpreter
 *
 * ResidualVM is the legal property of its developers, whose names
 * are too numerous to list here. Please refer to the COPYRIGHT
 * file distributed with this source distribution.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.

 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.

 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 *
 */

#define FORBIDDEN_SYMBOL_EXCEPTION_printf
#define FORBIDDEN_SYMBOL_EXCEPTION_chdir
#define FORBIDDEN_SYMBOL_EXCEPTION_getcwd
#define FORBIDDEN_SYMBOL_EXCEPTION_getwd
#define FORBIDDEN_SYMBOL_EXCEPTION_mkdir
#define FORBIDDEN_SYMBOL_EXCEPTION_unlink
#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
#define FORBIDDEN_SYMBOL_ALLOW_ALL

#include "common/endian.h"
#include "common/timer.h"
#include "common/file.h"
#include "common/events.h"
#include "common/system.h"
#include "common/textconsole.h"

#include "audio/audiostream.h"
#include "audio/mixer.h"
#include "audio/decoders/raw.h"

#include "engines/grim/movie/bink.h"

#include "engines/grim/grim.h"
#include "engines/grim/colormap.h"

#define MWIDTH 640
#define MHEIGHT 400
Ect ect, but that's the beginning.


My terminal window says:

Code: Select all

    C++      engines/grim/movie/bink.o
/usr/include/ppc/_types.h:31: error: expected constructor, destructor, or type conversion before 'typedef'
make: *** [engines/grim/movie/bink.o] Error 1
Keep in mind, I haven't touched this since I last tried, so if there are some major changes or something...

Anyways, tell me if I am completely off base, I dunno if I tried some other things before stopping last time, I might have...
User avatar
somaen
ScummVM Developer
Posts: 372
Joined: Thu Apr 21, 2011 7:31 pm
Location: Trondheim, NO

Post by somaen »

If the Bink-stuff is giving you problems, don't worry, it isn't used in Grim Fandango at all, only Escape From Monkey Island. (Thus, you can liberally comment out, and remove all includes of the Bink-stuff, if you want, without any repercussions).

However, did you do a "git pull origin master" recently?
Jon God
Posts: 34
Joined: Sat Oct 27, 2007 9:13 pm

Post by Jon God »

somaen wrote:If the Bink-stuff is giving you problems, don't worry, it isn't used in Grim Fandango at all, only Escape From Monkey Island. (Thus, you can liberally comment out, and remove all includes of the Bink-stuff, if you want, without any repercussions).

However, did you do a "git pull origin master" recently?
I just tried a second ago, and got

Code: Select all

From git://github.com/residualvm/residualvm
 * branch            master     -> FETCH_HEAD
Updating 4fb9bfc..f2683ec
error: Your local changes to the following files would be overwritten by merge:
        engines/grim/movie/bink.cpp
Please, commit your changes or stash them before you can merge.
Aborting

As for commenting them out, I am super rusty. How do I know where it's referenced from, to comment it out?
User avatar
somaen
ScummVM Developer
Posts: 372
Joined: Thu Apr 21, 2011 7:31 pm
Location: Trondheim, NO

Post by somaen »

Well, that error, can be fixed by putting aside the changes youve done to the working copy, by typing "git stash", before any "git pull"s.

Commenting out SHOULDN'T really be necessary, but I guess you could pretty much remove the entire contents of the bink.cpp and bink.h files, then comment out the contents (not the function definition, just the stuff between the { } ) of the CreateBinkPlayer-function in movie.cpp, that should make for a bink-less residual.
Jon God
Posts: 34
Joined: Sat Oct 27, 2007 9:13 pm

Post by Jon God »

somaen wrote:Well, that error, can be fixed by putting aside the changes youve done to the working copy, by typing "git stash", before any "git pull"s.

Commenting out SHOULDN'T really be necessary, but I guess you could pretty much remove the entire contents of the bink.cpp and bink.h files, then comment out the contents (not the function definition, just the stuff between the { } ) of the CreateBinkPlayer-function in movie.cpp, that should make for a bink-less residual.
I tried, what I think I understand and got this:

Code: Select all

    C++      engines/grim/movie/bink.o
    C++      engines/grim/movie/mpeg.o
In file included from /usr/include/sys/time.h:235,
                 from /usr/include/sys/select.h:148,
                 from /usr/include/unistd.h:483,
                 from /usr/include/zconf.h:289,
                 from /usr/include/zlib.h:34,
                 from ./engines/grim/movie/movie.h:26,
                 from ./engines/grim/movie/mpeg.h:36,
                 from engines/grim/movie/mpeg.cpp:41:
/usr/include/time.h:127:19: error: macro "clock" passed 1 arguments, but takes just 0
/usr/include/time.h:126: error: expected initializer before 'SYMBOL'
/usr/include/time.h:128: error: expected initializer before 'SYMBOL'
/usr/include/time.h:129: error: expected initializer before 'SYMBOL'
/usr/include/time.h:130: error: expected initializer before 'SYMBOL'
/usr/include/time.h:131: error: expected initializer before 'SYMBOL'
/usr/include/time.h:132: error: expected initializer before 'SYMBOL'
/usr/include/time.h:133: error: expected initializer before 'SYMBOL'
/usr/include/time.h:136: error: expected initializer before 'SYMBOL'
engines/grim/movie/mpeg.cpp: In static member function 'static void Grim::MpegPlayer::timerCallback(void*)':
engines/grim/movie/mpeg.cpp:69: error: 'g_movie' was not declared in this scope
engines/grim/movie/mpeg.cpp: In constructor 'Grim::MpegPlayer::MpegPlayer()':
engines/grim/movie/mpeg.cpp:73: error: 'g_movie' was not declared in this scope
make: *** [engines/grim/movie/mpeg.o] Error 1
Post Reply