Scanything (CNCRemote) + Linuxcnc Build

Having problems with or questions about SheetCam? Post them here.
robertspark
Posts: 257
Joined: Thu Feb 26, 2015 12:11 am

Scanything (CNCRemote) + Linuxcnc Build

Post by robertspark »

Les,

I was having a go at setting up scanything for LinuxCNC (master / 2.9 branch)

I appreciate that I've got the build the driver which I was having a go at.

Basically codeblocks throws up a message (5 of them in a row) saying
include/version.h No such file or directory

when I try to build "linuxcncserver"

I have tried this via a RIP linuxcnc install and also via the deb install.

I am installing on Debian Bullseye.

I thought I'd give it a shot and see if I can get Scanything to work with master linuxcnc branch.

Any idea what "version.h" file it's looking for (+ how do i create it, I had a go at running a fer scripts in the CNCRemote git clone in the hope a script may sort out what was missing / create it)

I haven't got a licence for Scanything, so don't feel too obliged to help as I know you've got other things on and I'm just dabbling at having a go at getting it going and posting a how to on the linuxcnc forum if I figure it out (+ I ill buy a licence if I get it to work)

Thanks

Rob
robertspark
Posts: 257
Joined: Thu Feb 26, 2015 12:11 am

Re: Scanything (CNCRemote) + Linuxcnc Build

Post by robertspark »

Hm.... figured it out (sort of)....

The script version.sh) that creates (or should create) the version.h file does not create the file

Code: Select all

#!/bin/bash
ver=`linuxcnc_var LINUXCNCVERSION`
ver=`expr $ver : '\([0-9]*\.[0-9]*\.[0-9]*\)'`
if [ $? -ne 0 ]
then 
   echo LinuxCNC not found
   exit 1
fi
echo "//LinuxCNC version = $ver" > include/version.h
echo "//File auto generated by version.sh" >> include/version.h
IFS='.'; arr=($ver); unset IFS;
echo "#define LINUXCNC_VER ((${arr[0]} * 10000) + (${arr[1]} * 100) + ${arr[2]})" >> include/version.h
echo "#define LINUXCNC_PRE_JOINTS (LINUXCNC_VER < 20800)  //This is when axes and joints were separated" >> include/version.h
echo "#define LINUXCNC_MULTI_SPINDLE (LINUXCNC_VER >= 20800)  //This is when multi-spindle was added" >> include/version.h

because when I created the folder "include" and added an empty file "version.h" it appended the info into it and the build ran (further)

Code: Select all

//LinuxCNC version = 2.9.0
//File auto generated by version.sh
#define LINUXCNC_VER ((2 * 10000) + (9 * 100) + 0)
#define LINUXCNC_PRE_JOINTS (LINUXCNC_VER < 20800)  //This is when axes and joints were separated
#define LINUXCNC_MULTI_SPINDLE (LINUXCNC_VER >= 20800)  //This is when multi-spindle was added

OK.... new problem when building the server using code blocks....

it throws the following message :

| ^~~~~~~~~~~~~
/home/rob/CNCRemote/drivers/linuxcnc/server/main.cpp:46:12: error: ‘PACKAGE_VERSION’ was not declared in this scope
46 | string a = PACKAGE_VERSION;
| ^~~~~~~~~~~~~~~
User avatar
Les Newell
Site Admin
Posts: 3668
Joined: Thu May 11, 2006 8:12 pm

Re: Scanything (CNCRemote) + Linuxcnc Build

Post by Les Newell »

Run Scanything from within your rip environment. It should automatically build CNCRemote for you.
Assuming you have Scanything installed in the default directory the command line to run it would be something like: ~/Scanything/run-scanything
I'm working from memory and it's a while since I last looked at it but that should be correct.
robertspark
Posts: 257
Joined: Thu Feb 26, 2015 12:11 am

Re: Scanything (CNCRemote) + Linuxcnc Build

Post by robertspark »

thanks Les, I did try that before but I think it threw a wobbly over something.... I'm hoping it does not need anything GTK2 as I'm fairly certain it was something like that.

I'll try again and post back
User avatar
Les Newell
Site Admin
Posts: 3668
Joined: Thu May 11, 2006 8:12 pm

Re: Scanything (CNCRemote) + Linuxcnc Build

Post by Les Newell »

CNCRemote is pretty minimal. Scanything includes most of the libraries it needs. You must run it within your rip environment though.
robertspark
Posts: 257
Joined: Thu Feb 26, 2015 12:11 am

Re: Scanything (CNCRemote) + Linuxcnc Build

Post by robertspark »

Code: Select all

rob@RobsCNC:~/scanything$ ./run-scanything 
./scanything: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

User avatar
Les Newell
Site Admin
Posts: 3668
Joined: Thu May 11, 2006 8:12 pm

Re: Scanything (CNCRemote) + Linuxcnc Build

Post by Les Newell »

Try sudo apt install libstdc++6
robertspark
Posts: 257
Joined: Thu Feb 26, 2015 12:11 am

Re: Scanything (CNCRemote) + Linuxcnc Build

Post by robertspark »

