Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 866554 - sci-geosciences/grass-8.2.0-r1 eautoreconf breaks m.nviz.image
Summary: sci-geosciences/grass-8.2.0-r1 eautoreconf breaks m.nviz.image
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: mario.haustein
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2022-08-25 17:04 UTC by Ulf Norberg
Modified: 2022-08-27 10:54 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
eautoreconf removed (eautoreconf.patch,321 bytes, patch)
2022-08-25 17:04 UTC, Ulf Norberg
Details | Diff
emerge --info (emerge_info,6.70 KB, text/plain)
2022-08-26 18:52 UTC, Ulf Norberg
Details
MAKEOPT="-j1" ebuild /adm/portage/sci-geosciences/grass/grass-8.2.0-r2.ebuild clean install (sci-geosciences:grass-8.2.0-r1:20220826-180547.log.bz2,99.11 KB, application/x-bzip)
2022-08-26 18:54 UTC, Ulf Norberg
Details
MAKEOPT="-j1" ebuild /adm/portage/sci-geosciences/grass/grass-8.2.0-r2.ebuild clean install (sci-geosciences:grass-8.2.0-r2:20220826-181038.log.bz2,99.80 KB, application/x-bzip)
2022-08-26 19:01 UTC, Ulf Norberg
Details
MAKEOPT="-j1" emerge -1 =sci-geosciences/grass-8.2.0-r2 (sci-geosciences:grass-8.2.0-r2:20220826-182806.log.bz2,99.84 KB, application/x-bzip)
2022-08-26 19:02 UTC, Ulf Norberg
Details
Example of garbled image (nviz_test_garbled.jpg,10.08 KB, image/jpeg)
2022-08-26 19:08 UTC, Ulf Norberg
Details
Expected output from 2) (nviz_test_good.jpg,7.80 KB, image/jpeg)
2022-08-26 19:09 UTC, Ulf Norberg
Details
MAKEOPTS="-j1" ebuild /var/db/repos/gentoo/sci-geosciences/grass/grass-8.2.0-r1.ebuild clean install (sci-geosciences:grass-8.2.0-r1:20220826-194218.log.bz2,96.22 KB, application/x-bzip)
2022-08-26 19:56 UTC, Ulf Norberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ulf Norberg 2022-08-25 17:04:52 UTC
Created attachment 801025 [details, diff]
eautoreconf removed

Running m.nviz.image results in either a black image or an image with a garbled mixture of the content from my X screen.  I have tried this on three different machines with different graphic drivers, Mesa iris & nouveau and Nvidias proprietary - with the same result. When I manually build grass-8.2.0 from source - m.nviz.image runs fine.  Also, by removing eautoreconf in the ebuild (as in the attached patch) makes m.nviz.image work as intended - I dont't know why..., and perhaps it is not the correct approach.  Any ideas?
Comment 1 mario.haustein 2022-08-26 16:43:10 UTC
Can you please provide:

1. the output of emerge --info
2. a series of steps to reproduce the bug (preferably based on publicly available data)
3. the file build.log created by 'MAKEOPT="-j1" ebuild grass-8.2.0-r1.ebuild clean install' of your patched ebuild
4. the same as in 3. but with the original ebuild compiled on the same machine

This would help me to reproduce the bug. I would like to find the reason behind this issue before removing "eautoreconf" as it sounds not to address the source of this bug.

Many thanks in advance.
Comment 2 Ulf Norberg 2022-08-26 18:52:36 UTC
Created attachment 801223 [details]
emerge --info
Comment 3 Ulf Norberg 2022-08-26 18:54:52 UTC
Created attachment 801226 [details]
MAKEOPT="-j1" ebuild /adm/portage/sci-geosciences/grass/grass-8.2.0-r2.ebuild clean install
Comment 4 Ulf Norberg 2022-08-26 19:00:21 UTC
Comment on attachment 801226 [details]
MAKEOPT="-j1" ebuild /adm/portage/sci-geosciences/grass/grass-8.2.0-r2.ebuild clean install

Sorry (my mistake), the command I ran for this output was "MAKEOPT="-j1" ebuild /var/db/repos/gentoo/sci-geosciences/grass/grass-8.2.0-r1.ebuild clean install"
Comment 5 Ulf Norberg 2022-08-26 19:01:33 UTC
Created attachment 801229 [details]
MAKEOPT="-j1" ebuild /adm/portage/sci-geosciences/grass/grass-8.2.0-r2.ebuild clean install
Comment 6 Ulf Norberg 2022-08-26 19:02:15 UTC
Created attachment 801232 [details]
MAKEOPT="-j1" emerge -1 =sci-geosciences/grass-8.2.0-r2
Comment 7 Ulf Norberg 2022-08-26 19:04:53 UTC
Hi Mario, and thanks for your response!

