Skip to content

Instantly share code, notes, and snippets.

@imylomylo
Last active September 17, 2019 14:02
Show Gist options
  • Save imylomylo/239b6edc78a4b03146d8f4d209bcdde7 to your computer and use it in GitHub Desktop.
Save imylomylo/239b6edc78a4b03146d8f4d209bcdde7 to your computer and use it in GitHub Desktop.
Maker Bot Install From Scratch
```
1 sudo vi /etc/netplan/50-cloud-init.yaml
2 sudo netplan apply
3 sudo apt-get update
4 sudo apt-get upgrade
5 wget https://github.com/Kitware/CMake/releases/download/v3.15.3/cmake-3.15.3.tar.gz
6 tar zxvf cmake-3.15.3.tar.gz
7 cd cmake-3.15.3/
8 ./configure
9 cd
10 cd systemservices/
11 ./install.coinrequirements.ubuntu1804.sh
12 cd..
13 cd ..
14 ls
15 cd cmake-3.15.3/
16 ./configure
17 make
18 sudo make install
19 sudo update-alternatives --install /usr/bin/cmake cmake /usr/local/bin/cmake 1 --force
20 history
```
The following leads to requiring an upgrade from clang 6
```
21 sudo apt-get install gcc-8
22 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8
23 cd
24 gcc --version
25 git clone https://github.com/KomodoPlatform/antara-makerbot.git
26 cd antara-makerbot/
27 mkdir build
28 cd build/
29 cmake -DCMAKE_BUILD_TYPE=Release ../
30 history
```
```
mylo@dev2:~$ gcc --version
gcc (Ubuntu 8.3.0-6ubuntu1~18.04.1) 8.3.0
```
```
mylo@dev2:~/antara-makerbot/build$ cmake -DCMAKE_BUILD_TYPE=Release ../
-- The CXX compiler identification is Clang 8.0.0
-- Check for working CXX compiler: /usr/bin/clang++
-- Check for working CXX compiler: /usr/bin/clang++ -- broken
CMake Error at /usr/local/share/cmake-3.15/Modules/CMakeTestCXXCompiler.cmake:53 (message):
The C++ compiler
"/usr/bin/clang++"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /home/mylo/antara-makerbot/build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/make cmTC_c8b4d/fast && /usr/bin/make -f CMakeFiles/cmTC_c8b4d.dir/build.make CMakeFiles/cmTC_c8b4d.dir/build
make[1]: Entering directory '/home/mylo/antara-makerbot/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_c8b4d.dir/testCXXCompiler.cxx.o
/usr/bin/clang++ -o CMakeFiles/cmTC_c8b4d.dir/testCXXCompiler.cxx.o -c /home/mylo/antara-makerbot/build/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
Linking CXX executable cmTC_c8b4d
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c8b4d.dir/link.txt --verbose=1
/usr/bin/clang++ CMakeFiles/cmTC_c8b4d.dir/testCXXCompiler.cxx.o -o cmTC_c8b4d
/usr/bin/ld: cannot find -lstdc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
CMakeFiles/cmTC_c8b4d.dir/build.make:86: recipe for target 'cmTC_c8b4d' failed
make[1]: *** [cmTC_c8b4d] Error 1
make[1]: Leaving directory '/home/mylo/antara-makerbot/build/CMakeFiles/CMakeTmp'
Makefile:121: recipe for target 'cmTC_c8b4d/fast' failed
make: *** [cmTC_c8b4d/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:9 (project)
-- Configuring incomplete, errors occurred!
See also "/home/mylo/antara-makerbot/build/CMakeFiles/CMakeOutput.log".
See also "/home/mylo/antara-makerbot/build/CMakeFiles/CMakeError.log".
```
This fixes it
```
sudo apt-get install gcc-8 g++-8
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment