darlinghq / darling

Darwin/macOS emulation layer for Linux
http://www.darlinghq.org
GNU General Public License v3.0
11.45k stars 445 forks source link

error: prefix attribute must be followed by an interface or protocol #964

Closed jcgonzalezr92 closed 3 years ago

jcgonzalezr92 commented 3 years ago

Hello All,

This happened when i tried the make, I installed all dependencies and all was going ok until here:

[ 12%] Building CXX object src/external/objc4/runtime/CMakeFiles/objc_obj.dir/maptable.mm.o [ 12%] Building CXX object src/external/objc4/runtime/CMakeFiles/objc_obj.dir/hashtable2.mm.o [ 12%] Building CXX object src/external/objc4/runtime/CMakeFiles/objc_obj.dir/NSObject.mm.o /home/user/darling/src/external/objc4/runtime/NSObject.mm:2000:2: error: prefix attribute must be followed by an interface or protocol @implementation _NSObject ^ 1 error generated. make[2]: [src/external/objc4/runtime/CMakeFiles/objc_obj.dir/build.make:89: src/external/objc4/runtime/CMakeFiles/objc_obj.dir/NSObject.mm.o] Error 1 make[1]: [CMakeFiles/Makefile2:11542: src/external/objc4/runtime/CMakeFiles/objc_obj.dir/all] Error 2 make: *** [Makefile:130: all] Error 2

I was wondering if you have any advise or if you can see that i may have done something wrong please let me know.

Thanks and regards!

facekapow commented 3 years ago

What commit are you trying to build and what version of clang are you using?

ivanpmartell commented 3 years ago

I'm not OP, but I have the same error with the following: commit 35534fcaa312b184145c95a543cf86c8b08d4e70

clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final) Target: x86_64-pc-linux-gnu Thread model: posix

Running on ubuntu bionic: Distributor ID: Ubuntu Description: Ubuntu 18.04.5 LTS Release: 18.04

HinTak commented 3 years ago

That clang is way too old - current is 11 or 12? It is certainly 10+ . You'll have problem with old kernel version with ubuntu 18.04 too! Consider upgrading to 20.04 at least.

facekapow commented 3 years ago

Yeah, certainly too old. The docs say Clang 9+ is required (latest Clang release is 12).