Setting up linuxcnc Stretch-uspace to build glade & linuxcnc

  • ozzyrob
  • ozzyrob's Avatar Topic Author
  • Visitor
  • Visitor
11 Jun 2018 00:13 - 13 Jun 2018 23:35 #112162 by ozzyrob
First things first, this is a work in progress, so any problems will be welcomed.
Text in italics such as your-user-name is meant to be replaced by your user name.

Initial environment
Normal installation from this image
www.linuxcnc.org/testing-stretch-rtpreem...uspace-amd64-r10.iso

Upon first boot run to update apt
sudo apt-get update

Then run the following to update various packages (these include bug & security fixes and updates)
sudo apt-get dist-upgrade

So now the system is configured for apt and has latest fixes.
At this point you can choose to reboot or not.

Let's get the required glade version setup & installed
Create a build directory (which can be deleted later) The tilde character ~ is a shortcut for /home/your-user-name
mkdir ~/Downloads/glade-build
Change to created directory
cd ~/Downloads/glade-build
Download the glade sources
wget https://ftp.gnome.org/pub/GNOME/sources/glade3/3.8/glade3-3.8.6.tar.xz
Extract the glade sources
With x meaning extract, v meaning verbose, this is a personal preference and can be left out, and f means the next
text is the file your wish to work upon.

tar xvf glade3-3.8.6.tar.xz

So far so good.

Let's get the packages we need to build glade.
I put together a script to do the work, but if you want you can type it as one long command.
Anyway here is the script you can cut & paste into get-glade-deps.sh
A little explanation
# denotes the begining of comment
\ is a way of continuing the command on the next line, I feel it helps readability
Due to the way the script is run there is no shebang #!/bin/sh.
# run with sudo bash -c 'sh get-glade-dpes.sh'
apt-get install \
build-essential devscripts dh-make \
intltool python-gtk2-dev \
libxml2-dev \
gtk-doc-tools \
gnome-doc-utils \
liblablgtk2-gnome-ocaml-dev \
libglade2-dev \
libgladeui-common \
python-gtkglext1 \
devhelp \
itstool \
libcanberra-gtk-module \
libcanberra-gtk-dev

Now run the file with the following command
sudo bash -c 'sh get-glade-dpes.sh
If there is an error similar to this
./get-glade-deps.sh: 4: ./get-glade-deps.sh: intltool: not found
It points to an extra whitespace after the \ or a missing \ on the line before. Removing the whitespace after the \ or adding the missing \ on line 3 will fix it whatever the case my be. The last line does not require a final \ as it is the end of the multi line command.
If there is no errors from apt-get all has gone well.

Time to build glade deb packages
Change to the glade directory
cd glade3-3.8.6
Setup to build debs with dh-make
dh_make -c lgpl -s --createorig
Since we are making a very simple package for glade and one that does not get distributed we can basically ignore
Done. Please edit the files in the debian/ subdirectory now.
Time to make the deb packages
debuild -us -uc
At the end of the process lintian will through up some messages that can be ignored for our process. Any errors, which should be none will shows themselves up.

Installation of glade deb package
cd to the upper directory
cd ../
Running ls will give this ouput
get-glade-deps.sh glade3_3.8.6-1.debian.tar.xz
glade3-3.8.6 glade3_3.8.6-1.dsc
glade3_3.8.6-1_amd64.build glade3_3.8.6.orig.tar.xz
glade3_3.8.6-1_amd64.buildinfo glade3-3.8.6.tar.xz
glade3_3.8.6-1_amd64.changes glade3-dbgsym_3.8.6-1_amd64.deb
glade3_3.8.6-1_amd64.deb


The file of interest to us is glade3_3.8.6-1_amd64.deb. Since we already have the dependencies installed installation is as simple as
sudo dpkg -i glade3_3.8.6-1_amd64.deb
Now everything is setup, there is a menu entry in Programming, the catalog and pixmaps are ready to go and libraries are ready.

The source directory can now be removed by
rm -rf glade3-3.8.6

If you later wish to remove glade
sudo dpkg -r glade3
Last edit: 13 Jun 2018 23:35 by ozzyrob. Reason: Removed make install steps and added dh-make to dep script & steps to create and install deb package

Please Log in or Create an account to join the conversation.

  • ozzyrob
  • ozzyrob's Avatar Topic Author
  • Visitor
  • Visitor
14 Jun 2018 00:06 - 14 Jun 2018 00:07 #112330 by ozzyrob
Setup for a Build Environment for Linuxcnc

This is a continuation from the first post, all we a doing are adding the extra packages for building Linuxcnc from source.
I put together a script to do the work, but if you want you can type it as one long command.
Anyway here is the script you can cut & paste into get-linuxcnc-deps.sh
A little explanation
# denotes the begining of comment
\ is a way of continuing the command on the next line, I feel it helps readability
Due to the way the script is run there is no shebang #!/bin/sh.
# run with sudo bash -c 'sh get-linuxcnc-dpes.sh'
apt-get install \
devscripts \
tcl8.6-dev tk8.6-dev \
libreadline-gplv2-dev \
asciidoc dblatex \
dvipng graphviz groff \
imagemagick inkscape \
python-lxml source-highlight \
texlive-extra-utils \
texlive-font-utils \
texlive-fonts-recommended \
texlive-lang-cyrillic \
texlive-lang-french \
texlive-lang-german \
texlive-lang-polish \
texlive-lang-spanish \
texlive-latex-recommended \
w3c-linkchecker \
xsltproc \
libxmu-dev \
libglu1-mesa-dev libgl1-mesa-dev \
libboost-python-dev \
libmodbus-dev \
libusb-1.0-0-dev python-serial \
yapps2 \
asciidoc-dblatex \
libxaw7-dev \
-o APT::Install-Suggests=0 \
-o APT::Install-Recommends=0

Now run with the following command.
sudo bash -c 'sh get-linuxcnc-dpes.sh'

The last 2 lines are options to apt-get, they prevent the installation of about ~900MB of packages compared to ~190MB of packages.
If you get any errors whilst running the script please refer to the previous post regarding missing \ or extra whitespace at the end of a line.

Once apt-get finishes, without errors, you are ready to clone the linuxcnc repository with
cd ~
git clone git://github.com/linuxcnc/linuxcnc.git linuxcnc-dev
If want the master branch all is good
To checkout 2.7.13
cd linuxcnc-dev
git checkout 2.7

To checkout Linuxcnc 2.7-12 use this command in linuxcnc-dev directory
git checkout 0ba1ae2754ac05e86c87cad3d8b888a52c00f8e8 .
Do not forget . on the end

On the first build it will go something like this for a RIP build from the linuxcnc-dev directory.
cd src
./autogen.sh
./configure --with-realtime=uspace
make
sudo make setuid 

To run use the following
cd ../
. scripts/rip-environment
linuxcnc
Do not leave out the . before scripts/rip-environment

Have fun
Last edit: 14 Jun 2018 00:07 by ozzyrob.

Please Log in or Create an account to join the conversation.

More
01 Dec 2019 14:21 #151661 by 3D-Master
i have installed glade 3.8.6 and it works but the Python and Linuxcnc buttons are missing. How do i get them?

Please Log in or Create an account to join the conversation.

More
01 Dec 2019 23:10 - 01 Dec 2019 23:11 #151710 by 0x2102
Last edit: 01 Dec 2019 23:11 by 0x2102.

Please Log in or Create an account to join the conversation.

More
22 May 2022 09:46 #243542 by aalozo
Thank you for your manual. I am a newbie and my english is bad.
I need yours help. Until "debuild -us -uc" is all great .
And now

aalozo@debian:~/Downloads/glade-build/glade3-3.8.6$ debuild -us -uc
 dpkg-buildpackage -us -uc -ui
dpkg-buildpackage: Information: Quellpaket glade3
dpkg-buildpackage: Information: Quellversion 3.8.6-1
dpkg-buildpackage: Information: Quelldistribution unstable
dpkg-buildpackage: Information: Quelle geändert durch root <root@debian>
 dpkg-source --before-build .
dpkg-buildpackage: Information: Host-Architektur amd64
 fakeroot debian/rules clean
dh clean
   dh_clean
 dpkg-source -b .
dpkg-source: Information: Quellformat »3.0 (quilt)« wird verwendet
dpkg-source: Information: glade3 wird unter Benutzung des existierenden ./glade3_3.8.6.orig.tar.xz gebaut
dpkg-source: Information: glade3 wird in glade3_3.8.6-1.debian.tar.xz gebaut
dpkg-source: Information: glade3 wird in glade3_3.8.6-1.dsc gebaut
 debian/rules build
make: „build“ ist bereits aktuell.
 fakeroot debian/rules binary
dh binary
   dh_update_autotools_config
dh_update_autotools_config: mkdir debian/.debhelper: Permission denied
make: *** [debian/rules:18: binary] Fehler 255
dpkg-buildpackage: Fehler: Unterprozess fakeroot debian/rules binary lieferte Exitstatus 2
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui failed

 

Please Log in or Create an account to join the conversation.

More
23 May 2022 22:14 #243645 by andypugh
This was an old thread. It probably does not make sense to install on Stretch in 2022.

Please Log in or Create an account to join the conversation.

More
24 May 2022 22:21 - 24 May 2022 22:22 #243727 by robertspark
+1 .... why do you REALLY want / NEED stretch....

there is a perfectly working iso with buster and linuxcnc 2.8.2 that is very easy quick and STABLE to install especially if you are having problems and are a relatively new user or one that does not want to fiddle under the bonnet.

quickest way to getting to cut chips >>>
www.linuxcnc.org/iso/linuxcnc-2.8.2-buster.iso
+ copy to usb using either:
www.balena.io/etcher/
rufus.ie/en/

reboot + access bios (delete / F2 / F10)
change boot order to USB first
reboot and install.....
done!  Working config

fiddle with bios to improve latency
Last edit: 24 May 2022 22:22 by robertspark.

Please Log in or Create an account to join the conversation.

Time to create page: 0.075 seconds
Powered by Kunena Forum