HVML / PurC

The prime HVML interpreter for C Language.
GNU Lesser General Public License v3.0
1.06k stars 54 forks source link

build failed on mac os monterey(12.3.1 (21E258)) m1 chip #3

Closed devbian closed 2 years ago

devbian commented 2 years ago

gcc version:

Apple clang version 13.1.6 (clang-1316.0.21.2.5) Target: arm64-apple-darwin21.4.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin

cmake version:

cmake version 3.23.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

build command:

cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPORT=Mac -B build && cmake --build build && sudo cmake --install build

error message

[ 73%] Building C object Source/PurC/CMakeFiles/PurC.dir/utils/rbtree.c.o [ 74%] Building C object Source/PurC/CMakeFiles/PurC.dir/utils/real.c.o /workspace/PurC/Source/PurC/utils/real.c:775:1: error: '_dummy_f128' declared as an array with a negative size _COMPILE_TIME_ASSERT(f128, sizeof(long double) == sizeof(uint64_t) 2); ^~~~~~~~~~~~~~~ /workspace/PurC/Source/PurC/utils/real.c:774:36: note: expanded from macro '_COMPILE_TIME_ASSERT' typedef int dummy ## name[(x) 2 - 1] ^~~ 1 error generated. make[2]: [Source/PurC/CMakeFiles/PurC.dir/utils/real.c.o] Error 1 make[1]: [Source/PurC/CMakeFiles/PurC.dir/all] Error 2 make: *** [all] Error 2

VincentWei commented 2 years ago

The error means that the long double on your platform is not 128 bits...

Let's see how to suppress this error.

Thanks for your report!

VincentWei commented 2 years ago

Fixed. Please pull and try again.

devbian commented 2 years ago

@VincentWei Greate. compile success.

image