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

1.1.6: error: use of undeclared identifier 'SQLITE_MAX_LENGTH' and other errors #30

Open
yurivict opened this issue Jul 16, 2024 · 4 comments

Comments

@yurivict
Copy link

1.1.6 build fails:

/usr/ports/science/libgetar/work/libgetar-1.1.6/src/SqliteArchive.cpp:234:46: error: use of undeclared identifier 'SQLITE_MAX_LENGTH'
  234 |             for(size_t chunkidx(0); chunkidx*LZ4_CHUNK_SIZE < byteLength; ++chunkidx)
      |                                              ^
/usr/ports/science/libgetar/work/libgetar-1.1.6/src/SqliteArchive.cpp:15:53: note: expanded from macro 'LZ4_CHUNK_SIZE'
   15 | #define LZ4_CHUNK_SIZE std::min(LZ4_MAX_INPUT_SIZE, SQLITE_MAX_LENGTH)/2
      |                                                     ^
/usr/ports/science/libgetar/work/libgetar-1.1.6/src/SqliteArchive.cpp:236:51: error: use of undeclared identifier 'SQLITE_MAX_LENGTH'
  236 |                 const int sourceSize(min((size_t) LZ4_CHUNK_SIZE, byteLength - chunkidx*LZ4_CHUNK_SIZE));
      |                                                   ^
/usr/ports/science/libgetar/work/libgetar-1.1.6/src/SqliteArchive.cpp:15:53: note: expanded from macro 'LZ4_CHUNK_SIZE'
   15 | #define LZ4_CHUNK_SIZE std::min(LZ4_MAX_INPUT_SIZE, SQLITE_MAX_LENGTH)/2
      |                                                     ^
/usr/ports/science/libgetar/work/libgetar-1.1.6/src/SqliteArchive.cpp:236:89: error: use of undeclared identifier 'SQLITE_MAX_LENGTH'
  236 |                 const int sourceSize(min((size_t) LZ4_CHUNK_SIZE, byteLength - chunkidx*LZ4_CHUNK_SIZE));
      |                                                                                         ^
/usr/ports/science/libgetar/work/libgetar-1.1.6/src/SqliteArchive.cpp:15:53: note: expanded from macro 'LZ4_CHUNK_SIZE'
   15 | #define LZ4_CHUNK_SIZE std::min(LZ4_MAX_INPUT_SIZE, SQLITE_MAX_LENGTH)/2
      |                                                     ^
/usr/ports/science/libgetar/work/libgetar-1.1.6/src/SqliteArchive.cpp:242:76: error: use of undeclared identifier 'SQLITE_MAX_LENGTH'
  242 |                                        ((const char*) contents) + chunkidx*LZ4_CHUNK_SIZE,
      |                                                                            ^
/usr/ports/science/libgetar/work/libgetar-1.1.6/src/SqliteArchive.cpp:15:53: note: expanded from macro 'LZ4_CHUNK_SIZE'
   15 | #define LZ4_CHUNK_SIZE std::min(LZ4_MAX_INPUT_SIZE, SQLITE_MAX_LENGTH)/2
      |                                                     ^
/usr/ports/science/libgetar/work/libgetar-1.1.6/src/SqliteArchive.cpp:251:46: error: use of undeclared identifier 'SQLITE_MAX_LENGTH'
  251 |             for(size_t chunkidx(0); chunkidx*LZ4_CHUNK_SIZE < byteLength; ++chunkidx)
      |                                              ^
/usr/ports/science/libgetar/work/libgetar-1.1.6/src/SqliteArchive.cpp:15:53: note: expanded from macro 'LZ4_CHUNK_SIZE'
   15 | #define LZ4_CHUNK_SIZE std::min(LZ4_MAX_INPUT_SIZE, SQLITE_MAX_LENGTH)/2
      |                                                     ^
/usr/ports/science/libgetar/work/libgetar-1.1.6/src/SqliteArchive.cpp:253:51: error: use of undeclared identifier 'SQLITE_MAX_LENGTH'
  253 |                 const int sourceSize(min((size_t) LZ4_CHUNK_SIZE, byteLength - chunkidx*LZ4_CHUNK_SIZE));
      |                                                   ^
/usr/ports/science/libgetar/work/libgetar-1.1.6/src/SqliteArchive.cpp:15:53: note: expanded from macro 'LZ4_CHUNK_SIZE'
   15 | #define LZ4_CHUNK_SIZE std::min(LZ4_MAX_INPUT_SIZE, SQLITE_MAX_LENGTH)/2
      |                                                     ^
/usr/ports/science/libgetar/work/libgetar-1.1.6/src/SqliteArchive.cpp:253:89: error: use of undeclared identifier 'SQLITE_MAX_LENGTH'
  253 |                 const int sourceSize(min((size_t) LZ4_CHUNK_SIZE, byteLength - chunkidx*LZ4_CHUNK_SIZE));
      |                                                                                         ^
/usr/ports/science/libgetar/work/libgetar-1.1.6/src/SqliteArchive.cpp:15:53: note: expanded from macro 'LZ4_CHUNK_SIZE'
   15 | #define LZ4_CHUNK_SIZE std::min(LZ4_MAX_INPUT_SIZE, SQLITE_MAX_LENGTH)/2
      |                                                     ^
/usr/ports/science/libgetar/work/libgetar-1.1.6/src/SqliteArchive.cpp:259:76: error: use of undeclared identifier 'SQLITE_MAX_LENGTH'
  259 |                                        ((const char*) contents) + chunkidx*LZ4_CHUNK_SIZE,
      |                                                                            ^
/usr/ports/science/libgetar/work/libgetar-1.1.6/src/SqliteArchive.cpp:15:53: note: expanded from macro 'LZ4_CHUNK_SIZE'
   15 | #define LZ4_CHUNK_SIZE std::min(LZ4_MAX_INPUT_SIZE, SQLITE_MAX_LENGTH)/2
      |                                                     ^
/usr/ports/science/libgetar/work/libgetar-1.1.6/src/SqliteArchive.cpp:268:46: error: use of undeclared identifier 'SQLITE_MAX_LENGTH'
  268 |             for(size_t chunkidx(0); chunkidx*RAW_CHUNK_SIZE < byteLength; ++chunkidx)
      |                                              ^
/usr/ports/science/libgetar/work/libgetar-1.1.6/src/SqliteArchive.cpp:16:24: note: expanded from macro 'RAW_CHUNK_SIZE'
   16 | #define RAW_CHUNK_SIZE SQLITE_MAX_LENGTH/2
      |                        ^
/usr/ports/science/libgetar/work/libgetar-1.1.6/src/SqliteArchive.cpp:270:51: error: use of undeclared identifier 'SQLITE_MAX_LENGTH'
  270 |                 const int sourceSize(min((size_t) RAW_CHUNK_SIZE, byteLength - chunkidx*RAW_CHUNK_SIZE));
      |                                                   ^
/usr/ports/science/libgetar/work/libgetar-1.1.6/src/SqliteArchive.cpp:16:24: note: expanded from macro 'RAW_CHUNK_SIZE'
   16 | #define RAW_CHUNK_SIZE SQLITE_MAX_LENGTH/2
      |                        ^
/usr/ports/science/libgetar/work/libgetar-1.1.6/src/SqliteArchive.cpp:270:89: error: use of undeclared identifier 'SQLITE_MAX_LENGTH'
  270 |                 const int sourceSize(min((size_t) RAW_CHUNK_SIZE, byteLength - chunkidx*RAW_CHUNK_SIZE));
      |                                                                                         ^
/usr/ports/science/libgetar/work/libgetar-1.1.6/src/SqliteArchive.cpp:16:24: note: expanded from macro 'RAW_CHUNK_SIZE'
   16 | #define RAW_CHUNK_SIZE SQLITE_MAX_LENGTH/2
      |                        ^
/usr/ports/science/libgetar/work/libgetar-1.1.6/src/SqliteArchive.cpp:271:74: error: use of undeclared identifier 'SQLITE_MAX_LENGTH'
  271 |                 rawTargets.push_back(((const char*) contents) + chunkidx*RAW_CHUNK_SIZE);
      |                                                                          ^
/usr/ports/science/libgetar/work/libgetar-1.1.6/src/SqliteArchive.cpp:16:24: note: expanded from macro 'RAW_CHUNK_SIZE'
   16 | #define RAW_CHUNK_SIZE SQLITE_MAX_LENGTH/2
      |                        ^
12 errors generated.

clang-18
FreeBSD 14.1

@klarh
Copy link
Collaborator

klarh commented Jul 16, 2024

Hello,

Could you confirm that this is for building the library (i.e. via CMake) and not the python version (via setup.py)? Thank you!

@yurivict
Copy link
Author

Yes, this is for the cmake part.

@klarh
Copy link
Collaborator

klarh commented Jul 17, 2024

That makes sense! I had indeed forgotten to set that definition during the cmake compilation. Could you confirm that v1.1.7 fixes the issue in your builds?

@yurivict
Copy link
Author

v1.1.7 builds successfully.

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

2 participants