GLM issue when compiling from source on ubuntu 18.04

Hello,
I’m trying to build a specific version of kicad from source:

git clone -b master https://git.launchpad.net/kicad
cd kicad/
git checkout 3045509

These are all the commands I ran:

cmake has a problem with GLM:

I’ve not come across libs like GLM before. It appears to be installed, but ldconfig doesn’t list it, and it’s not in /lib. There are files that have definitions for rotate, transform etc in /usr/include/glm

Any suggestions? I need an older version of GLM (or another lib) because I’m trying to compile from source that is 6 months old?

Thanks a lot,
Matt

glm is header only, i.e. it doesn’t have binary libraries at all, it’s just included as header files. It should be easy to download an older version and install it wherever and add the information about the location somewhere into the build system.

1 Like

There was some time ago an issue with GLM version and the KiCad source code (that was changed to adapt to the changes of newest GLM lib)

May guess is that you will need an older version of GLM if you want to build that KiCad version…
Or maybe you can build a latter revision with that fixed… ?..

Have a look at the thread:
https://lists.launchpad.net/kicad-developers/msg21614.html

1 Like

image

Needed to use libglm-dev 0.9.8.3

Also, had to run ldconfig after install to get pcbnew to work.

1 Like

OK, I can compile it but I can’t enable the python console which is one of the things I really want.
Here’s how I configure to turn on all the python related options:

cmake -DKICAD_SCRIPTING_WXPYTHON=ON -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_ACTION_MENU=ON -DKICAD_SCRIPTING_MODULES=ON ../../

Here’s the output from cmake -L …/…/

But then when I install and run kicad, there is no python console and this is a screenshot of the version information:

image

How to do I enable the python options?
Thanks!

From the mailing list i gather the following:

The python console relies on wxpython compiled against gtk2. (Kicad in general needs all of the wx packages compiled against gtk2)
Sadly this is one of the things no longer available in many linux distros. Including ubuntu 18.04.
This is a know issue but will not be fixed until after the v5 release.

As far as i can tell the current goal would be to release v5 with the limitations that come with relying on wx compiled against gtk2. If we are lucky fixing this will be the first thing on the agenda in the v6 dev cycle. This would allow an easy backport to either kicad 5.0.1 or maybe 5.1.0 (Some devs object and want to focus on other stuff first. Mainly on the opengl port.)

More details see the full discussion about that: https://lists.launchpad.net/kicad-developers/msg35791.html

1 Like

noooooo!!!
is wxPython required for the action plugins? That’s what I need really - I don’t need interactive python.

so, just to be clear - there is now no easy way to compile kicad4 with python support?

I don’t know. i think that somewhere there was the information that only the python console and footprint wizard are affected by missing wxpython. So it might be that action plugins still work. But i don’t know if there is a compiler option to only turn off these two python parts without disabling action plugins. (I never compiled kicad my self.)

@matthew_venn As this is related with building KiCad, I suggest you join KiCad’s dev mailing list and search there for specialized help. Very few KiCad developers are on this forum.

1 Like

Python scripting and python wx gui are two different things, it should be possible to use them independently. @matthew_venn: just select the cmake options so that scripting is on but python gui/widgets is off. Unfortunately I don’t have the source/build system at hand but you can see them in the docs: docs.kicad.org/doxygen/md_Documentation_development_compiling.html

Action plugins (scripts started from Tools->External Plugins…) should work without wxpython unless they themselves import and use wxpython.

1 Like

ok, I got it working. As you said wxPython is not needed for the pcbnew python module or the action script plugins.
I had some issue with the options to cmake not ‘sticking’ when building in a different directory. In the end I did this from the source’s root directory:

cmake -DKICAD_SCRIPTING_WXPYTHON=OFF -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_ACTION_MENU=ON -DKICAD_SCRIPTING_MODULES=ON 
make 
sudo make install

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.