The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
October 20, 2020, 10:37:35 am
Home Help Search Login Register
News: Paul & Fred have reached a settlement with Stardock!

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  Technical Issues (Moderator: Death 999)
| | |-+  Building an OS X Bundled App
« previous next »
Pages: 1 [2] Print
Author Topic: Building an OS X Bundled App  (Read 8588 times)
Death 999
Global Moderator
Enlightened
*****
Offline Offline

Gender: Male
Posts: 3848


We did. You did. Yes we can. No.


View Profile
Re: Building an OS X Bundled App
« Reply #15 on: May 14, 2008, 01:00:16 am »

Here's the config log.

Code:
gcc -c -arch ppc -arch i386 /tmp/build.1184.tmp.c -o /tmp/build.1184.tmp.c.o
gcc -arch ppc -arch i386 /tmp/build.1184.tmp.c.o -o /tmp/build.1184.tmp.out

gcc -c -arch ppc -arch i386 /tmp/build.1184.tmp.c -o /tmp/build.1184.tmp.c.o
gcc -arch ppc -arch i386 -framework SDL -framework Cocoa -lobjc /tmp/build.1184.tmp.c.o -o /tmp/build.1184.tmp.out
ld: warning in /Library/Frameworks//SDL.framework/SDL, file is not of required architecture

gcc -c -arch ppc -arch i386 /tmp/build.1184.tmp.c -o /tmp/build.1184.tmp.c.o
gcc -arch ppc -arch i386 -framework SDL -framework Cocoa -lobjc -framework SDL_image /tmp/build.1184.tmp.c.o -o /tmp/build.1184.tmp.out
ld: warning in /Library/Frameworks//SDL.framework/SDL, file is not of required architecture
ld: warning in /Library/Frameworks//SDL_image.framework/SDL_image, file is not of required architecture

gcc -c -arch ppc -arch i386 /tmp/build.1184.tmp.c -o /tmp/build.1184.tmp.c.o
gcc -arch ppc -arch i386 -framework SDL -framework Cocoa -lobjc -framework SDL_image /tmp/build.1184.tmp.c.o -o /tmp/build.1184.tmp.out
ld: warning in /Library/Frameworks//SDL.framework/SDL, file is not of required architecture
ld: warning in /Library/Frameworks//SDL_image.framework/SDL_image, file is not of required architecture

gcc -c -arch ppc -arch i386 /tmp/build.1184.tmp.c -o /tmp/build.1184.tmp.c.o
gcc -arch ppc -arch i386 -framework SDL -framework Cocoa -lobjc -framework SDL_image /tmp/build.1184.tmp.c.o -o /tmp/build.1184.tmp.out
ld: warning in /Library/Frameworks//SDL.framework/SDL, file is not of required architecture
ld: warning in /Library/Frameworks//SDL_image.framework/SDL_image, file is not of required architecture

gcc -c -arch ppc -arch i386 /tmp/build.1184.tmp.c -o /tmp/build.1184.tmp.c.o
/tmp/build.1184.tmp.c: In function é─˛mainé─˘:
/tmp/build.1184.tmp.c:5: error: é─˛strupré─˘ undeclared (first use in this function)
/tmp/build.1184.tmp.c:5: error: (Each undeclared identifier is reported only once
/tmp/build.1184.tmp.c:5: error: for each function it appears in.)
/tmp/build.1184.tmp.c: In function é─˛mainé─˘:
/tmp/build.1184.tmp.c:5: error: é─˛strupré─˘ undeclared (first use in this function)
/tmp/build.1184.tmp.c:5: error: (Each undeclared identifier is reported only once
/tmp/build.1184.tmp.c:5: error: for each function it appears in.)
lipo: can't figure out the architecture type of: /var/folders/MJ/MJvjeLdrGW4ooJhSVYS5bU+++TI/-Tmp-//cczH1NYN.out
Failed program was:
+++ START /tmp/build.1184.tmp.c
#include <sys/types.h>
#include <string.h>

int main(void) {
(void) strupr;
return 0;
}
+++ END /tmp/build.1184.tmp.c

