floooh / fips-bgfx

fipsified version of bgfx (https://github.com/bkaradzic/bgfx)
17 stars 7 forks source link

Can't build under macOS #16

Open gmisail opened 7 years ago

gmisail commented 7 years ago

I followed the steps in the README. After building, I get this error message.

/Users/gmisail/Desktop/Projects/Junior/CPP/CRay/fips-workspace/fips-bgfx/bgfx/3rdparty/etc2/ProcessRGB.cpp:208:53: error: 
      member reference base type 'v4i' (aka 'uint16 [4]') is not a structure or
      union
        __m128i d = _mm_loadu_si128((__m128i*)a[i*2].data());
                                              ~~~~~~^~~~~
/Users/gmisail/Desktop/Projects/Junior/CPP/CRay/fips-workspace/fips-bgfx/bgfx/3rdparty/etc2/ProcessRGB.cpp:225:44: error: 
      member reference base type 'v4i' (aka 'uint16 [4]') is not a structure or
      union
        _mm_storeu_si128((__m128i*)a[4+i*2].data(), a0);
                                   ~~~~~~~~^~~~~
/Users/gmisail/Desktop/Projects/Junior/CPP/CRay/fips-workspace/fips-bgfx/bgfx/3rdparty/etc2/ProcessRGB.cpp:230:53: error: 
      member reference base type 'v4i' (aka 'uint16 [4]') is not a structure or
      union
        __m128i d = _mm_loadu_si128((__m128i*)a[i*2].data());
                                              ~~~~~~^~~~~
/Users/gmisail/Desktop/Projects/Junior/CPP/CRay/fips-workspace/fips-bgfx/bgfx/3rdparty/etc2/ProcessRGB.cpp:237:42: error: 
      member reference base type 'v4i' (aka 'uint16 [4]') is not a structure or
      union
        _mm_storeu_si128((__m128i*)a[i*2].data(), t2);
                                   ~~~~~~^~~~~
4 errors generated.

** BUILD FAILED **

The following build commands failed:
    CompileC /Users/gmisail/Desktop/Projects/Junior/CPP/CRay/fips-workspace/fips-build/fips-bgfx/osx-xcode-debug/fips-bgfx.build/Debug/bgfx-etc2.build/Objects-normal/x86_64/ProcessRGB.o bgfx/3rdparty/etc2/ProcessRGB.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
[ERROR] Failed to build config 'osx-xcode-debug' of project 'fips-bgfx'

I am running macOS 10.12.4.

floooh commented 7 years ago

Hmm yes I can reproduce, might be caused by new clang versions. Unfortunately simply updating the bgfx and bx submodule introduced other problems (with the fips cmake wrapper scripts, could be that the directory structure has changed). I currently cannot take care of this since I'm not working with bgfx at the moment, but pull requests are welcome of course.

SirTrashyton commented 5 years ago

Would you happen to know a fix? I have scoured the internet far and wide and have yet to find a conclusion. My logs: /bin/sh: cmake: command not found [ERROR] Failed to generate 'osx-xcode-debug' of project 'fips-bgfx'

floooh commented 5 years ago

@SirTrashyton ...I'm only seeing the original error outlined above when trying to compile (which is somehow related to SIMD intrinsics). Your problem looks more basic, like fips itself isn't working.

When you run ./fips diag tools, does it find cmake? It should roughly look like this:

> ./fips diag tools
=== tools:
git:    found
cmake:  found
ccmake: found
make:   found
ninja:  found
xcodebuild: found
xcrun:  found
javac:  found
java:   found
python2:    found
ccache: OPTIONAL, NOT FOUND (used with './fips set ccache on')
vscode: found
clion:  OPTIONAL, NOT FOUND (used as IDE with clion configs)