libstdc++6 is already the newest version (10.2.1-6)
User avatar
Les Newell
Site Admin
Posts: 3668
Joined: Thu May 11, 2006 8:12 pm

Re: Scanything (CNCRemote) + Linuxcnc Build

Post by Les Newell »

Are you running 32 bit or 64 bit Linux? What version of Scanything are you using?
If you are using a 64 bit distro, try this version of Scanything www.sheetcam.com/Download/Scanything_se ... .23-64.bin
robertspark
Posts: 257
Joined: Thu Feb 26, 2015 12:11 am

Re: Scanything (CNCRemote) + Linuxcnc Build

Post by robertspark »

thanks Les, will try that shortly.

yes am using a 64bit Debian bullseye distro
robertspark
Posts: 257
Joined: Thu Feb 26, 2015 12:11 am

Re: Scanything (CNCRemote) + Linuxcnc Build

Post by robertspark »

Thanks Les, yes that loaded and made the server files it needs.

I'm going to try it on the machine tonight (I just tried it on the virtual machine that I've got on my laptop and it loaded just fine + very easy)

Code: Select all

cd Downloads

chmod 774 Scan<TAB>

./Scan<TAB>

cd ~/scanything

./run-scanything.sh
robertspark
Posts: 257
Joined: Thu Feb 26, 2015 12:11 am

Re: Scanything (CNCRemote) + Linuxcnc Build

Post by robertspark »

hmm :/ on my proper machine

I got this:

Code: Select all

20:59:55: Started
20:59:55: Loading plugins
20:59:55: socket is not connected
20:59:55: Checking for LinuxCNC server...
20:59:55: LinuxCNC version is 2.9.0
20:59:55: Creating include/version.h
20:59:55: Building src/linuxcnc.cpp
20:59:55: Building src/main.cpp
20:59:55: Building src/cnccomms.cpp
20:59:58: Building src/cncplugin.cpp
20:59:59: src/main.cpp:46:12: error: ‘PACKAGE_VERSION’ was not declared in this scope
20:59:59:    46 | string a = PACKAGE_VERSION;
20:59:59:       |            ^~~~~~~~~~~~~~~
20:59:59: Building src/cncserver.cpp
21:00:00: make: *** [makefile:34: obj/main.o] Error 1
21:00:00: make: *** Waiting for unfinished jobs....
21:00:05: Failed to build the server
21:00:05: ./cncremote-linuxcnc_2.9.0_5.10.0-12-rt-amd64
21:00:05: Pre-built server not found
User avatar
Les Newell
Site Admin
Posts: 3668
Joined: Thu May 11, 2006 8:12 pm

Re: Scanything (CNCRemote) + Linuxcnc Build

Post by Les Newell »

I just installed Bullseye and built LinuxCNC so I could figure out what is going on.

Edit ~/scanything/cncremote/plugins/linuxcncserver/src/main.cpp and comment out line 46.
I can't remember why that line is there. I think it is a remnant of some testing.

Before running Scanything set this environment variable:
export LIBRARY_PATH={wherever you cloned LinuxCNC}/lib
robertspark
Posts: 257
Joined: Thu Feb 26, 2015 12:11 am

Re: Scanything (CNCRemote) + Linuxcnc Build

Post by robertspark »

Thanks Les,

I tried the above on my virtual machine and it just hangs at the last point, please note I've not got a camera plugged in or enabled on the virtual machine.

I will try later with the proper machine with a supereyes pencil camera later this evening

Code: Select all

14:23:38: Started
14:23:38: Loading plugins
14:23:38: Timed out calling function
14:23:38: Checking for LinuxCNC server...
14:23:38: LinuxCNC version is 2.9.0
14:23:38: Creating include/version.h
14:23:38: Building src/linuxcnc.cpp
14:23:38: Building src/main.cpp
14:23:38: Building src/cnccomms.cpp
14:23:45: Building src/cncplugin.cpp
14:23:46: Building src/cncserver.cpp
14:23:47: Building src/timer.cpp
14:24:05: linking cncremote-linuxcnc
robertspark
Posts: 257
Joined: Thu Feb 26, 2015 12:11 am

Re: Scanything (CNCRemote) + Linuxcnc Build

Post by robertspark »

Oh, when I go into "options" >> "select machine" and select linuxcnc, I get this as an extra line:

Code: Select all

14:23:38: Timed out calling function
14:23:38: Checking for LinuxCNC server...
14:23:38: LinuxCNC version is 2.9.0
14:23:38: Creating include/version.h
14:23:38: Building src/linuxcnc.cpp
14:23:38: Building src/main.cpp
14:23:38: Building src/cnccomms.cpp
14:23:45: Building src/cncplugin.cpp
14:23:46: Building src/cncserver.cpp
14:23:47: Building src/timer.cpp
14:24:05: linking cncremote-linuxcnc
14:28:09: Checking for LinuxCNC server...
14:28:09: make: 'cncremote-linuxcnc' is up to date.
14:28:09: Starting LinuxCNC server
14:28:09: ./cncremote-linuxcnc: error while loading shared libraries: libnml.so.0: cannot open shared object file: No such file or directory
Post Reply