-
-
Notifications
You must be signed in to change notification settings - Fork 923
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
Add to Gentoo repository #2217
Comments
There were some attempts. Please check existing issues and documentation. |
Related to #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: #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 https://github.com/gentoo/gentoo/blob/09bceb3446344354276908ee2bb792b4bd33ce3e/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
No, but I do not remember. |
Please specify |
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: #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 jmcnamara/libxlsxwriter#116. I don't know what the Organic Maps developers would say about this going upstream, I guess it could be fixed with a |
Try |
Even in documentation ebuild example EAPI is 8: |
Hm, |
Tried to emerge your ebuild (big thank you again!):
|
Created
|
Same thing here so I guess something has changed since commit ab8fb16 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 |
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 |
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 |
Adding |
Hmmm, but if a map is downloaded - we do not need a network? |
But the map needs to be downloaded at some time. Also, OM notifies you about too old maps and present you the newest one. It does make some network connections. You can also look at (some) of the dependencies with
QtNetwork is explicitely linked against. |
why some package want to disable it? What is the name of that package? |
Now, even without adding qtbase dependency, I got compile error:
Any ideas? This is the link to the patch https://github.com/gentoo/guru/blob/73885a8d9d55f623ed74366c932d800ea09c9a37/gui-apps/organicmaps/files/more-3party.patch |
I suggest to properly fix the upstream version here instead of applying strange patches ) |
I know nothing about cmake - can somebody please investigate the upstream? |
Your patch has failed, because the same file has changed here, and the older patch didn't take it into account. So you can take the latest version of the file from here and make another patch, similar to the failing one. To reduce the amount of patches (or remove them completely) you can offer necessary changes in pull requests here. If they are really needed, and they don't break all other platforms, then we can accept and merge these changes here. And custom patches for Gentoo won't be needed. There is not much to know about cmake. Two commands are used to build:
You can also install ninja build and use Then go step by step and fix all build issues. |
I tried to install without more-3party.patch and got
Can we fix it in this repo, not in a patch? |
This config clearly requires that jansson is installed in your system as a dependency. Why a patch is needed?
|
Oh, ok, thanks, I will try... |
Let me clarify the situation, since I'm the author of the patches. Patch 1Here is an updated version of the patch. @vitaly-zdanevich I'll make an PR with that for guru as soon as the OrganicMaps PRs are resolved. diff --git a/3party/CMakeLists.txt b/3party/CMakeLists.txt
index d4996e302d..953787945b 100644
--- a/3party/CMakeLists.txt
+++ b/3party/CMakeLists.txt
@@ -41,9 +41,6 @@ if (NOT WITH_SYSTEM_PROVIDED_3PARTY)
# Add pugixml library.
add_subdirectory(pugixml)
- # Add protobuf library.
- add_subdirectory(protobuf)
-
if (NOT PLATFORM_LINUX)
add_subdirectory(freetype)
add_subdirectory(icu)
@@ -55,6 +52,9 @@ if (NOT WITH_SYSTEM_PROVIDED_3PARTY)
target_include_directories(utf8cpp INTERFACE "${OMIM_ROOT}/3party/utfcpp/source")
endif()
+# Add protobuf library.
+add_subdirectory(protobuf)
+
add_subdirectory(agg)
add_subdirectory(bsdiff-courgette)
add_subdirectory(liboauthcpp) It put protobuf to a vendored library again, since the installed version in Gentoo is too new. This should be fixed by #6310, so the patch is superfluous at the moment the PR is merged. Patch 2
See PR #7983 The Jansson failure76dd632 introduced a new mechanism for finding jansson which seems to fail. PR #7982 should fix that. The failure after thatApplying both PRs fixes CMake configuration. However, the next failure is:
This needs further investigation. I'm not sure why the base project does not include
|
@gerion0 thanks! It would be great to understand the root causes of why the master code does not work for jansson. Regarding fast double parser, it is under the if for some reason. You're likely building with
|
Should have looked into the CMakeLists as well and not just on the output of ripgrep... |
Because released versions of |
For header-only libs we should use cmake's INTERFACE without any preconditions, instead of PRIVATE, right? I'm sure there was a better, even faster double parser that is worth integrating. I think it was even faster than mentioned in #1659 |
I hope that we can fix it soon. I know nothing about cmake so waiting for you guys... |
@vitaly-zdanevich it's a great opportunity to learn instead of waiting ;-) |
I do not understand this, what should I do? |
On the organicmaps side, nothing is necessary, adding the library search process directly in CMake would just provide a better (and earlier in the build) error message. The next step for the Gentoo packaging process would be to write an ebuild for fast_double_parser. |
So, what to do with that now? |
|
Please help, I cannot compile this :( |
@vitaly-zdanevich it is impossible to help without any error logs. |
Did you install libpthread dependency? |
This does not exist as seperate package on Gentoo.
|
The failed cmake check is clearly about the missing Threads library:
Either its dev version is missing, or there is a bug in cmake module that searches for this library on gentoo. |
Therefore I asked to compile a binary that uses pthread, which @vitaly-zdanevich said is working.
Gentoo does not split out the headers in dev packages, since one always needs them to compile other packages.
It works on my Gentoo :). Maybe some configuration in the system of @vitaly-zdanevich is incorrect. @vitaly-zdanevich You can:
|
/lib64/libpthread.so.0 |
Thanks, but this is difficult for me, what about a Google Meet call with my screen sharing? |
@biodranik is desktop version ready for use? How to build it? What are the dependencies?
The text was updated successfully, but these errors were encountered: