Skip to content
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

Cesium Native: Could NOT find csprng #2645

Closed
Sgambe33 opened this issue Oct 16, 2024 · 8 comments · May be fixed by #2647
Closed

Cesium Native: Could NOT find csprng #2645

Sgambe33 opened this issue Oct 16, 2024 · 8 comments · May be fixed by #2647

Comments

@Sgambe33
Copy link

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
Copy link
Contributor

I can confirm that I see the same problem.

@ELeeScape
Copy link
Contributor

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
Copy link
Author

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

@ELeeScape
Copy link
Contributor

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
Copy link
Collaborator

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
Copy link
Author

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

@plevy
Copy link
Collaborator

plevy commented Oct 23, 2024

In the short term, the link problem is with that application, osgearth_imgui. If you disable it, it should build and install.

@alihitman99
Copy link

alihitman99 commented Nov 10, 2024

#2493
that issue help me and i can build cesium-native osgearth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants