Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

ruby.h:26:10: error: #include expects "FILENAME" or <FILENAME> #2

Open
sonots opened this issue Dec 8, 2017 · 1 comment
Open

ruby.h:26:10: error: #include expects "FILENAME" or <FILENAME> #2

sonots opened this issue Dec 8, 2017 · 1 comment

Comments

@sonots
Copy link

sonots commented Dec 8, 2017

With extconf.rb like:

require 'mkmf-cu'

create_header('extconf.h')
create_makefile('culib/culib')

I get errors as:

compiling ../../../../ext/culib/culib.cu
[given command line options]: --mkmf-cu-ext=c -I. -I/home/sonots/.rbenv/versions/2.4.1/include/ruby-2.4.0/x86_64-linux -I/home/sonots/.rbenv/versions/2.4.1/include/ruby-2.4.0/ruby/backward -I/home/sonots/.rbenv/versions/2.4.1/include/ruby-2.4.0 -I../../../../ext/culib -DRUBY_EXTCONF_H="extconf.h" -I/home/sonots/.rbenv/versions/2.4.1/include -fPIC -I /home/sonots/nccl/build/include -I /home/sonots/.cudnn/active/cuda/include -o culib.o -c ../../../../ext/culib/culib.cu
nvcc -I. -I/home/sonots/.rbenv/versions/2.4.1/include/ruby-2.4.0/x86_64-linux -I/home/sonots/.rbenv/versions/2.4.1/include/ruby-2.4.0/ruby/backward -I/home/sonots/.rbenv/versions/2.4.1/include/ruby-2.4.0 -I../../../../ext/culib -I/home/sonots/.rbenv/versions/2.4.1/include -I/home/sonots/nccl/build/include -I/home/sonots/.cudnn/active/cuda/include -DRUBY_EXTCONF_H="extconf.h" -o culib.o -c ../../../../ext/culib/culib.cu --compiler-options -fPIC --compiler-bindir gcc
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
In file included from /home/sonots/.rbenv/versions/2.4.1/include/ruby-2.4.0/ruby.h:33:0,
                 from ../../../../ext/culib/culib.cu:2:
/home/sonots/.rbenv/versions/2.4.1/include/ruby-2.4.0/ruby/ruby.h:26:10: error: #include expects "FILENAME" or <FILENAME>
 #include RUBY_EXTCONF_H
          ^
In file included from /home/sonots/.rbenv/versions/2.4.1/include/ruby-2.4.0/ruby/ruby.h:36:0,
                 from /home/sonots/.rbenv/versions/2.4.1/include/ruby-2.4.0/ruby.h:33,
                 from ../../../../ext/culib/culib.cu:2:
/home/sonots/.rbenv/versions/2.4.1/include/ruby-2.4.0/ruby/defines.h:22:10: error: #include expects "FILENAME" or <FILENAME>
 #include RUBY_EXTCONF_H
          ^
In file included from /home/sonots/.rbenv/versions/2.4.1/include/ruby-2.4.0/ruby/defines.h:143:0,
                 from /home/sonots/.rbenv/versions/2.4.1/include/ruby-2.4.0/ruby/ruby.h:36,
                 from /home/sonots/.rbenv/versions/2.4.1/include/ruby-2.4.0/ruby.h:33,
                 from ../../../../ext/culib/culib.cu:2:
/home/sonots/.rbenv/versions/2.4.1/include/ruby-2.4.0/ruby/missing.h:28:10: error: #include expects "FILENAME" or <FILENAME>
 #include RUBY_EXTCONF_H
          ^
In file included from /home/sonots/.rbenv/versions/2.4.1/include/ruby-2.4.0/ruby/ruby.h:2005:0,
                 from /home/sonots/.rbenv/versions/2.4.1/include/ruby-2.4.0/ruby.h:33,
                 from ../../../../ext/culib/culib.cu:2:
/home/sonots/.rbenv/versions/2.4.1/include/ruby-2.4.0/ruby/intern.h:26:10: error: #include expects "FILENAME" or <FILENAME>
 #include RUBY_EXTCONF_H
          ^
@sonots
Copy link
Author

sonots commented Dec 8, 2017

The point is that by create_header('extconf.h'), -DRUBY_EXTCONF_H="extconf.h" is added to compiler options.

nvcc does not support #include RUBY_EXTCONF_H ? 🤔

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant