Skip to content
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

Got errors compiling the extensions #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

leoc
Copy link

@leoc leoc commented May 16, 2012

I got some errors as I added rfusefs to my projects Gemfile. Rfusefs depends on rfuse-ng.

Installing rfuse-ng (0.5.3) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /home/arthur/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb 
checking for main() in -lfuse... yes
creating Makefile

make
compiling file_info.c
compiling bufferwrapper.c
compiling intern_rfuse.c
intern_rfuse.c: In function ‘intern_fuse_fd’:
intern_rfuse.c:53:3: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
intern_rfuse.c: In function ‘intern_fuse_process’:
intern_rfuse.c:69:3: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
cc1: all warnings being treated as errors
make: *** [intern_rfuse.o] Error 1


Gem files will remain installed in /home/arthur/.rvm/gems/ruby-1.9.3-p125@rindle/gems/rfuse-ng-0.5.3 for inspection.
Results logged to /home/arthur/.rvm/gems/ruby-1.9.3-p125@rindle/gems/rfuse-ng-0.5.3/ext/gem_make.out
An error occured while installing rfuse-ng (0.5.3), and Bundler cannot continue.
Make sure that `gem install rfuse-ng -v '0.5.3'` succeeds before bundling.

Then I forked and the first thing I did was to switch the whole thing to a setting that´s bundler specific. It was kind of mixed with a Jeweler Rakefile.

When I did a rake install everthing installed fine.

I don´t know.

Maybe the previous bundler installations changed the C standard to C90 and we have to add something like

with_cflags("-std=c99 #{$CFLAGS}") do
  create_makefile("rfuse-ng")
end

For some reason I get another error with Ruby 1.9.2, though I thought it was forked and modified for Ruby 1.9.2 compatibility.


Installing rfuse-ng (0.5.3) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /home/arthur/.rvm/rubies/ruby-1.9.2-p318/bin/ruby extconf.rb 
checking for main() in -lfuse... yes
creating Makefile

make
gcc -I. -I/home/arthur/.rvm/rubies/ruby-1.9.2-p318/include/ruby-1.9.1/x86_64-linux -I/home/arthur/.rvm/rubies/ruby-1.9.2-p318/include/ruby-1.9.1/ruby/backward -I/home/arthur/.rvm/rubies/ruby-1.9.2-p318/include/ruby-1.9.1 -I. -I/home/arthur/.rvm/usr/include    -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -fPIC -Wall -Werror -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26  -o file_info.o -c file_info.c
gcc -I. -I/home/arthur/.rvm/rubies/ruby-1.9.2-p318/include/ruby-1.9.1/x86_64-linux -I/home/arthur/.rvm/rubies/ruby-1.9.2-p318/include/ruby-1.9.1/ruby/backward -I/home/arthur/.rvm/rubies/ruby-1.9.2-p318/include/ruby-1.9.1 -I. -I/home/arthur/.rvm/usr/include    -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -fPIC -Wall -Werror -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26  -o bufferwrapper.o -c bufferwrapper.c
gcc -I. -I/home/arthur/.rvm/rubies/ruby-1.9.2-p318/include/ruby-1.9.1/x86_64-linux -I/home/arthur/.rvm/rubies/ruby-1.9.2-p318/include/ruby-1.9.1/ruby/backward -I/home/arthur/.rvm/rubies/ruby-1.9.2-p318/include/ruby-1.9.1 -I. -I/home/arthur/.rvm/usr/include    -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -fPIC -Wall -Werror -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26  -o intern_rfuse.o -c intern_rfuse.c
gcc -I. -I/home/arthur/.rvm/rubies/ruby-1.9.2-p318/include/ruby-1.9.1/x86_64-linux -I/home/arthur/.rvm/rubies/ruby-1.9.2-p318/include/ruby-1.9.1/ruby/backward -I/home/arthur/.rvm/rubies/ruby-1.9.2-p318/include/ruby-1.9.1 -I. -I/home/arthur/.rvm/usr/include    -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -fPIC -Wall -Werror -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26  -o rfuse_mod.o -c rfuse_mod.c
gcc -I. -I/home/arthur/.rvm/rubies/ruby-1.9.2-p318/include/ruby-1.9.1/x86_64-linux -I/home/arthur/.rvm/rubies/ruby-1.9.2-p318/include/ruby-1.9.1/ruby/backward -I/home/arthur/.rvm/rubies/ruby-1.9.2-p318/include/ruby-1.9.1 -I. -I/home/arthur/.rvm/usr/include    -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -fPIC -Wall -Werror -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26  -o rfuse.o -c rfuse.c
rfuse.c: In function ‘unsafe_return_error’:
rfuse.c:43:3: error: passing argument 1 of ‘rb_respond_to’ makes integer from pointer without a cast [-Werror]
In file included from /home/arthur/.rvm/rubies/ruby-1.9.2-p318/include/ruby-1.9.1/ruby/ruby.h:1343:0,
                 from /home/arthur/.rvm/rubies/ruby-1.9.2-p318/include/ruby-1.9.1/ruby.h:32,
                 from rfuse.c:8:
/home/arthur/.rvm/rubies/ruby-1.9.2-p318/include/ruby-1.9.1/ruby/intern.h:286:5: note: expected ‘VALUE’ but argument is of type ‘VALUE (*)()’
rfuse.c:45:5: error: passing argument 1 of ‘rb_funcall’ makes integer from pointer without a cast [-Werror]
In file included from /home/arthur/.rvm/rubies/ruby-1.9.2-p318/include/ruby-1.9.1/ruby.h:32:0,
                 from rfuse.c:8:
/home/arthur/.rvm/rubies/ruby-1.9.2-p318/include/ruby-1.9.1/ruby/ruby.h:1123:7: note: expected ‘VALUE’ but argument is of type ‘VALUE (*)()’
rfuse.c:48:5: error: passing argument 1 of ‘rb_inspect’ makes integer from pointer without a cast [-Werror]
In file included from /home/arthur/.rvm/rubies/ruby-1.9.2-p318/include/ruby-1.9.1/ruby/ruby.h:1343:0,
                 from /home/arthur/.rvm/rubies/ruby-1.9.2-p318/include/ruby-1.9.1/ruby.h:32,
                 from rfuse.c:8:
/home/arthur/.rvm/rubies/ruby-1.9.2-p318/include/ruby-1.9.1/ruby/intern.h:459:7: note: expected ‘VALUE’ but argument is of type ‘VALUE (*)()’
rfuse.c:51:5: error: passing argument 1 of ‘rb_funcall’ makes integer from pointer without a cast [-Werror]
In file included from /home/arthur/.rvm/rubies/ruby-1.9.2-p318/include/ruby-1.9.1/ruby.h:32:0,
                 from rfuse.c:8:
/home/arthur/.rvm/rubies/ruby-1.9.2-p318/include/ruby-1.9.1/ruby/ruby.h:1123:7: note: expected ‘VALUE’ but argument is of type ‘VALUE (*)()’
rfuse.c:53:30: error: ‘struct RArray’ has no member named ‘len’
rfuse.c:54:21: error: ‘struct RArray’ has no member named ‘ptr’
rfuse.c: In function ‘rf_readdir’:
rfuse.c:102:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_getdir’:
rfuse.c:188:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_mknod’:
rfuse.c:233:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_mkdir’:
rfuse.c:296:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_open’:
rfuse.c:326:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_release’:
rfuse.c:361:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_fsync’:
rfuse.c:394:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_flush’:
rfuse.c:428:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_truncate’:
rfuse.c:459:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_utime’:
rfuse.c:491:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_chown’:
rfuse.c:524:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_chmod’:
rfuse.c:556:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_unlink’:
rfuse.c:586:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_rmdir’:
rfuse.c:615:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_symlink’:
rfuse.c:644:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_rename’:
rfuse.c:675:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_link’:
rfuse.c:706:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_setxattr’:
rfuse.c:881:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_removexattr’:
rfuse.c:1014:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_opendir’:
rfuse.c:1045:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_releasedir’:
rfuse.c:1076:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_fsyncdir’:
rfuse.c:1109:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_access’:
rfuse.c:1218:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_create’:
rfuse.c:1252:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_ftruncate’:
rfuse.c:1289:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_lock’:
rfuse.c:1363:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_utimens’:
rfuse.c:1423:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_bmap’:
rfuse.c:1472:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_ioctl’:
rfuse.c:1513:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
rfuse.c: In function ‘rf_poll’:
rfuse.c:1552:9: error: variable ‘res’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
make: *** [rfuse.o] Error 1


Gem files will remain installed in /home/arthur/.rvm/gems/ruby-1.9.2-p318@rindle/gems/rfuse-ng-0.5.3 for inspection.
Results logged to /home/arthur/.rvm/gems/ruby-1.9.2-p318@rindle/gems/rfuse-ng-0.5.3/ext/gem_make.out
An error occured while installing rfuse-ng (0.5.3), and Bundler cannot continue.
Make sure that `gem install rfuse-ng -v '0.5.3'` succeeds before bundling.

Here again, when I do rake install within an RVM Ruby 1.9.2 environment everthing installs just fine.

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

Successfully merging this pull request may close these issues.

1 participant