guru icon indicating copy to clipboard operation
guru copied to clipboard

gui-apps/organicmaps: fix compilation

Open vitaly-zdanevich opened this issue 9 months ago • 38 comments

In the next PR will add versioned ebuild.

Based on https://github.com/gentoo/guru/pull/185

@gerion0 Please review

After emerge I see this in logs - should I do something with that?

 * QA Notice: Files built without respecting LDFLAGS have been detected
 *  Please include the following list of files in your report:
 * /usr/bin/OMaps

vitaly-zdanevich avatar Mar 01 '25 05:03 vitaly-zdanevich

  • My PR contained a lot of additional dependencies. Have you checked that they are not needed anymore? Please add them, if they are needed.
  • Please unbundle harfbuzz as well like I did in my PR.
  • My PR contained a commit description that links to the respective upstream PRs and describes what was done. Please add that, too.
  • Is utfcpp in a version >4 not needed anymore? I got problems with Gentoo's utfcpp-3.

gerion0 avatar Mar 01 '25 12:03 gerion0

Please unbundle harfbuzz as well like I did in my PR.

done.

vitaly-zdanevich avatar Mar 01 '25 13:03 vitaly-zdanevich

  • My PR contained a lot of additional dependencies. Have you checked that they are not needed anymore?

Organic Maps compiles and starts. Should I check some additional cases?

vitaly-zdanevich avatar Mar 01 '25 13:03 vitaly-zdanevich

Is utfcpp in a version >4 not needed anymore? I got problems with Gentoo's utfcpp-3.

Currently in the main tree we have ~utfcpp-4.0.6

vitaly-zdanevich avatar Mar 01 '25 13:03 vitaly-zdanevich

Should I add to Guru remaining EGIT_SUBMODULES

3party/just_gtfs
3party/protobuf/protobuf
3party/fast_obj

?

vitaly-zdanevich avatar Mar 01 '25 13:03 vitaly-zdanevich

My PR contained a commit description that links to the respective upstream PRs and describes what was done. Please add that, too.

Done. Its ok now?

vitaly-zdanevich avatar Mar 01 '25 13:03 vitaly-zdanevich

Fix the PYTHON_COMPAT and also use a versioned ebuild instead of a live ebuild

stkw0 avatar Mar 01 '25 16:03 stkw0

At first glance seems protobuf could also be unbundled

stkw0 avatar Mar 01 '25 16:03 stkw0

Fix the PYTHON_COMPAT

What fix? Looks good to me

PYTHON_COMPAT=( python3_{7..13} )

vitaly-zdanevich avatar Mar 02 '25 07:03 vitaly-zdanevich

use a versioned ebuild

Ok, but let me please add versioned ebuild after merging of this fix to live ebuild - because anyway we want to have live ebuild as well.

vitaly-zdanevich avatar Mar 02 '25 07:03 vitaly-zdanevich

At first glance seems protobuf could also be unbundled

Tried, got

/var/tmp/portage/gui-apps/organicmaps-9999/work/organicmaps-9999/indexer/drules_struct.pb.h:25:10: fatal error: google/protobuf/generated_message_table_driven.h: No such file or directory

vitaly-zdanevich avatar Mar 02 '25 07:03 vitaly-zdanevich

At first glance seems protobuf could also be unbundled

This does not work unfortunately, see this upstream PR. To document this, I mentioned it in the commit message of my previous PR and asked OP above to do the same.

gerion0 avatar Mar 02 '25 10:03 gerion0

Fix the PYTHON_COMPAT and also use a versioned ebuild instead of a live ebuild

