Skip to content
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

proj: update to 9.1.1 #40347

Merged
merged 12 commits into from
Jan 22, 2023
Merged

proj: update to 9.1.1 #40347

merged 12 commits into from
Jan 22, 2023

Conversation

ar-jan
Copy link
Contributor

@ar-jan ar-jan commented Nov 5, 2022

Testing the changes

  • I tested the changes in this PR: yes

Followup to #31687.

@ar-jan ar-jan changed the title Update proj to 7.2.1 proj: update to 7.2.1 Nov 5, 2022
@nezos
Copy link
Contributor

nezos commented Nov 5, 2022

proj 7.2.1 is two major versions behind. I am running 9.1 without problems.

@ar-jan
Copy link
Contributor Author

ar-jan commented Nov 5, 2022

I tested everything with 7.2 and have been using that. When v8 came out there were some issues with v8 in combination with other packages as I recall. That may well have been solved but I'd rather get this in now since it's ready and tested.

The CI failures are unrelated (Python 3.11 packages not yet available).

@ar-jan ar-jan force-pushed the proj-721 branch 2 times, most recently from 386fff1 to f986851 Compare November 8, 2022 13:24
@ghost
Copy link

ghost commented Nov 8, 2022

@ar-jan, I have updated proj to 9.1.0 in the forked repository (https://github.com/kruceter/void-packages/tree/proj).

In my attempts to revbump reverse dependencies I could fix some issues related
to the new API of PROJ (>=8.0.0) and tested them briefly.

I hope my changes will prove to be useful for you in some way.

@ar-jan
Copy link
Contributor Author

ar-jan commented Nov 8, 2022

Ah great. I've also been testing proj 9.1.0 and I thought there's a few more things to solve. Here's my notes:

  • grass: v7.6 still uses proj_api.h, but the build does succeed. [Do you know if it functions correctly without proj4 api?]
  • XyGrib: can be patched like New lib proj api opengribs/XyGrib#289 [I see you used that].
  • merkaartor: with DACCEPT_USE_OF_DEPRECATED_PROJ_API_H removed, build still failed for me. Did it build correctly for you?
  • vtk: current version fails due to proj_api.h, but it can be upgraded to >= 9.1.0 to fix.

@ghost
Copy link

ghost commented Nov 8, 2022

  • grass: v7.6 still uses proj_api.h, but the build does succeed. [Do you know if it functions correctly without proj4 api?]

It should work. configure has the following lines confirming this:

# PROJ version check: if proj.h exists, it must be proj 5+

ac_save_cppflags="$CPPFLAGS"
CPPFLAGS="$PROJINC $CPPFLAGS"
for ac_hdr in proj.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:5727: checking for $ac_hdr" >&5

cat > conftest.$ac_ext <<EOF
#line 5730 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF

UPD: I could not open it due to "missing GUI" (possibly refers to wxPython). I will look into it on my side.


  • merkaartor: with DACCEPT_USE_OF_DEPRECATED_PROJ_API_H removed, build still failed for me. Did it build correctly for you?

It did for me with proj 9.0.1.


  • vtk: current version fails due to proj_api.h, but it can be upgraded to >= 9.1.0 to fix.

I am at fault for overlooking it. I will update it on my side to see whether it works or not.

@ar-jan
Copy link
Contributor Author

ar-jan commented Nov 8, 2022

UPD: I could not open it due to "missing GUI" (possibly refers to wxPython). I will look into it on my side.

Iirc had to start explicitly using something like GRASS_PYTHON=python2. Could also update to v7.8, done that in previous PR.

@ghost
Copy link

ghost commented Nov 8, 2022

Iirc had to start explicitly using something like GRASS_PYTHON=python2. Could also update to v7.8, done that in previous PR.

Still the same outcome. I will try to update it 7.8.7 and see how it turns out.

@nezos
Copy link
Contributor

nezos commented Nov 8, 2022

Grass GUI never worked, in older version on Void, I had to hack the startup script. Now that I use v8.2, it doesn't start also but I don't need it as I use QGIS. If I try to start the grass GUI I get:

TypeError: ToolBar.AddTool(): arguments did not match any overloaded call:

The problem refers to the wxPython package, it's an old issue:

OSGeo/grass#2019 (comment)

Updating also grass would pave the way for having qgis as a package.

Hope this helps

@ar-jan
Copy link
Contributor Author

ar-jan commented Nov 8, 2022

Yeah, grass was the reason my previous PR #31687 didn't get merged, and I spent a long time trying things with wxPython, but I did actually get it to work with python2 and v7.8. Also grass is optional for QGIS, I have a branch ready for QGIS 3.28 which just doesn't include grass.

@ghost
Copy link

ghost commented Nov 9, 2022

I managed to build grass 7.8.7 with proj 9.1.0.

Its GUI started without any surprises; and what is more important, it works with python 3 (at least I swapped out everything related to python 2). That was my original purpose for picking this package, so I am content.

vtk 9.1.0 is not tested yet; it is quite a large piece of software to build on my machine.

@ar-jan, I have pushed all changes to the "proj" branch in kruceter/void-packages, so you can use them however you wish.


@nezos

Grass GUI never worked

Thank you for mentioning this. I was a little afraid to think that I broke grass by tampering with it in a related pull request.

As for versions starting from 8, I had learned of incompatibility with the current wxPython4 through trial and error; this includes that issue you have referred to.

Unless wxPython4 is updated, nothing can be done about upgrading to grass 8.

@nezos
Copy link
Contributor

nezos commented Nov 9, 2022

Also grass is optional for QGIS, I have a branch ready for QGIS 3.28 which just doesn't include grass.
My opinion is that in such software you need all the tools possible to handle different kinds of data. QGIS still relies on tools provided by GRASS to perform many tasks.

@kruceter I see though in the grass template you have in your fork that you still rely on python2.

I confirm also that grass and QGIS 3.28 builds with proj 9.1.

@ghost
Copy link

ghost commented Nov 9, 2022

@kruceter I see though in the grass template you have in your fork that you still rely on python2.

https://github.com/kruceter/void-packages/commit/f494f414a06f5c1855cb2fca12e3c3e5b82cea4a#diff-ebae98cb097fc36b8a6f7cc1d8ca2b9a319bcb740ecf0e2cfc9d995c07d4ebf2

@ar-jan
Copy link
Contributor Author

ar-jan commented Nov 9, 2022

I have pushed all changes to the "proj" branch in kruceter/void-packages, so you can use them however you wish.

Thanks @kruceter. I've cherry-picked your commits for grass, XyGrib, and OpenOrienteering-Mapper. Now building 9.1 &co again.

@ar-jan
Copy link
Contributor Author

ar-jan commented Nov 10, 2022

As discussed on irc, vtk will have to be upgraded first separately because it provides shlibs which are used by other packages: #40423.

@ar-jan ar-jan changed the title proj: update to 7.2.1 proj: update to 9.1.0 Nov 15, 2022
@ar-jan ar-jan marked this pull request as draft November 15, 2022 16:58
@ar-jan ar-jan force-pushed the proj-721 branch 3 times, most recently from fa3d286 to 6e016c8 Compare November 20, 2022 18:41
@ar-jan ar-jan force-pushed the proj-721 branch 2 times, most recently from e0766a6 to f8e13ea Compare December 3, 2022 23:17
@ar-jan ar-jan marked this pull request as ready for review December 3, 2022 23:18
@ar-jan
Copy link
Contributor Author

ar-jan commented Dec 3, 2022

Oh, proj-9.1.1 was just released, I'll update to that.

srcpkgs/osm2pgsql/template Outdated Show resolved Hide resolved
@ar-jan
Copy link
Contributor Author

ar-jan commented Jan 12, 2023

I think this is ready, I've been running proj-9.1.1 for over a month.

Only sore point is grass. But afaict the version of grass that's currently packaged is more broken than the update to 7.8.7 included here, because here only the gui is broken while text mode works.

Or maybe grass could be removed? I wonder if anyone is even using it on Void given that it seems to be broken to several of us.

@ar-jan
Copy link
Contributor Author

ar-jan commented Jan 12, 2023

@kruceter Would you care to see if you can get it to work? I gathered these from the error messages involved. I didn't get it working but iirc I stopped before trying all of them combined.

Need to backport fixes to wxPython 4.0.7 with Python 3.8+
Via OSGeo/grass#1971 (comment):
https://src.fedoraproject.org/rpms/python-wxpython4/c/f55a17c2d3b336c82fb44f7816ec63219847f4cc?branch=rawhide:
https://github.com/wxWidgets/Phoenix/commit/9096426603272672d9a676e8bcdcadf0a1cfa1a2.patch [from https://github.com/wxWidgets/Phoenix/pull/1533 Add index...]
https://github.com/wxWidgets/Phoenix/commit/3eb9eb32dc3285435039f6c420c398665372a1ad.patch [from https://github.com/wxWidgets/Phoenix/pull/2005 ScrolledWindow.SetScrollbars]
https://github.com/wxWidgets/Phoenix/commit/0d449626d6d298ad96ebd1d514d0e42833bce470.patch [from https://github.com/wxWidgets/Phoenix/pull/2026 integer division]

@ghost
Copy link

ghost commented Jan 13, 2023

Applied proposed patches and rebuilt wxPython4 with grass. The outcome is same.

@ghost
Copy link

ghost commented Jan 14, 2023

There is no way to disable GUI using build arguments, their old manual misled me.

Rebase and apply this patch (and change version in the commit message too):

0001-fixup-grass-update-to-7.8.7-rebuild-for-proj-9.1.txt

There is nothing we can do about broken gui at present time, so leave it be.

If GUI does not work, grass falls back to the text mode. We can live with it at least until wxPython is updated. If you are interested in enforcing the text mode, add the following block to the template:

post_install() {
	# This package is broken with wxPython4 (<=4.0.7),
	# hence the GUI is compulsorily disabled.
	vsed -i "${DESTDIR}/usr/bin/grass" -e "s/\(default_gui =\).*/\1 \"text\"/"
}

Aside from grass I think this pull request can be merged.

@ar-jan
Copy link
Contributor Author

ar-jan commented Jan 15, 2023

I wonder if it wouldn't be cleaner to drop the grass package for now, instead of patching it to be text-only. Any thoughts, @alexjarosch @classabbyamp?

@nezos
Copy link
Contributor

nezos commented Jan 16, 2023

I wonder if it wouldn't be cleaner to drop the grass package for now, instead of patching it to be text-only. Any thoughts, @alexjarosch @classabbyamp?

If you drop GRASS then you will lose the functionality also from the QGIS Toolbox. I have read that GRASS8 works with the latest QGIS (since v3.24). Even if as a standalone it does not work, the toolbox options are handy.

@classabbyamp
Copy link
Member

removing grass is not the right way. i think the right way would be to update wxpython but that's a bit of scope creep :)

better to just patch it for now

@alexjarosch
Copy link
Contributor

I agree with the two posts above from @classabbyamp and @nezos . I think we don't want to loose the functionality in QGIS as well as GRASS. Updating wxpython is really another scope as pointed out above, so I second the opinion tp better just patch it for now.

ar-jan and others added 12 commits January 22, 2023 14:50
The current release does not support the new API of PROJ (>=8.0.0);
included patch aims to solve the issue.

Conditional make_build_args prevents crossbuilding with failing ninja
("unknown target LINK=${XBPS_CROSS_TRIPLET}-c++").

I suspect that this approach is a relique of the past and therefore is
removed from the template.

No other issues did arise due to this change.
@ar-jan
Copy link
Contributor Author

ar-jan commented Jan 22, 2023

OK, agree having the grass toolbox algorithms in QGIS will be useful. I've briefly tested a new QGIS build with Grass 8.2.1 and looks good.

@kruceter I've used your patch but also updated to grass-8.2.1 which was just released, so the patches could be dropped again.

@Johnnynator Johnnynator merged commit 2586316 into void-linux:master Jan 22, 2023
@ghost
Copy link

ghost commented Jan 23, 2023

I've used your patch but also updated to grass-8.2.1 which was just released, so the patches could be dropped again.

No problem at all. This would be for the best.

@ar-jan ar-jan mentioned this pull request Jul 28, 2023
@ar-jan ar-jan deleted the proj-721 branch September 9, 2023 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants