Closed Baptou88 closed 3 years ago
I have not tried it in a long time. That is a surprising error because I would expect that many people would have reported this if it were a common problem. Perhaps try to remove libglew-dev from the list and see if it work? Or to remove libglexmx-dev and see if it works?
If the first command doesn't work, I do not expect make to work either.
I think I got this too, but I pretty much ignored that error, hoping that I wouldn't care because I think it was for the GUI version of Slic3r?
Can't edit my previous comment... I downloaded the PE for Slic3r. Since it uses cmake, you can comment out line 26 and 28 (one is for the GUI version, the other is for wxWidgets). on the rPi, you likely won't need those. You will still have to run: sudo apt-get install libglew-dev
by hand, but you shouldn't need the other one. For some reason, the Slic3r developers didn't separate the GUI components from their code very well, so even removing the option doesn't seem to remove the dependancy. Maybe it is something you should ask them to look into a bit for octoprint? Or at least a leaner command line build?
Thanks for the reply !
but what is the line 26 and 28 @roboknight
you can comment out line 26 and 28
Sorry, it was late. I meant line 26 and 28 of the CMakeLists.txt file. It contains GUI support by default it appears. HOWEVER... I have had trouble with the default 1.62 boost library that the Pi seems to come with. I'm attempting to build 1.66. 1.62 doesn't seem to contain the Boost.Process headers. You can download them, but for some reason 1.62 doesn't seem to get the support. So I am attempting to build 1.66 to see if I can get that support.
It appears that Boost.Process was introduced in boost 1.64 https://www.boost.org/doc/libs/1_64_0/doc/html/process.html .
Seems like you're trying to install the latest Slic3r PE? Would you want to first try and old version?
My browser isn't supported with github, so I can't edit my comments instead of adding new ones. What I did was the following (In the Slic3r directory after I edited CMakeLists.txt): mkdir build cd build cmake .. make
I think I had pretty much everything installed. You still need libglew-dev as above. Note: I don't use -j2 on the rPi because the rPi just doesn't have the horsepower or memory to really run multi-process. I've seen that around. The -j option for make just allows make to run multiple processes to compile faster. On your x86 beast, that's fine, but on the lil 'ole rPi... it'll likely just run you out of memory.
If you got it working, please modify the script in the wiki. Thanks!
I have an older one... not for the Prussa, but I wanted to see a few of the newer features, like the 3D honeycomb. If boost 1.66 fails, then I'll cave and give up on 3D honeycomb... I just wanted to see what that looked like :)
@roboknight I'm sure you want to see the new features! How about if you compile boost sources from scratch? It's not really that hard. Download boost, unzip, then run:
./bootstrap.sh --with-libraries=process
./b2
sudo ./b2 install
It's actually pretty quick. You'll need the correct list of libraries for bootstrap. If the build complains about others, you need to add them. Many of them are header-only so they don't require mentioning.
I'm in the middle of it. It just hasn't finished (I'm building on the rPi... ugh)... Except I think you might have just saved me... I didn't add --with-libraries=process ...
I downloaded version 1.66 from the sourceforge... don't know if it is really the latest (I don't think so) At any rate, I ran into an issue with the --with-libraries... it keeps telling me its the wrong option --with-
I had to restart it without the option. So I guess I'm pretty much getting all of boost. I have a 16GB SDcard (probably what is slowing this down actually). At any rate, it looks like it's "cup-o-coffee" time.
Looks like Boost 1.66 installed just fine. I'm at 50%... much further than before. So I'm hoping it will finish.
Okay, I'm unsure at this point, but I may have reached the compile limits of the rPi, no matter what. It seems to be compiling one file, PlaceholderParser.cpp and just hanging... Its still there, but it doesn't seem like it has made any progress. I'm going to leave it at this point and see if it finishes in the morning.
You may want to have a look at this when compiling Slic3r: https://stackoverflow.com/questions/27588296/running-gcc-on-c-source-file-on-linux-gives-cc1plus-out-of-memory-allocati
The file I was getting stuck on may have a similar issue. I basically ran "fromdos" on all the .cpp and .hpp files. It cleared up the file I was getting stuck on.
Okay, I finally got the thing built... but I had to give up on NOT building the gui version... Apparently you only really get the gui_version no matter what. NOTE: I have an rPi 3 B+ with a 16GB SDCard resized so that the rPi can see the whole card. If you have a 4GB card, or you haven't resized your partition so the whole card can be used by the rPi, these instructions may fail in unpredictable ways.
You will need to increase your swapfile space by bumping the dphys-swapfile configuration (you may need even 4000 here if you want to try the precompiled headers, but start with 3000):
sudo nano /etc/dphys-swapfile
# Change the line in dphys-swapfile to the following and save the file.
CONF_SWAPSIZE=3000
Now you are going to need the wxWidgets libraries, and you are going to have to edit CMakeLists.txt:
sudo apt-get install wx-common
sudo apt-get install libwxbase3.0-dev
sudo apt-get install libwxgtk3.0-dev
# from the checked out Slic3r PE directory
nano CMakeLists.txt # This did say vi. I'm a VI geezer.
WxWidgets installs a lot of stuff, including GTX2.
When you edit the CMakeLists.txt file (in the main Slic3r directory) (NOTE: One of the options is for PCH or pre-compiled headers. It may help to change that to 0)
option(SLIC3R_STATIC "Compile Slic3r with static libraries (Boost, TBB, glew)" ${SLIC3R_STATIC_INITIAL})
option(SLIC3R_GUI "Compile Slic3r with GUI components (OpenGL, wxWidgets)" 1)
option(SLIC3R_FHS "Assume Slic3r is to be installed in a FHS directory structure" 0)
option(SLIC3R_WX_STABLE "Build against wxWidgets stable (3.0) as oppsed to dev (3.1) on Linux" 1)
option(SLIC3R_PROFILE "Compile Slic3r with an invasive Shiny profiler" 0)
option(SLIC3R_PCH "Use precompiled headers" 1)
option(SLIC3R_MSVC_COMPILE_PARALLEL "Compile on Visual Studio in parallel" 0)
option(SLIC3R_MSVC_PDB "Generate PDB files on MSVC in Release mode" 0)
option(SLIC3R_PERL_XS "Compile XS Perl module and enable Perl unit and integration tests" 0)
option(SLIC3R_ASAN "Enable ASan on Clang and GCC" 0)
option(SLIC3R_SYNTAXONLY "Only perform source code correctness checking, no binary output (UNIX only)" 0)
Then, make a build directory in the Slic3r PE directory
mkdir build
cd build
This way, if things go wrong, you can blow away the build and start again. I used Boost 1.66 built from source (as above in this thread). It was pretty easy. Here you can leave the build directory to build the Boost library. When you are finished, return to your build directory. NOTE: If you have previously built Slic3r (not Slic3r PE) and used Boost 1.62, removing this here will cause issues with Slic3r. You can attempt to LEAVE the Boost 1.62 libraries, however, I don't know which version CMake will locate when it looks for libraries. If it only finds the 1.62, then your build may fail. If it finds 1.66, then you should have no issues with either Slic3r version. I haven't gotten around to trying to fix Slic3r to use Boost 1.66, but consider this before you go ahead and install Slic3r PE.
# To remove your current version of boost. Make sure you pay attention
# to the dpkg output and use that in place of libboost1.62-dev
dpkg -S /usr/include/boost/version.hpp
sudo apt-get autoremove libboost1.62-dev
# For reference, if you haven't yet built libboost-1.66
# get the source for libboost-1.66, extract it, and enter the directory.
# From there, do the following to build it. This can be done outside
# your Slic3r PE build directory.
./bootstrap.sh
./b2
sudo ./b2 install
The above commands are for reference to build libboost-1.66 from source. If you have already built libboost-1.66 and installed it, you should be fine.
Return to the directory you were building in. I ran this BEFORE running cmake or make:
sudo apt-get install tofrodos
find .. -name \*.c -exec fromdos \{\} \;
find .. -name \*.cpp -exec fromdos \{\} \;
find .. -name \*.hpp -exec fromdos \{\} \;
find .. -name \*.h -exec fromdos \{\} \;
from the build directory. The first command installs fromdos (you will likely have to install fromdos (or you can use SED and perform an equivalent procedure, but I don't know the command off-hand)) and the rest run fromdos on the source files. It might help with the above issue. It did help with one file that seemed to get "stuck". You can try without doing this. I don't know what is causing the issue here, but things just seemed to get stuck.
Finally:
cmake ..
make
sudo make install # This should install everything, but I ended up just copying slic3r-gui to /usr/local/bin
At any rate, hopefully you'll end up with slic3r-gui. It still runs the same. I don't know where the "GUI" part really is, but it appears to run and slice okay. It DOES have 2 options that differ from Slic3r, so you'll need to checkout #48.
Just to be clear, this was just a clone from the master branch... So I might actually be on whatever is after version_1.44.0-alpha4. If you want 1.41.3, or another tag, you'll need:
git checkout 1.41.3
Or whatever version you want to checkout.
That's great! The next step is to turn it all into one script so that it can be included in OctoPi. If I had an RPi, I would do it! But I don't have one for testing that I can use.
I was trying to figure that out because I'm still running into problems because some of the arguments have changed (I opened up an issue there...).. I'll clone the code from here and see if I have more luck... but I've got some other things to do before I get home.
So I believe I fixed my problem and I sliced my first file with Slic3r PE 1.42.0-beta.
https://github.com/OctoPrint/OctoPrint-Slic3r/issues/48
Has my change for __init__.py
in OctoPrint-Slic3r, but it doesn't seem like the way to do it because if you are just using the regular slic3r now, it won't work. I'm not sure what the best way to fix it is, but if someone wants to make the change, they must recompile the __init__.py
:
cd /home/pi/oprint/lib/python2.7/site-packages/octoprint_slic3r
nano __init__.py # you need to change line 280
python
>>> import py_compile
>>> py_compile.compile('__init__.py')
Then restart OctoPrint.
How did you run that tar xf boost_1_66_0.tar.bz2
command? It doesn't seem to do anything but let me continue writing stuff until I hit ctrl+z
--Edit-- Nvm, I got it working
You need to bunzip the file first. So it's tar xjf boost_1_66_0.tar.bz2
.
@roboknight Want to send a PR for the changes in init.py? Is the fix in OctoPrint-Slic3r? Which init.py?
Either have OctoPrint-Slic3r support both styles of flags, checking the version and doing the right thing. Or, have an external script that wraps slic3r and converts the print-center to center as needed.
I have install boost 1.66 and install:
sudo apt-get install wx-common
apt-get install libwxbase3.0-dev
sudo apt-get install libwxgtk3.0-dev
but i still have the same issue
xs/CMakeFiles/libslic3r.dir/build.make:902: recipe for target 'xs/CMakeFiles/lib slic3r.dir/src/libslic3r/GCodeSender.cpp.o' failed make[2]: *** [xs/CMakeFiles/libslic3r.dir/src/libslic3r/GCodeSender.cpp.o] Error 1 CMakeFiles/Makefile2:103: recipe for target 'xs/CMakeFiles/libslic3r.dir/all' fa iled make[1]: *** [xs/CMakeFiles/libslic3r.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: *** [all] Error 2
I'm still getting that wxWidgets 3.0 error. Has anyone fixed it??
So I believe I fixed my problem and I sliced my first file with Slic3r PE 1.42.0-beta.
48
Has my change for init.py in OctoPrint-Slic3r, but it doesn't seem like the way to do it because if you are just using the regular slic3r now, it won't work. I'm not sure what the best way to fix it is, but if someone wants to make the change, they must recompile the init.py:
cd /home/pi/oprint/lib/python2.7/site-packages/octoprint_slic3r vi __init__.py # you need to change line 280 python >>> import py_compile >>> py_compile.compile('__init__.py')
Then restart OctoPrint.
How do I exit out of vi? It just has text but I can't save nor do anything but exit
Oh, yeah, you might want to use nano. I'm a bit of a geezer when it comes to editors. ':q' will get you out of vi. That's COLON and the small 'q'.
@NovaViper, have you installed the wxWidgets 3.0 libraries? You need to have those. Plus, I'm doing all of this on a rPi. If that's what you're using, then you might want to check to see if wxWidgets 3.0 libraries are in your repos.
apt-cache search wx
will let you see all the things containing wx (which should be mostly wxWidgets things).
@eyal the latest tar usually can figure out when things are bzipped, so I stopped using the j. But yeah, an older one will usually need to have it. The wrapper script for slic3r-gui seemed like a good idea to me too. The init.py was the one that ends up in the main site-packages directory. That's the code that generates the arguments. I didn't submit anything because I figured maybe there was a better way to create a wrapper script. And that seems it would go with some kind of installer? Maybe looking for slic3r-gui and if it finds it, then creating the necessary wrapper?
I did file #48, but maybe I need to file something differently?
Oh, yeah, you might want to use nano. I'm a bit of a geezer when it comes to editors. ':q' will get you out of vi. That's COLON and the small 'q'.
@NovaViper, have you installed the wxWidgets 3.0 libraries? You need to have those. Plus, I'm doing all of this on a rPi. If that's what you're using, then you might want to check to see if wxWidgets 3.0 libraries are in your repos.
apt-cache search wx
will let you see all the things containing wx (which should be mostly wxWidgets things).
Yeah, I have many wx stuff:
amule-utils-gui - graphic utilities for aMule boa-constructor - RAD tool for Python and wxWindows application bochs-wx - WxWindows plugin for Bochs bossa - Atmel SAM ARM microcontroller flash programming GUI cain - simulations of chemical reactions cain-examples - examples for cain cain-solvers - solvers for cain drawxtl - crystal structure viewer eekboek-gui - Graphical User Interface for EekBoek erlang-wx - Erlang/OTP bindings to wxWidgets filezilla - Full-featured graphical FTP/FTPS/SFTP client filezilla-common - Architecture independent files for filezilla fontypython - Find, view and manage font files of all kinds gnumed-client - medical practice management - Client gvrng - Interactive, introductory programming language jmdlx - jugglemaster deluxe using wxWidgets libalien-wxwidgets-perl - Perl module for locating wxWidgets binaries libgnuradio-wxgui3.7.10 - gnuradio wxgui functions libmgl-wnd7.4.1 - library for scientific graphs (windows runtime library) libmgl-wx7.4.1 - library for scientific graphs (wx interface for windows) libpadre-plugin-datawalker-perl - simple Perl data structure browser Padre libstat-lsmode-perl - Perl module to format file modes like ls -l libtest-valgrind-perl - module to test Perl code through valgrind libwx-glcanvas-perl - Perl interface to wxWidgets' OpenGL canvas libwx-perl - interface to wxWidgets cross-platform GUI toolkit libwx-perl-datawalker-perl - Perl data structure browser libwx-perl-processstream-perl - Wx::Perl module to access IO of external processes via events libwx-scintilla-perl - source code editor component for wxWidgets libwxbase2.8-0 - wxBase library (runtime) - non-GUI support classes of wxWidgets toolkit libwxbase2.8-dbg - wxBase library (debug) - non-GUI support classes of wxWidgets toolkit libwxbase2.8-dev - wxBase library (development) - non-GUI support classes of wxWidgets toolkit libwxbase3.0-0v5 - wxBase library (runtime) - non-GUI support classes of wxWidgets toolkit libwxbase3.0-0v5-dbg - debugging symbols for the wxBase library libwxbase3.0-dev - wxBase library (development) - non-GUI support classes of wxWidgets toolkit libwxgtk-media2.8-0 - wxWidgets Cross-platform C++ GUI toolkit (GTK+ media library runtime) libwxgtk-media2.8-dbg - wxWidgets Cross-platform C++ GUI toolkit (GTK+ media library debug) libwxgtk-media2.8-dev - wxWidgets Cross-platform C++ GUI toolkit (GTK+ media library development) libwxgtk-media3.0-0v5 - wxWidgets Cross-platform C++ GUI toolkit (GTK+ media library runtime) libwxgtk-media3.0-0v5-dbg - debugging symbols for the wxGTK media library libwxgtk-media3.0-dev - wxWidgets Cross-platform C++ GUI toolkit (GTK+ media library development) libwxgtk-webview3.0-0v5 - wxWidgets Cross-platform C++ GUI toolkit (webview library runtime) libwxgtk-webview3.0-0v5-dbg - debugging symbols for the wxGTK webview library libwxgtk-webview3.0-dev - wxWidgets Cross-platform C++ GUI toolkit (webview library development) libwxgtk2.8-0 - wxWidgets Cross-platform C++ GUI toolkit (GTK+ runtime) libwxgtk2.8-dbg - wxWidgets Cross-platform C++ GUI toolkit (GTK+ debug) libwxgtk2.8-dev - wxWidgets Cross-platform C++ GUI toolkit (GTK+ development) libwxgtk3.0-0v5 - wxWidgets Cross-platform C++ GUI toolkit (GTK+ runtime) libwxgtk3.0-0v5-dbg - debugging symbols for the wxGTK GUI toolkit library libwxgtk3.0-dev - wxWidgets Cross-platform C++ GUI toolkit (GTK+ development) libwxsmithlib-dev - wxSmith development files (Code::Blocks plugin for RAD GUI editing) libwxsqlite3-3.0-0 - SQLite3 C++ wrapper for use in programs based on the wxWidgets libwxsqlite3-3.0-dev - Development files for wxSQLite3 movabletype-plugin-core - Core Movable Type plugins mudita24 - ALSA GUI control tool for Envy24 (ice1712) soundcards multiget - graphical download manager openbabel-gui - Chemical toolbox utilities (graphical user interface) owx - utility to program Wouxun dual-band handheld radios plplot12-driver-wxwidgets - Scientific plotting library (wxWidgets driver) poedit - gettext catalog editor poedit-common - Common files for poedit poedit-dbg - gettext catalog editor (debug) psychopy - environment for creating psychology stimuli in Python pyhoca-gui - Graphical X2Go client written in (wx)Python pyprompter - intelligent predictive wxPython text editor pyro-gui - graphical tool for Pyro pyscanfcs - scientific tool for perpendicular line scanning FCS python-avc - live connection among widgets and application variables python-dsv - Python module for delimiter-separated-value files (Python 2) python-fs-browser - Python filesystem abstraction - Gtk browser python-hachoir-wx - wxWidgets GUI for the hachoir binary parser python-opengl - Python bindings to OpenGL (Python 2) python-pyface - traits-capable windowing framework python-pythoncard - wxPython-based GUI construction framework (underlying Python libraries) python-squaremap - wxPython control to display hierarchic data as nested squares python-traitsbackendwx - WxPython backend for Traits and TraitsGUI (Pyface) python-traitsgui - Traits-capable windowing framework python-wxgtk-media3.0 - Python interface to the wxWidgets Cross-platform C++ GUI toolkit (wx.media) python-wxgtk-webview3.0 - Python interface to the wxWidgets Cross-platform C++ GUI toolkit (wx.html2) python-wxgtk2.8 - wxWidgets Cross-platform C++ GUI toolkit (wxPython binding) python-wxgtk2.8-dbg - wxWidgets Cross-platform C++ GUI toolkit (wxPython binding, debug version) python-wxgtk3.0 - Python interface to the wxWidgets Cross-platform C++ GUI toolkit python-wxgtk3.0-dev - Development files for wxPython python-wxmpl - Painless matplotlib embedding in wxPython python-wxtools - Tools from the wxPython distribution python-wxversion - API for selecting the wxPython version to use python3-dsv - Python module for delimiter-separated-value files (Python 3) python3-opengl - Python bindings to OpenGL (Python 3) pythoncard - wxPython-based GUI construction framework (meta-package) pythoncard-doc - wxPython-based GUI construction framework (documentation and samples) pythoncard-tools - wxPython-based GUI construction framework (optional development tools) silverjuke - jukebox, karaoke, and kiosk mode mp3 player soundgrain - Graphical interface to control granular sound synthesis modules spe - Stani's Python Editor stx-btree-dev - b+tree implementation in c++ survex-aven - sophisticated cave survey viewer for Survex tea - graphical text editor with syntax highlighting tpclient-pywx - Thousand Parsec Python client treeviewx - Displays and prints phylogenetic trees wings3d - Nendo-inspired 3D polygon mesh modeller winpdb - Platform independent Python debugger wmaker-utils - Window Maker - Utilities wx-common - wxWidgets Cross-platform C++ GUI toolkit (common support files) wx2.8-doc - wxWidgets Cross-platform C++ GUI toolkit (documentation) wx2.8-examples - wxWidgets Cross-platform C++ GUI toolkit (examples) wx2.8-headers - wxWidgets Cross-platform C++ GUI toolkit (header files) wx2.8-i18n - wxWidgets Cross-platform C++ GUI toolkit (i18n support) wx3.0-doc - wxWidgets Cross-platform C++ GUI toolkit (documentation) wx3.0-examples - wxWidgets Cross-platform C++ GUI toolkit (examples) wx3.0-headers - wxWidgets Cross-platform C++ GUI toolkit (header files) wx3.0-i18n - wxWidgets Cross-platform C++ GUI toolkit (i18n support) wxastrocapture - Windows linuX Astronomy Capture wxastrocapture-dbg - Debug information for Windows linuX Astronomy Capture wxgeometrie - Swiss army knife for the math teacher wxglade - GUI designer written in Python with wxPython wxhexeditor - hexadecimal editor for massive files wxmaxima - GUI for the computer algebra system Maxima wxsqlite3-3.0-dbg - Debugging symbols for wxSQLite3 3.0 wxsqlite3-doc - Documentation files for wxSQLite3 firmware-misc-nonfree - Binary firmware for various drivers in the Linux kernel codeblocks-contrib - contrib plugins for Code::Blocks IDE codeblocks-contrib-dbg - Debugging libraries for the Code::Blocks contrib plugins codeblocks-libwxcontrib0 - Code::Blocks shared libraries for wxContribItems codeblocks-libwxcontrib0-dbgsym - Debug symbols for codeblocks-libwxcontrib0 codeblocks-wxcontrib-dev - Code::Blocks development libraries for wxContribItems codeblocks-wxcontrib-headers - Code::Blocks development headers for wxContribItems libwxsmithlib0 - wxSmith shared library (Code::Blocks plugin for RAD GUI editing) libwxsmithlib0-dev - wxSmith development metapackage wxsmith-dev - wxSmith development files (libraries) wxsmith-headers - wxSmith development files (headers)
sudo apt-get install wx-common
sudo apt-get install libwxbase3.0-dev
sudo apt-get install libwxgtk3.0-dev
It appears you have all of the 3.0-dev libraries. If you have edited the CMakeList.txt file so that the "Build against wxWidgets (stable) 3.0" is selected (1 is true here), then the above libraries should work to fix the wxWidgets stuff. You will likely need to completely clean the directory where you ran cmake. I usually create a "build" directory (as I have above), so that if I need to re-run the cmake, I can just rm -rf *
in that directory and re-run cmake with cmake ..
. You have all of the libraries, and if you've installed libboost-1.66, it should run on the standard OctoPrint distribution.
Changed the setting, but still doens't work
Well, I'm trying to the sudo make j2 command but PuTTY/KiTTY keeps on disconnecting from the pi hence the command never finishes. How can I make it stay connected??
@NovaViper, I'm presuming you did cmake ..
from the build directory before you tried to make anything. Once you do that, you can just run make
. The -j2
will just waste memory on an rPi. Additionally, if you didn't sudo apt-get install libwxbase3.0-dev
it will fail. I noticed I had a mistake above and forgot sudo
(My Chrome version prevents editing at home, hence all the additional entries...can't upgrade that one.). I have since edited the above, so hopefully it combines the steps in the proper order. Anyway, If the make
does succeed, then you can run sudo make install
(you only need the sudo on the make when you are installing). That should just copy files where they need to go. Although, I think I pretty much copied the binary to /usr/local/bin when I was finished. I'll see if I can attempt a patch for the script that does most of this. I haven't done that yet because I'm not familiar with the normal install script and haven't looked that closely at it.
Also, that fromdos
stuff helps the preprocessor. I noticed there was a file or two (I think mainly the precompiled header) that really caused cpp to start hogging memory, and I think it has something to do with the DOS style returns in some of the files. It SHOULDN'T matter, but seems to. I don't know if you have the rPi 3 B+ (that's what I have), and I am using a 16GB SDCard. I don't know if the latter is necessary, but your disconnections sound like the preprocessor starting to hog memory and process time. It may be timing out your connection. I was using an OSX Terminal, though Linux works just as well, with ssh to log into the rPi to do the builds. That may be why I don't see the disconnection. Also, the -j2
starts two threads, which can both hog memory separately. That's why I don't use it on the rPi. There aren't many resources to be had, so trying to "speed up" your build with -j2
, doesn't make sense.
Oh, also it helps if you just rm -rf *
IN YOUR BUILD DIRECTORY. I don't want you to accidentally blow something away that you need before you rebuild with cmake ..
and make
.
sudo make install
failed, saying Segmentation Fault. I already had the libraries installed and cleared the build directory before hand
I have install boost 1.66 and install: sudo apt-get install wx-common apt-get install libwxbase3.0-dev sudo apt-get install libwxgtk3.0-dev but i still have the same issue
xs/CMakeFiles/libslic3r.dir/build.make:902: recipe for target 'xs/CMakeFiles/lib slic3r.dir/src/libslic3r/GCodeSender.cpp.o' failed make[2]: *** [xs/CMakeFiles/libslic3r.dir/src/libslic3r/GCodeSender.cpp.o] Error 1 CMakeFiles/Makefile2:103: recipe for target 'xs/CMakeFiles/libslic3r.dir/all' fa iled make[1]: *** [xs/CMakeFiles/libslic3r.dir/all] Error 2 Makefile:138: recipe for target 'all' failed make: *** [all] Error 2
@Baptou88, I think this is the issue that I used fromdos
for as well as increasing the swapfile size to 3000. I think it is crashing here because it is running out of memory. I have updated the original instructions to fix a couple of missing sudos and the ordering.
@NovaViper , You have an rPi 3 B+? Do you know how much memory? And you did a regular make
first? It sounds like a memory issue, but it's hard to tell. Normally a sudo make install
will build and install everything. I issue a make
before hand because I don't want the build to belong to root
. So I usually do something like make && sudo make install
or make
and then sudo make install
. You should have the same 1GB of ram I have then. Unless you didn't increase your swap space, OR maybe you have an SDCard that doesn't have enough room for the swapfile? Because I ended up using a 16GB SDCard I had laying around. I DID make sure the whole card was used by the rPi. I forget how you need to increase the space, but when I dd'd the file onto the card, it only had 2 or 4 GB of space. You have to increase it with a partitioning command. I don't remember it though. This might help there: https://raspberrypi.stackexchange.com/questions/78411/expanding-partition-on-sd
I don't have know much memory I have and yeah, I have a Raspberry Pi 3 B+. And I did sudo make install before I did make
Do I do all of this in the build directory??
Except for building libboost-1.66, it should be okay to do all of this from the build directory. The instructions for resizing the partition can be done from there. However, make sure you pay attention to the warnings because if you've already got a working OctoPrint setup, you might not be ready to lose that if things go horribly wrong with the partitioning. It seemed pretty easy when I did it, but I STARTED there because I wanted to use the whole SDCard from the get go, so I didn't have much to lose except another DD to the SDCard. Oh, and the editing the CMakeLists.txt will be nano ../CMakeLists.txt
(I didn't use vi there in case you're more comfortable with nano).
I've tried repartitioning and everything.. Still getting errors all over from make
@NovaViper, do you have the output from Make? Oh, and did you just do a git clone <repo>
from the Slic3R PE repo directly? I'm wondering because while I got version 1.42.0-beta, it has a log as the latest that was 1.44.x (or something like that) as the last entry. 1.42.0-beta, the tagged version, was a bit earlier, but SHOULD compile the same. But I also wanted to try to compile the version you have when I get home (not at the rPi right now).
Here:
[ 35%] Built target glew
[ 35%] Built target nlopt
[ 35%] Built target admesh
[ 35%] Built target nowide
[ 35%] Built target clipper
[ 35%] Built target miniz
[ 35%] Built target glu-libtess
[ 35%] Built target polypartition
[ 35%] Built target poly2tri
[ 35%] Built target qhull
[ 35%] Built target semver
[ 35%] Building CXX object src/libslic3r/CMakeFiles/libslic3r.dir/pchheader.cpp.o
c++: internal compiler error: Segmentation fault (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-6/README.Bugs> for instructions.
src/libslic3r/CMakeFiles/libslic3r.dir/build.make:73: recipe for target 'src/libslic3r/CMakeFiles/libslic3r.dir/pchheader.cpp.o' failed
make[2]: *** [src/libslic3r/CMakeFiles/libslic3r.dir/pchheader.cpp.o] Error 4
CMakeFiles/Makefile2:1427: recipe for target 'src/libslic3r/CMakeFiles/libslic3r.dir/all' failed
make[1]: *** [src/libslic3r/CMakeFiles/libslic3r.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
Yeah, that's the precompiled header. It's running the c-preprocessor off the rails and running out of memory. You can "uncheck" the use precompiled headers. That might help, but that one takes a TON of memory. I didn't think to ask what other processes you might have had on the rPi. I don't know if you have just the vanilla OctoPrint build. Unchecking that option will probably get you past this. That sucker is HUGE... I had some real trouble on that one. I don't know how many times I had to recompile that one because of issues. You MIGHT also try making the swapfile 4000 (replace 3000 above with 4000)... but I eventually remember at that point running fromdos
on the sources. There is something in that precompiled header that ended up generating unicode, or something stupid and the preprocessor doesn't really handle it. At any rate, try unchecking the precompiled headers first. I had them checked, but maybe it is just better to do away with them.
One thing I was doing during the compile was using top
with another ssh
(yeah, I know, it uses more memory), but when I ran top
, if the cpp was using more than 700M or 800M, it was in trouble. If you check above in the CMakeLists.txt file, there is an option for precompiled headers. It is currently set to 1. If you set it to 0, it SHOULD turn that off and get you by this error. The fromdos
command I was talking about is also listed above. It basically makes sure you're files are "unix friendly". DOS puts a CR-LF at the end of lines in text files and sometimes that confuses the c-preprocessor (cpp). Not USUALLY, but there are a few times it does. That's when I usually resort to fromdos
.
There is ONE more trick. If it DOES fail like that, sometimes, you can just re-issue the make
and SOMETIMES is will get you far enough to get past that error. I did use that a few times, but eventually I tried to fix it because I discovered it was a c-preprocessor issue.
I've been updating https://github.com/OctoPrint/OctoPrint-Slic3r/issues/47#issuecomment-482425271 , so that it has the stuff I've been mentioning. That way it'll be easier for you to know what I'm talking about.
I'm not sure how to do any of that.. <_>
@NovaViper, I updated the instructions a bit. It more clearly points out the swap configuration, and a few other things (like the precompiled header option).
More segmentation faults :/ I get it from the make command
[ 35%] Building CXX object src/libslic3r/CMakeFiles/libslic3r.dir/pchheader.cpp.o
c++: internal compiler error: Segmentation fault (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-6/README.Bugs for instructions. src/libslic3r/CMakeFiles/libslic3r.dir/build.make:73: recipe for target 'src/libslic3r/CMakeFiles/libslic3r.dir/pchheader.cpp.o' failed make[2]: [src/libslic3r/CMakeFiles/libslic3r.dir/pchheader.cpp.o] Error 4 CMakeFiles/Makefile2:1427: recipe for target 'src/libslic3r/CMakeFiles/libslic3r.dir/all' failed make[1]: [src/libslic3r/CMakeFiles/libslic3r.dir/all] Error 2 Makefile:160: recipe for target 'all' failed make: *** [all] Error 2
@NovaViper, how far did it get? When I get home, I'll try to recreate things on another SDCard and see if there is something I've missed. I'll also try to check out a tagged version instead of just the latest, to see if that's different.
Got until the regular make command
Hello Everyone I wish desperately to install Slic3r, Printrun and Octoprint on Raspbian, but impossible to install Slic3r Pe . I followed the instructions of this link: How to install Slic3r on RPi
But from the second step I already have an error:
sudo apt-get install -y git libboost-all-dev libboost-geometry-utils-perl libboost-system-dev libboost-thread-dev git-core build-essential libgtk2.0-dev libwxgtk2.8-dev libwx-perl libmodule-build-perl libnet-dbus-perl cpanminus libextutils-cbuilder-perl gcc-4.7 g++-4.7 libwx-perl libperl-dev libextutils-cppguess-perl libeigen3-dev libglew-dev libglewmx-dev cpanminus
Les paquets suivants contiennent des dépendances non satisfaites : libglewmx-dev : Est en conflit avec: libglew-dev mais 2.0.0-3 devra être installé perl-modules-5.24 : Casse: libextutils-cbuilder-perl (< 0.280225) E: Erreur, pkgProblem::Resolve a généré des ruptures, ce qui a pu être causé par les paquets devant être gardés en l'état.
And:
sudo make -j2
CMakeFiles/Makefile2:1389 : la recette pour la cible « src/libslic3r/CMakeFiles/libslic3r.dir/all » a échouée make[1]: *** [src/libslic3r/CMakeFiles/libslic3r.dir/all] Erreur 2 Makefile:160 : la recette pour la cible « all » a échouée make: *** [all] Erreur 2
Do you have solutions to these problems? Are there any newer tutorials? thanks for the returns