Skip to content

gui-apps/organicmaps: fix compilation#297

Open
vitaly-zdanevich wants to merge 2 commits intogentoo:devfrom
vitaly-zdanevich:dev
Open

gui-apps/organicmaps: fix compilation#297
vitaly-zdanevich wants to merge 2 commits intogentoo:devfrom
vitaly-zdanevich:dev

Conversation

@vitaly-zdanevich
Copy link
Contributor

@vitaly-zdanevich vitaly-zdanevich commented Mar 1, 2025

In the next PR will add versioned ebuild.

Based on #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

@gerion0
Copy link

gerion0 commented Mar 1, 2025

  • 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.

@vitaly-zdanevich
Copy link
Contributor Author

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

done.

@vitaly-zdanevich vitaly-zdanevich marked this pull request as draft March 1, 2025 13:32
@vitaly-zdanevich
Copy link
Contributor Author

  • 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
Copy link
Contributor Author

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
Copy link
Contributor Author

Should I add to Guru remaining EGIT_SUBMODULES

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

?

@vitaly-zdanevich
Copy link
Contributor Author

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 vitaly-zdanevich marked this pull request as ready for review March 1, 2025 13:53
@stkw0
Copy link
Contributor

stkw0 commented Mar 1, 2025

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

@stkw0
Copy link
Contributor

stkw0 commented Mar 1, 2025

At first glance seems protobuf could also be unbundled

@vitaly-zdanevich
Copy link
Contributor Author

vitaly-zdanevich commented Mar 2, 2025

Fix the PYTHON_COMPAT

What fix? Looks good to me

PYTHON_COMPAT=( python3_{7..13} )

@vitaly-zdanevich
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@gerion0
Copy link

gerion0 commented Mar 2, 2025

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
Copy link

gerion0 commented Mar 2, 2025

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)?

@vitaly-zdanevich
Copy link
Contributor Author

asked OP above to do the same

I added such comments into ebuild itself.

@vitaly-zdanevich
Copy link
Contributor Author

the bundled dependencies have no releases at all

Created mapsme/just_gtfs#23

@vitaly-zdanevich
Copy link
Contributor Author

and fast_obj

But I see some releases here
image

@gerion0
Copy link

gerion0 commented Mar 2, 2025

  • 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
Copy link

gerion0 commented Mar 2, 2025

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.

@vitaly-zdanevich vitaly-zdanevich force-pushed the dev branch 2 times, most recently from e76a756 to 6752ec6 Compare March 2, 2025 11:05
@vitaly-zdanevich
Copy link
Contributor Author

Added dep dev-libs/expat

@vitaly-zdanevich
Copy link
Contributor Author

vitaly-zdanevich commented Mar 2, 2025

You can check the binary (for example with ldd

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

@gerion0
Copy link

gerion0 commented Mar 2, 2025

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).

@vitaly-zdanevich vitaly-zdanevich force-pushed the dev branch 2 times, most recently from 617e477 to cdcb0bb Compare September 20, 2025 15:21
@vitaly-zdanevich vitaly-zdanevich marked this pull request as ready for review September 20, 2025 15:54
@vitaly-zdanevich
Copy link
Contributor Author

It can be merged, I will add versioned ebuild on the next PR, for smaller atomic PRs.

@stkw0
Copy link
Contributor

stkw0 commented Oct 5, 2025

commits have to be atomic, not PR. If you are going to add a versioned ebuild, better do it in this same PR

@vitaly-zdanevich
Copy link
Contributor Author

Have no time now, I am traveling. Better to fix the broken ebuild now, by merging this PR.

@stkw0
Copy link
Contributor

stkw0 commented Oct 5, 2025

I think it has been broken for so much time we can wait some days. It's also easier to handle one single PR.
btw, I think you should add := for boost and libraries that implement slots so it gets rebuilt if the slot changes.

@vitaly-zdanevich
Copy link
Contributor Author

Fixed, ready to merge.

