FormerLurker / ArcWelderPlugin

A plugin for OctoPrint used to convert G0/G1 commands to G2/G3 commands. Reduce the size of your gcode files, and reduce number of gcodes per second sent to your printer.
Other
444 stars 25 forks source link

OrangePi-Zero & Arc-Welder #234

Closed billbrach closed 2 years ago

billbrach commented 2 years ago

System O/S specifics: OPi-Red-version

Hello, After hearing rave reviews of how good Arc-Welder is, I decided to add it to my OctoPrint install on a couple of OrangePI Zero's that I have attached to my printers. On one unit, OPi-Green, it installed w/o issue. When I looked at what verison of OP I was running on Green, I was surprised to see it was 1.8.0rc5. OPi-Red was running the latest stable release 1.7.3 and I tried many things to install AW on Red, to no avail. I have those error logs someplace; it always fails in the "wheel build" area of the code, seeming like it is locked up. So, I upgraded Red to 1.8.0rc5, expecting it to install and this is the error message I get now.

Here is the error message. Note that this is a running OP install, with many prints under its belt, running 1.7.3

OPi-Red-Arc-welder-error

FormerLurker commented 2 years ago

What version of python are you using? The devel branch may have a patch to fix this issue .

billbrach commented 2 years ago

Python 3.7.3, pip 22.1 Incidentally, I'd really like to be running on the stable OP version, and not the release candidate LOL

billbrach commented 2 years ago

Here is the bottom of the log file, when I tried to install AW with OP 1.7.3 May be a compatibility problem with the Arm GCC compiler ??

octoprint_arc_welder/data/lib/c/arc_welder/arc_welder.h:413:35: warning: ‘source_target_segment_statistics arc_welder::segmentstatistics’ [-Wreorder] source_target_segment_statistics segmentstatistics; ^~~~~~~ octoprint_arc_welder/data/lib/c/arc_welder/arc_welder.cpp:39:1: warning: when initialized here [-Wreorder] arc_welder::arc_welder(std::string source_path, std::string target_path, logger log, double resolution_mm, double max_radius, bool g90_g91_influences_extruder, int buffer_size, progress_callback callback) : currentarc(DEFAULT_MIN_SEGMENTS, buffer_size - 5, resolution_mm, max_radius), segmentstatistics(segment_statistic_lengths, segment_statistic_lengths_count, log) ^~~~~~ octoprint_arc_welder/data/lib/c/arc_welder/arc_welder.cpp: In member function ‘arc_welder_results arc_welder::process()’: octoprint_arc_welder/data/lib/c/arc_welder/arc_welder.cpp:284:16: warning: unused variable ‘end_clock’ [-Wunused-variable] const clock_t end_clock = clock(); ^~~~~ octoprint_arc_welder/data/lib/c/arc_welder/arc_welder.cpp: In member function ‘int arc_welder::process_gcode(parsed_command, bool, bool)’: octoprint_arc_welder/data/lib/c/arc_welder/arc_welder.cpp:349:7: warning: unused variable ‘clear_shapes’ [-Wunused-variable] bool clear_shapes = false; ^~~~ In file included from octoprint_arc_welder/data/lib/c/arc_welder/arc_welder.h:38, from octoprint_arc_welder/data/lib/c/arc_welder/arc_welder.cpp:29: octoprint_arc_welder/data/lib/c/gcode_processor_lib/logger.h: At global scope: octoprint_arc_welder/data/lib/c/gcode_processor_lib/logger.h:37:20: warning: ‘log_level_names’ defined but not used [-Wunused-variable] static const char log_level_names[] = {"NOSET", "VERBOSE", "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"}; ^~~~~~~ In file included from /usr/include/c++/8/vector:69, from octoprint_arc_welder/data/lib/c/arc_welder/arc_welder.h:28, from octoprint_arc_welder/data/lib/c/arc_welder/arc_welder.cpp:29: /usr/include/c++/8/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {segment_statistic}; _Tp = segment_statistic; _Alloc = std::allocator]’: /usr/include/c++/8/bits/vector.tcc:413:7: note: parameter passing for argument of type ‘std::vector::iterator’ {aka ‘gnu_cxx::normal_iterator<segment_statistic*, std::vector >’} changed in GCC 7.1 vector<_Tp, _Alloc>:: ^~~~~~~ /usr/include/c++/8/bits/vector.tcc: In member function ‘arc_welder_progress arc_welder::getprogress(long int, double)’: /usr/include/c++/8/bits/vector.tcc:109:4: note: parameter passing for argument of type ‘gnu_cxx::normal_iterator<segment_statistic, std::vector >’ changed in GCC 7.1 _M_realloc_insert(end(), std::forward<_Args>(args)...); ^~~~~ /usr/include/c++/8/bits/vector.tcc:109:4: note: parameter passing for argument of type ‘gnu_cxx::__normal_iterator<segment_statistic, std::vector >’ changed in GCC 7.1 _M_realloc_insert(end(), std::forward<_Args>(args)...); ^~~~~ /usr/include/c++/8/bits/vector.tcc:109:4: note: parameter passing for argument of type ‘gnu_cxx::normal_iterator<segment_statistic*, std::vector >’ changed in GCC 7.1 _M_realloc_insert(end(), std::forward<_Args>(args)...); ^~~~~ /usr/include/c++/8/bits/vector.tcc:109:4: note: parameter passing for argument of type ‘gnu_cxx::normal_iterator<segment_statistic, std::vector >’ changed in GCC 7.1 _M_realloc_insert(end(), std::forward<_Args>(args)...); ^~~~~ /usr/include/c++/8/bits/vector.tcc: In constructor ‘arc_welder::arc_welder(std::cxx11::string, std::__cxx11::string, logger, double, double, bool, int, progress_callback)’: /usr/include/c++/8/bits/vector.tcc:109:4: note: parameter passing for argument of type ‘gnu_cxx::__normal_iterator<segment_statistic*, std::vector >’ changed in GCC 7.1 _M_realloc_insert(end(), std::forward<_Args>(args)...); ^~~~~ /usr/include/c++/8/bits/vector.tcc:109:4: note: parameter passing for argument of type ‘gnu_cxx::__normal_iterator<segment_statistic*, std::vector >’ changed in GCC 7.1 _M_realloc_insert(end(), std::forward<_Args>(args)...); ^~~~~ /usr/include/c++/8/bits/vector.tcc:109:4: note: parameter passing for argument of type ‘gnu_cxx::__normal_iterator<segment_statistic*, std::vector >’ changed in GCC 7.1 _M_realloc_insert(end(), std::forward<_Args>(args)...); ^~~~~ /usr/include/c++/8/bits/vector.tcc:109:4: note: parameter passing for argument of type ‘gnu_cxx::__normal_iterator<segment_statistic*, std::vector >’ changed in GCC 7.1 _M_realloc_insert(end(), std::forward<_Args>(args)...); ^~~~~ arm-linux-gnueabihf-gcc: fatal error: Killed signal terminated program cc1plus compilation terminated. error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

ERROR: Command errored out with exit status 1: /home/pi/oprint/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-pq5uye50/setup.py'"'"'; file='"'"'/tmp/pip-req-build-pq5uye50/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-un3956tx/install-record.txt --single-version-externally-managed --compile --install-headers /home/pi/oprint/include/site/python3.7/Arc-Welder Check the logs for full command output. WARNING: You are using pip version 20.3.3; however, version 22.1 is available. You should consider upgrading via the '/home/pi/oprint/bin/python3 -m pip install --upgrade pip' command.

ldursw commented 2 years ago
arm-linux-gnueabihf-gcc: fatal error: Killed signal terminated program cc1plus
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

It seems the board doesn't have enough RAM to compile everything. Enabling swap may work but will be extremely slow.

