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

Error building in Arch Linux #765

Open
samtux opened this issue Nov 19, 2023 · 3 comments
Open

Error building in Arch Linux #765

samtux opened this issue Nov 19, 2023 · 3 comments

Comments

@samtux
Copy link

samtux commented Nov 19, 2023

In the Platform: x86_64 Arch Linux, GCC v13.2.1, clang v16.0.6, cmake v3.27.8.

I get the next error building in Arch Linux:

[ 25%] Built target Async++
[ 26%] Built target sqlite3
[ 26%] Building CXX object CesiumAsync/CMakeFiles/CesiumAsync.dir/src/SqliteCache.cpp.o
In file included from /home/smesa/makepkg/cesium-native/cesium-native/CesiumAsync/include/CesiumAsync/ICacheDatabase.h:3,
                 from /home/smesa/makepkg/cesium-native/cesium-native/CesiumAsync/include/CesiumAsync/SqliteCache.h:3,
                 from /home/smesa/makepkg/cesium-native/cesium-native/CesiumAsync/src/SqliteCache.cpp:1:
/home/smesa/makepkg/cesium-native/cesium-native/CesiumAsync/include/CesiumAsync/CacheItem.h:27:15: error: expected ')' before 'cacheStatusCode'
   27 |       uint16_t cacheStatusCode,
      |               ^~~~~~~~~~~~~~~~
      |               )
/home/smesa/makepkg/cesium-native/cesium-native/CesiumAsync/include/CesiumAsync/CacheItem.h:26:16: note: to match this '('
   26 |   CacheResponse(
      |                ^
/home/smesa/makepkg/cesium-native/cesium-native/CesiumAsync/include/CesiumAsync/CacheItem.h:37:3: error: 'uint16_t' does not name a type
   37 |   uint16_t statusCode;
      |   ^~~~~~~~
/home/smesa/makepkg/cesium-native/cesium-native/CesiumAsync/include/CesiumAsync/CacheItem.h:12:1: note: 'uint16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
   11 | #include <vector>
  +++ |+#include <cstdint>
   12 | 
/home/smesa/makepkg/cesium-native/cesium-native/CesiumAsync/include/CesiumAsync/ICacheDatabase.h:52:7: error: 'uint16_t' has not been declared
   52 |       uint16_t statusCode,
      |       ^~~~~~~~
/home/smesa/makepkg/cesium-native/cesium-native/CesiumAsync/include/CesiumAsync/SqliteCache.h:42:16: error: 'virtual bool CesiumAsync::SqliteCache::storeEntry(const std::string&, time_t, const std::string&, const std::string&, const CesiumAsync::HttpHeaders&, uint16_t, const CesiumAsync::HttpHeaders&, const gsl::span<const std::byte>&)' marked 'override', but does not override
   42 |   virtual bool storeEntry(
      |                ^~~~~~~~~~
/home/smesa/makepkg/cesium-native/cesium-native/CesiumAsync/src/SqliteCache.cpp: In member function 'virtual std::optional<CesiumAsync::CacheItem> CesiumAsync::SqliteCache::getEntry(const std::string&) const':
/home/smesa/makepkg/cesium-native/cesium-native/CesiumAsync/src/SqliteCache.cpp:454:34: error: too many initializers for 'CesiumAsync::CacheResponse'
  454 |           std::move(responseData)}};
      |                                  ^
/home/smesa/makepkg/cesium-native/cesium-native/CesiumAsync/src/SqliteCache.cpp:454:35: error: no matching function for call to 'CesiumAsync::CacheItem::CacheItem(<brace-enclosed initializer list>)'
  454 |           std::move(responseData)}};
      |                                   ^
/home/smesa/makepkg/cesium-native/cesium-native/CesiumAsync/include/CesiumAsync/CacheItem.h:96:3: note: candidate: 'CesiumAsync::CacheItem::CacheItem(time_t, CesiumAsync::CacheRequest&&, CesiumAsync::CacheResponse&&)'
   96 |   CacheItem(
      |   ^~~~~~~~~
/home/smesa/makepkg/cesium-native/cesium-native/CesiumAsync/include/CesiumAsync/CacheItem.h:96:3: note:   conversion of argument 3 would be ill-formed:
/home/smesa/makepkg/cesium-native/cesium-native/CesiumAsync/include/CesiumAsync/CacheItem.h:88:23: note: candidate: 'CesiumAsync::CacheItem::CacheItem(const CesiumAsync::CacheItem&)'
   88 | class CESIUMASYNC_API CacheItem {
      |                       ^~~~~~~~~
/home/smesa/makepkg/cesium-native/cesium-native/CesiumAsync/include/CesiumAsync/CacheItem.h:88:23: note:   candidate expects 1 argument, 3 provided
/home/smesa/makepkg/cesium-native/cesium-native/CesiumAsync/include/CesiumAsync/CacheItem.h:88:23: note: candidate: 'CesiumAsync::CacheItem::CacheItem(CesiumAsync::CacheItem&&)'
/home/smesa/makepkg/cesium-native/cesium-native/CesiumAsync/include/CesiumAsync/CacheItem.h:88:23: note:   candidate expects 1 argument, 3 provided
make[2]: *** [CesiumAsync/CMakeFiles/CesiumAsync.dir/build.make:174: CesiumAsync/CMakeFiles/CesiumAsync.dir/src/SqliteCache.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3306: CesiumAsync/CMakeFiles/CesiumAsync.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
@kring
Copy link
Member

kring commented Nov 19, 2023

The solution is in the error message: add #include <cstdint> to the top of the file. Other compilers seem to be ok without it, but it should be there. We welcome a pull request with this change if it works for you.

@mlavik1
Copy link

mlavik1 commented Jan 4, 2024

@kring There's also a similar error when building draco. It has recently been fixed, in this PR: https://github.com/google/draco/pull/964/files

Would it also be an option to update the Draco submodule?

@kring
Copy link
Member

kring commented Jan 8, 2024

Would it also be an option to update the Draco submodule?

Yes, we'd welcome a pull request to update the Draco submodule as well.

drewtu2 added a commit to drewtu2/cesium-native that referenced this issue Mar 19, 2024
Adds the `#include <cstdint>` header to a handful of headers to build
successfully on linux. Tested Ubuntu 18.04 w/ gcc 14.0, cmake 3.29

This issue is discussed in CesiumGS#765
drewtu2 added a commit to drewtu2/cesium-native that referenced this issue Mar 19, 2024
- Updates draco version to fix build issue with missing includes
  discussed in this issue:
  CesiumGS#765
- This PR does not address the missing includes within the Cesium Native
  library itself. Those are handled in
  CesiumGS#833
drewtu2 added a commit to drewtu2/cesium-native that referenced this issue Mar 20, 2024
Adds the `#include <cstdint>` header to a handful of headers to build
successfully on linux. Tested Ubuntu 18.04 w/ gcc 14.0, cmake 3.29

This issue is discussed in CesiumGS#765
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

No branches or pull requests

3 participants