JUST_GTFS_COMMIT="7516753825500f90ac2de6f18c256d5abec1ff33"
PROTOBUF_COMMIT="9442c12e866b56369f1c53abea1261259c924a19"
TEST_DATA_COMMIT="30ecb0b3fe694a582edfacc2a7425b6f01f9fec6"
WORLD_FEED_TESTS_S="${WORKDIR}/world_feed_integration_tests_data-${TEST_DATA_COMMIT}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is multiple errors due to the bundled deps:

 * The following files are causing errors:
 *   3party/imgui/imgui/examples/example_glfw_vulkan/CMakeLists.txt:2.8
 *   3party/osrm/osrm-backend/CMakeLists.txt:2.8.8
 *   3party/osrm/osrm-backend/third_party/libosmium/CMakeLists.txt:2.8
 *   3party/fast_obj/CMakeLists.txt:3.0
 *
 * Compatibility with CMake < 3.10 will be removed in a future release.
 * See also tracker bug #964405; check existing or file a new bug for this package.
 * If not fixed in upstream's code repository, we should make sure they are aware.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its a warning, I notified the upstream organicmaps/organicmaps#2217 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a strong reason to try to unbundle at least imgui (already packaged) and fast_obj (which I think there was a WIP PR about it already) and osrm.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a strong reason to try to unbundle at least imgui

Tried - OrganicMaps is still trying to build its vendored ImGui :(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and fast_obj (which I think there was a WIP PR about it already

#298

Copy link

@biodranik biodranik Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Organic Maps embeds all libs so they can work in the same way on all platforms (even where the latest versions of libs are not yet available for whatever reason)
  • We often use bleeding-edge master/main branch commits for deps for performance and bugfixes
  • We're always keeping libs up-to-date. The latest PR would bump all versions to the freshest ones 3party update organicmaps/organicmaps#12205
  • It is very easy to support all versions in one place
  • We prefer everyone to use the same tested version of the dependency when we receive bugreports. Otherwise, different/older deps may complicate support.
  • If you feel that some Organic Maps dependency is outdated, please let us know or bump it in our repo.
  • OSRM can be removed; we don't use it
  • You do not need to build everything, building only desktop target is enough. Then most of these dependency issues won't break your builds.

TL;DR; Do not define WITH_SYSTEM_PROVIDED_3PARTY and build only desktop target to distribute OM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Organic Maps embeds all libs so they can work in the same way on all platforms (even where the latest versions of libs are not yet available for whatever reason)

Embedding third party libs is a no go.

  • We often use bleeding-edge master/main branch commits for deps for performance and bugfixes

Which is fine for a git build / -9999 but not a tagged release. Adding the required versions for tagged releases is easy and doable.

TL;DR; Do not define WITH_SYSTEM_PROVIDED_3PARTY and build only desktop target to distribute OM

Not defining WITH_SYSTEM_PROVIDED_3PARTY will mean that this won't get accepted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not defining WITH_SYSTEM_PROVIDED_3PARTY will mean that this won't get accepted.

@peeweep can we migrate Organic Maps into gentoo-zh?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not defining WITH_SYSTEM_PROVIDED_3PARTY will mean that this won't get accepted.

@peeweep can we migrate Organic Maps into gentoo-zh?

I don't see the point of migrating to gentoo-zh

Copy link
Contributor Author

@vitaly-zdanevich vitaly-zdanevich Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not defining WITH_SYSTEM_PROVIDED_3PARTY will mean that this won't get accepted.

@peeweep can we migrate Organic Maps into gentoo-zh?

I don't see the point of migrating to gentoo-zh

@peeweep
The point is - if here on ::guru they do not like vendoring - when ebuild using a few libs not from the overlay but download them from upstreams.

Signed-off-by: Vitaly Zdanevich <zdanevich.vitaly@ya.ru>
Signed-off-by: Vitaly Zdanevich <zdanevich.vitaly@ya.ru>
@vitaly-zdanevich
Copy link
Contributor Author

Fixed.

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.

9 participants