gwaldron / osgearth

3D Maps for OpenSceneGraph / C++14
https://www.pelicanmapping.com/home-1/opensource
Other
1.47k stars 772 forks source link

build failed with Cesium-native #2577

Closed virtuozo007 closed 1 month ago

virtuozo007 commented 1 month ago

osgEarth Version (required): I am building osgEarth 3.6 with Cesium-native v0.34.0 OS: linux Compiler: gcc11

the osgEarthCesium lib was successfully generated, but when building the osgearth_imgui application, there were so many "undefined reference " errors.

I think this build failure is similar to #2434

Could you please help, thanks. @jasonbeverage

[ 60%] Linking CXX executable osgearth_imgui
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.6.0: undefined reference to `Cesium3DTilesReader::GroupMetadataReader::readArrayFromJson(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> > const&) const'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.6.0: undefined reference to `CesiumGeometry::Ray::Ray(glm::vec<3ul, double, (glm::qualifier)0> const&, glm::vec<3ul, double, (glm::qualifier)0> const&)'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.6.0: undefined reference to `Cesium3DTilesReader::SchemaReader::readFromJson(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> > const&) const'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.6.0: undefined reference to `CesiumGeospatial::BoundingRegionBuilder::toRegion() const'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.6.0: undefined reference to `Cesium3DTilesReader::GroupMetadataReader::GroupMetadataReader()'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.6.0: undefined reference to `Cesium3DTilesReader::MetadataEntityReader::MetadataEntityReader()'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.6.0: undefined reference to `CesiumGeometry::QuadtreeTileID::computeInvertedY(CesiumGeometry::QuadtreeTilingScheme const&) const'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.6.0: undefined reference to `CesiumGeometry::Transforms::Y_UP_TO_Z_UP'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.6.0: undefined reference to `Cesium3DTilesReader::SchemaReader::readFromJson(gsl::span<std::byte const, 18446744073709551615ul> const&) const'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.6.0: undefined reference to `Cesium3DTilesReader::SchemaReader::SchemaReader()'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.6.0: undefined reference to `CesiumGltf::convertPropertyComponentTypeToString[abi:cxx11](CesiumGltf::PropertyComponentType)'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.6.0: undefined reference to `CesiumGltf::KhrTextureTransform::KhrTextureTransform(CesiumGltf::ExtensionKhrTextureTransform const&)'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.6.0: undefined reference to `CesiumUtility::JsonValue::getValuePtrForKey(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.6.0: undefined reference to `CesiumGeometry::clipTriangleAtAxisAlignedThreshold(double, bool, int, int, int, double, double, double, std::vector<std::variant<int, CesiumGeometry::InterpolatedVertex>, std::allocator<std::variant<int, CesiumGeometry::InterpolatedVertex> > >&)'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.6.0: undefined reference to `CesiumGeospatial::BoundingRegionBuilder::setPoleTolerance(double)'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.6.0: undefined reference to `CesiumGeometry::Ray::operator-() const'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.6.0: undefined reference to `CesiumGeospatial::BoundingRegionBuilder::expandToIncludePosition(CesiumGeospatial::Cartographic const&)'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.6.0: undefined reference to `CesiumGeometry::Transforms::Z_UP_TO_Y_UP'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.6.0: undefined reference to `Cesium3DTilesReader::SubtreeFileReader::load(CesiumAsync::AsyncSystem const&, std::shared_ptr<CesiumAsync::IAssetAccessor> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const&) const'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.6.0: undefined reference to `Cesium3DTilesReader::SubtreeFileReader::SubtreeFileReader()'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.6.0: undefined reference to `CesiumGeometry::IntersectionTests::rayPlane(CesiumGeometry::Ray const&, CesiumGeometry::Plane const&)'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.6.0: undefined reference to `CesiumGeometry::Transforms::X_UP_TO_Z_UP'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.6.0: undefined reference to `Cesium3DTilesReader::MetadataEntityReader::readFromJson(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> > const&) const'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.6.0: undefined reference to `CesiumGeospatial::BoundingRegionBuilder::BoundingRegionBuilder()'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.6.0: undefined reference to `CesiumGltf::KhrTextureTransform::applyTransform(double, double) const'
collect2: error: ld returned 1 exit status
make[2]: *** [src/applications/osgearth_imgui/CMakeFiles/osgearth_imgui.dir/build.make:240: src/applications/osgearth_imgui/osgearth_imgui] Error 1
make[1]: *** [CMakeFiles/Makefile2:1141: src/applications/osgearth_imgui/CMakeFiles/osgearth_imgui.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
gwaldron commented 1 month ago

Please try with the 0.31.0 tag of Cesium native. https://github.com/CesiumGS/cesium-native/tree/v0.31.0