-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
As noted in knu/sorted_set#15 and related perhaps to #2 I'm getting a compile error for rbtree on Ruby 3.1.2 and haven't gotten to the root of it yet, so thought I'd report here.
I'm happy to try to help debug as well.
rbtree.c:763:25: error: cannot assign to non-static data member 'klass' with
const-qualified type 'const VALUE' (aka 'const unsigned long')
RBASIC(temp)->klass = 0;
~~~~~~~~~~~~~~~~~~~ ^
.rbenv/versions/3.1.2/include/ruby-3.1.0/ruby/internal/core/rbasic.h:88:
17:
note: non-static data member 'klass' declared const here
const VALUE klass;
~~~~~~~~~~~~^~~~~
rbtree.c:1418:9: error: call to undeclared function 'rb_inspecting_p'; ISO C99 and later
do not support implicit function declarations [-Wimplicit-function-declaration]
if (rb_inspecting_p(self))
^
rbtree.c:1418:9: note: did you mean 'rb_inspect'?
.rbenv/versions/3.1.2/include/ruby-3.1.0/ruby/internal/intern/object.h:1
21:7:
note: 'rb_inspect' declared here
VALUE rb_inspect(VALUE obj);
^
rbtree.c:1420:12: error: call to undeclared function 'rb_protect_inspect'; ISO C99 and
later do not support implicit function declarations [-Wimplicit-function-declaration]
return rb_protect_inspect(inspect_rbtree, self, str);
^
3 errors generated.
make: *** [rbtree.o] Error 1clang --version
Apple clang version 15.0.0 (clang-1500.0.40.1)
Target: x86_64-apple-darwin23.1.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
>> RbConfig::CONFIG
>> RbConfig::CONFIG
=>
{"DESTDIR"=>"",
"MAJOR"=>"3",
"MINOR"=>"1",
"TEENY"=>"2",
"PATCHLEVEL"=>"20",
"INSTALL"=>"/opt/homebrew/bin/ginstall -c",
"EXEEXT"=>"",
"prefix"=>"$HOME/.rbenv/versions/3.1.2",
"ruby_install_name"=>"ruby",
"RUBY_INSTALL_NAME"=>"ruby",
"RUBY_SO_NAME"=>"ruby.3.1",
"exec"=>"exec",
"ruby_pc"=>"ruby-3.1.pc",
"CC_WRAPPER"=>"",
"PACKAGE"=>"ruby",
"BUILTIN_TRANSSRCS"=>" enc/trans/newline.c",
"MANTYPE"=>"doc",
"vendorarchhdrdir"=>
"$HOME/.rbenv/versions/3.1.2/include/ruby-3.1.0/vendor_ruby/arm64-darwin23",
"sitearchhdrdir"=>
"$HOME/.rbenv/versions/3.1.2/include/ruby-3.1.0/site_ruby/arm64-darwin23",
"rubyarchhdrdir"=>
"$HOME/.rbenv/versions/3.1.2/include/ruby-3.1.0/arm64-darwin23",
"vendorhdrdir"=>"$HOME/.rbenv/versions/3.1.2/include/ruby-3.1.0/vendor_ruby",
"sitehdrdir"=>"$HOME/.rbenv/versions/3.1.2/include/ruby-3.1.0/site_ruby",
"rubyhdrdir"=>"$HOME/.rbenv/versions/3.1.2/include/ruby-3.1.0",
"RUBY_SEARCH_PATH"=>"",
"UNIVERSAL_INTS"=>"",
"UNIVERSAL_ARCHNAMES"=>"",
"configure_args"=>
" '--prefix=$HOME/.rbenv/versions/3.1.2' '--with-openssl-dir=/opt/homebrew/opt/openssl@3' '--enable-shared' '--with-readline-dir=/opt/homebrew/opt/readline' '--with-libyaml-dir=/opt/homebrew/opt/libyaml' '--with-gmp-dir=/opt/homebrew/opt/gmp' '--with-ext=openssl,psych,+' 'CC=clang' 'LDFLAGS=-L/opt/homebrew/opt/libomp/lib' 'CPPFLAGS=-I/opt/homebrew/opt/libomp/include'",
"CONFIGURE"=>"configure",
"vendorarchdir"=>
"$HOME/.rbenv/versions/3.1.2/lib/ruby/vendor_ruby/3.1.0/arm64-darwin23",
"vendorlibdir"=>"$HOME/.rbenv/versions/3.1.2/lib/ruby/vendor_ruby/3.1.0",
"vendordir"=>"$HOME/.rbenv/versions/3.1.2/lib/ruby/vendor_ruby",
"sitearchdir"=>
"$HOME/.rbenv/versions/3.1.2/lib/ruby/site_ruby/3.1.0/arm64-darwin23",
"sitelibdir"=>"$HOME/.rbenv/versions/3.1.2/lib/ruby/site_ruby/3.1.0",
"sitedir"=>"$HOME/.rbenv/versions/3.1.2/lib/ruby/site_ruby",
"rubyarchdir"=>"$HOME/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin23",
"rubylibdir"=>"$HOME/.rbenv/versions/3.1.2/lib/ruby/3.1.0",
"ruby_version"=>"3.1.0",
"sitearch"=>"arm64-darwin23",
"arch"=>"arm64-darwin23",
"sitearchincludedir"=>"$HOME/.rbenv/versions/3.1.2/include/arm64-darwin23",
"archincludedir"=>"$HOME/.rbenv/versions/3.1.2/include/arm64-darwin23",
"sitearchlibdir"=>"$HOME/.rbenv/versions/3.1.2/lib/arm64-darwin23",
"archlibdir"=>"$HOME/.rbenv/versions/3.1.2/lib/arm64-darwin23",
"libdirname"=>"libdir",
"RUBY_EXEC_PREFIX"=>"$HOME/.rbenv/versions/3.1.2",
"RUBY_LIB_VERSION"=>"",
"RUBY_LIB_VERSION_STYLE"=>"3\t/* full */",
"RI_BASE_NAME"=>"ri",
"ridir"=>"$HOME/.rbenv/versions/3.1.2/share/ri",
"rubysitearchprefix"=>"$HOME/.rbenv/versions/3.1.2/lib/ruby/arm64-darwin23",
"rubyarchprefix"=>"$HOME/.rbenv/versions/3.1.2/lib/ruby/arm64-darwin23",
"MAKEFILES"=>"Makefile GNUmakefile",
"PLATFORM_DIR"=>"",
"THREAD_MODEL"=>"pthread",
"SYMBOL_PREFIX"=>"_",
"EXPORT_PREFIX"=>"",
"COMMON_HEADERS"=>"",
"COMMON_MACROS"=>"",
"COMMON_LIBS"=>"",
"MAINLIBS"=>"-lpthread -ldl -lobjc",
"ENABLE_SHARED"=>"yes",
"DLDSHARED"=>"clang -dynamiclib",
"DLDLIBS"=>"",
"SOLIBS"=>"-lpthread -ldl -lobjc",
"LIBRUBYARG_SHARED"=>"-lruby.3.1",
"LIBRUBYARG_STATIC"=>
"-lruby.3.1-static -framework CoreFoundation -lpthread -ldl -lobjc",
"LIBRUBYARG"=>"-lruby.3.1",
"LIBRUBY"=>"libruby.3.1.dylib",
"LIBRUBY_ALIASES"=>"libruby.dylib",
"LIBRUBY_SONAME"=>"libruby.3.1.dylib",
"LIBRUBY_SO"=>"libruby.3.1.dylib",
"LIBRUBY_A"=>"libruby.3.1-static.a",
"RUBYW_INSTALL_NAME"=>"",
"rubyw_install_name"=>"",
"EXTDLDFLAGS"=>"",
"EXTLDFLAGS"=>"",
"strict_warnflags"=>"-std=gnu99",
"warnflags"=>
"-Wall -Wextra -Wdeprecated-declarations -Wdivision-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 -Wextra-tokens -Wundef",
"debugflags"=>"-ggdb3",
"optflags"=>"-O3 -fno-fast-math",
"NULLCMD"=>":",
"ENABLE_DEBUG_ENV"=>"",
"DLNOBJ"=>"dln.o",
"INSTALL_STATIC_LIBRARY"=>"no",
"MJIT_SUPPORT"=>"yes",
"EXECUTABLE_EXTS"=>"",
"ARCHFILE"=>"",
"LIBRUBY_RELATIVE"=>"no",
"EXTOUT"=>".ext",
"PREP"=>"miniruby exe/$(PROGRAM)",
"CROSS_COMPILING"=>"no",
"TEST_RUNNABLE"=>"yes",
"rubylibprefix"=>"$HOME/.rbenv/versions/3.1.2/lib/ruby",
"setup"=>"Setup",
"ENCSTATIC"=>"",
"EXTSTATIC"=>"",
"SOEXT"=>"dylib",
"TRY_LINK"=>"",
"PRELOADENV"=>"DYLD_INSERT_LIBRARIES",
"LIBPATHENV"=>"DYLD_FALLBACK_LIBRARY_PATH",
"RPATHFLAG"=>"",
"LIBPATHFLAG"=>" -L%s",
"LINK_SO"=>
"\ndsymutil $@; { test -z '$(RUBY_CODESIGN)' || codesign -s '$(RUBY_CODESIGN)' -f $@; }",
"ASMEXT"=>"S",
"LIBEXT"=>"a",
"DLEXT"=>"bundle",
"LDSHAREDXX"=>"clang++ -dynamic -bundle",
"LDSHARED"=>"clang -dynamic -bundle",
"CCDLFLAGS"=>"-fno-common",
"STATIC"=>"",
"ARCH_FLAG"=>"",
"DLDFLAGS"=>"-L/opt/homebrew/opt/libomp/lib -Wl,-undefined,dynamic_lookup",
"ALLOCA"=>"",
"dsymutil"=>"dsymutil",
"codesign"=>"codesign",
"cleanlibs"=>"$(TARGET_SO).dSYM",
"POSTLINK"=>
"dsymutil $@; { test -z '$(RUBY_CODESIGN)' || codesign -s '$(RUBY_CODESIGN)' -f $@; }",
"WERRORFLAG"=>"-Werror",
"CHDIR"=>"cd -P",
"RMALL"=>"rm -fr",
"RMDIRS"=>"rmdir -p",
"RMDIR"=>"rmdir",
"CP"=>"cp",
"RM"=>"rm -f",
"PKG_CONFIG"=>"pkg-config",
"DOXYGEN"=>"doxygen",
"DOT"=>"dot",
"MAKEDIRS"=>"/opt/homebrew/bin/gmkdir -p",
"MKDIR_P"=>"/opt/homebrew/bin/gmkdir -p",
"INSTALL_DATA"=>"/opt/homebrew/bin/ginstall -c -m 644",
"INSTALL_SCRIPT"=>"/opt/homebrew/bin/ginstall -c",
"INSTALL_PROGRAM"=>"/opt/homebrew/bin/ginstall -c",
"SET_MAKE"=>"",
"LN_S"=>"ln -s",
"DLLWRAP"=>"",
"WINDRES"=>"",
"ASFLAGS"=>"",
"ARFLAGS"=>"rcu ",
"try_header"=>"",
"CC_VERSION_MESSAGE"=>
"Apple clang version 15.0.0 (clang-1500.0.40.1)\nTarget: arm64-apple-darwin23.1.0\nThread model: posix\nInstalledDir: /Library/Developer/CommandLineTools/usr/bin",
"CC_VERSION"=>"clang --version",
"MJIT_CC"=>"/usr/bin/clang",
"CSRCFLAG"=>"",
"COUTFLAG"=>"-o ",
"OUTFLAG"=>"-o ",
"CPPOUTFILE"=>"-o conftest.i",
"GNU_LD"=>"no",
"GCC"=>"yes",
"EGREP"=>"/usr/bin/grep -E",
"GREP"=>"/usr/bin/grep",
"CPP"=>"clang -E",
"CXXFLAGS"=>"-fdeclspec",
"OBJEXT"=>"o",
"CPPFLAGS"=>
"-I/opt/homebrew/opt/libomp/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT ",
"LDFLAGS"=>
"-L. -L/opt/homebrew/opt/libomp/lib -fstack-protector-strong -L/usr/local/lib",
"CFLAGS"=>
"-fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-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 -Wextra-tokens -Wundef -fno-common -pipe",
"STRIP"=>"strip -A -n",
"RANLIB"=>"ranlib",
"OBJDUMP"=>"objdump",
"OBJCOPY"=>":",
"NM"=>"nm",
"LD"=>"clang",
"CXX"=>"clang++",
"AS"=>"as",
"AR"=>"ar",
"CC"=>"clang",
"target_os"=>"darwin23",
"target_vendor"=>"apple",
"target_cpu"=>"arm64",
"target"=>"arm64-apple-darwin23",
"host_os"=>"darwin23",
"host_vendor"=>"apple",
"host_cpu"=>"arm64",
"host"=>"arm64-apple-darwin23",
"build_os"=>"darwin23.1.0",
"build_vendor"=>"apple",
"build_cpu"=>"aarch64",
"build"=>"aarch64-apple-darwin23.1.0",
"RUBY_VERSION_NAME"=>"ruby-3.1.0",
"RUBYW_BASE_NAME"=>"rubyw",
"RUBY_BASE_NAME"=>"ruby",
"RUBY_PROGRAM_VERSION"=>"3.1.2",
"RUBY_API_VERSION"=>"3.1",
"HAVE_GIT"=>"yes",
"GIT"=>"git",
"cxxflags"=>"",
"cppflags"=>"",
"cflags"=>
"-fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wdivision-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 -Wextra-tokens -Wundef",
"target_alias"=>"",
"host_alias"=>"",
"build_alias"=>"",
"LIBS"=>"",
"ECHO_T"=>"",
"ECHO_N"=>"",
"ECHO_C"=>"\\\\c",
"DEFS"=>"",
"mandir"=>"$HOME/.rbenv/versions/3.1.2/share/man",
"localedir"=>"$HOME/.rbenv/versions/3.1.2/share/locale",
"libdir"=>"$HOME/.rbenv/versions/3.1.2/lib",
"psdir"=>"$HOME/.rbenv/versions/3.1.2/share/doc/ruby",
"pdfdir"=>"$HOME/.rbenv/versions/3.1.2/share/doc/ruby",
"dvidir"=>"$HOME/.rbenv/versions/3.1.2/share/doc/ruby",
"htmldir"=>"$HOME/.rbenv/versions/3.1.2/share/doc/ruby",
"infodir"=>"$HOME/.rbenv/versions/3.1.2/share/info",
"docdir"=>"$HOME/.rbenv/versions/3.1.2/share/doc/ruby",
"oldincludedir"=>"/usr/include",
"includedir"=>"$HOME/.rbenv/versions/3.1.2/include",
"runstatedir"=>"$HOME/.rbenv/versions/3.1.2/var/run",
"localstatedir"=>"$HOME/.rbenv/versions/3.1.2/var",
"sharedstatedir"=>"$HOME/.rbenv/versions/3.1.2/com",
"sysconfdir"=>"$HOME/.rbenv/versions/3.1.2/etc",
"datadir"=>"$HOME/.rbenv/versions/3.1.2/share",
"datarootdir"=>"$HOME/.rbenv/versions/3.1.2/share",
"libexecdir"=>"$HOME/.rbenv/versions/3.1.2/libexec",
"sbindir"=>"$HOME/.rbenv/versions/3.1.2/sbin",
"bindir"=>"$HOME/.rbenv/versions/3.1.2/bin",
"exec_prefix"=>"$HOME/.rbenv/versions/3.1.2",
"PACKAGE_URL"=>"",
"PACKAGE_BUGREPORT"=>"",
"PACKAGE_STRING"=>"",
"PACKAGE_VERSION"=>"",
"PACKAGE_TARNAME"=>"",
"PACKAGE_NAME"=>"",
"PATH_SEPARATOR"=>":",
"SHELL"=>"/bin/sh",
"UNICODE_VERSION"=>"13.0.0",
"UNICODE_EMOJI_VERSION"=>"13.1",
"SDKROOT"=>"",
"platform"=>"arm64-darwin23",
"archdir"=>"$HOME/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin23",
"topdir"=>"$HOME/.rbenv/versions/3.1.2/lib/ruby/3.1.0/arm64-darwin23"}Metadata
Metadata
Assignees
Labels
No labels