-
-
Notifications
You must be signed in to change notification settings - Fork 368
CMake: Fix LAPACKE detection on Debian Bookworm (Debian 12) #6365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
INSTALL.md
Outdated
``` | ||
``` | ||
``` | ||
``` | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this valid markdown markup?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes--- it's my first time using markdown--- ill resolve it asap
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries ;) caught my eye when waking up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the heads up--- ive resolved them 🙂
INSTALL.md
Outdated
r-base-dev \ | ||
python3-termcolor \ | ||
libglu1-mesa-dev libgl1-mesa-dev \ | ||
subversion``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a multiline code block finishes with the ticks on another line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alright----
INSTALL.md
Outdated
## Authors | ||
Markus Neteler and the GRASS Development Team | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thats probably just a white space--- must've hit enter when editing the file
INSTALL.md
Outdated
- [Guide to contributing on GitHub](./doc/development/github_guide.md) | ||
|
||
|
||
## (N) Debian Bookworm (Debain 12) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## (N) Debian Bookworm (Debain 12) | |
## (N) Debian Bookworm (Debian 12) |
This is good, but the scripts need to be more organized. We are already building Docker images. Can we reuse or connect with that? So, there would be one single place and it would be tested regularly. Also, the installation instructions can use the script making maintenance easier. |
Thanks for the feedback! That makes sense — keeping scripts in one place and reusing the Docker setup would definitely make things more consistent. Could you point me to the Docker build scripts so I can take a look at how this could fit in? |
The folder is docker/debian |
- [Guide to contributing on GitHub](./doc/development/github_guide.md) | ||
|
||
|
||
## (N) Debian Bookworm (Debian 12) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a dedicated page for this kind of information: https://grasswiki.osgeo.org/wiki/Compile_and_Install. There are lots of platforms to give instructions to... in my opinion this is not the place. Maybe we can link to that page (and update it wherever needed).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasnt aware of this--- i'll remove this section from the docs
Additionally-- i think it would be better if I added the missing dependencies (if any) to docker/debian
.... as @wenzeslaus suggested ----- a single script handling such things would be better
any thoughts?
]] | ||
|
||
|
||
include(CheckLibraryExists) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current implementation (admittedly with plenty of room to improve) is based on search for pkg-config files. Also Debian installs *.pc
files for openblas (and cblas, lapacke): openblas.pc, blas-openblas.pc, lapack-openblas.pc. That should be enough. We should initially explore what is possibly missing for that to work.
It is possible to add configuration, e.g.: -DLAPACKE_PKGCONFIG=lapack-openblas
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried your suggestion — cmake ..
now runs smoothly ( i must’ve overlooked that earlier).
However, when I run make install
, I still hit errors related to MAPSET PERMANENT - permission denied
. It seems the build process expects a valid GRASS location/mapset for thumbnail generation, which fails if none exists.
Do you think this should be handled in the build system (e.g. skipping thumbnails when no mapset is available), or is this more of a local environment setup issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Difficult to say without the log file.
Forgot to mention this page: https://grasswiki.osgeo.org/wiki/Compile_and_Install_With_CMake
Our Dockerfiles now use Debian 13, a change since this PR was opened |
This pull request is an attempt to fix #6364.
Fix-1: LAPACKE detection error by CMake
The Bug
on debian 12 (bookworm)... building GRASS failed with the following error
Could NOT find LAPACKE (missing: HAVE_LAPACKE_DGESV)
Even though
liblapacke-dev
andlibopenblas-dev
were installed, CMake couldn’t detect LAPACKE because the check relied oncheck_symbol_exists()
, which doesn’t actually link againstliblapacke.so
.Debugging
The Fix
Edited
cmake/find_scripts/FindLAPACKE.cmake
to replace the header-only check with a proper library check.Initially it was
Which was changed to
Fix-2: Automated Script for installing build dependencies
The scripts are in
setup_grass_dev.sh
andsetup_grass_extra.sh
.