The release tarball of OrganicMaps does not contain the needed bundled dependencies. Unbundling is complicated (needs appropriate header patching). However, the bundled dependencies have no releases at all (just_gtfs and fast_obj and an old protobuf. I'm not sure, how to handle this:

  1. Download the bundled dependencies as Git repositories pinned to a specific commit?
  2. Download the bundled dependencies as tarballs of a specific Git commit (AFAIK, Github supports this)?

gerion0 avatar Mar 02 '25 10:03 gerion0

asked OP above to do the same

I added such comments into ebuild itself.

vitaly-zdanevich avatar Mar 02 '25 10:03 vitaly-zdanevich

the bundled dependencies have no releases at all

Created https://github.com/mapsme/just_gtfs/issues/23

vitaly-zdanevich avatar Mar 02 '25 10:03 vitaly-zdanevich

and fast_obj

But I see some releases here image

vitaly-zdanevich avatar Mar 02 '25 10:03 vitaly-zdanevich

  • My PR contained a lot of additional dependencies. Have you checked that they are not needed anymore?

Organic Maps compiles and starts. Should I check some additional cases?

It compiles and starts on your PC but probably it won't start on a fresh Gentoo install. You can check the binary (for example with ldd) which shared libraries are needed as well and add them as dependencies to fix that.

gerion0 avatar Mar 02 '25 11:03 gerion0

and fast_obj

But I see some releases here image

Ah, I missed it. Youre right, then you could download the release tarball and copy it to 3party/fast_obj within the ebuild or try to unbundle it by creating the correct patch for OrganicMaps and adding fast_obj as proper package/ebuild here.

gerion0 avatar Mar 02 '25 11:03 gerion0

Added dep dev-libs/expat

vitaly-zdanevich avatar Mar 02 '25 11:03 vitaly-zdanevich

You can check the binary (for example with ldd

Thanks, checked - found only two missing deps. Others - deps of existing dep dev-qt/qtbase

vitaly-zdanevich avatar Mar 02 '25 11:03 vitaly-zdanevich

qtbase contains a lot of libraries (managed by use flags). AFAIK, OM links against them directly, so please add them, too (OM will not build, if one of that useflag is deactivated by the user).

gerion0 avatar Mar 02 '25 11:03 gerion0

adding fast_obj as proper package/ebuild here

Tried to create an ebuild:

EAPI=8

inherit cmake

DESCRIPTION="Fast C OBJ parser"

HOMEPAGE="https://github.com/thisistherk/fast_obj"

SRC_URI="https://github.com/thisistherk/fast_obj/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="MIT"

SLOT="0"

KEYWORDS="~amd64"

I am not familiar with C/C++ ecosystem, got error on emerge:

ninja -v -j32 -l32 install
ninja: error: unknown target 'install'

How to solve? Inherit must be not cmake?

vitaly-zdanevich avatar Mar 02 '25 11:03 vitaly-zdanevich

At first glance seems protobuf could also be unbundled

This does not work unfortunately, see this upstream PR. To document this, I mentioned it in the commit message of my previous PR and asked OP above to do the same.

Yes, I was looking a bit in the linked PR. Maybe the last comment on that PR made me think it was only problematic under microsoft compiler and it worked elsewhere when was not the case.

stkw0 avatar Mar 02 '25 18:03 stkw0

Fix the PYTHON_COMPAT and also use a versioned ebuild instead of a live ebuild

The release tarball of OrganicMaps does not contain the needed bundled dependencies. Unbundling is complicated (needs appropriate header patching). However, the bundled dependencies have no releases at all (just_gtfs and fast_obj and an old protobuf. I'm not sure, how to handle this:

1. Download the bundled dependencies as Git repositories pinned to a specific commit?

2. Download the bundled dependencies as tarballs of a specific Git commit (AFAIK, Github supports this)?

I am not personally opinionated about this, whatever works. I think it's more important to have a versioned ebuild, specially for complex projects like this, even if it's with bundled libraries.

stkw0 avatar Mar 02 '25 18:03 stkw0

adding fast_obj as proper package/ebuild here

Tried to create an ebuild:

If you make a PR for this package, I would try to take a look and help with it.

stkw0 avatar Mar 02 '25 19:03 stkw0

Fix the PYTHON_COMPAT

What fix? Looks good to me

PYTHON_COMPAT=( python3_{7..13} )

The minimum should be 11

stkw0 avatar Mar 02 '25 19:03 stkw0

adding fast_obj as proper package/ebuild here

Tried to create an ebuild:

If you make a PR for this package, I would try to take a look and help with it.

https://github.com/gentoo/guru/pull/298

vitaly-zdanevich avatar Mar 03 '25 05:03 vitaly-zdanevich

Lets merge it now - because it already works, but broken in master.

vitaly-zdanevich avatar Mar 04 '25 08:03 vitaly-zdanevich

It lacks a versioned ebuild.

stkw0 avatar Mar 04 '25 09:03 stkw0

@vitaly-zdanevich Sadly organic maps github repo were archived. News (in russian): https://www.opennet.ru/opennews/art.shtml?num=62887 Original in english: https://mastodon.social/@organicmaps/114155428924741370

RarogCmex avatar Mar 21 '25 19:03 RarogCmex