Technical support > Mac
Question re. compiling 2.3.1 for PPC/OSX 10.5
Mattn:
are you in your ufoai checkout directory? there should be a configure script
dp:
Aha. Yes, /Users/dp/ufoai contains a configure file (shown as a Unix Executable). Thank you.
I did a cd to that directory and typed "sudo ./configure --enable-universal". Several things I didn't expect happened: (1) It disabled uforadiant; (2) It couldn't find xvid.h or theora.h, even though I successfully did a "sudo port install XviD +universal libtheora +universal" last night; and (3) It couldn't find bfd.h, link.h, or CUnit/Basic.h.
Nonetheless, I continued on with Step 2 to see what would happen and typed "make" -- this yielded:
===> CC [game] src/game/g_actor.c
gcc-4.0: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
make: *** [debug-darwin-powerpc/game/game/g_actor.c.o] Error 1
These don't sound like errors related to the files that configure couldn't find.
Step 2 notes "If you are having trouble getting things to compile, be aware that most of the issues come from installing autoconfig/automake as universal." and recommends trying a different install in this case. I tried it, but got the same results.
I searched my drive for xvid.h and found copies in 2 locations: /opt/local/include and /opt/local/var/macports/software/XviD/1.2.2.0/opt/local/include. The first was installed last night and the second was installed back when I was trying the "Non-universal binaries" procedure.
I also found 2 copies of theora.h in "theora" folders, in the same directories.
I found bfd.h in /Users/dp/ufoai/src/shared.
There's a link.h file in /Developers/SDKs/MacOSX10.5.sdk/usr/include/wx-2.8/wx, dated Sept 26 2005.
There's also a basic.h file in an "ogl" folder in the same directory, with the same date. I'd bet these link.h and basic.h files aren't the ones I need.
Evidently, I need to: (1) Find and install the correct link.h and basic.h files in the correct directories; and (2) Either move the other files to the directories configure expects to find them in (and I don't know where it's looking) or edit the configure file.
I used XCode to look at the configure file and, toward the end, found:
PKGDATADIR=${PKGDATADIR:-${PREFIX}/games/ufoai}
PKGBINDIR=${PKGBINDIR:-${PREFIX}/bin}
PKGLIBDIR=${PKGLIBDIR:-${PREFIX}/lib}
This may be what needs editing, but I'm unsure what the edits should be. I'm also unsure how to fix the errors produced by the options and flags in the makefile.
dp:
I returned to this effort recently after studying a bit about UNIX and MacPorts.
1. Ran “sudo port -u upgrade outdated” to get any updated files and delete old ones.
2. Got a fresh copy of the ufoai source.
3. Added paths to the files that were reported as missing in my last attempt to my environment. The path environment shown by “set” is: /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:$/opt/local/include:/Users/dp/ufoai/src/shared:/Developers/SDKs/MacOSX105.sdk/user/include
4. Ran “sudo ./configure --enable-universal” again.
I got the same errors as before. The messages that puzzle me are:
Setting custom data directory
Setting custom library directory
Could not find xvid.h
Could not find theora/theora.h
Found execinfo.h
Could not find bfd.h
Found sys/utsname.h
Could not find link.h
Could not find CUnit/Basic.h
5. I don’t understand why the configure script is setting custom data and library directories. It appears to me that the script should do this only if I specify custom directories in the command line.
6. Apparently, the script is looking for xvid.h, theora.h, bfd.h, and link.h in specific directories and they aren’t there, since adding paths to the ones I found previously didn’t help. Wish I knew where the script expects to find them -- I don’t understand the script well enough to determine this.
Mattn:
Try to export yourCFLAGS and LDFLAGS to your macport dirs.
I wil write more about this once i have a real keyboard under my fingers.
dp:
I added /opt/local/var/macports to my PATH environmental variable (I think this is what you were suggesting), but got the same messages from the configure script as before.
Something I noticed that may be relevant: The macports path contains files named cflags.diff, patch-CFLAGS.diff, and no-AM_CFLAGS.diff. It also contains patch-fix-apr_apu-ldflags.diff and patch-build-generic-platform.inc.in-LDFLAGS.diff, but not an ldflags.diff. It seems odd to me that there would be patches for ldflags when there apparently is no ldflags.diff file present.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version