gcc -c -arch ppc -arch i386 /tmp/build.1184.tmp.c -o /tmp/build.1184.tmp.c.o
/tmp/build.1184.tmp.c: In function é─˛mainé─˘:
/tmp/build.1184.tmp.c:5: error: é─˛stricmpé─˘ undeclared (first use in this function)
/tmp/build.1184.tmp.c:5: error: (Each undeclared identifier is reported only once
/tmp/build.1184.tmp.c:5: error: for each function it appears in.)
/tmp/build.1184.tmp.c: In function é─˛mainé─˘:
/tmp/build.1184.tmp.c:5: error: é─˛stricmpé─˘ undeclared (first use in this function)
/tmp/build.1184.tmp.c:5: error: (Each undeclared identifier is reported only once
/tmp/build.1184.tmp.c:5: error: for each function it appears in.)
lipo: can't figure out the architecture type of: /var/folders/MJ/MJvjeLdrGW4ooJhSVYS5bU+++TI/-Tmp-//ccMEnmuN.out
Failed program was:
+++ START /tmp/build.1184.tmp.c
#include <sys/types.h>
#include <string.h>

int main(void) {
(void) stricmp;
return 0;
}
+++ END /tmp/build.1184.tmp.c

gcc -c -arch ppc -arch i386 /tmp/build.1184.tmp.c -o /tmp/build.1184.tmp.c.o
gcc -arch ppc -arch i386 -framework SDL -framework Cocoa -lobjc -framework SDL_image /tmp/build.1184.tmp.c.o -o /tmp/build.1184.tmp.out
ld: warning in /Library/Frameworks//SDL.framework/SDL, file is not of required architecture
ld: warning in /Library/Frameworks//SDL_image.framework/SDL_image, file is not of required architecture

gcc -c -arch ppc -arch i386 /tmp/build.1184.tmp.c -o /tmp/build.1184.tmp.c.o
gcc -arch ppc -arch i386 -framework SDL -framework Cocoa -lobjc -framework SDL_image /tmp/build.1184.tmp.c.o -o /tmp/build.1184.tmp.out
ld: warning in /Library/Frameworks//SDL.framework/SDL, file is not of required architecture
ld: warning in /Library/Frameworks//SDL_image.framework/SDL_image, file is not of required architecture

gcc -c -arch ppc -arch i386 /tmp/build.1184.tmp.c -o /tmp/build.1184.tmp.c.o
gcc -arch ppc -arch i386 -framework SDL -framework Cocoa -lobjc -framework SDL_image /tmp/build.1184.tmp.c.o -o /tmp/build.1184.tmp.out
ld: warning in /Library/Frameworks//SDL.framework/SDL, file is not of required architecture
ld: warning in /Library/Frameworks//SDL_image.framework/SDL_image, file is not of required architecture

gcc -c -arch ppc -arch i386 /tmp/build.1184.tmp.c -o /tmp/build.1184.tmp.c.o
gcc -arch ppc -arch i386 -framework SDL -framework Cocoa -lobjc -framework SDL_image /tmp/build.1184.tmp.c.o -o /tmp/build.1184.tmp.out
ld: warning in /Library/Frameworks//SDL.framework/SDL, file is not of required architecture
ld: warning in /Library/Frameworks//SDL_image.framework/SDL_image, file is not of required architecture

gcc -c -arch ppc -arch i386 /tmp/build.1184.tmp.c -o /tmp/build.1184.tmp.c.o
gcc -arch ppc -arch i386 -framework SDL -framework Cocoa -lobjc -framework SDL_image /tmp/build.1184.tmp.c.o -o /tmp/build.1184.tmp.out
ld: warning in /Library/Frameworks//SDL.framework/SDL, file is not of required architecture
ld: warning in /Library/Frameworks//SDL_image.framework/SDL_image, file is not of required architecture

gcc -c -arch ppc -arch i386 /tmp/build.1184.tmp.c -o /tmp/build.1184.tmp.c.o
/tmp/build.1184.tmp.c:3:3: error: #error
/tmp/build.1184.tmp.c:3:3: error: #error
lipo: can't figure out the architecture type of: /var/folders/MJ/MJvjeLdrGW4ooJhSVYS5bU+++TI/-Tmp-//ccElgHPZ.out
Failed program was:
+++ START /tmp/build.1184.tmp.c

#ifndef WIN32
# error
#endif
int main() {
return 0;
}
+++ END /tmp/build.1184.tmp.c

gcc -c -arch ppc -arch i386 /tmp/build.1184.tmp.c -o /tmp/build.1184.tmp.c.o
/tmp/build.1184.tmp.c:3:3: error: #error
/tmp/build.1184.tmp.c:3:3: error: #error
lipo: can't figure out the architecture type of: /var/folders/MJ/MJvjeLdrGW4ooJhSVYS5bU+++TI/-Tmp-//ccaWSVr3.out
Failed program was:
+++ START /tmp/build.1184.tmp.c

#ifndef __MINGW32__
# error
#endif
int main() {
return 0;
}
+++ END /tmp/build.1184.tmp.c

gcc -c -arch ppc -arch i386 /tmp/build.1184.tmp.c -o /tmp/build.1184.tmp.c.o
gcc -arch ppc -arch i386 -framework SDL -framework Cocoa -lobjc -framework SDL_image -framework OpenGL /tmp/build.1184.tmp.c.o -o /tmp/build.1184.tmp.out
ld: warning in /Library/Frameworks//SDL.framework/SDL, file is not of required architecture
ld: warning in /Library/Frameworks//SDL_image.framework/SDL_image, file is not of required architecture

gcc -c -arch ppc -arch i386 -I/opt/local/include /tmp/build.1184.tmp.c -o /tmp/build.1184.tmp.c.o
gcc -arch ppc -arch i386 -framework SDL -framework Cocoa -lobjc -framework SDL_image -L/opt/local/lib -lmikmod -framework CoreAudio /tmp/build.1184.tmp.c.o -o /tmp/build.1184.tmp.out
ld: warning in /Library/Frameworks//SDL.framework/SDL, file is not of required architecture
ld: warning in /Library/Frameworks//SDL_image.framework/SDL_image, file is not of required architecture
ld: warning in /opt/local/lib/libmikmod.dylib, file is not of required architecture

gcc -c -arch ppc -arch i386 -I/opt/local/include /tmp/build.1184.tmp.c -o /tmp/build.1184.tmp.c.o
gcc -arch ppc -arch i386 -framework SDL -framework Cocoa -lobjc -framework SDL_image -L/opt/local/lib -lvorbisfile -lvorbis -lm -logg /tmp/build.1184.tmp.c.o -o /tmp/build.1184.tmp.out
ld: warning in /Library/Frameworks//SDL.framework/SDL, file is not of required architecture
ld: warning in /Library/Frameworks//SDL_image.framework/SDL_image, file is not of required architecture
ld: warning in /opt/local/lib/libvorbisfile.dylib, file is not of required architecture
ld: warning in /opt/local/lib/libvorbis.dylib, file is not of required architecture
ld: warning in /opt/local/lib/libogg.dylib, file is not of required architecture

gcc -c -arch ppc -arch i386 /tmp/build.1184.tmp.c -o /tmp/build.1184.tmp.c.o
gcc -arch ppc -arch i386 -framework SDL -framework Cocoa -lobjc -framework SDL_image -lz /tmp/build.1184.tmp.c.o -o /tmp/build.1184.tmp.out
ld: warning in /Library/Frameworks//SDL.framework/SDL, file is not of required architecture
ld: warning in /Library/Frameworks//SDL_image.framework/SDL_image, file is not of required architecture

gcc -c -arch ppc -arch i386 /tmp/build.5782.tmp.c -o /tmp/build.5782.tmp.c.o
gcc -arch ppc -arch i386 /tmp/build.5782.tmp.c.o -o /tmp/build.5782.tmp.out

gcc -c -arch ppc -arch i386 /tmp/build.5782.tmp.c -o /tmp/build.5782.tmp.c.o
gcc -arch ppc -arch i386 -framework SDL -framework Cocoa -lobjc /tmp/build.5782.tmp.c.o -o /tmp/build.5782.tmp.out
ld: warning in /Library/Frameworks//SDL.framework/SDL, file is not of required architecture

gcc -c -arch ppc -arch i386 /tmp/build.5782.tmp.c -o /tmp/build.5782.tmp.c.o
gcc -arch ppc -arch i386 -framework SDL -framework Cocoa -lobjc -framework SDL_image /tmp/build.5782.tmp.c.o -o /tmp/build.5782.tmp.out
ld: warning in /Library/Frameworks//SDL.framework/SDL, file is not of required architecture
ld: warning in /Library/Frameworks//SDL_image.framework/SDL_image, file is not of required architecture

gcc -c -arch ppc -arch i386 /tmp/build.5782.tmp.c -o /tmp/build.5782.tmp.c.o
gcc -arch ppc -arch i386 -framework SDL -framework Cocoa -lobjc -framework SDL_image /tmp/build.5782.tmp.c.o -o /tmp/build.5782.tmp.out
ld: warning in /Library/Frameworks//SDL.framework/SDL, file is not of required architecture
ld: warning in /Library/Frameworks//SDL_image.framework/SDL_image, file is not of required architecture

gcc -c -arch ppc -arch i386 /tmp/build.5782.tmp.c -o /tmp/build.5782.tmp.c.o
gcc -arch ppc -arch i386 -framework SDL -framework Cocoa -lobjc -framework SDL_image /tmp/build.5782.tmp.c.o -o /tmp/build.5782.tmp.out
ld: warning in /Library/Frameworks//SDL.framework/SDL, file is not of required architecture
ld: warning in /Library/Frameworks//SDL_image.framework/SDL_image, file is not of required architecture

gcc -c -arch ppc -arch i386 /tmp/build.5782.tmp.c -o /tmp/build.5782.tmp.c.o
/tmp/build.5782.tmp.c: In function é─˛mainé─˘:
/tmp/build.5782.tmp.c:5: error: é─˛strupré─˘ undeclared (first use in this function)
/tmp/build.5782.tmp.c:5: error: (Each undeclared identifier is reported only once
/tmp/build.5782.tmp.c:5: error: for each function it appears in.)
/tmp/build.5782.tmp.c: In function é─˛mainé─˘:
/tmp/build.5782.tmp.c:5: error: é─˛strupré─˘ undeclared (first use in this function)
/tmp/build.5782.tmp.c:5: error: (Each undeclared identifier is reported only once
/tmp/build.5782.tmp.c:5: error: for each function it appears in.)
lipo: can't figure out the architecture type of: /var/folders/MJ/MJvjeLdrGW4ooJhSVYS5bU+++TI/-Tmp-//ccLWnEYp.out
Failed program was:
+++ START /tmp/build.5782.tmp.c
#include <sys/types.h>
#include <string.h>

int main(void) {
(void) strupr;
return 0;
}
+++ END /tmp/build.5782.tmp.c

gcc -c -arch ppc -arch i386 /tmp/build.5782.tmp.c -o /tmp/build.5782.tmp.c.o
/tmp/build.5782.tmp.c: In function é─˛mainé─˘:
/tmp/build.5782.tmp.c:5: error: é─˛stricmpé─˘ undeclared (first use in this function)
/tmp/build.5782.tmp.c:5: error: (Each undeclared identifier is reported only once
/tmp/build.5782.tmp.c:5: error: for each function it appears in.)
/tmp/build.5782.tmp.c: In function é─˛mainé─˘:
/tmp/build.5782.tmp.c:5: error: é─˛stricmpé─˘ undeclared (first use in this function)
/tmp/build.5782.tmp.c:5: error: (Each undeclared identifier is reported only once
/tmp/build.5782.tmp.c:5: error: for each function it appears in.)
lipo: can't figure out the architecture type of: /var/folders/MJ/MJvjeLdrGW4ooJhSVYS5bU+++TI/-Tmp-//ccLbc5hr.out
Failed program was:
+++ START /tmp/build.5782.tmp.c
#include <sys/types.h>
#include <string.h>

int main(void) {
(void) stricmp;
return 0;
}
+++ END /tmp/build.5782.tmp.c

gcc -c -arch ppc -arch i386 /tmp/build.5782.tmp.c -o /tmp/build.5782.tmp.c.o
gcc -arch ppc -arch i386 -framework SDL -framework Cocoa -lobjc -framework SDL_image /tmp/build.5782.tmp.c.o -o /tmp/build.5782.tmp.out
ld: warning in /Library/Frameworks//SDL.framework/SDL, file is not of required architecture
ld: warning in /Library/Frameworks//SDL_image.framework/SDL_image, file is not of required architecture

gcc -c -arch ppc -arch i386 /tmp/build.5782.tmp.c -o /tmp/build.5782.tmp.c.o
gcc -arch ppc -arch i386 -framework SDL -framework Cocoa -lobjc -framework SDL_image /tmp/build.5782.tmp.c.o -o /tmp/build.5782.tmp.out
ld: warning in /Library/Frameworks//SDL.framework/SDL, file is not of required architecture
ld: warning in /Library/Frameworks//SDL_image.framework/SDL_image, file is not of required architecture

gcc -c -arch ppc -arch i386 /tmp/build.5782.tmp.c -o /tmp/build.5782.tmp.c.o
gcc -arch ppc -arch i386 -framework SDL -framework Cocoa -lobjc -framework SDL_image /tmp/build.5782.tmp.c.o -o /tmp/build.5782.tmp.out
ld: warning in /Library/Frameworks//SDL.framework/SDL, file is not of required architecture
ld: warning in /Library/Frameworks//SDL_image.framework/SDL_image, file is not of required architecture

gcc -c -arch ppc -arch i386 /tmp/build.5782.tmp.c -o /tmp/build.5782.tmp.c.o
gcc -arch ppc -arch i386 -framework SDL -framework Cocoa -lobjc -framework SDL_image /tmp/build.5782.tmp.c.o -o /tmp/build.5782.tmp.out
ld: warning in /Library/Frameworks//SDL.framework/SDL, file is not of required architecture
ld: warning in /Library/Frameworks//SDL_image.framework/SDL_image, file is not of required architecture

gcc -c -arch ppc -arch i386 /tmp/build.5782.tmp.c -o /tmp/build.5782.tmp.c.o
gcc -arch ppc -arch i386 -framework SDL -framework Cocoa -lobjc -framework SDL_image /tmp/build.5782.tmp.c.o -o /tmp/build.5782.tmp.out
ld: warning in /Library/Frameworks//SDL.framework/SDL, file is not of required architecture
ld: warning in /Library/Frameworks//SDL_image.framework/SDL_image, file is not of required architecture

gcc -c -arch ppc -arch i386 /tmp/build.5782.tmp.c -o /tmp/build.5782.tmp.c.o
/tmp/build.5782.tmp.c:3:3: error: #error
/tmp/build.5782.tmp.c:3:3: error: #error
lipo: can't figure out the architecture type of: /var/folders/MJ/MJvjeLdrGW4ooJhSVYS5bU+++TI/-Tmp-//ccIcpkLb.out
Failed program was:
+++ START /tmp/build.5782.tmp.c

#ifndef WIN32
# error
#endif
int main() {
return 0;
}
+++ END /tmp/build.5782.tmp.c

gcc -c -arch ppc -arch i386 /tmp/build.5782.tmp.c -o /tmp/build.5782.tmp.c.o
/tmp/build.5782.tmp.c:3:3: error: #error
/tmp/build.5782.tmp.c:3:3: error: #error
lipo: can't figure out the architecture type of: /var/folders/MJ/MJvjeLdrGW4ooJhSVYS5bU+++TI/-Tmp-//cc0PB47D.out
Failed program was:
+++ START /tmp/build.5782.tmp.c

#ifndef __MINGW32__
# error
#endif
int main() {
return 0;
}
+++ END /tmp/build.5782.tmp.c

gcc -c -arch ppc -arch i386 /tmp/build.5782.tmp.c -o /tmp/build.5782.tmp.c.o
gcc -arch ppc -arch i386 -framework SDL -framework Cocoa -lobjc -framework SDL_image -framework OpenGL /tmp/build.5782.tmp.c.o -o /tmp/build.5782.tmp.out
ld: warning in /Library/Frameworks//SDL.framework/SDL, file is not of required architecture
ld: warning in /Library/Frameworks//SDL_image.framework/SDL_image, file is not of required architecture

