xord / rays

A Drawing Engine using OpenGL.
MIT License
1 stars 1 forks source link

The build fails at the assert part #2

Closed akicho8 closed 11 months ago

akicho8 commented 1 year ago

Executing gem i rubysketch results in a failure of the native build for the related library, rays.

/opt/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rays-0.1.43 $ rake
 clang++ -c -I/opt/rbenv/versions/3.2.2/include  -I/opt/homebrew/opt/gmp/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -DDARWIN -DNDEBUG -DOSX -I/opt/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rays-0.1.43/include -I/opt/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rucy-0.1.39/include -I/opt/rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/xot-0.1.39/include -isystemvendor/glm -isystemvendor/clipper/cpp -isystemvendor/poly2tri/poly2tri -isystemvendor/splines-lib -isystem/opt/rbenv/versions/3.2.2/include/ruby-3.2.0 -isystem/opt/rbenv/versions/3.2.2/include/ruby-3.2.0/arm64-darwin22 -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wextra-tokens -Wdeprecated-declarations -Wdivision-by-zero -Wdiv-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wundef  -fno-common -pipe -fdeclspec -Wno-unknown-pragmas -Wno-deprecated-register -Wno-reserved-user-defined-literal -arch arm64 -std=c++20 -stdlib=libc++ -mmacosx-version-min=10.7 -o src/shader.o src/shader.cpp 
src/shader.cpp:459:3: error: use of undeclared identifier 'assert'
                assert(for_variable);
                ^
src/shader.cpp:475:3: error: use of undeclared identifier 'assert'
                assert(names && for_variable && default_name);
                ^
2 errors generated.
rake aborted!
Command failed with status (1): [ clang++ -c -I/opt/rbenv/versions/3.2.2/in...]

Tasks: TOP => default => ext => lib/rays/native.bundle => ext/rays/native.bundle => lib => lib/librays.a => src/shader.o
(See full trace by running task with --trace)

What should I do? I would appreciate any advice.

Environment:

ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22]

xord commented 11 months ago

@akicho8 Thank you for taking the time to post the issue, and we appreciate your feedback.

I noticed that in your report, you mentioned an issue related to the use of assert() without including #include , which was present in multiple places. I've made the necessary corrections to address this issue. Subsequently, I've released a new version of the gem with these fixes included. https://github.com/xord/rays/commit/a9fdc8ef4d9a84856dc2052efdc6a943ef0e219d

Could you please try installing the updated version of the gem?

Once you've had a chance to test it, please let us know if the issue is resolved or if you encounter any further difficulties. Your feedback is invaluable, and we're here to assist you further if needed.

Thank you once again for bringing this to our attention.

akicho8 commented 11 months ago

Thanks for the response. gem i rubysketch now works.