Hello list,

I'm trying to build Freeciv with SDL in Xcode my setup is as follow :
MacBook Intel OSX 10.4.9 Xcode 2.4.1 GCC 4

Step 1 - I built a tolua framework and a binary
both compiled fine

Step 2 - I built a civserver framework and a binary with these :

both got this warning :
Compiling sernet.c
warning : pointer targets in passing argument 3 of 'accept' differ in signedness

Step 3 - I built a SDL Cocoa app with :
needed SDL frameworks

I included tolua and civserver binaries in the bundle in freeciv/bin and freeciv data in freeciv/share/freeciv

got these warnings :

warning : pointer targets in passing argument 6 of 'recvfrom' differ in signedness

in diplomat_dialog.c
in dialogs.h
warning : 'struct unit_list' declared inside parameter list
warning : its scope is only this definition or declaration, which is probably not what you want

go the same warning as above for :
repodlgs.c in dialogs.h
themespec.c in dialog.h

These should be because I needed to put the include for SDL (and gui- sdl) on top of headers declaration in some files or it won't compile.

I got a nice SDL Cocoa blue window and a crash :

(gdb) run
[Switching to process 128 local thread 0x1207]
2: Using Video Output: Quartz
Program received signal:  "EXC_BAD_ACCESS".

#0      0x002e9199 in genlist_insert
#1      0x00034a08 in create_default_cma_presets
#2      0x00016486 in load_general_options
#3      0x00096a8f in SDL_main
#4      0x00002a10 in -[SDLMain applicationDidFinishLaunching:]
#5      0x927e717b in _nsnote_callback
#6      0x908553e6 in __CFXNotificationPost
#7      0x9084cbd1 in _CFXNotificationPostNotification
#8 0x927df724 in -[NSNotificationCenter postNotificationName:object:userInfo:]
#9      0x927e66c9 in -[NSNotificationCenter postNotificationName:object:]
#10     0x9328fe94 in -[NSApplication _postDidFinishNotification]
#11     0x9328fd7e in -[NSApplication _sendFinishLaunchingNotification]
#12     0x9328f87d in -[NSApplication(NSAppleEventHandling) _handleAEOpen:]
#13 0x9328f448 in -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] #14 0x927ece65 in -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:]
#15     0x927ecc8f in _NSAppleEventManagerGenericHandler
#16     0x915206c5 in aeDispatchAppleEvent
#17     0x915205f6 in dispatchEventAndSendReply
#18     0x915204c2 in aeProcessAppleEvent
#19     0x92dea0e4 in AEProcessAppleEvent
#20     0x9328d63d in _DPSNextEvent
#21 0x9328d056 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
#22     0x93286ddb in -[NSApplication run]
#23     0x0000315e in main

this is what I got in main (stuck at 0x0000315e) :
0x00003146  <+1549>  call   0xaf273 <dyld_stub_objc_msgSend>
0x0000314b  <+1554>  mov    (%edi),%edx
0x0000314d  <+1556>  mov    0xb0024,%eax
0x00003152  <+1561>  mov    %eax,4(%esp)
0x00003156  <+1565>  mov    %edx,(%esp)
0x00003159  <+1568>  call   0xaf273 <dyld_stub_objc_msgSend>
0x0000315e  <+1573>  mov    0xb0040,%eax
0x00003163  <+1578>  mov    %eax,4(%esp)
0x00003167  <+1582>  mov    %ebx,(%esp)
0x0000316a  <+1585>  call   0xaf273 <dyld_stub_objc_msgSend>
0x0000316f  <+1590>  mov    0xb0040,%eax
0x00003174  <+1595>  mov    %eax,4(%esp)
0x00003178  <+1599>  mov    -44(%ebp),%eax
0x0000317b  <+1602>  mov    %eax,(%esp)
0x0000317e  <+1605>  call   0xaf273 <dyld_stub_objc_msgSend>
0x00003183  <+1610>  xor    %eax,%eax
0x00003185  <+1612>  add    $0x7c,%esp
0x00003188  <+1615>  pop    %ebx
0x00003189  <+1616>  pop    %esi
0x0000318a  <+1617>  pop    %edi
0x0000318b  <+1618>  pop    %ebp
0x0000318c  <+1619>  ret

So I guess I need help or the voice of wisdom that will tell "It can't work for this or that reason". I'm pretty amazed there isn't any osx intel binary available yet, I hacked Salty Banana ppc port and the intel one works very very fast. So I stupidly thought a Cocoa SDL port would be great... well again help and advices are welcome.

Sorry for the long post


Freeciv-dev mailing list

Reply via email to