gcc -c -arch ppc -arch i386 -I/opt/local/include /tmp/build.5782.tmp.c -o /tmp/build.5782.tmp.c.o
gcc -arch ppc -arch i386 -framework SDL -framework Cocoa -lobjc -framework SDL_image -L/opt/local/lib -lmikmod -framework CoreAudio /tmp/build.5782.tmp.c.o -o /tmp/build.5782.tmp.out
ld: warning in /Library/Frameworks//SDL.framework/SDL, file is not of required architecture
ld: warning in /Library/Frameworks//SDL_image.framework/SDL_image, file is not of required architecture
ld: warning in /opt/local/lib/libmikmod.dylib, file is not of required architecture

gcc -c -arch ppc -arch i386 -I/opt/local/include /tmp/build.5782.tmp.c -o /tmp/build.5782.tmp.c.o
gcc -arch ppc -arch i386 -framework SDL -framework Cocoa -lobjc -framework SDL_image -L/opt/local/lib -lvorbisfile -lvorbis -lm -logg /tmp/build.5782.tmp.c.o -o /tmp/build.5782.tmp.out
ld: warning in /Library/Frameworks//SDL.framework/SDL, file is not of required architecture
ld: warning in /Library/Frameworks//SDL_image.framework/SDL_image, file is not of required architecture
ld: warning in /opt/local/lib/libvorbisfile.dylib, file is not of required architecture
ld: warning in /opt/local/lib/libvorbis.dylib, file is not of required architecture
ld: warning in /opt/local/lib/libogg.dylib, file is not of required architecture

gcc -c -arch ppc -arch i386 /tmp/build.5782.tmp.c -o /tmp/build.5782.tmp.c.o
gcc -arch ppc -arch i386 -framework SDL -framework Cocoa -lobjc -framework SDL_image -lz /tmp/build.5782.tmp.c.o -o /tmp/build.5782.tmp.out
ld: warning in /Library/Frameworks//SDL.framework/SDL, file is not of required architecture
ld: warning in /Library/Frameworks//SDL_image.framework/SDL_image, file is not of required architecture
Logged
Novus
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1938


Fot or not?


View Profile
Re: Building an OS X Bundled App
« Reply #16 on: May 15, 2008, 07:55:10 pm »

Looks like SDL is compiled for only Intel and UQM seems to be expecting both PowerPC and Intel 386 code to be stored in the same files.
Logged

RTFM = Read the fine manual.
RTTFAQ = Read the Ur-Quan Masters Technical FAQ.
Death 999
Global Moderator
Enlightened
*****
Offline Offline

Gender: Male
Posts: 3848


We did. You did. Yes we can. No.


View Profile
Re: Building an OS X Bundled App
« Reply #17 on: May 16, 2008, 06:49:31 pm »

So, how do I change that expectation?

Change EXTRA_PLATFORM_GCC_FLAGS_COMPILE_FOO to not include ppc architectures? That smells like what I did earlier, and that didn't work. Should we include an implementation of stricmp, perhaps a simple one aliasing it to the symbol actually used on macs?
« Last Edit: May 16, 2008, 06:51:58 pm by Death 999 » Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Building an OS X Bundled App
« Reply #18 on: May 16, 2008, 10:09:31 pm »

What version of UQM is this? Is this 0.6.2? Or the version from SVN?

In 0.6.2 the build scripts defines HAVE_STRICMP if stricmp() is present, with port.h containing
Quote
#ifndef HAVE_STRICMP
#   define stricmp strcasecmp
#else
#   define strcasecmp stricmp
#endif

In SVN, the build scripts defines HAVE_STRICMP if stricmp() is present, and HAVE_STRCASECMP_UQM, with port.h containing:
Quote
#if !defined(HAVE_STRICMP) && !defined(HAVE_STRCASECMP_UQM)
#   error Neither stricmp() nor strcasecmp() is available.
#elif !defined(HAVE_STRICMP)
#   define stricmp strcasecmp
#elif !defined(HAVE_STRCASECMP_UQM)
#   define strcasecmp stricmp
#else
    // We should take care not to define anything if both strcasecmp() and
    // stricmp() are defined, as one might exist as a macro to the other.
