libretro / libretro-super

Super repo for other libretro projects. Fetches, builds and installs.
MIT License
406 stars 284 forks source link

ppsspp fails to compile on osx ppc. Space in include path and defaults to SSE. #550

Open snigel opened 7 years ago

snigel commented 7 years ago

When trying to compile ppsspp it fails when it's trying to include .../Power Macintosh/... due to the space. I'm compiling on a ppc mac with osx 10.5 and gcc 4.7 installed via macports.

See snippet below:

c++ -DGIT_VERSION=\"" 37689d422"\" -std=c++11 -O2 -DNDEBUG  -D__LIBRETRO__ -DINLINE="inline"
-DPPSSPP -DUSE_FFMPEG -DBAKE_IN_GIT -DPROFILE_THIS_SCOPE\(x\) -DGLEW_STATIC -DNO_VULKAN  
-I../ffmpeg/macosx/Power Macintosh/include 
-I. -I.. -I../Common -I../libretro -I../ext/native -I../ext/zlib -I../ext/snappy -I../ffmpeg  
-I../ffmpeg/macosx/Power Macintosh/include 
-I../ext/cityhash -I../ext/armips -I../ext/native/ext/libzip -I../ext/native/ext -I../ext/native 
-I../ext/libkirk -I../ext/xbrz -I../ext/xxhash -I../ext/native/ext/rg_etc1 -I../ext/glew  
-D__MACOSX__ -fPIC -D__MACOSX__  -D_M_IX86 -m32 -D_ARCH_32 -DHAVE_OPENGL  -DDYNAREC  -c -o../ext/native/ext/rg_etc1/rg_etc1.o ../ext/native/ext/rg_etc1/rg_etc1.cpp
c++: error: Macintosh/include: No such file or directory
c++: error: Macintosh/include: No such file or directory
make: *** [../ext/native/ext/rg_etc1/rg_etc1.o] Error 1
cp "ppsspp_libretro.dylib" "/Users/snigel/libretro-super/dist/osx-Power Macintosh/ppsspp_libretro.dylib"
cp: ppsspp_libretro.dylib: No such file or directory

I fixed that by using quotes in the OS X part of the Makefile

# OS X
else ifneq (,$(findstring osx,$(platform)))
        TARGET := $(TARGET_NAME)_libretro.dylib
        LDFLAGS += -dynamiclib
        OSXVER = `sw_vers -productVersion | cut -d. -f 2`
        OSX_LT_MAVERICKS = `(( $(OSXVER) <= 9 )) && echo "YES"`
        ifeq ($(OSX_LT_MAVERICKS),"YES")
                LDFLAGS += -mmacosx-version-min=10.5
        endif
                LDFLAGS += -stdlib=libc++
        fpic = -fPIC

        FFMPEGINCFLAGS += -I"$(FFMPEGDIR)/macosx/$(FFMPEG_ARCH)/include"
        FFMPEGLIBDIR := $(FFMPEGDIR)/macosx/$(FFMPEG_ARCH)/lib
        FFMPEGLDFLAGS += -liconv -L"$(FFMPEGLIBDIR)" -lavformat -lavcodec -lavutil -lswresample -lswscale
        PLATCFLAGS += -D__MACOSX__
        GL_LIB := -framework OpenGL
        PLATFORM_EXT := darwin

In makefile.common the PPC system will end up at an else branch with SSE/SSE2. For testing I patched it by just commenting out the line. I think it should detect altivec capabilities for ppc.

   else
        ifneq (,$(findstring msvc,$(platform)))
        ifeq (,$(findstring x64,$(platform)))
                CPUFLAGS += /arch:SSE2
        endif
                CPUFLAGS += -D_M_IX86_FP
        else
                #CPUFLAGS += -msse -msse2
endif

I'm now stuck on failure to compile vjson

c++ -DGIT_VERSION=\"" 37689d422"\" -std=c++11 -O2 -DNDEBUG  -D__LIBRETRO__ -DINLINE="inline" -DPPSSPP -DUSE_FFMPEG -DBAKE_IN_GIT -DPROFILE_THIS_SCOPE\(x\) -DGLEW_STATIC -DNO_VULKAN  -I"../ffmpeg/macosx/Power Macintosh/include" -I. -I.. -I../Common -I../libretro -I../ext/native -I../ext/zlib -I../ext/snappy -I../ffmpeg  -I"../ffmpeg/macosx/Power Macintosh/include" -I../ext/cityhash -I../ext/armips -I../ext/native/ext/libzip -I../ext/native/ext -I../ext/native -I../ext/libkirk -I../ext/xbrz -I../ext/xxhash -I../ext/native/ext/rg_etc1 -I../ext/glew  -D__MACOSX__ -fPIC -D__MACOSX__  -D_M_IX86 -m32 -D_ARCH_32 -DHAVE_OPENGL  -DDYNAREC  -c -o../ext/native/ext/vjson/json.o ../ext/native/ext/vjson/json.cpp
/var/tmp//ccrUR7dE.s:101:Invalid mnemonic 'int'
/var/tmp//ccrUR7dE.s:186:Invalid mnemonic 'int'
make: *** [../ext/native/ext/vjson/json.o] Error 1

I'm not sure what to do about this though.

orbea commented 6 years ago

@snigel

  1. Is this a still a problem?
  2. This is the wrong repo, try reporting it here instead if you can still reproduce it.

https://github.com/libretro/ppsspp