Build errors (MapboxGLGlyphManager related) #2007
Replies: 9 comments 10 replies
-
You need to build with protocol buffer support by building against
protobuf. It looks I didn't protect that code when protobuf wasn't present.
…On Thu, Mar 3, 2022 at 10:41 AM MarkusMoss ***@***.***> wrote:
Hi, I have tried to build latest osgearth code (try linking it against
latest OSG).
For me, building osgearth (under latest ubuntu), stops here with these
error messages:
"osgearth/src/osgEarth/MapboxGLGlyphManager.cpp:25:10: fatal error:
glyphs.pb.h: Fila eller mappa finnes ikke " (file not found)
and
"osgearth/src/osgEarth/MapboxGLImageLayer.cpp:243:27: error:
‘MVTFeatureSource’ was not declared in this scope; did you mean
‘featureSource’?
243 | osg::ref_ptr< MVTFeatureSource > featureSource = new
MVTFeatureSource();"
Do I need to install some "Mapbox" 3rdparty to get it built ?
Thanks for info ! regards, Markus
—
Reply to this email directly, view it on GitHub
<#2007>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACPXYWXXJB47Q7UWL6ZOS3U6DMUJANCNFSM5P226XXQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Is there a reason you can't build against protobuf? Honestly I'd like to
just make it a required dependency. We use vector tiles all the time which
requires protobuf so we always build with it on.
Jason
…On Thu, Mar 3, 2022 at 1:16 PM Nebi Sarikaya ***@***.***> wrote:
I had the same problem and I commented out that lines while building.
—
Reply to this email directly, view it on GitHub
<#2007 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACPXYTXUOONG2TXZ75RJALU6D6YLANCNFSM5P226XXQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
You might need to rerun cmake. If you just added protobuf as a dependency
it needs to regenerate the project and you should have support for loading
MVT.
…On Thu, Mar 3, 2022 at 1:39 PM Nebi Sarikaya ***@***.***> wrote:
There is no reason. Actually after that I built the latest version against
protobuf. But this time I got error on MapboxGLImageLayer.cpp at line 236,
since do not have MVT support. And I commented out the followinf lines:
if (type() == "vector-mbtiles")
{
URI uri(url(), context);
osg::ref_ptr< MVTFeatureSource > featureSource = new MVTFeatureSource();
featureSource->setReadOptions(options);
featureSource->setURL(uri);
featureSource->open();
_featureSource = featureSource.get();
}
—
Reply to this email directly, view it on GitHub
<#2007 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACPXYQX2UBJI6TNJEDQNKDU6EBPXANCNFSM5P226XXQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Thanks for info and fast reply! I will try nebsar's approach. Markus |
Beta Was this translation helpful? Give feedback.
-
That file is generated from the vetor_tile.proto file in the osgearth
source code. On Linux you need to install the protobuf-compiler and
libprotobuf-dev like we do in our Github actions here
https://github.com/gwaldron/osgearth/blob/master/.github/workflows/linux.yml#L31
Once you have that re-rerun cmake and the protoc compiler will generate
that header for you from the proto file.
Jason
…On Fri, Mar 4, 2022 at 1:07 PM Nebi Sarikaya ***@***.***> wrote:
Hello Jason,
I tried to build osgEarth again. But the main problem is I do not have
vector_tile.pb.h header. I think this is about MapBox Mapnik library. Is it
right? How can I include that library?
—
Reply to this email directly, view it on GitHub
<#2007 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACPXYR46WZOK3J6KFBF73LU6JGPHANCNFSM5P226XXQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I recently pushed a fix that lets you build without protobuf, so that's another option. Otherwise, you can leave "Protobuf_SRC_ROOT_FOLDER" unset. |
Beta Was this translation helpful? Give feedback.
-
I managed to build the latest version with protobuf at last 😁, with MVT support. Protobuf_SRC_ROOT_FOLDER should indicate the folder that protoc.exe exists. |
Beta Was this translation helpful? Give feedback.
-
Converted to issue #2042. |
Beta Was this translation helpful? Give feedback.
-
What operating system are you using?
You shouldn't need to set that manually usually, if you are using Linux it
should just find it if you installed protobuf via apt get. On Windows I'd
recommend building using vcpkg to get your dependencies as described here:
http://docs.osgearth.org/en/latest/build.html
Jason
…On Fri, Mar 4, 2022 at 3:45 PM Nebi Sarikaya ***@***.***> wrote:
Thank you Jason,
What directory should I show in the cmake in the picture?
"src/protobuf/google/"? Cmake does not seems to find protobuf source code
automatically. Sorry for the stupid question.
[image: image]
<https://user-images.githubusercontent.com/5169314/156838933-f913ee6e-4de7-4f77-abd2-1554a240cfa2.png>
—
Reply to this email directly, view it on GitHub
<#2007 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACPXYSU5HJZQEY4ZMMYHETU6JY63ANCNFSM5P226XXQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi, I have tried to build latest osgearth code (try linking it against latest OSG).
For me, building osgearth (under latest ubuntu), stops here with these error messages:
"osgearth/src/osgEarth/MapboxGLGlyphManager.cpp:25:10: fatal error: glyphs.pb.h: Fila eller mappa finnes ikke " (file not found)
and
"osgearth/src/osgEarth/MapboxGLImageLayer.cpp:243:27: error: ‘MVTFeatureSource’ was not declared in this scope; did you mean ‘featureSource’?
243 | osg::ref_ptr< MVTFeatureSource > featureSource = new MVTFeatureSource();"
Do I need to install some "Mapbox" 3rdparty to get it built ?
Thanks for info ! regards, Markus
Beta Was this translation helpful? Give feedback.
All reactions