Compilation issue: glm version detected is wrong

Hello all.

I didn’t find an AppImage for my actual glibc version, so I decide to compile KiCad. (Motive being that though I
could run a near AppImage succesfully, the image doesn’t seem to detect the printers - I suspect that the
glibc version is the culprit. I could generate a PDF and print that externally though)

On my first attempt, I get an error on my glm version:

CMake Error at /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find GLM: Found unsuitable version "0.9.4.0", but required is at
  least "0.9.8" (found /usr/include)
Call Stack (most recent call first):
  /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:598 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindGLM.cmake:54 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:769 (find_package)

Fine, so I compiled and installed 0.9.9.5, from Slackbuilds:

$ pkg-config --modversion glm
0.9.9

But KiCad printed exactly the same error message as above. Is KiCAD detecting the glm version elsewhere?

Thanks in advance,
John

You are encountering the pleasantries of cmake. You have to delete the cmake cache it generated as it may have cached the old values including invalid version.

It is also possible that however this process works resulted in a version of GLM installed in a location that is not searched by cmake. You may have to tell cmake about this version manually, by passing -DGLM_INCLUDE_DIR=/some/path

We set the glm version as cache variables

Ok… I’ve hit those ‘pleasantries of cmake’ quite a few times before. The question is ‘delete the cache’… When Slackware compiles a program, it typically creates a temporary directory, compiles, then creates a package to be installed. I’d suspect that the cache would be created in that temporary directory. That temp directory is deleted after creating the package, so I’d expect that the cache would be re-generated next compile? Or is the cache located somewhere else?

Note: I did find a temp dir (in /tmp/SB0/). I deleted KiCAD there, re-compiled, and got the same problem.

Note that the original error message says: (found /usr/include)

If I change the path using -DGLM_INCLUDE_DIR=/something the ‘found’ disappears. Which makes me suspect that that no compilation/linking parameters are necessary. A simple program which prints the GLM_VERSION_MESSAGE, seems to compile without any parameters:

#include <stdio.h>
#include <glm/glm.hpp>
int main() {
    printf("\nGLM version string: %s\n", GLM_VERSION_MESSAGE);
}

compiles with 'g++ version_test.cpp`

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