Chakracore: Ubuntu 20.04, Clang 10 build failure

Created on 12 Jun 2020  路  8Comments  路  Source: chakra-core/ChakraCore

I tried to compile ChakraCore in Ubuntu 20.04 following the build instructions for Linux.

I got below error. I follow same procedure in Ubuntu 16.04 and I was able to compile without any issue. Any clue about below error?

Thank you!

-- Configuring done
-- Generating done
-- Build files have been written to: /home/AzureUser/Desarrollo/ChakraCore/out/Debug
[ 1%] Building CXX object pal/src/CMakeFiles/Chakra.Pal.Singular.dir/cruntime/file.cpp.o
In file included from /home/AzureUser/Desarrollo/ChakraCore/pal/src/cruntime/file.cpp:23:
In file included from /home/AzureUser/Desarrollo/ChakraCore/pal/src/include/pal/palinternal.h:553:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/stdlib.h:36:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstdlib:75:
/usr/include/stdlib.h:112:36: error: exception specification in declaration does not match previous declaration
__extension__ extern long long int atoll (const char __nptr)
^
/home/AzureUser/Desarrollo/ChakraCore/pal/inc/pal.h:6198:33: note: previous declaration is here
PALIMPORT long long int __cdecl atoll(const char *);
^
1 error generated.
make[2]:
[pal/src/CMakeFiles/Chakra.Pal.Singular.dir/build.make:63: pal/src/CMakeFiles/Chakra.Pal.Singular.dir/cruntime/file.cpp.o] Error 1
make[1]:
[CMakeFiles/Makefile2:757: pal/src/CMakeFiles/Chakra.Pal.Singular.dir/all] Error 2
make: *
* [Makefile:84: all] Error 2
See error details above. Exit code was 2

Build Break Linux

Most helpful comment

Thanks for confirming, and I hope you're able to work with Clang 9 for now. I'll aim to fix this in the next week or two - hoping to update all of the PAL code.

For reference for anyone looking at this
PAL (Platform Abstraction Layer) is a component of the dotNet CoreCLR, it implements various low level windows APIs on top of linux/macOS APIs to allow a codebase originally written for windows to run on other platforms without significant edits. ChakraCore's codebase contains an old fork of PAL with edited build files to integrate it with ChakraCore - this was how ChakraCore which was originally built as windows only was made cross platform fairly quickly.

Related #6404

All 8 comments

What version of ChakraCore are you trying to build? Latest master or the 1.11 release branch?

(Wondering if it could relate to this: https://github.com/microsoft/ChakraCore/pull/6418)

I'm using the latest master in both cases.(16.04, ok, and 20.04, failed) I have not tried with 19.04, I'll do that tomorrow.

One other possibility is that it could relate to this fix https://github.com/dotnet/coreclr/pull/28045 which we have not (yet) ported across from coreCLR for PAL, this may cause a build failure with clang 10, though shouldn't affect clang 9 or earlier.

@Fly-Style confirmed that he can build master on Ubuntu 20.04 with clang 9.

I believe I tried clang 10, I'd try clang 9

I confirm that clang 9 works ok in Ubuntu 20.04. The issue was more related to clang10 and I guess PAL

Thanks for confirming, and I hope you're able to work with Clang 9 for now. I'll aim to fix this in the next week or two - hoping to update all of the PAL code.

For reference for anyone looking at this
PAL (Platform Abstraction Layer) is a component of the dotNet CoreCLR, it implements various low level windows APIs on top of linux/macOS APIs to allow a codebase originally written for windows to run on other platforms without significant edits. ChakraCore's codebase contains an old fork of PAL with edited build files to integrate it with ChakraCore - this was how ChakraCore which was originally built as windows only was made cross platform fairly quickly.

Related #6404

Fixed in #6604

(Sorry for delay I forgot about this)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

atefshehata picture atefshehata  路  3Comments

obastemur picture obastemur  路  4Comments

ross-weir picture ross-weir  路  4Comments

crdumoul picture crdumoul  路  4Comments

dilijev picture dilijev  路  6Comments