1) attached
2) The following steps can reproduce the bug for me (tested with Nvidias proprietary drivers):
echo -e "north: 3\nsouth: 0\neast: 3\nwest: 0\nrows: 3\ncols: 3\n0 0 0\n0 1 0\n0 0 0" | r.in.ascii input=- output=test_nviz
g.region rast=test_nviz
m.nviz.image elevation_map=test_nviz -a mode=fine resolution_fine=1 color_map=test_nviz zexag=1 output=/tmp/nviz_test format=ppm
3) attached (but, see below): "MAKEOPT="-j1" ebuild /adm/portage/sci-geosciences/grass/grass-8.2.0-r2.ebuild clean install"
4) attached: "MAKEOPT="-j1" ebuild /var/db/repos/gentoo/sci-geosciences/grass/grass-8.2.0-r1.ebuild clean install"

I keep my local ebuild in /adm/portage, and when i did as you (almost) wrote in 3) I still got a garbled image (attached), but when I instead ran (as I normally do) "MAKEOPT="-j1" emerge -1 =sci-geosciences/grass-8.2.0-r2" I don't - I am not sure why (and I have never used ebuild before to install a package).  However, it would be interesting to hear if you can replicate the bug using the steps in 2).
Comment 8 Ulf Norberg 2022-08-26 19:08:50 UTC
Created attachment 801235 [details]
Example of garbled image
Comment 9 Ulf Norberg 2022-08-26 19:09:28 UTC
Created attachment 801238 [details]
Expected output from 2)
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-26 19:24:51 UTC
note: MAKEOPTS, not MAKEOPT
Comment 11 Ulf Norberg 2022-08-26 19:56:26 UTC
Created attachment 801295 [details]
MAKEOPTS="-j1" ebuild /var/db/repos/gentoo/sci-geosciences/grass/grass-8.2.0-r1.ebuild clean install

Thanks, I was actually wondering why it went so fast... :) - and, following the steps in 2) this gives a good/expected image, so it is a bit more involved than I thought...
Comment 12 mario.haustein 2022-08-26 19:56:41 UTC
@Sam: Thanks for the hint. It was just a typo.

@Ulf: You don't need to upload new logs. I was able to reproduce the issue.

I already have a hypothesis about the root cause. `eautoreconf` creates a file config.h from config.h.in in the repo which defines OPENGL_FBO which itself alters the behavior of the renderer (see: https://github.com/OSGeo/grass/commit/61b83ac2db76d1c44533371bb1edfab675758814)

I have to ask upstream for assistance.

@Ulf: The "ebuild install" command didn't install anything onto your system, but just under /var/tmp/portage/sci-geosciences/grass/grass-8.2.0-r2/image. So it is normal, you didn't see a change in behavior.
Comment 13 mario.haustein 2022-08-27 08:34:21 UTC
It's exactly the other way round. Running `autoheader` as part of `eautoreconf` removes `OPENGL_FBO` from `config.h.in` which leads to the issue.
Comment 14 mario.haustein 2022-08-27 09:16:13 UTC
@Ulf: I prepared a pull request. Thanks for nailing it down to `eautoreconf`. This helped a lot. Good job!
Comment 15 Ulf Norberg 2022-08-27 09:41:02 UTC
I only used "brute force".  Thanks for tracking it down!
Comment 16 Larry the Git Cow gentoo-dev 2022-08-27 10:53:33 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99201b14faf305a88326bbb59343cc4e3b272d1c

commit 99201b14faf305a88326bbb59343cc4e3b272d1c
Author:     Mario Haustein <mario.haustein@hrz.tu-chemnitz.de>
AuthorDate: 2022-08-27 08:04:49 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-08-27 10:52:46 +0000

    sci-geosciences/grass: don't call eautoreconf
    
    Upstream have their own header which autoheader conflicts
    with. Just use the dist tarball's build system files instead.
    
    Closes: https://bugs.gentoo.org/866554
    Signed-off-by: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de>
    Closes: https://github.com/gentoo/gentoo/pull/27030
    Signed-off-by: Sam James <sam@gentoo.org>

 .../grass/{grass-7.8.7-r1.ebuild => grass-7.8.7-r2.ebuild}        | 8 ++++++--
 .../grass/{grass-8.0.2-r1.ebuild => grass-8.0.2-r2.ebuild}        | 8 ++++++--
 .../grass/{grass-8.2.0-r1.ebuild => grass-8.2.0-r2.ebuild}        | 8 ++++++--
 sci-geosciences/grass/grass-9999.ebuild                           | 8 ++++++--
 4 files changed, 24 insertions(+), 8 deletions(-)