zoukankan      html  css  js  c++  java
  • Running Slic3r from git on GNU Linux

    https://github.com/slic3r/Slic3r/wiki/Running-Slic3r-from-git-on-GNU-Linux

    Installing Slic3r

     

    Do NOT install with sudo!

     

    How to use this document

    This document is divided into sections.

    Notes/instructions specific to a particlar Linux distribution are included as a subsection of the main section. So the prerequisite instructions for Ubuntu 16.04 are listed in the Installing Prerequisites section, under Ubuntu 16.04. If you do not see a section for your distribution of choice then use the general instructions (if available) or translate the information from one of the other distributions to your own.

    If you want to add instructions or suggest edits to this document, please create a github issue.

     

    Installing prerequisites

     

    G++ (C++ Compiler)

    Slic3r requires a C++ compiler that suppports most of the C++11 spec. For GCC, this means 4.9 or newer is required (this is a hard requirement). Clang 3.3 should also work (and is used on OSX).

    You should install gcc from your distribution's packages whenever able.

     

    Perl

    Slic3r works fine with Perl 5.12, 5.14, 5.18, 5.20, 5.22, 5.24: in other words all versions except for 5.16. If your distribution ships 5.16 it is recommend that you use Perlbrew for installing an alternative user-land perl. See below for Perlbrew-specific instructions. Some distributions have brokens perls, so using perlbrew is always a good idea.

     

    General Libraries

    Ubuntu 16.04

     $ sudo apt-get install build-essential libgtk2.0-dev libwxgtk3.0-dev libwx-perl libmodule-build-perl git cpanminus libextutils-cppguess-perl libboost-all-dev libxmu-dev liblocal-lib-perl wx-common libopengl-perl libwx-glcanvas-perl libtbb-dev libxmu-dev freeglut3-dev libwxgtk-media3.0-dev libboost-thread-dev libboost-system-dev libboost-filesystem-dev libcurl4-openssl-dev

    Debian 8 (Jessie)

     $ sudo apt-get install -y build-essential cpanminus liblocal-lib-perl
     $ sudo apt-get build-dep slic3r
     $ sudo apt-get install -y libxmu-dev freeglut3-dev libwxgtk-media2.8-dev 
     $ sudo apt-get install libboost-thread-dev libboost-system-dev libboost-filesystem-dev

    Note: depending on your version of Debian, you may need to install libwxgtk-media3.0-dev instead of 2.8.

    Debian 7 (Wheezy) or Ubuntu 14.04 or 12.02

     # For Ubuntu 14.04 gcc-4.9:
     $ sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
     $ sudo apt-get update
     $ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9
    
     $ sudo apt-get install -y gcc-4.9 git build-essential libgtk2.0-dev libwxgtk2.8-dev libwx-perl libmodule-build-perl libnet-dbus-perl libexpat1-dev cpanminus liblocal-lib-perl
     $ sudo apt-get install -y libxmu-dev freeglut3-dev libwxgtk-media2.8-dev
     $ sudo apt-get install libboost-thread-dev libboost-system-dev libboost-filesystem-dev libboost-all-dev libtbb-dev

    Ubuntu 12.02 Special Note

    Ubuntu 12.02 has versions of Boost in its repository that are too old. Add new versions from the ppa as below.

    sudo add-apt-repository ppa:boost-latest/ppa
    sudo apt-get update
    sudo apt-get install libboost-thread1.55-dev libboost-system1.55-dev

    OpenSUSE 13.2

    sudo apt-get install curl
    curl -L http://cpanmin.us | sudo perl - --sudo App::cpanminus

    Add opensuse build service repository with Parse::PMfile

    zypper ar -r http://download.opensuse.org/repositories/devel:/languages:/perl:/CPAN-P/openSUSE_13.2/devel:languages:perl:CPAN-P.repo  -n build:perl:cpan-p -f
    
    Install required packages
    zypper install git-core curl perl-Wx perl-App-cpanminus perl-ExtUtils-CppGuess perl-Moo perl-threads perl-Math-PlanePath perl-Class-Accessor perl-Parse-PMFile wxWidgets-ansi-devel libXmu-devel libXi-devel

    Fedora 17

    sudo yum install git curl gcc-c++ perl-Wx 
        perl-Module-Build perl-App-cpanminus perl-Moo

    Fedora 18

    sudo yum install git curl gcc-c++ perl-Wx 
        perl-Module-Build perl-App-cpanminus perl-Moo 
        perl-Math-PlanePath perl-Boost-Geometry-Utils perl-Math-Clipper 
        perl-Math-ConvexHull perl-Math-Geometry-Voronoi perl-parent 
        perl-Growl-GNTP perl-Class-XSAccessor perl-XML-SAX-ExpatXS 
        perl-Math-ConvexHull-MonotoneChain perl-ExtUtils-XSpp 
        perl-ExtUtils-CppGuess perl-ExtUtils-Typemaps-Default 
        perl-Capture-Tiny perl-Test-Base perl-Test-Differences 
        perl-Text-Diff perl-Module-Build-WithXSpp
    $ curl -L http://cpanmin.us | sudo perl - --sudo App::cpanminus

    Fedora 24/25

    sudo dnf install git curl gcc-c++ boost-devel perl-Wx 
        perl-Module-Build perl-App-cpanminus perl-Moo 
        perl-Math-PlanePath perl-Boost-Geometry-Utils perl-autodie 
        perl-Math-ConvexHull perl-Math-Geometry-Voronoi perl-parent 
        perl-Growl-GNTP perl-Class-XSAccessor perl-XML-SAX-ExpatXS 
        perl-Math-ConvexHull-MonotoneChain perl-ExtUtils-XSpp 
        perl-ExtUtils-CppGuess perl-ExtUtils-Typemaps-Default 
        perl-Capture-Tiny perl-Test-Base perl-Test-Differences 
        perl-Text-Diff perl-Module-Build-WithXSpp /usr/bin/cpan
    sudo cpan
    $ install App::cpanminus
    $ install PAR
    $ install PAR::Packer
    $ quit

     

    Gentoo

    Via portage:

    echo "=media-gfx/slic3r-9999 **" >> /etc/portage/package.keywords/slic3r && emerge -av =media-gfx/slic3r-9999

    Building by Hand:

    NOTE -- letting App-cpanminus do its thing on a Gentoo Linux system has a high chance of messing up your system image! Proceed with caution.

    Install local::lib. This should let Slic3r's use of cpanm not break your system.

    layman -a perl-experimental-snapshots
    emerge App-cpanminus

     

    Perlbrew

    Install perlbrew (do this once per system):

    $ wget -O - https://install.perlbrew.pl | bash
    $ perlbrew install perl5.26.1 -Dusethreads -Duselargefiles -Dcccdlflags=-fPIC -Doptimize=-O2 --as threaded-perl-5.26.1

    Follow the instructions regarding source Perlbrew tells you.

    $ perlbrew switch threaded-perl-5.26.1
    
    Install cpanm for perlbrew:
    ```` bash
    $ perlbrew install-cpanm

     

    Get Slic3r

    Choose either Slic3r stable or master. master has more features, but may have more bugs, stable does not change as often.

     

    Get Slic3r (stable)

    $ git clone https://github.com/alexrj/Slic3r.git
    $ cd Slic3r
    $ git checkout -b origin/stable 

     

    Get Slic3r (master)

    $ git clone https://github.com/alexrj/Slic3r.git
    $ cd Slic3r
    $ git checkout -b origin/master 

     

    Update Slic3r

    cd to the directory you cloned Slic3r to.

    $ git pull

     

    Build Slic3r

    $ export LDLOADLIBS=-lstdc++
    $ perl Build.PL
    $ perl Build.PL --gui

    Create a file in your favorite text editor, call it slic3r and paste the following into it:

    #!/bin/sh
    perl ./slic3r.pl $*

    Mark it as executable with chmod +x slic3r

    Perlbrew

    $ sudo CPANM=~/perl5/perlbrew/bin/cpanm perl Build.PL
    $ sudo CPANM=~/perl5/perlbrew/bin/cpanm perl Build.PL --gui

     

    Troubleshooting

     

    CppGuess

    If you get an error where CppGuess fails to build, use

    export LDLOADLIBS=-lstdc++

    to set that flag and then try running perl Build.PL again. CppGuess usually only needs to be built once, so subsequent builds of Slic3r should not require that flag.

     

    Alternatives

     

    Debian 8 (Jessie)

    Use the fork https://github.com/lordofhyphens/Slic3r which is a patchset to produce a Debian package of current Slic3r.

     

    Build Slic3r (C++)

    Note: Slic3r's C++ side only supports CLI. While a GUI may be built, it is nonfunctional.

     

    Prerequisites

    • Slic3r's C++ toolpath requires CMake 3.8 or higher.
    • Boost is still required.
    • The GUI code requires a C++14 compliant compiler (gcc-6 or clang 3.4)
    • You also need libcurl4-openssl-dev ( for the cmake configuration )

     

    Procedure

    mkdir build
    cd build
    cmake ../src 
    cmake --build . -- -j4 
    

    There are several command switches that may be passed to cmake.

    Use cmake ../src -LH in the build directory to display all of them.

  • 相关阅读:
    visual studio disable git
    app常见性能测试点
    App测试流程及测试点(个人整理版)
    APP测试要点
    APP端测试常见的功能点
    一文搞懂性能测试常见指标
    为什么会有生产bug?
    线上出了bug,是谁的责任?
    生产上线发现重大Bug的思考
    项目上线后出现Bug,该如何处理?
  • 原文地址:https://www.cnblogs.com/ztguang/p/12644351.html
Copyright © 2011-2022 走看看