[3party] Optionally allow building with packaged protobuf #3822

Merged
Ferenc- merged 1 commit from protobuf into master 2023-02-01 16:01:27 +00:00
Ferenc- commented 2022-11-05 22:51:16 +00:00 (Migrated from github.com)

Signed-off-by: Ferenc Géczi ferenc.gm@gmail.com

Signed-off-by: Ferenc Géczi <ferenc.gm@gmail.com>
biodranik commented 2022-11-06 07:47:28 +00:00 (Migrated from github.com)

Is protobuf updated to the latest version? Are there any issues with the latest version?

Is protobuf updated to the latest version? Are there any issues with the latest version?
Ferenc- commented 2023-01-15 11:41:54 +00:00 (Migrated from github.com)

Is protobuf updated to the latest version? Are there any issues with the latest version?

Now, that the macro has been dropped, the version has no impact on this PR, so those questions can be the topic of the separate update PR.

> Is protobuf updated to the latest version? Are there any issues with the latest version? Now, that the macro has been dropped, the version has no impact on this PR, so those questions can be the topic of the separate update PR.
biodranik (Migrated from github.com) reviewed 2023-01-15 13:42:11 +00:00
biodranik (Migrated from github.com) left a comment

Now we can expect reports about "it doesn't build if I use system package".

Now we can expect reports about "it doesn't build if I use system package".
@ -151,4 +151,2 @@
add_subdirectory(${OMIM_ROOT}/3party/protobuf ${CMAKE_CURRENT_BINARY_DIR}/protobuf)
target_link_libraries(${PROJECT_NAME}
biodranik (Migrated from github.com) commented 2023-01-15 13:41:37 +00:00

Isn't the second param necessary?

Isn't the second param necessary?
Ferenc- commented 2023-01-15 18:28:16 +00:00 (Migrated from github.com)

Now we can expect reports about "it doesn't build if I use system package".

We can set up a CI with a reference build setup with system packages, and just point towards it.
If a user can't replicate that for whatever reason, then it is not our problem anymore.

> Now we can expect reports about "it doesn't build if I use system package". We can set up a CI with a reference build setup with system packages, and just point towards it. If a user can't replicate that for whatever reason, then it is not our problem anymore.
Ferenc- (Migrated from github.com) reviewed 2023-01-15 18:31:46 +00:00
@ -151,4 +151,2 @@
add_subdirectory(${OMIM_ROOT}/3party/protobuf ${CMAKE_CURRENT_BINARY_DIR}/protobuf)
target_link_libraries(${PROJECT_NAME}
Ferenc- (Migrated from github.com) commented 2023-01-15 18:31:46 +00:00

Isn't the second param necessary?

Necessary for what?
For the build to work? Apparently not.
For some so far (for me) unclear purpose, that you might know about?
Let me know and I put it back immediately.

> Isn't the second param necessary? Necessary for what? For the build to work? Apparently not. For some so far (for me) unclear purpose, that you might know about? Let me know and I put it back immediately.
biodranik (Migrated from github.com) reviewed 2023-01-15 20:01:26 +00:00
@ -151,4 +151,2 @@
add_subdirectory(${OMIM_ROOT}/3party/protobuf ${CMAKE_CURRENT_BINARY_DIR}/protobuf)
target_link_libraries(${PROJECT_NAME}
biodranik (Migrated from github.com) commented 2023-01-15 20:01:26 +00:00

Is it related to generated protoc binary that can be used to recompile changed map styles?

Is it related to generated protoc binary that can be used to recompile changed map styles?
Ferenc- (Migrated from github.com) reviewed 2023-01-16 20:01:58 +00:00
@ -151,4 +151,2 @@
add_subdirectory(${OMIM_ROOT}/3party/protobuf ${CMAKE_CURRENT_BINARY_DIR}/protobuf)
target_link_libraries(${PROJECT_NAME}
Ferenc- (Migrated from github.com) commented 2023-01-16 20:01:57 +00:00

generated protoc binary

The protoc binary does not appear to be generated by the current cmake + ninja build process, on the master branch:

find -iname \*proto\*
./indexer/protobuf
./indexer/protobuf/CMakeFiles/protobuf.dir
./OMaps.app/Contents/Resources/drules_proto_dark.bin
./OMaps.app/Contents/Resources/drules_proto_vehicle_clear.bin
./OMaps.app/Contents/Resources/drules_proto_clear.bin
./OMaps.app/Contents/Resources/drules_proto_vehicle_dark.bin
./libprotobuf.a
./drules_struct.proto

Have I missed something perhaps?

recompile changed map styles

From the STYLES.md I don't see how and where that is needed, from that it appears that only the already generated python output is used. Once protobuf is istalled with pip install protobuf.

The one place where I have found usage of protoc is the generate_proto.sh, but that just assumes, that the protoc is somewhere in the PATH.

> generated protoc binary The `protoc` binary does not appear to be generated by the current `cmake` + `ninja` build process, on the `master` branch: ````bash find -iname \*proto\* ./indexer/protobuf ./indexer/protobuf/CMakeFiles/protobuf.dir ./OMaps.app/Contents/Resources/drules_proto_dark.bin ./OMaps.app/Contents/Resources/drules_proto_vehicle_clear.bin ./OMaps.app/Contents/Resources/drules_proto_clear.bin ./OMaps.app/Contents/Resources/drules_proto_vehicle_dark.bin ./libprotobuf.a ./drules_struct.proto ```` Have I missed something perhaps? > recompile changed map styles From the `STYLES.md` I don't see how and where that is needed, from that it appears that only the already generated python output is used. Once protobuf is istalled with `pip install protobuf`. The one place where I have found usage of `protoc` is the `generate_proto.sh`, but that just assumes, that the `protoc` is somewhere in the `PATH`.
biodranik (Migrated from github.com) reviewed 2023-01-20 22:26:32 +00:00
@ -151,4 +151,2 @@
add_subdirectory(${OMIM_ROOT}/3party/protobuf ${CMAKE_CURRENT_BINARY_DIR}/protobuf)
target_link_libraries(${PROJECT_NAME}
biodranik (Migrated from github.com) commented 2023-01-20 22:26:31 +00:00

As far as I remember, protoc shoud be the same version to generate styles properly. @vng @pastk do you install some custom protoc/protobuf version or the latest one works fine with styles generation?

As far as I remember, protoc shoud be the same version to generate styles properly. @vng @pastk do you install some custom protoc/protobuf version or the latest one works fine with styles generation?
pastk reviewed 2023-01-21 19:39:42 +00:00
@ -151,4 +151,2 @@
add_subdirectory(${OMIM_ROOT}/3party/protobuf ${CMAKE_CURRENT_BINARY_DIR}/protobuf)
target_link_libraries(${PROJECT_NAME}

As far as I remember, protoc shoud be the same version to generate styles properly. @vng @pastk do you install some custom protoc/protobuf version or the latest one works fine with styles generation?

I don't seem to have a protoc binary in my system even. For the styles compiler to work I just installed python protobuf as per the STYLES doc. ATM I'm using 3.19.4.

> As far as I remember, protoc shoud be the same version to generate styles properly. @vng @pastk do you install some custom protoc/protobuf version or the latest one works fine with styles generation? I don't seem to have a `protoc` binary in my system even. For the styles compiler to work I just installed python protobuf as per the STYLES doc. ATM I'm using `3.19.4`.
Ferenc- (Migrated from github.com) reviewed 2023-01-25 16:21:01 +00:00
@ -151,4 +151,2 @@
add_subdirectory(${OMIM_ROOT}/3party/protobuf ${CMAKE_CURRENT_BINARY_DIR}/protobuf)
target_link_libraries(${PROJECT_NAME}
Ferenc- (Migrated from github.com) commented 2023-01-25 16:21:00 +00:00

How about you @vng ?

How about you @vng ?
vng (Migrated from github.com) reviewed 2023-01-25 17:58:53 +00:00
@ -151,4 +151,2 @@
add_subdirectory(${OMIM_ROOT}/3party/protobuf ${CMAKE_CURRENT_BINARY_DIR}/protobuf)
target_link_libraries(${PROJECT_NAME}
vng (Migrated from github.com) commented 2023-01-25 17:58:52 +00:00

I work on MacOS. brew install protobuf is enough for me.

I work on MacOS. brew install protobuf is enough for me.
biodranik (Migrated from github.com) reviewed 2023-01-28 09:57:09 +00:00
biodranik (Migrated from github.com) left a comment

Please rebase and check if it works with the latest system protobuf library.

Please rebase and check if it works with the latest system protobuf library.
biodranik (Migrated from github.com) approved these changes 2023-01-28 10:40:26 +00:00
This repo is archived. You cannot comment on pull requests.
No reviewers
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
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: organicmaps/organicmaps-tmp#3822
No description provided.