gwaldron / osgearth

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

Cesium Native: Could NOT find csprng #2645

Open Sgambe33 opened 4 days ago

Sgambe33 commented 4 days ago

osgEarth Version (required): 3.7.0

Description of the problem: Could not find csprng while building osgearth with cesium-native support.

What you have tried: I followed the instructions in the documentation literally. Also tried to rebuild cesium-native and osgearth from the beginning.

Screenshot, code block, or data file that will help reproduce the issue: image

ELeeScape commented 4 days ago

I can confirm that I see the same problem.

ELeeScape commented 4 days ago

It appears to me that cesium-native doesn't use csprng anymore(?), at least there aren't any references to it in the current cesium-native repo.

Sgambe33 commented 3 days ago

So it should be safe to remove it from findCesiumNative.cmake?

ELeeScape commented 3 days ago

Well, probably, but there were two other library problems as well. modp_b64 has changed names to modpbase64 and s2geometry has changed names to s2. Fixing those two allowed the cmake configure to successfully run, but the build fails with a bunch of linker errors that I don't understand yet. I'm pretty sure that no one has tried to (clean) build the Cesium support in osgEarth in quite some time.

jasonbeverage commented 2 days ago

Thanks for the PR @ELeeScape . I didn't realize that cesium native moved to using vcpkg as their package manager and removed their git submodules. For now, please use the 0.37 cesium-native release until we have a change to look into this further.

Sgambe33 commented 2 days ago

Now, although switching to 0.37 release fixed most of the problems, some still persist and make the install impossible:

[100%] Linking CXX executable osgearth_imgui
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.7.1: 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.7.1: undefined reference to `Cesium3DTilesReader::GroupMetadataReader::GroupMetadataReader()'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.7.1: undefined reference to `Cesium3DTilesReader::SchemaReader::readFromJson(gsl::span<std::byte const, 18446744073709551615ul> const&) const'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.7.1: undefined reference to `Cesium3DTilesReader::SchemaReader::SchemaReader()'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.7.1: 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.7.1: undefined reference to `CesiumGeospatial::BoundingRegionBuilder::setPoleTolerance(double)'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.7.1: undefined reference to `CesiumGeospatial::BoundingRegionBuilder::expandToIncludePosition(CesiumGeospatial::Cartographic const&)'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.7.1: undefined reference to `CesiumGeospatial::LocalHorizontalCoordinateSystem::LocalHorizontalCoordinateSystem(glm::vec<3ul, double, (glm::qualifier)0> const&, CesiumGeospatial::LocalDirection, CesiumGeospatial::LocalDirection, CesiumGeospatial::LocalDirection, double, CesiumGeospatial::Ellipsoid const&)'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.7.1: undefined reference to `CesiumGeometry::Transforms::Z_UP_TO_Y_UP'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.7.1: undefined reference to `CesiumGeometry::IntersectionTests::rayPlane(CesiumGeometry::Ray const&, CesiumGeometry::Plane const&)'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.7.1: undefined reference to `CesiumGeometry::Transforms::X_UP_TO_Z_UP'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.7.1: undefined reference to `Cesium3DTilesReader::GroupMetadataReader::readArrayFromJson(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> > const&) const'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.7.1: undefined reference to `CesiumGeospatial::BoundingRegionBuilder::toRegion(CesiumGeospatial::Ellipsoid const&) const'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.7.1: undefined reference to `CesiumGeometry::QuadtreeTileID::computeInvertedY(CesiumGeometry::QuadtreeTilingScheme const&) const'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.7.1: undefined reference to `Cesium3DTilesReader::MetadataEntityReader::MetadataEntityReader()'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.7.1: undefined reference to `CesiumGeometry::Transforms::Y_UP_TO_Z_UP'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.7.1: 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.7.1: undefined reference to `CesiumGltf::convertPropertyComponentTypeToString[abi:cxx11](CesiumGltf::PropertyComponentType)'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.7.1: undefined reference to `CesiumGltf::KhrTextureTransform::KhrTextureTransform(CesiumGltf::ExtensionKhrTextureTransform const&)'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.7.1: undefined reference to `CesiumGltf::getQuaternionAccessorView(CesiumGltf::Model const&, CesiumGltf::Accessor const*)'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.7.1: 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.7.1: undefined reference to `CesiumGeometry::Ray::operator-() const'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.7.1: undefined reference to `Cesium3DTilesReader::SubtreeFileReader::SubtreeFileReader()'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.7.1: undefined reference to `Cesium3DTilesReader::MetadataEntityReader::readFromJson(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> > const&) const'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.7.1: undefined reference to `CesiumGeospatial::BoundingRegionBuilder::BoundingRegionBuilder()'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.7.1: undefined reference to `Cesium3DTilesReader::SchemaReader::readFromJson(rapidjson::GenericValue<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> > const&) const'
/usr/bin/ld: ../../osgEarthCesium/libosgEarthCesium.so.3.7.1: 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:123: src/applications/osgearth_imgui/osgearth_imgui] Error 1
make[1]: *** [CMakeFiles/Makefile2:1714: src/applications/osgearth_imgui/CMakeFiles/osgearth_imgui.dir/all] Error 2
make: *** [Makefile:136: all] Error 2