#endif

You may be able to work around the problem by editing config_unix.h yourself (after running "./build.sh uqm"), changing HAVE_STRICMP and/or HAVE_STRCASECMP. I'm curious as to what it contains now.
Logged

ôWhen Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.ö
Novus
Enlightened
*****
Offline Offline

Gender: Male
Posts: 1938


Fot or not?


View Profile
Re: Building an OS X Bundled App
« Reply #19 on: May 16, 2008, 10:11:00 pm »

Change EXTRA_PLATFORM_GCC_FLAGS_COMPILE_FOO to not include ppc architectures? That smells like what I did earlier, and that didn't work. Should we include an implementation of stricmp, perhaps a simple one aliasing it to the symbol actually used on macs?
To me this sounds like two completely different problems. If you don't case about PPC Macs (e.g. you're compiling for personal use), you can just leave them out like you already did. The stricmp bit is odd; it seems to be Microsoftese for strcasecmp. The build script should be detecting which is available. If you're already hacking build.vars, add "-Dstricmp=strcasecmp" to COMPILE_C. That's messy, but it should get it to link. Meep-eep's trying to figure out how to get it to work right instead of well enough.
Logged

RTFM = Read the fine manual.
RTTFAQ = Read the Ur-Quan Masters Technical FAQ.
Death 999
Global Moderator
Enlightened
*****
Offline Offline

Gender: Male
Posts: 3848


We did. You did. Yes we can. No.


View Profile
Re: Building an OS X Bundled App
« Reply #20 on: May 16, 2008, 11:19:19 pm »

What version of UQM is this? Is this 0.6.2? Or the version from SVN?

It's 0.6.2


You may be able to work around the problem by editing config_unix.h yourself (after running "./build.sh uqm"), changing HAVE_STRICMP and/or HAVE_STRCASECMP. I'm curious as to what it contains now.

Here's the config_unix.h file:
Code:
/* This file contains some compile-time configuration options for *nix
 * systems.
 * config_unix.h is generated from config_unix.h.in by build.sh
 * When building on MS Windows using build.sh (MinGW, Cygwin),
 * config_win.h is generated from src/config_win.h.in.
 * When using MSVC on MS Windows, you'll have to edit src/msvc++/config.h
 * manually if you want anything else than the defaults.
 */

#ifndef _CONFIG_UNIX_H
#define _CONFIG_UNIX_H

/* Directory where the UQM game data is located */
#define CONTENTDIR "/uqm/content"

/* Directory where game data will be stored */
#define USERDIR "~/.uqm/"

/* Directory where config files will be stored */
#define CONFIGDIR USERDIR

/* Directory where supermelee teams will be stored */
#define MELEEDIR "${UQM_CONFIG_DIR}/teams/"

/* Directory where save games will be stored */
#define SAVEDIR "${UQM_CONFIG_DIR}/save/"

/* Defined if words are stored with the most significant byte first */
#undef WORDS_BIGENDIAN

/* Defined if your system has readdir_r of its own */
#define HAVE_READDIR_R

/* Defined if your system has setenv of its own */
#define HAVE_SETENV

/* Defined if your system has strupr of its own */
#undef HAVE_STRUPR

/* Defined if your system has stricmp of its own */
#undef HAVE_STRICMP

/* Defined if your system has getopt_long */
#define HAVE_GETOPT_LONG

/* Defined if your system has iswgraph of its own*/
#define HAVE_ISWGRAPH

/* Defined if your system has wchar_t of its own */
#define HAVE_WCHAR_T

/* Defined if your system has wint_t of its own */
#define HAVE_WINT_T

#endif  /* _CONFIG_UNIX_H */

Interesting. So, HAVE_STRICMP is explicitly undefined here.


Now I can't get to the linking step anymore. What happen? I get the same thing with no modifications or with some or all.

Code:
  CC       obj/debug/src/sc2code/libs/graphics/sdl/3do_blt.c.o
