Re: [hatari-devel] macOS build on x86_64 broken?

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi Thomas,

thanks a lot for the quick response!

> On 6. Jan 2024, at 11:14, Thomas Huth <th.huth@xxxxxxxxx> wrote:
> 
> Am Sat, 6 Jan 2024 11:05:19 +0100
> schrieb Frank Danapfel <frank.danapfel@xxxxxxxxxxxxxx>:
> 
>> Hello,
>> 
>> I’m building my own versions of Hatari locally (since I want a version without portmidi) on an Intel iMac running macOS 13.6.3 with Xcode 15.1 using the following sequence of commands in the terminal:
>> 
>> % cd Source/hatari
>> % git pull
>> % cd build
>> % cmake ..
> …
>> % cmake --build .
>> 
>> (the source repo was originally cloned with % git clone https://github.com/hatari/hatari.git and the required libraries have been installed via homebrew (% brew install sdl2 libpng make tidy-html5 imagemagick capstone))
>> 
>> Until recently (around December 15) this worked without issues, but now the build fails with the following errors:
>> 
>> [ 26%] Building C object src/cpu/CMakeFiles/UaeCpu.dir/memory.c.o
>> In file included from /Users/frank/Source/hatari/src/cpu/memory.c:15:
>> In file included from /usr/local/Cellar/sdl2/2.28.5/include/SDL2/SDL.h:38:
>> In file included from /usr/local/Cellar/sdl2/2.28.5/include/SDL2/SDL_cpuinfo.h:111:
>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/immintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
>> #error "This header is only meant to be used on x86 and x64 architecture"
> 
> Hi Frank,
> 
> this sounds like your SDL library can not deal with universal binaries?
> Hatari now defaults to building universal binaries, so if your SDL is not
> capable of that, you might want to try to switch it off again. Try:
> 
> cmake -DCMAKE_OSX_ARCHITECTURES:STRING="x86_64" ..
> 
> to configure your sources instead of running "cmake .." - I hope that will
> fix the issue for you.

Yepp, adding -DCMAKE_OSX_ARCHITECTURES:STRING="x86_64" fixed the error and Hatari now builds again. 

Thanks for your help!

Regards,
Frank






Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/