metaeducation / ren-c

Library for embedding a Rebol interpreter into C codebases
GNU Lesser General Public License v3.0
128 stars 27 forks source link

Compile failure (clang-9.0.1, @9708455) #1081

Closed giuliolunati closed 4 years ago

giuliolunati commented 4 years ago

In file included from ../src/core/a-globals.c:33: ../src/include/sys-core.h:132:10: error: " included prior to %sys-core.h in release build"

giuliolunati commented 4 years ago

Smoking gun is 9708455e

hostilefork commented 4 years ago

The comments explain the motivation... it's to try and catch compilations of the core that link to things like printf without having to go to the nm and looking at symbols.

But it does seem there are compilers where the inclusion of stdio.h is unavoidable (like you do #include <stdlib.h> and it includes stdio). I think this is unfortunate...it basically makes all standard library functions reserved words in the language.

Perhaps exempting Android is good enough. Try this:

https://github.com/metaeducation/ren-c/commit/8766228abd55ca56f6f34d712b33391709968498

giuliolunati commented 4 years ago

Don't exempt Android! The cross compilation with gcc works well, the issue is restricted to clang, that I use for native compilation on Termux. I can manage to switch to gcc... Better reverting 876628 and closing this issue.

hostilefork commented 4 years ago

Well, we can exempt clang then...

hostilefork commented 4 years ago

I force pushed over top of the last commit with __clang__ as the exemption:

https://github.com/metaeducation/ren-c/commit/0fc26acde2f67a5c77be4584bd4b700b9bef9a81

It is probably recent clang that is the problem, because it only showed up in the most recent OS X. So that's probably the better check.

BTW: please do give any comments on the generic tuple... as I intend to merge it soon.

hostilefork commented 4 years ago

Assuming the __clang__ worked (it worked on the builds for the latest OS X)...

giuliolunati commented 4 years ago

Yes, it works, thanks!

Il mer 7 ott 2020, 20:53 Hostile Fork notifications@github.com ha scritto:

Assuming the clang worked (it worked on the builds for the latest OS X)...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/metaeducation/ren-c/issues/1081#issuecomment-705128816, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLC4M6F5V2DOXUEEYV7D4DSJS2JNANCNFSM4SF5LYXQ .