FormerLurker commented 2 years ago

Interesting. Maybe it could be possible to precompile the lib, but the install script would need some modifications. Have you considered the console version? It can be integrated into most slicers. There is a cura plugin too.

billbrach commented 2 years ago

Regards RAM, according to what is at the top of my original post, it looks like it has over 100 Megs available. And, the second one of these that I have installed just fine. But, I'm not sure the hardware is identical between the two. I will check that out.

Regards a pre-compiled library, its not worth the effort on your part. I was just hoping there was something that would jog your memory, as to why it installed on OP 1.8.0rc5 but would not install on OP 1.7.3.

FormerLurker commented 2 years ago

I will try installing on that rc ASAP. Certainly could be an issue.

billbrach commented 2 years ago
arm-linux-gnueabihf-gcc: fatal error: Killed signal terminated program cc1plus
compilation terminated.
error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

It seems the board doesn't have enough RAM to compile everything. Enabling swap may work but will be extremely slow.

You may be correct !! The one that I can install AW on has 512M RAM and the one I can't is only 256M.

billbrach commented 2 years ago

Problem solve - it was the RAM issue as mentioned above. What I did was on Green uninstall AW and roll back OP to the current stable, 1.7.3. Then installed AW, without any issues !! So, 256M is not enough to install AW. I'm going to swap SD cards, install AW on Red's SD card using Green, and then reinstall the SD card into Red. Closing the issue....

billbrach commented 2 years ago

Closed, thanks for all of your help !!

FormerLurker commented 2 years ago

I only wish I could help more. It may be possible to copy arcwelder over to the pi with less memory. It would need to be manually registered, but it should be possible. Let me know if you would like me to figure out how to do that.

billbrach commented 2 years ago

I'm going to try moving the SD card to the one with more RAM, and try installing it like that, then moving it back to the one with less memory. I'm betting it will work !!

Thanks,

Bill


From: FormerLurker @.> Sent: Tuesday, May 17, 2022 9:48 AM To: FormerLurker/ArcWelderPlugin @.> Cc: Bill Brach @.>; State change @.> Subject: Re: [FormerLurker/ArcWelderPlugin] OrangePi-Zero & Arc-Welder (Issue #234)

I only wish I could help more. It may be possible to copy arcwelder over to the pi with less memory. It would need to be manually registered, but it should be possible. Let me know if you would like me to figure out how to do that.

— Reply to this email directly, view it on GitHubhttps://github.com/FormerLurker/ArcWelderPlugin/issues/234#issuecomment-1128894326, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAOP6QLZIH56UTKONJQFWYLVKOPR5ANCNFSM5WC53NWA. You are receiving this because you modified the open/close state.Message ID: @.***>

FormerLurker commented 2 years ago

Genius! I bet it will too! I will have to update the readme!

FormerLurker commented 2 years ago

@billbrach, did that work?

billbrach commented 2 years ago

FormerLurker - YES, swapping the SD card into the unit with more RAM did allow it to compile and install. Upgraded to OctoPrint 1.8.1 before I installed AW.

NO - when I put that SD card back into the lower RAM OPi, Arc Welder does not show up in the list of installed plugins. After I installed AW in the unit with higher RAM, I uploaded a file, and saw that AW did its magic, so I know it installed correctly.

FYI - the OPi that won't compile or run, is 256M RAM, the other unit that works fine is 512M RAM.

Thanks for your help, and thanks for a great plugin !!

Edit: Paid $10.49 for the 512M Orange Pi Zero 2 years ago. My have times changed :(

https://www.aliexpress.com/item/3256803323773726.html?spm=a2g0o.store_pc_groupList.8148356.1.244029ccLtC8Mh&pdp_npi=2%40dis%21USD%21US%20%2420.99%21US%20%2420.99%21%21%21%21%21%400bb0622d16546380363562802e5e94%2112000026109605131%21sh