waynedog74 / mupen64plus

Automatically exported from code.google.com/p/mupen64plus
0 stars 0 forks source link

mupen64plus 1.99.4 Build problems on Mac OSX 10.7 #482

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Describe your system:
 - Operating System (be specific): Mac OS X 10.7.2
 - Machine type (32-bit or 64-bit): 64-bit
 - Mupen64Plus version: 1.99.4
 - Plugins used: N/A

Describe the problem:

Attempting to build the latest version of Mupen64Plus on Mac OS X 10.7 seems to 
be problematic

Here is the build script I am using (just for core - for now):

#!/bin/sh
 PWD=`pwd` 
 export CC="gcc"
 export CXX="g++"
 export LD="g++"
 APIDIR=$PWD/mupen64plus-core/src/api
 export MACOSX_DEPLOYMENT_TARGET=10.7
 export SDK_ROOT=/Developer/SDKs/MacOSX10.7.sdk
 export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

APP_BUNDLE=./mupen64plus.app/Contents

echo "== Core =="
 cd mupen64plus-core/projects/unix
 make all 
 cd ../../..
 cp -f mupen64plus-core/projects/unix/*.dylib .

-------

When building - I get the following error:

== Core ==
    CC  _obj/api/callbacks.o
../../src/api/callbacks.c:26:20: error: stdlib.h: No such file or directory
../../src/api/callbacks.c:27:19: error: stdio.h: No such file or directory
../../src/api/callbacks.c:34: error: ‘NULL’ undeclared here (not in a 
function)
../../src/api/callbacks.c: In function ‘DebugMessage’:
../../src/api/callbacks.c:63: warning: implicit declaration of function 
‘vsprintf’
make: *** [_obj/api/callbacks.o] Error 1
cp: mupen64plus-core/projects/unix/*.dylib: No such file or directory

-------
So I changed the definition of CC in my buildfile to 'CC="gcc -I/usr/include"'. 
This gets me farther:

== Core ==
    CC  _obj/api/callbacks.o
    CC  _obj/api/common.o
    CC  _obj/api/config.o
    CC  _obj/api/debugger.o
    CC  _obj/api/frontend.o
    CC  _obj/api/vidext.o
    CC  _obj/main/main.o
    CC  _obj/main/util.o
    CC  _obj/main/cheat.o
    CC  _obj/main/eventloop.o
    CC  _obj/main/md5.o
    CC  _obj/main/rom.o
    CC  _obj/main/ini_reader.o
    CC  _obj/main/savestates.o
    CC  _obj/main/adler32.o
    CC  _obj/memory/dma.o
    CC  _obj/memory/flashram.o
    CC  _obj/memory/memory.o
    CC  _obj/memory/n64_cic_nus_6105.o
    CC  _obj/memory/pif.o
    CC  _obj/memory/tlb.o
    CC  _obj/osal/dynamiclib_unix.o
    CC  _obj/osal/files_unix.o
../../src/osal/files_unix.c:39:43: error: CoreFoundation/CoreFoundation.h: No 
such file or directory
../../src/osal/files_unix.c:42: error: expected ‘=’, ‘,’, ‘;’, 
‘asm’ or ‘__attribute__’ before ‘macSetBundlePath’
../../src/osal/files_unix.c: In function ‘osal_get_shared_filepath’:
../../src/osal/files_unix.c:198: warning: implicit declaration of function 
‘macSetBundlePath’
make: *** [_obj/osal/files_unix.o] Error 1
cp: mupen64plus-core/projects/unix/*.dylib: No such file or directory
-------

Is there some additional setting that need to be configured before building for 
10.7?

Original issue reported on code.google.com by erll...@gmail.com on 27 Feb 2012 at 5:47

GoogleCodeExporter commented 9 years ago
Ok, I think I have the solution partially figured out: On Mac OS X 10.7, you 
don't have the 10.5 sdk installed - which all of the Makefiles use as the 
systemroot. If I change the -isysroot in all of the Makefiles to

-isysroot /Developer/SDKs/MacOSX10.7.sdk

Then everything (in the main package builds)

However, I'm still getting the following error when trying to build the glide64 
plugin:

== Glide ==

CXX _obj/Main.o

In file included from ../../src/wrapper/glide.h:42,

from ../../src/rdp.h:48,

from ../../src/Util.h:41,

from ../../src/Main.cpp:37:

../../src/wrapper/3dfx.h:101:4: warning: #warning define FX_ENTRY & FX_CALL for 
your compiler

{standard input}:1498:suffix or operands invalid for `bswap'

make: *** [_obj/Main.o] Error 1

cp: mupen64plus-video-glide64/projects/unix/*.dylib: No such file or directory

Original comment by erll...@gmail.com on 27 Feb 2012 at 9:30

GoogleCodeExporter commented 9 years ago
I have more specific information about the mupen64plus-video-glide build issue. 
The problem appears to be the following block of code:

asm volatile ("bswap %[cur]"
           : [cur] "=g"(cur)
           : "[cur]"(~*(data++))
           );

On lines 647-650 of Main.cpp. If I comment out these lines the entire build 
succeeds. Any thoughts on why this would be problematic for Mac OS X 10.7? I've 
also posted this issue on wahrhaft's bitbucket repo, but I haven't heard 
anything there either.

Could it be 32/64 bit related?

Original comment by erll...@gmail.com on 1 Mar 2012 at 11:24

GoogleCodeExporter commented 9 years ago
Probably the build scripts should be updated to make the SDK configurable. Now 
I am no longer using OSX as my main OS so maybe someone could contribute that?
I'm afraid I can't help with the asm issue

Original comment by auria...@gmail.com on 6 May 2012 at 3:41

GoogleCodeExporter commented 9 years ago
I changed the build scripts for compiling from source (i.e. mercurial), but 
maybe this could help you out. Look at my comment in 
https://code.google.com/p/mupen64plus/wiki/CompilingFromHg

Original comment by n.pepi...@gmail.com on 30 Dec 2012 at 7:34

GoogleCodeExporter commented 9 years ago
This should be fixed in the newer builds from hg.

Original comment by n.pepi...@gmail.com on 3 Jan 2013 at 3:03

GoogleCodeExporter commented 9 years ago

Original comment by s...@narfation.org on 3 Jan 2013 at 4:06