In file included from src/sc2code/libs/graphics/sdl/sdl_common.h:25,
                 from src/sc2code/libs/graphics/sdl/3do_blt.c:21:
/Library/Frameworks/SDL_image.framework/Headers/SDL_image.h:28:17: error: SDL.h: No such file or directory
/Library/Frameworks/SDL_image.framework/Headers/SDL_image.h:29:25: error: SDL_version.h: No such file or directory
/Library/Frameworks/SDL_image.framework/Headers/SDL_image.h:30:24: error: begin_code.h: No such file or directory
/Library/Frameworks/SDL_image.framework/Headers/SDL_image.h:114:24: error: close_code.h: No such file or directory
make: *** [obj/debug/src/sc2code/libs/graphics/sdl/3do_blt.c.o] Error 1

I definitely have these missing header files; they're in /Library/Frameworks/SDL.framework/Headers
« Last Edit: May 16, 2008, 11:36:17 pm by Death 999 » Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Building an OS X Bundled App
« Reply #21 on: May 17, 2008, 12:49:08 am »

Do you have a 'config.h' file in some location which might be scanner before src/?

Something to try: set and export "CFLAGS=-save-temps" before doing "./build.sh uqm config" (or edit build.vars afterwards). You'll get a whole lot of .s and .i files in your build root when you run "./build.sh uqm" then. The mapres.i file should give a bit of information on what files are actually included. It will be too big for the forum, but you could use pastebin.com or something similar to pass it on to us.
Logged

ôWhen Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.ö
Death 999
Global Moderator
Enlightened
*****
Offline Offline

Gender: Male
Posts: 3848


We did. You did. Yes we can. No.


View Profile
Re: Building an OS X Bundled App
« Reply #22 on: May 19, 2008, 03:54:05 pm »

Wait.. I see why it failed - I forgot that CFLAGS step in the instructions.  Roll Eyes

Trying again... okay. That just got back to where we were before.

Getting the further debug info... Oh, crud. I can't include both CFLAGS values. When I try

CFLAGS="-I/Library/Frameworks/SDL.framework/Headers -save-temps" ./build.sh uqm config

it just doesn't find the SDL framework and dies right away. Is it not possible to put more than one CFLAG on a line?

Okay, I put them into the COMPILE_C and COMPILE_OBJC values, after -c and before -arch i386...

http://pastebin.com/m78492fd2
« Last Edit: May 19, 2008, 04:16:51 pm by Death 999 » Logged
meep-eep
Forum Admin
Enlightened
*****
Offline Offline

Posts: 2847



View Profile
Re: Building an OS X Bundled App
« Reply #23 on: May 19, 2008, 06:03:55 pm »

You should be able to put as much flags in CFLAGS as you wish.

As for that file which you pasted... when including the file reslib.h it goes right to line 24, without executing line 23...
Did you, by any chance, comment out the line that says '#include "port.h"'?
Logged

ôWhen Juffo-Wup is complete
when at last there is no Void, no Non
when the Creators return
then we can finally rest.ö
Death 999
Global Moderator
Enlightened
*****
Offline Offline

Gender: Male
Posts: 3848


We did. You did. Yes we can. No.


View Profile
Re: Building an OS X Bundled App
« Reply #24 on: May 19, 2008, 09:37:09 pm »

...

...

I thought I undid that after doing it (so I could build just urquan.c without dragging along much else).
* Death 999 checks.

Huh. I must have 'reverted' the original instead of the modified. Or maybe typed :q instead of :wq?

Anywho, it compiles now (iff I remove "-arch ppc" from build.vars).

After adventures in finding the right content package...

Now I discover that the turning I was trying to put in simply doesn't work at all. Hmm. Well, we have the basic building taken care of.

~~~~ edited in much later, to sum up ~~~~

follow the instructions linked above, at
http://sc2.svn.sourceforge.net/viewvc/sc2/trunk/sc2/INSTALL.macosx?view=markup
using the branch 'if SDL complains'...
EXCEPT:
after configuring but before building, eliminate the ppc targets from build.vars
« Last Edit: July 09, 2008, 05:37:30 pm by Death 999 » Logged
Pages: 1 [2] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!