Add to Gentoo repository #2217
Labels
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
2 participants
Due date
No due date set.
Dependencies
No dependencies set.
Reference: organicmaps/organicmaps-tmp#2217
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@biodranik is desktop version ready for use? How to build it? What are the dependencies?
There were some attempts. Please check existing issues and documentation.
Related to organicmaps/organicmaps#1752
Desktop version works well for me.
Now I have some experience adding software to the Gentoo main tree, in the future I hope to find some time to add Organic Maps as well, but I want to merge my first ebuild.
I would love to see this in the Gentoo repository! I have played around a little in a local repo and have ran into a few problems.
Here's the (incomplete) ebuild based on the git source:
For this to make it into the Gentoo repository I guess the git sources shouldn't be used. But the releases I have seen have been specifically for Android so is the Linux desktop code available in any other way than git?
Also I have not been able to find more specific information on what versions of the dependencies that are needed. https://github.com/organicmaps/organicmaps/blob/master/docs/INSTALL.md
If found that OMaps would not build without this patch (I don't remember where or how I found out now):
That makes OMaps build and install but I can only run it from /usr/share/organicmaps, most likely related to this issue: organicmaps/organicmaps#2387
@vitaly-zdanevich: Does OMaps run on your desktop regardsless of what folder you execute it from? Did you add a CMAKE_INSTALL_PREFIX or something when building?
So that's as far as I have gotten at this point. I do not have a lot of experience in creating ebuilds but I hope that we can solve this together. :)
Thanks!
EAPI 6 is too old, I think we need to specify it to 8.
You can, with 9999 version, looks here for an example
09bceb3446/media-sound/nulloy/nulloy-9999.ebuild
As I understand, in Gentoo this is a common practice to have 9999 ebuild (git master) and some version ebuild.
Now, for some reason, I cannot start OMaps, getting
./OMaps: error while loading shared libraries: libicuuc.so.70: cannot open shared object file: No such file or directory
No, but I do not remember.
Please specify
OpenStreetMap
in the ebuild description, for SEO.I get a "EAPI=8 is not supported" when I try that running the ebuild digest.
Right, of course, but it would be masked, right? If there are official releases they could make it into arch and ~arch without being unmasked first.
What version of icu do you have installed? What's stated in the install documentation is that libicu-dev is needed whatever that translates to in Gentoo...
Fair point! Fixed!
It seems that recent commits have fixed the problem I had that made OMaps only run from particular folders, possibly related to this fix a few hours ago: organicmaps/organicmaps#2734
Again, I don't remember how I found out that the patch is needed or where I found the solution; neither do I know if this is Gentoo specific or generic. What I want to get to is basically if this is a patch for Organic Maps upstream and if I should create a ticket or if it should be kept as a Portage specific patch.
It seems to be Gentoo specific according to https://github.com/jmcnamara/libxlsxwriter/issues/116. I don't know what the Organic Maps developers would say about this going upstream, I guess it could be fixed with a
if(${CMAKE_HOST_SYSTEM} MATCHES gentoo)
as seen here.Try
grep -r 'EAPI=8' /var/db/repos/gentoo/
Even in documentation ebuild example EAPI is 8:
Hm,
ebuild organicmaps-9999.ebuild manifest
returnsEAPI=8 is not supported
, but 7 works.Tried to emerge your ebuild (big thank you again!):
Created
files/patch
with your patch, now I got:Same thing here so I guess something has changed since commit
ab8fb16fdf
a day ago when I installed it successfully.The problem is that for some reason you're building internal OM libraries as shared, not as static ones. We never designed nor tested OM with its internal libs (e.g. editor, indexer, search) as shared.
I'm not building for Gentoo (but for Alpine Linux) and saw the same thing originally. Our build scripts for CMake set
-DBUILD_SHARED_LIBS=True
by default (as we want to build all libraries shared rather than static of course), but for an end user application like this that doesn't really make sense. Set it to false or omit it from the CMake command to fix the build.Thank you for the comment @PureTryOut! I thought that was enabled by default for EAPI>=7 in the Gentoo ebuilds but it's definitely something to look into!
@hrnick will you update the ebuild?
Recently I pushed my first package into Guru, so I got some experience how to do it.
No update done other than EAPI=7. I added the following based on what I found in other ebuilds in the gentoo repository but with the same result unfortunately. :/
Try
TRUE
.I tried both ON and TRUE.
So it seems as if it is the EAPI>=7 that breaks the building. I wonder if that is because BUILD_SHARED_LIBS is set to TRUE/ON by default from EAPI 7.
So what is it that is being built statically? With EAPI=6 and no BUILD_SHARED_LIBS specificed organicmaps installs using the ebuild and patch above for me and running ldd on /usr/bin/OMaps yields a result which, as far as I understand it, at least means that the executable is built as a dynamic one at least.
So I guess this is what is being built statically with indexer, search and editor having circular dependencies that is only allowed for statically built libraries:
Ideally that gets fixed, but for now
-DBUILD_SHARED_LIBS=False
will make it compile.Adding
-DBUILD_SHARED_LIBS=False
makes organicmaps install even with EAPI=7. ShouldIUSE="static-libs"
andREQUIRED_USE="static-libs"
to indicate that this has to be built statically maybe? Let me know what you think and I'll post an updated ebuild.No, you shouldn't add such an USE flag, it would only add confusion.
Thank you! I wasn't sure if that would be a way to highlight to the user how the package is built.
Updated ebuild using EAPI 7 (8 still generates an error message on my system for some reasaon):
The patch has been renamed to better describe what it is and does.
THANK YOU! Organic Maps is so good, we must have it for Linux distributions. Tried your ebuild: works, I can make stable ebuild version (your is 9999) and add to Guru, ok?
Hm, for some reason - omaps is not found in my dmenu... But I can start it from terminal.
Love it!

Now I have omaps in dmenu, without system restart.
Dark theme is possible?
I'd be happy to see it added to guru! :)
But wouldn't a git version package be version 9999? Again, if there are releases for desktop to download somewhere we could do separate packages for them as well. At https://github.com/organicmaps/organicmaps/releases there doesn't seem to be any desktop releases for any of the versions.
Did a commit to Guru, currently with 9999 only.
So, what about dark theme?
Of course it would be better also to publish to GitHub releases desktop version, as well - and other Linux distributions can use it, maybe Gentoo too.
Type
?dark
into the search field (and there is?light
too).Updated, currently at https://github.com/gentoo/guru/tree/dev/gui-apps/organicmaps
I do not know how to fix this warning, I tried to replace
cmake-utils
tocmake
but build fails oncmake-utils_src_prepare
.Not sure what you mean? You can just download the tarball from the git tag and use that to build any version of OM you like, including the desktop build. Seems the proposed ebuild uses git so far but you can just
wget https://github.com/organicmaps/organicmaps/archive/<git tag>/organicmaps-<git tag>.tar.gz
and get a tarball of that version.Thanks @PureTryOut! I just assumed that they were all specifically for android since all recent releases has -android in their names, even for the source code versions. But if it's possible to build the desktop version using these I could have a go at it later.
Yeah I know, I was confused too but it's just the entire source tagged. That suffix can be ignored., it contains all relevant files for the desktop build too.
I thought about binary version too.
Unfortunately it does not seem as easy as just changing the source of the build. Here's an ebuild for v2022.07.01:
Running this gives the following error messages:
Yeah the repo uses git submodules, which you clone normally with
git clone --recursive
. In this case you need to download all the git submodules seperately (which is what I do for now, but it'll get better with #2863), or just use the git method for now.I think I figured out how that works in portage. This should be an ebuild for organicmaps-2022.07.01, the
EGIT_COMMIT
specified is the bump versions commit for that release. I confirmed this by runningOMaps --version
, then emerging with an olderEGIT_COMMIT
and runningOMaps --version
again. So the only thing that should have to be done to version bump this in portage is to rename the ebuild/patch, updateEGIT_COMMIT
and do an ebuild digest. Please give it a try and let me know if it works as intended. If you want to have a go at an older version the commit for 2022.06.29 should be9a66b6e3aae4f23e142695cddb5c0565fdd6f526
.Maybe organicmaps-9999 should have keywords set to "" so that it would have to be unmasked whereas the releases could be ~arch and, when considered stable, arch?
@biodranik Organic Maps pollute common space with gtest - what do you think about it?
@vitaly-zdanevich why are you building and installing unit tests? They are not needed, only the
desktop
target is needed to run the app.And why version 9999?
I do not know... How can I disable it? It should be enabled with USE
test
+ running them, for such case - can we fix gtest issue?In Gentoo world this is mean "unstable" from Git.
gtest sources obviously are not needed, even if someone decides to build and install unit tests (why someone except repo developers would need it???).
make install
(orcmake --install
) installs everything that is configured to be installable. That includes gtest as it's internal CMake configuration has it configured to be installable. Weird I know but it is how it is. You can just remove the resulting files from the final package.As for why you would build and run unit tests as a packager: to verify functionality of the package. When the unit tests succeed you can as a package with reasonable certainty know that the resulting package will work, just as the upstream developer would. Obviously there is no need to install them though.
Try to pass -DINSTALL_GTEST=off to cmake call.
Please clarify, I do not understand - what is cmake call?
The place where you're calling cmake, normally something like
cmake -DBUILD_TYPE=Release
. In the ebuild emerge is doing it incmake-utils_src_configure
.I'm not sure how you're writing an ebuild when you don't know what cmake does 🤔
Now we have cmake_src_configure - should it be
-DINSTALL_GTEST=off cmake_src_configure
?Will try add to
mycmakeargs
, to have such block:Got error:
Implemented in
8cf6d8072d
I don't even get there, I get the following errors, both for 2022.07.01 and 9999. It's strange that that it happens for 2022.07.01, it installed just fine before. Could it be a dependency issue?
Disable unity builds to avoid gcc-12 errors, #2886 is in progress
It's a compiler regression.
So where are we on building Organic Maps on Gentoo? I haven't given it a try for a while now and using the guru ebuild I got the following:
Adding the following seems to solve that:
Next I got...
Updating src_prepare seems to solve this...
Now I'm stuck on a...
I also added KEYWORDS. Now the ebuild I'm using looks like this:
Nevermind about where I got stick, it still seems to be the compiler regression. But I guess the updates to the ebuild could be useful anyway. :)
@hrnick please commit to Guru - you can copy-paste in a browser.
Thanks for pointing that out! Done!
But I see that the last commit is July 10 https://github.com/gentoo/guru/blob/dev/gui-apps/organicmaps/organicmaps-9999.ebuild
I don't know what happened. What about now?
Still July 10 is the last change.
"You’re making changes in a project you don’t have write access to. Submitting a change will write it to a new branch in your fork hrnick/guru, so you can send a pull request."
Could that be it?
9999 version cannot have KEYWORD.
I did a push to
dev
with yoursrc_prepare
- thanks.@hrnick in order to push to GURU dev - please get permission, read more about it here https://wiki.gentoo.org/wiki/Project:GURU/Information_for_Contributors
Thanks for the info!
Organicmaps installs now using the ebuild in guru, I have it on my desktop again! Thank you everyone for helping out! :)