Technical support > Mac

Question re. compiling 2.3.1 for PPC/OSX 10.5

(1/4) > >>

dp:
Step 2 of the instructions under "None universal binaries" at ufoai.ninex.info/wiki/index.php/Compile_for_Mac say "Edit the SDL_config.h in both the ppc and i386 directory."

But I find only one copy of SDL_config.h on my system. It's in /opt/local/var/macports/build/_opt_local_var_macports_sources etc./work/SDL-1.2.14/include. There are numerous ppc and i386 folders on my system, but none seem to be associated with SDL. The config file does seem to contain the BYTEORDER code that needs to be commented out, though. Is this just an error in the directions?

dp:
1. Having received no reply to my original question, I decided to forge ahead and see what happens. I commented out the BYTEORDER code in the config file, changed to the directory specified in Step 2, and typed "sudo port install libsdl-framework" into Terminal, as instructed. After a few seconds, I got a series of messages:

--->  Computing dependencies for libsdl-framework
--->  Dependencies to be installed: libsdl
Error: Requested variants "" do not match original selection "+universal".
Please use the same variants again, perform 'port clean libsdl' or specify the force option (-f).
Error: Failed to install libsdl
Log for libsdl is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_libsdl/main.log
Error: The following dependencies were not installed: libsdl
Error: Status 1 encountered during processing.

I was uncertain what to do, so I followed one of the message’s suggestions and typed "sudo port clean libsdl" into Terminal. It executed without error, so I tried the install again. This time, it completed ok and I was then able to finish Step 2.

2. Step 3 doesn't say what directory to be in but doesn't mention a need to change directories. So, I typed the specified command without changing and it seemed to execute ok until it tried to build p7zip. That yielded:

--->  Building p7zip
Error: Target org.macports.build returned: shell command failed (see log for details)
Log for p7zip is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_p7zip/main.log
Error: Status 1 encountered during processing.

When I checked the log, everything looked ok (except for a few warnings that some integer constants are too large for 'long' type) up until:

:info:build /var/tmp//ccJ51jOR.s:1442:Invalid mnemonic 's4w'
:info:build make[1]: *** [Main.o] Error 1
:info:build make: *** [sfx] Error 2
:info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_p7zip/work/p7zip_9.13" && /usr/bin/make all3 " returned error 2
:error:build Target org.macports.build returned: shell command failed (see log for details)
:debug:build Backtrace: shell command failed (see log for details)
    while executing
"command_exec build"
    (procedure "portbuild::build_main" line 8 )
    invoked from within
"$procedure $targetname"
:info:build Warning: the following items did not execute (for p7zip): org.macports.activate org.macports.build org.macports.destroot org.macports.install
:notice:build Log for p7zip is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_archivers_p7zip/main.log

I have no idea how to correct this problem -- suggestions welcome.

dp:
1. I suspect the “None universal binaries” procedure (which I assume should read “Non-universal”) yields an Intel-only executable, rather than PPC-only, as I first thought. That might explain the warnings about overly large integer constants in the log, which I mentioned previously, since my G4 is 32-bit, and the absence of two SDL_config.h files on my system. So I decided to try the “Universal binaries” approach.

2. I followed the procedure at http://ufoai.ninex.info/wiki/index.php/Getting_the_source#Mac_OS_X to get the source.

3. Followed instructions at http://guide.macports.org/#using.port.selfupdate to run MacPorts’ selfupdate command (sudo port selfupdate) and upgrade outdated files (sudo port upgrade outdated).

4. Followed http://ufoai.ninex.info/wiki/index.php/Compile_for_Mac to install some libraries.

5. I could not perform Step 1.5 on that page because the link it gives (http://gtk-osx.org/) points to an Asian-language site that has nothing to do with Gtk2 or Glib2. I tried searching for another source and found http://sourceforge.net/apps/trac/gtk-osx/wiki/Build#Prerequisites. Unfortunately, the prerequisites indicate the procedure for installation is incompatible with a system that has MacPorts installed.

So, once again, I’m stymied. Help would be appreciated.

Mattn:
gtk is not needed for the game - only for uforadiant - disable uforadiant via configure and you don't need gtk

dp:

--- Quote --- gtk is not needed for the game - only for uforadiant
--- End quote ---
and, by inference, Glib2 isn't needed either because it's used only by Gtk2, apparently. Thanks.


--- Quote ---disable uforadiant via configure and you don't need gtk
--- End quote ---
I haven't done a make for uforadiant, so I assume this step is unnecessary (maybe impossible, because there should be nothing to disable)?

I forged ahead with Step 2, which calls first for running "selfupdate" and "upgrade outdated" again. The selfupdate proved to be superfluous, but the upgrade produced an error when it tried to update perl5:

--->  Installing perl5 @5.12.3_0+perl5_12
--->  Deactivating perl5 @5.8.9_0
--->  Cleaning perl5
--->  Activating perl5 @5.12.3_0+perl5_12
Error: Target org.macports.activate returned: Image error: /opt/local/bin/a2p is being used by the active perl5.8 port.  Please deactivate this port first, or use 'port -f activate perl5' to force the activation.

It then proceeded to do an "install perl5.8 @5.8.9_4+universal" and completed normally. I'm perplexed as to (1) why the upgrade would install an outdated version of perl5 after it had already installed 5.12.3_0; and (2) why it specified +universal for the 5.8.9_4 install, but not for 5.12.3_0. I hope (2) doesn't prove to be an error.

Anyway, I typed "sudo port activate perl5 @5.12.3_0+perl5_12" into Terminal and it seemed to work, even though I forgot to use the -f flag:

--->  Computing dependencies for perl5
--->  Activating perl5 @5.12.3_0+perl5_12
--->  Cleaning perl5

Next, I typed "sudo port install libsdl_image +universal" etc., as instructed in Step 2, but omitted gtkglext and gtksourceview2 because I infer they're unnecessary if one doesn't need uforadiant. This command seemed to work fine.

Step 2 says next to type "./configure --enable-universal" into Terminal, but this yielded "-bash: ./configure: No such file or directory". I also tried "sudo ./configure --enable-universal", but that yielded "sudo: ./configure: command not found".

I searched for info about ./configure -- the best source I found was at http://linux.about.com/od/ubupck_doc/a/ubupg06t03.htm. It says configure should run a script that generates a Makefile. Apparently, I'm making a syntax error and/or need to cd to somewhere -- regardless, I need help again.


Navigation

[0] Message Index

[#] Next page

Go to full version