libretro / libretro-super

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

Cannot build cores using Xcode 6 GM #122

Open yoshisuga opened 10 years ago

yoshisuga commented 10 years ago

When running libretro-build-ios.sh, I get the following error:

clang++ -o out/bsnes_libretro_ios.dylib -dynamiclib obj/libco.o obj/processor-arm.o obj/processor-gsu.o obj/processor-hg51b.o obj/processor-lr35902.o obj/processor-r65816.o obj/processor-spc700.o obj/processor-upd96050.o obj/sfc-interface.o obj/sfc-system.o obj/sfc-controller.o obj/sfc-cartridge.o obj/sfc-cheat.o obj/sfc-memory.o obj/sfc-cpu.o obj/sfc-smp.o obj/sfc-dsp.o obj/sfc-ppu.o obj/sfc-satellaviewbase.o obj/sfc-icd2.o obj/sfc-bsx.o obj/sfc-nss.o obj/sfc-event.o obj/sfc-sa1.o obj/sfc-superfx.o obj/sfc-armdsp.o obj/sfc-hitachidsp.o obj/sfc-necdsp.o obj/sfc-epsonrtc.o obj/sfc-sharprtc.o obj/sfc-spc7110.o obj/sfc-sdd1.o obj/sfc-obc1.o obj/sfc-hsu1.o obj/sfc-msu1.o obj/sfc-satellaviewcart.o obj/sfc-sufamiturbo.o obj/gb-interface.o obj/gb-system.o obj/gb-scheduler.o obj/gb-memory.o obj/gb-cartridge.o obj/gb-cpu.o obj/gb-ppu.o obj/gb-apu.o obj/gb-cheat.o obj/gb-video.o obj/libretro.o -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk -arch armv7
ld: illegal text-relocation to '_posix_memalign' in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/usr/lib/libSystem.dylib from '_co_create' in obj/libco.o for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [build] Error 1
Failed to build bsnes performance core
cp: out/bsnes_libretro_ios.dylib: No such file or directory

Has anyone been able to build using the latest Xcode?

yoshisuga commented 10 years ago

The following cores don't compile using Xcode 6:

build_libretro_bsnes
build_libretro_mame078
build_libretro_mame
build_libretro_mupen64
crazyquark commented 10 years ago

Yup, fails for me too on Xcode 6.0.1 with the same error. Code at fault is in libco/armeabi.c. Seems there is an issue with posix_memalign that is active when -DHAVE_POSIX_MEMALIGN is active. Also had to disable: build_libretro_picodrive

crazyquark commented 10 years ago

The only thing I could figure out is that the co_create uses C-linkeage while posix_memalign is probably C++ linked. Not sure these can mix.

inactive123 commented 9 years ago

Can you retest it now? It should work now.

crazyquark commented 9 years ago

Hello,

Indeed the libco error is gone(what was the fix? I am having trouble finding the change) However, now the build process fails because of the precompiled build tools that are missing (prec-build folder - for MAME I believe):

Where should I get the prec-build folder?

Errors are: ar -cr obj//libsqlite3.a obj//lib/sqlite3/sqlite3.o mkdir -p obj//build cp -R prec-build/makedep obj//build cp -R prec-build/makemak obj//build cp: cp: cp -R prec-build/file2str obj//build prec-build/makedep: No such file or directory prec-build/makemak: No such file or directory make: * [obj//build/makemak] Error 1 make: * Waiting for unfinished jobs.... make: * [obj//build/makedep] Error 1 cp: prec-build/file2str: No such file or directory make: * [obj//build/file2str] Error 1 Failed to build MAME (iOS) cp: mame_libretro_ios.dylib: No such file or directory

crazyquark commented 9 years ago

Disabling mame in the build script I am left with a different error, related to picodrive:

clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.1.sdk -o picodrive_libretro_ios.dylib -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -marm -DIOS -DNO_ZLIB -fPIC -Wall -ggdb -falign-functions=2 -I. -DINLINE=inline -O2 -DNDEBUG -ffunction-sections -D_SVP_DRC -DEMU_F68K -D_USE_CZ80 -DDRC_SH2 platform/libretro/libretro.o platform/common/mp3.o platform/common/mp3_dummy.o zlib/gzio.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o zlib/deflate.o zlib/crc32.o zlib/adler32.o zlib/zutil.o zlib/compress.o zlib/uncompr.o unzip/unzip.o unzip/unzip_stream.o pico/pico.o pico/cart.o pico/memory.o pico/state.o pico/sek.o pico/z80if.o pico/videoport.o pico/draw2.o pico/draw.o pico/mode4.o pico/misc.o pico/eeprom.o pico/patch.o pico/debug.o pico/media.o pico/sms.o pico/cd/mcd.o pico/cd/cd_memory.o pico/cd/cd_sek.o pico/cd/cdc.o pico/cd/cdd.o pico/cd/cd_image.o pico/cd/cue.o pico/cd/gfx.o pico/cd/gfx_dma.o pico/cd/cd_misc.o pico/cd/pcm.o pico/32x/32x.o pico/32x/32x_memory.o pico/32x/32x_draw.o pico/32x/sh2soc.o pico/32x/pwm.o pico/pico/pico_pico.o pico/pico/pico_memory.o pico/pico/xpcm.o pico/carthw/carthw.o pico/carthw/svp/svp.o pico/carthw/svp/svp_memory.o pico/carthw/svp/ssp16.o pico/carthw/svp/stub_arm.o pico/carthw/svp/compiler.o pico/sound/sound.o pico/sound/sn76496.o pico/sound/ym2612.o pico/sound/mix.o cpu/fame/famec.o cpu/cz80/cz80.o cpu/drc/cmn.o cpu/sh2/sh2.o cpu/sh2/compiler.o cpu/sh2/mame/sh2pico.o -dynamiclib -lm Undefined symbols for architecture armv7: "_refresh_fc_eg_chan", referenced from: YM2612UpdateOne in ym2612.o "_refresh_fc_eg_chan_sl3", referenced from: YM2612UpdateOne in ym2612.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *\ [picodrive_libretro_ios.dylib] Error 1 Failed to build picodrive

crazyquark commented 9 years ago

The following cores still fail to compile with Xcode 6: (I had to disable them)

build_libretro_mame078 build_libretro_mame

build_libretro_picodrive build_libretro_mupen64

steve228uk commented 9 years ago

+1 :+1:

caiozullo commented 9 years ago

+1

andrewgribben commented 9 years ago

+1