SciRuby / rb-gsl

Ruby interface to the GNU Scientific Library
https://github.com/SciRuby/rb-gsl
Other
100 stars 46 forks source link

Build fails: `rb_gsl_common.h: error: unknown type name 'EXTERN'` #69

Open barracuda156 opened 7 months ago

barracuda156 commented 7 months ago
/usr/bin/clang -I. -I/opt/local/include/ruby-3.3.0/arm64-darwin23 -I/opt/local/include/ruby-3.3.0/ruby/backward -I/opt/local/include/ruby-3.3.0 -I. -DGSL_VERSION=2.7.1 -DGSL_1_15_LATER -DGSL_1_15_LATER -DGSL_1_16_LATER -DGSL_2_0_LATER -DGSL_2_1_LATER -DHAVE_ROUND -DHAVE_GSL_EIGEN_FRANCIS -DHAVE_GNU_GRAPH -DHAVE_GSL_SF_MATHIEU_A_E -DHAVE_GSL_SF_MATHIEU_B_E -DHAVE_GSL_SF_MATHIEU_CE_E -DHAVE_GSL_SF_MATHIEU_SE_E -DHAVE_GSL_SF_MATHIEU_MC_E -DHAVE_GSL_SF_MATHIEU_MS_E -I./.gem.20240405-74113-3sf0ok/arm64-darwin23 -I/opt/local/include -I/opt/local/libexec/openssl3/include -isystem/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -fno-common -pipe -I/opt/local/libexec/openssl3/include -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wextra-tokens -Wdeprecated-declarations -Wdivision-by-zero -Wdiv-by-zero -Wimplicit-function-declaration -Wimplicit-int -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 -Wmisleading-indentation -Wundef -fno-common -Wall -Iinclude -I/opt/local/include -arch arm64 -o array.o -c array.c
In file included from array.c:12:
./include/rb_gsl_common.h:29:1: error: unknown type name 'EXTERN'
EXTERN ID rb_gsl_id_beg, rb_gsl_id_end, rb_gsl_id_excl, rb_gsl_id_to_a;
^
./include/rb_gsl_common.h:29:10: error: expected ';' after top level declarator
EXTERN ID rb_gsl_id_beg, rb_gsl_id_end, rb_gsl_id_excl, rb_gsl_id_to_a;
         ^
         ;
./include/rb_gsl_common.h:352:1: error: unknown type name 'EXTERN'
EXTERN VALUE cGSL_Object;
^
./include/rb_gsl_common.h:352:13: error: expected ';' after top level declarator
EXTERN VALUE cGSL_Object;
            ^
            ;
In file included from array.c:13:
./include/rb_gsl_array.h:39:1: error: unknown type name 'EXTERN'
EXTERN VALUE cgsl_block, cgsl_block_int;
^
./include/rb_gsl_array.h:39:13: error: expected ';' after top level declarator
EXTERN VALUE cgsl_block, cgsl_block_int;
            ^
            ;
./include/rb_gsl_array.h:40:1: error: unknown type name 'EXTERN'
EXTERN VALUE cgsl_block_uchar;
^
./include/rb_gsl_array.h:40:13: error: expected ';' after top level declarator
EXTERN VALUE cgsl_block_uchar;
            ^
            ;
./include/rb_gsl_array.h:41:1: error: unknown type name 'EXTERN'
EXTERN VALUE cgsl_block_complex;
^
./include/rb_gsl_array.h:41:13: error: expected ';' after top level declarator
EXTERN VALUE cgsl_block_complex;
            ^
            ;
./include/rb_gsl_array.h:42:1: error: unknown type name 'EXTERN'
EXTERN VALUE cgsl_vector, cgsl_vector_complex;
^
./include/rb_gsl_array.h:42:13: error: expected ';' after top level declarator
EXTERN VALUE cgsl_vector, cgsl_vector_complex;
            ^
            ;
./include/rb_gsl_array.h:43:1: error: unknown type name 'EXTERN'
EXTERN VALUE cgsl_vector_col;
^
./include/rb_gsl_array.h:43:13: error: expected ';' after top level declarator
EXTERN VALUE cgsl_vector_col;
            ^
            ;
./include/rb_gsl_array.h:44:1: error: unknown type name 'EXTERN'
EXTERN VALUE cgsl_vector_col_view;
^
./include/rb_gsl_array.h:44:13: error: expected ';' after top level declarator
EXTERN VALUE cgsl_vector_col_view;
            ^
            ;
./include/rb_gsl_array.h:45:1: error: unknown type name 'EXTERN'
EXTERN VALUE cgsl_vector_complex_col;
^
./include/rb_gsl_array.h:45:13: error: expected ';' after top level declarator
EXTERN VALUE cgsl_vector_complex_col;
            ^
            ;
./include/rb_gsl_array.h:46:1: error: unknown type name 'EXTERN'
EXTERN VALUE cgsl_vector_complex_col_view;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [array.o] Error 1

make failed, exit code 2

Gem files will remain installed in /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_ruby_rb-gsl/rb33-gsl/work/destroot/opt/local/lib/ruby3.3/gems/3.3.0/gems/gsl-2.1.0.3 for inspection.
Results logged to /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_ruby_rb-gsl/rb33-gsl/work/destroot/opt/local/lib/ruby3.3/gems/3.3.0/extensions/arm64-darwin-23/3.3.0/gsl-2.1.0.3/gem_make.out
Command failed:  cd "/opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_ruby_rb-gsl/rb33-gsl/work/gsl-2.1.0.3" && /opt/local/bin/gem3.3 install --local --force --install-dir /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_ruby_rb-gsl/rb33-gsl/work/destroot/opt/local/lib/ruby3.3/gems/3.3.0 /opt/local/var/macports/build/_opt_svacchanda_SonomaPorts_ruby_rb-gsl/rb33-gsl/work/gsl-2.1.0.3/gsl.gem 
Exit code: 1
barracuda156 commented 7 months ago

Oh wow, this was never fixed since 2021: https://www.mail-archive.com/debian-bugs-rc@lists.debian.org/msg600486.html

0xdevalias commented 4 months ago

See:

barracuda156 commented 4 months ago

@0xdevalias Thank you, I will check the links.