基于Ubuntu14.04的CuraEngine三维切片源码编译

很久没有更新博客了,一来是忙,二来是项目没有需要写博客记录的。但是最近有不少项目,值得记录下来的,一个一个来,先说第一个。

这是一个3D打印机相关的项目,其中很重要的一步是在树莓派上实现CuraEngine的编译。分步骤来,先在ubuntu14.04下进行试验编译。在网上找了很多帖子,或者说按照github上的CuraEngine的指导按步骤进行,或者是列出了一些步骤和问题以及解决方法,但就没有一个很系统的详细的步骤,以至于在安装编译的过程中费了很大的周章。为避免后来者再像我一样费尽周折,在这里将详细步骤列出,作为研发记录以及后来者的参考。

先列出参考网页:

CuraEngine源码地址:

https://github.com/Ultimaker/CuraEngine

libArcus 源码地址:

https://github.com/Ultimaker/libArcus

Protobuf源码地址:

https://github.com/google/protobuf/releases

详细编译步骤:

1. 编译安装protobuf:

    (1) sudo apt-get install autoconf automake libtool curl make g++ unzip

    (2) git clone https://github.com/protocolbuffers/protobuf.git# 下载 protobuf    

    (3) cd protobuf

    (4) git submodule update --init --recursive

    (5) ./autogen.sh

    (6) ./configure

    (7) make

    (8) make check

    (9) sudo make install

    (10) sudo ldconfig #refresh shared library cache

2. 编译安装cmake

     (1) sudo apt-get install build-essential

     (2) wget http://www.cmake.org/files/v3.11/cmake-3.11.3.tar.gz

     (3) tar xvf cmake-3.11.3.tar.gz

     (4) cd cmake-3.11.3

     (5) ./configure

     (6) make

     (7) sudo apt-get install checkinstall
     (8) sudo checkinstall
     (9) sudo make install

     (10) #sudo mv /usr/bin/cmake /usr/bin/cmake_origin

     (11) #sudo ln -s /usr/local/bin/cmake /usr/bin/cmake

 

3. 安装python3.6python3.6-dev

    (1) sudo add-apt-repository ppa:jonathonf/python-3.6

    (2) Enter确认

    (3) sudo apt-get update

    (4) sudo apt-get install python3.6

    (5) sudo apt-get install python3.6-dev

    (6) sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 200

 

4. 安装python3-sip-dev

    sudo apt-get install python3-sip-dev

 

5. 编译libArcus

    (1) git clone https://github.com/Ultimaker/libArcus.git

    (2) cd libArcus

    (3) mkdir build && cd build

    (4) cmake ..

    (5) make

    (6) sudo make install

6. 升级至C++11(如果是Ubuntu16及以上的用户可以略过此步骤)

         (1) sudo add-apt-repository ppa:ubuntu-toolchain-r/test

         (2) sudo apt-get update

         (3) sudo apt-get install gcc-4.9 gcc-4.9-multilib g++-4.9 g++-4.9-multilib

         (4) sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 50

         (5) sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 90

         (6) sudo update-alternatives --config gcc

         (7) sudo update-alternatives --config g++


7. 编译安装CuraEngine

    (1) git clone https://github.com/Ultimaker/CuraEngine.git

    (2) mkdir build && cd build

    (3) cmake ..

    (4) make

 

发布了34 篇原创文章 · 获赞 12 · 访问量 8万+

猜你喜欢

转载自blog.csdn.net/phmatthaus/article/details/84143704