-
Notifications
You must be signed in to change notification settings - Fork 272
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
Add roaring64 to amalgamation script #545
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!!! Great. |
@SLieve Seems like the build for the C++ example for the amalgamation demo is broken with these changes. Looks like all places where C++ requires casting from Output$ ./amalgamation.sh
We are about to amalgamate all CRoaring files into one source file.
For rationale, see: https://www.sqlite.org/amalgamation.html
and: https://en.wikipedia.org/wiki/Single_Compilation_Unit
Creating roaring.h...
Creating roaring.c...
Creating amalgamation_demo.c...
Creating roaring.hh...
Creating amalgamation_demo.cpp...
Files have been written to current directory: /Users/zach/Development/CRoaring
-rw-r--r-- 1 zach staff 587 Jan 8 20:44 amalgamation_demo.c
-rw-r--r-- 1 zach staff 2526 Jan 8 20:44 amalgamation_demo.cpp
-rw-r--r-- 1 zach staff 951998 Jan 8 20:44 roaring.c
-rw-r--r-- 1 zach staff 85995 Jan 8 20:44 roaring.h
-rw-r--r-- 1 zach staff 105913 Jan 8 20:44 roaring.hh
The interface is found in the file 'include/roaring/roaring.h'.
For C, try:
cc -O3 -std=c11 -o amalgamation_demo amalgamation_demo.c && ./amalgamation_demo
For C++, try:
c++ -O3 -std=c++11 -o amalgamation_demo amalgamation_demo.cpp && ./amalgamation_demo
You can build a shared library with the following command:
cc -O3 -std=c11 -shared -o libroaring.dylib -fPIC roaring.c
$ c++ -O3 -std=c++11 -o amalgamation_demo amalgamation_demo.cpp && ./amalgamation_demo
./roaring.c:9206:18: error: cannot initialize a variable of type 'art_node4_t *' (aka 'roaring::internal::art_node4_s *') with an rvalue of type 'void *'
art_node4_t *node = roaring_malloc(sizeof(art_node4_t));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./roaring.c:9368:19: error: cannot initialize a variable of type 'art_node16_t *' (aka 'roaring::internal::art_node16_s *') with an rvalue of type 'void *'
art_node16_t *node = roaring_malloc(sizeof(art_node16_t));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./roaring.c:9517:19: error: cannot initialize a variable of type 'art_node48_t *' (aka 'roaring::internal::art_node48_s *') with an rvalue of type 'void *'
art_node48_t *node = roaring_malloc(sizeof(art_node48_t));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./roaring.c:9660:20: error: cannot initialize a variable of type 'art_node256_t *' (aka 'roaring::internal::art_node256_s *') with an rvalue of type 'void *'
art_node256_t *node = roaring_malloc(sizeof(art_node256_t));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./roaring.c:22046:13: error: cannot initialize a variable of type 'leaf_t *' (aka 'roaring::api::roaring64_leaf_s *') with an rvalue of type 'void *'
leaf_t *leaf = roaring_malloc(sizeof(leaf_t));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./roaring.c:22053:13: error: cannot initialize a variable of type 'leaf_t *' (aka 'roaring::api::roaring64_leaf_s *') with an rvalue of type 'void *'
leaf_t *result_leaf = roaring_malloc(sizeof(leaf_t));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./roaring.c:22069:25: error: cannot initialize a variable of type 'roaring64_bitmap_t *' (aka 'roaring::api::roaring64_bitmap_s *') with an rvalue of type 'void *'
roaring64_bitmap_t *r = roaring_malloc(sizeof(roaring64_bitmap_t));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./roaring.c:22750:21: error: cannot initialize a variable of type 'leaf_t *' (aka 'roaring::api::roaring64_leaf_s *') with an rvalue of type 'void *'
leaf_t *result_leaf = roaring_malloc(sizeof(leaf_t));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./roaring.c:22948:25: error: cannot initialize a variable of type 'leaf_t *' (aka 'roaring::api::roaring64_leaf_s *') with an rvalue of type 'void *'
leaf_t *result_leaf = roaring_malloc(sizeof(leaf_t));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./roaring.c:23064:25: error: cannot initialize a variable of type 'leaf_t *' (aka 'roaring::api::roaring64_leaf_s *') with an rvalue of type 'void *'
leaf_t *result_leaf = roaring_malloc(sizeof(leaf_t));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./roaring.c:23199:25: error: cannot initialize a variable of type 'leaf_t *' (aka 'roaring::api::roaring64_leaf_s *') with an rvalue of type 'void *'
leaf_t *result_leaf = roaring_malloc(sizeof(leaf_t));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11 errors generated. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Follow-up from PR #534. Fixes #543.
Tested: