Page 1 of 1

wxWidget dependencies difficulties with Debian 9 (testing)

Posted: Sat Jun 11, 2016 10:11 am
by robinwhittle
Here is an account of some difficulties I had, and how I solved them, for compiling Codelite 9.1.0 on a freshly created 64 bit Debian 9 testing system (sid - will be stretch when it is released).

I wanted to run Codelite with the latest gcc (6.1) C++ compiler and ideally the latest gdb debugger. Debian 8 uses 4.x compilers which use the old ABI (Application Binary Interface). I want to work on a large long-term C++ project with the most recent tools. I understand it is tricky installing a much later compiler (such as 5.x or 6.1, both which use the new ABI) on a Linux system which assumes the use of an older compiler, due in part at least to the need for some programs to compile themselves as part of installation. (VirtualBox compiles its own driver on installation.)

I had previously successfully built this version of Codelite on a Debian 8.2 (jessie) by following: http://codelite.org/Developers/Linux with the linked-to page on installing a bunch of wxWidgets packages: http://www.codelite.org/LiteEditor/WxWidgets30Binaries . This second page is the reference for most of what follows:

I was able to tell my package manager system to access the special builds of wxWidgets packages at the Codelite respository:

Code: Select all

sudo apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc
sudo apt-add-repository 'deb http://repos.codelite.org/wx3.0.2/debian/ wheezy libs'
These packages apparently belong to Debian 7, not the currently released Debian 8, nor of course the not-yet released Debian 9 I am working with.

Next I did the apt-get install command, here truncated to the first 6, which this page indicates are the essential ones:

Code: Select all

sudo apt-get install libwxbase3.0-0-unofficial \
                     libwxbase3.0-dev \
                     libwxgtk3.0-0-unofficial \
                     libwxgtk3.0-dev \
                     wx3.0-headers \
                     wx-common
However, this did not succeed, due to libwxgtk3.0-0-unofficial requiring these two packages, which I was unable to find sid versions of. These were the versions which were installed in my Debian 8.2 system: (BTW, I am using code boxes since it is the only way I know to use a fixed width font in this forum. I would be happiest writing the whole thing in a fixed width font.)

Code: Select all

libgstreamer-plugins-base0.10-0    0.10.36-2  GStreamer libraries from the "base" set.
libgstreamer0.10-0                 0.10.36-15 Core GStreamer libraries and elements
Already installed in the 9 (testing) system were much later versions of these, which apparently did not satisfy the requirements of libwxgtk3.0-0-unofficial:

Code: Select all

libgstreamer-plugins-base1.0-0    1.8.1-1
libgstreamer1.0-0                 1.8.1-1
I manually installed the other 5 packages above, also with apt-get install, without any problems (any dependencies were installed too).

I found the web pages for the above two packages which worked for me in the 8.2 system, which had specific files for my architecture, and saved these files to a local directory. These are both for Debian 8 (jessie). There were none for 9 testing (sid):

https://packages.debian.org/jessie/libg ... base0.10-0
libgstreamer-plugins-base0.10-0_0.10.36-2_amd64.deb

https://packages.debian.org/jessie/libgstreamer0.10-0
libgstreamer0.10-0_0.10.36-1.5_amd64.deb

I was able to list the dependencies of these with:

sudo dpkg -I libgstreamer0.10-0_0.10.36-1.5_amd64.deb
sudo dpkg -I libgstreamer-plugins-base0.10-0_0.10.36-2_amd64.deb

and after checking by searching within synaptic that these were satisfied with already installed packages, I installed them manually. I guess apt-get would have worked too.

sudo dpkg -i libgstreamer-plugins-base0.10-0_0.10.36-2_amd64.deb
sudo dpkg -i libgstreamer0.10-0_0.10.36-1.5_amd64.deb

Then I was able to use synaptic to install the remaining package I need for Codelite compilation, from the Codelite repository:

libwxgtk3.0-0-unofficial 3.0.2-1.wheezy

To check on this I ran the above command to install six packages and the response was that they were already installed.

