project-navigation
Personal tools

Author Topic: Problem compiling 2.2.1 (now serious -- see second post)  (Read 6396 times)

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Problem compiling 2.2.1 (now serious -- see second post)
« on: June 27, 2009, 04:34:31 pm »
I think I'm doing it right, but 2.2.1 still doesn't like me.

 2084  svn switch https://ufoai.svn.sourceforge.net/svnroot/ufoai/ufoai/tags/ufoai_2.2.1
 2094  ./configure --disable-uforadiant  --enable-universal --libdir=/opt/local/lib --includedir=/opt/local/include

I'm pretty sure that's the right syntax for the svn command to give me 2.2.1.
But configure still seems to want the SDL stuff in the system /Library/Frameworks.
Code: [Select]
Kleiman-ibook:trunk michael$ ./configure --disable-uforadiant  --enable-universal --libdir=/opt/local/lib --includedir=/opt/local/include
checking build system type... powerpc-apple-darwin9.7.0
checking host system type... powerpc-apple-darwin9.7.0
checking target system type... powerpc-apple-darwin9.7.0
checking system... Mac OS X
checking for sed... yes
checking for echo... yes
checking target OS... configure: error: Could not find SDL Framework at /Library/Frameworks.

Before I go and clobber configure to take SDL in /opt/local/lib, is there anything else that I am missing, overlooking, unaware of, or otherwise booching?
« Last Edit: June 28, 2009, 08:01:50 pm by keybounce »

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Re: Problem compiling 2.2.1 (now serious -- see second post)
« Reply #1 on: June 28, 2009, 08:18:51 pm »
(GRRR. System ate my post. "Modify" and "Remove" are vertically next to each other on my browser display, and "Remove" doesn't seem to require a confirmation.)

I am in need of talking with the person responsible for compiling the 2.2.1 release.

I can fix the SDL configuration by copying the section from the 2.3 configure script.

But when I have universal compiling turned on, I get this:

Code: [Select]
Kleiman-ibook:trunk michael$ make
 * [UFO] src/client/cl_actor.c
gcc-4.0: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
make: *** [debug-darwin-powerpc/client/client/cl_actor.o] Error 1
So how was the 2.2.1 universal compiled?

Second, with universal turned off, I get an error while compiling:

Code: [Select]
* [UFO] src/ports/unix/unix_main.c
 * [UFO] src/ports/macosx/osx_main.m
In file included from /System/Library/Frameworks/Security.framework/Headers/Security.h:24,
                 from /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Headers/LSSharedFileList.h:32,
                 from /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Headers/LaunchServices.h:37,
                 from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:41,
                 from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:20,
                 from src/ports/macosx/osx_main.m:36:
/System/Library/Frameworks/Security.framework/Headers/cssmconfig.h:64: error: two or more data types in declaration specifiers
/System/Library/Frameworks/Security.framework/Headers/cssmconfig.h:64: error: two or more data types in declaration specifiers
make: *** [debug-darwin-powerpc/client/ports/macosx/osx_main.o] Error 1

I'm trying to tell if this is harmless "code rot", caused by changes in headers from 10.3/10.4 to 10.5. It can be avoided by re-ordering header files. The system file in question is:

Code: [Select]
51 #ifndef _SINT32
 52 typedef int32_t sint32;
 53 #define _SINT32
 54 #endif
 55 #ifndef _SINT16
 56 typedef int16_t sint16;
 57 #define _SINT16
 58 #endif
 59 #ifndef _SINT8
 60 typedef int8_t sint8;
 61 #define _SINT8
 62 #endif
 63 #ifndef _UINT32
 64 typedef uint32_t uint32;
 65 #define _UINT32
 66 #endif

Since everything seems to be protected by ifdefs, why is causing problems, why is it only showing up here, and does re-ordering the header files to fix this result in unexpected changes elsewhere?

Interestingly, this file has the "strangest" include I've seen yet:
#include <CoreServices/../Frameworks/CarbonCore.framework/Headers/ConditionalMacros.h>

First time I've seen a .. like that in a fixed pathname.

Offline tchristney

  • Rookie
  • ***
  • Posts: 75
    • View Profile
Re: Problem compiling 2.2.1 (now serious -- see second post)
« Reply #2 on: June 28, 2009, 10:45:24 pm »
In the build/*.mk files you need to remove the -M options (-MD -MT $@ -MP) from the build rules. I thought that I had checked that in, but apparently only in trunk and not in the 2.2.x branch/tags.

I think that you can just remove the include of Carbon.h from osx_main.m - that should clear up the last error.

HTH

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Re: Problem compiling 2.2.1 (now serious -- see second post)
« Reply #3 on: June 29, 2009, 07:08:28 pm »
Thank you ...

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Re: Problem compiling 2.2.1 (now serious -- see second post)
« Reply #4 on: June 29, 2009, 07:43:40 pm »
Turns out that either of the two (Carbon.h and Cocoa.h) will cause the system include file to be used. Putting common.h after those two is the only thing that works.

When I run the executable from the command line, the mouse is only tracked while the button is pressed -- it does not get tracked on normal movement. And, since it only starts tracking with mousedown, and mousedown triggers whatever button is under the mouse, ...  (Also: No icon when run from the command line).

Building an installer, to see if that goes away when run as an app.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Problem compiling 2.2.1 (now serious -- see second post)
« Reply #5 on: June 29, 2009, 08:10:36 pm »
please submit patches again - so we can commit them to the 2.2 branch

Offline tchristney

  • Rookie
  • ***
  • Posts: 75
    • View Profile
Re: Problem compiling 2.2.1 (now serious -- see second post)
« Reply #6 on: June 30, 2009, 01:29:39 am »
It is known that every released version does not work properly if run from outside an app bundle. This has been fixed in trunk.
For 2.2.x just run "make macinstaller" and you should end up with the correct app bundle in src/ports/macosx/installer

Mattn: will try to get a clean checkout to compile and post the patch for you to integrate with the branch/tags.

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Re: Problem compiling 2.2.1 (now serious -- see second post)
« Reply #7 on: June 30, 2009, 03:00:44 am »
Alright, the good news: It works. Diffs attached.

I can compile, and run. I played until the first mission, a terror mission. Didn't take it seriously, and got slaughtered. But it works.

That means that my compile environment is working, so the problems I'm having with the 2.3 graphics are probably not on my end. Now it's time to divide and hunt the point where the graphics broke.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Problem compiling 2.2.1 (now serious -- see second post)
« Reply #8 on: June 30, 2009, 07:26:47 am »
thanks for the patch - would be nice if you could submit the configure.ac, too ;)

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Re: Problem compiling 2.2.1 (now serious -- see second post)
« Reply #9 on: June 30, 2009, 08:05:04 pm »
Sorry, I didn't know about configure.ac. Blown away now that I'm back at trunk, checking that other byte/int alignment issue.

Lets see if Time Machine still has that ... ahh, yes. Good ol TM...

Garrr. grumble grumble apple's UI designed for people who aren't getting under the hood grumble grumble.

Quote
An error has occured

configure.ac.
You cannot upload that type of file. The only allowed extensions are tga,obj,log,jpg,png,txt,diff,patch,md2,md3,blend,max,wings,zip,gz,bz2,odg,map,7z.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Problem compiling 2.2.1 (now serious -- see second post)
« Reply #10 on: June 30, 2009, 08:41:36 pm »
that configure.ac is the one that is in our svn repo already ;)

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Re: Problem compiling 2.2.1
« Reply #11 on: July 01, 2009, 07:01:57 am »
I did not modify it; I was wondering if it was generated locally.