Followed the information at http://ariya.ofilabs.com/2016/01/playing-with-chakracore-on-linux.html
except that I use virtualbox as the VM and install the ubuntu15.10 from http://releases.ubuntu.com/15.10/
the error message I am seeing is:
c++: error: unrecognized command line option ‘-fdelayed-template-parsing’
pal/src/CMakeFiles/Chakra.Pal.dir/build.make:54: recipe for target 'pal/src/CMakeFiles/Chakra.Pal.dir/cruntime/file.cpp.o' failed
make[2]: *** [pal/src/CMakeFiles/Chakra.Pal.dir/cruntime/file.cpp.o] Error 1
CMakeFiles/Makefile2:90: recipe for target 'pal/src/CMakeFiles/Chakra.Pal.dir/all' failed
make[1]: *** [pal/src/CMakeFiles/Chakra.Pal.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2
@flyboy9 you need clang++3.7+
sudo apt-add-repository "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.7 main"
sudo apt-get update
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -
sudo apt-get install clang++-3.7
You also need libicu
sudo apt-get install libicu-dev
It may ask you to install couple of more packages.
Check if you have clang++ on the path ? Otherwise
sudo ln -s /usr/bin/clang++-3.7 /usr/bin/clang++
sudo ln -s /usr/bin/clang-3.7 /usr/bin/clang
if you don't want to do that, you may set clang location using build.sh
./build.sh --cxx=/usr/bin/clang++-3.7 --cc=/usr/bin/clang-3.7
please let me know, so I can update this comment (eventually wiki)
hmm, followed you instruction, still seeing the same error
@obastemur
ling@ling-VirtualBox:~/Desktop/code/ChakraCore$ cmake . && make
Detected Linux x86_64
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ling/Desktop/code/ChakraCore
[ 1%] Building CXX object pal/src/CMakeFiles/Chakra.Pal.dir/cruntime/file.cpp.o
c++: error: unrecognized command line option ‘-fdelayed-template-parsing’
pal/src/CMakeFiles/Chakra.Pal.dir/build.make:54: recipe for target 'pal/src/CMakeFiles/Chakra.Pal.dir/cruntime/file.cpp.o' failed
make[2]: ** [pal/src/CMakeFiles/Chakra.Pal.dir/cruntime/file.cpp.o] Error 1
CMakeFiles/Makefile2:90: recipe for target 'pal/src/CMakeFiles/Chakra.Pal.dir/all' failed
make[1]: ** [pal/src/CMakeFiles/Chakra.Pal.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2
ling@ling-VirtualBox:~/Desktop/code/ChakraCore$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
ling@ling-VirtualBox:~/Desktop/code/ChakraCore$ sudo ln -s /usr/bin/clang-3.7 /usr/bin/clang
ln: failed to create symbolic link ‘/usr/bin/clang’: File exists
ling@ling-VirtualBox:~/Desktop/code/ChakraCore$ ./builds --cxx=/usr/bin/clang++-3.7 --cc=/usr/bin/clang-3.7
-bash: ./builds: No such file or directory
ling@ling-VirtualBox:~/Desktop/code/ChakraCore$ git branch
Question: is there a way for me to verify if the necessary develop environment is set up correctly?
ling@ling-VirtualBox:~/Desktop/code/ChakraCore$ cmake . && make
Could you use build.sh option above with the explicit location for clang, and clang++ ?
update: -bash: ./builds: No such file or directory could you try build.sh instead ?
from the long you have: ln: failed to create symbolic link ‘/usr/bin/clang’: File exists
where do you have the clang, and clang++ ?
update: and version of the clang installed ? clang -v ?
I also had difficulty building on Ubuntu 15.10. @digitalinfinity suggested that the version of cmake might be a problem. I tried to install the latest but ultimately updated to 16.04 LTS which included cmake 3.5.2, and was able to get a successful build.
With @obastemur's PR #913 now merged in, cmake 3.5 is no longer needed either so it should build fine with Ubuntu 15.10.
@flyboy9 can you confirm that you're able to build and then we'll close this issue? :)
I've just compiled ChakraCore on a new VM with the steps below;
Closing this issue for now. In case you are unable to compile using the steps above feel free to open this issue back. Thanks for all the details!
@Microsoft/chakra-developers what is the best way to share these steps above from our wiki on Github?
@obastemur : @liminzhu might be able to provide more guidance or integrate this into the wiki in an appropriate place.
// thanks for cc'ing me @dilijev
Great stuff @obastemur ! I was actually looking for such a guide. The most logical place in the current wiki would be Building ChakraCore and have a linux block in it. I can test it out today and add the guide there.
@liminzhu sounds great. Thanks!
@obastemur Just add the guide there with slight tweaks of words.
Most helpful comment
With @obastemur's PR #913 now merged in, cmake 3.5 is no longer needed either so it should build fine with Ubuntu 15.10.