I proceeded with the normal Codelite build procedure from the first-mentioned page above, except that instead of using git to obtain the source, I downloaded a tarball, starting at http://downloads.codelite.org, following the link "Download CodeLite 9.1.0 tar.gz from GitHub" which is to: http://downloads.codelite.org/downloads.php?sources which provides directly the file "codelite-9.1.tar.gz".

I un-tar-gzipped this so the main tree of source code was at: /xyz/codelite-build/codelite-9.1/ and from there, as a mortal user, gave the incantations:

Code: Select all

mkdir build-release
cd build-release
cmake -DCMAKE_BUILD_TYPE=Release .. -DCOPY_WX_LIBS=1
make -j4
sudo make install
Everything went OK and then I could run "codelite".

The build-essentials package (installed as part of the Codelite linux build instructions) installs five of the following GCC packages:

Code: Select all

gcc             4:5.3.1-3  Installed.   
gcc-4.9-base    4.9.3-14   Installed.

gcc-5           5.3.1-21   Installed.
gcc-5-base      5.3.1.21   Installed.

gcc-6           6.1.1-4    NOT installed.
gcc-6-base      6.1.1.-4   Installed.
The gcc-6-base package seems mainly to be directories ready for putting the actual 6.1 compiler in, with gcc-6. The 4.9 packages were symlinks to the actual compiler which is part of the gcc-5 packages. (Synaptic > select installed package > right click > Properties > Installed files.)

There was only a minimal gdb package installed, so I installed in its place (with synaptic) gdb-python2 7.10-1.1, since the Python capabilities are needed for "pretty printing" display of the innards of containers class objects such as vectors and maps.

Codelite detected these and I was able to create a new C++ workspace, create a new project (Console > Simple executable (g++)), make multiple copies of the printf() statement in the initial Hello World program, put a breakpoint in one of them, build it in the Debug configuration, run it standalone and step through it with the debugger after it hit the breakpoint. This is not a test of all the gdb capabilities, but it shows that Codelite is working.

Thanks for Codelite!

- Robin

Re: wxWidget dependencies difficulties with Debian 9 (testin

Posted: Sat Jun 11, 2016 1:26 pm
by DavidGH
Hi Robin,
These packages apparently belong to Debian 7, not the currently released Debian 8
That's right. There are official jessie wx3.0.2 packages, so there was no need to create unofficial ones.

Congratulations at your successful build, but I'm not quite clear on why you felt you needed to, or at least in this way.

First, there's an official CodeLite package in sid which is kept updated to the latest version, built against official wx packages. Why not use that?

If that didn't meet your requirements e.g. because of using a different gcc, wouldn't it have been easier to rebuild it and the wx packages? Or direct from source tarballs; neither wxWidgets nor CodeLite are difficult to build on Linux.

Regards,

David

Re: wxWidget dependencies difficulties with Debian 9 (testin

Posted: Sat Jun 11, 2016 4:42 pm
by robinwhittle
Hi David,

I wanted to build Codelite so I could get the latest version from the source. I am using subversion to get that right now, though I could have downloaded a zip file too, from the Clone or download button at: https://github.com/eranif/codelite .

I wasn't aware there was a Codelite package in sid. Searching in synaptic I see "codelite" and "codelite-plugins" both "9.1+dfsg2-1". I only know what "9.1" means in this context, and the 9.1 release is from 2016-01-31 - over 5 months ago. Generally I think Debian packages in the main package repositories are not the latest and up-to-datest, so I didn't think to look there.

I know nothing about wxWidgets or its packages etc. and would prefer not to know. As far as I know the Codelite source, in order to be compiled, needs the "unofficial" wxWidgets package from the Codelite repository. On Debian 8.x it was easy to get this, since all its dependencies could be installed with a single apt-get command with those 6 essential packages. This did not work on Debian 9 (testing). I think the developers who work on Codelite are familiar with wxWidgets and would have little difficulty dealing with this situation, but I have never created a GUI program and am just keen to write C++ for command line programs - using Codelite.

Regards

Robin