I already installed the following:
imagemagick
libmagickwand-dev
but still i get this error.
======================================================================
Mon 05Oct09 19:36:06
This installation of RMagick 2.12.0 is configured for
Ruby 1.8.7 (i486-linux) and ImageMagick 6.4.5 Q16
======================================================================
make
cc -I. -I. -I/usr/lib/ruby/1.8/i486-linux -I. -DRUBY_EXTCONF_H=\"extconf.h\" -I/usr/include/ImageMagick -fPIC -I/usr/include/ImageMagick -fopenmp -c rmmontage.c
cc -I. -I. -I/usr/lib/ruby/1.8/i486-linux -I. -DRUBY_EXTCONF_H=\"extconf.h\" -I/usr/include/ImageMagick -fPIC -I/usr/include/ImageMagick -fopenmp -c rmutil.c
cc -I. -I. -I/usr/lib/ruby/1.8/i486-linux -I. -DRUBY_EXTCONF_H=\"extconf.h\" -I/usr/include/ImageMagick -fPIC -I/usr/include/ImageMagick -fopenmp -c rmmain.c
cc -I. -I. -I/usr/lib/ruby/1.8/i486-linux -I. -DRUBY_EXTCONF_H=\"extconf.h\" -I/usr/include/ImageMagick -fPIC -I/usr/include/ImageMagick -fopenmp -c rmimage.c
rmimage.c: In function ‘Image_function_channel’:
rmimage.c:5136: error: ‘MagickFunction’ undeclared (first use in this function)
rmimage.c:5136: error: (Each undeclared identifier is reported only once
rmimage.c:5136: error: for each function it appears in.)
rmimage.c:5136: error: expected ‘;’ before ‘function’
rmimage.c:5152: error: ‘function’ undeclared (first use in this function)
rmimage.c:5158: error: ‘PolynomialFunction’ undeclared (first use in this function)
rmimage.c:5164: error: ‘SinusoidFunction’ undeclared (first use in this function)
make: *** [rmimage.o] Error 1
Looks like 2.12.1 just got released, I just tested it on my ubuntu machine and it seems to install fine.
gem install rmagick -v '2.12.1'
for the version:
Version: ImageMagick 6.3.7 08/07/09 Q16
succeeded on Debian Lenny
maybe try with ImageMagick 6.5.6 as that is the latest
Related
I am trying to install pydeep via pip install pydeep on a CentOS 64b, but i get this:
error: command 'gcc' failed with exit status 1. Tried to install gcc and many others like python-dev, etc. but still no result. I also cloned it from GitHub and tried to:
python setup.py build but I get the same problem (note that I already have libssdeep).
Downloading/unpacking pydeep
Running setup.py egg_info for package pydeep
Installing collected packages: pydeep
Running setup.py install for pydeep
building 'pydeep' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.6 -c pydeep.c -o build/temp.linux-x86_64-2.6/pydeep.o
pydeep.c:2:19: error: fuzzy.h: No such file or directory
pydeep.c: In function ‘pydeep_hash_file’:
pydeep.c:33: error: ‘FUZZY_MAX_RESULT’ undeclared (first use in this function)
pydeep.c:33: error: (Each undeclared identifier is reported only once
pydeep.c:33: error: for each function it appears in.)
pydeep.c:38: warning: implicit declaration of function ‘fuzzy_hash_file’
pydeep.c: In function ‘pydeep_hash_buf’:
pydeep.c:64: error: ‘FUZZY_MAX_RESULT’ undeclared (first use in this function)
pydeep.c:72: warning: implicit declaration of function ‘fuzzy_hash_buf’
pydeep.c: In function ‘pydeep_compare’:
pydeep.c:90: warning: implicit declaration of function ‘fuzzy_compare’
error: command 'gcc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-bogdan/pydeep/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-EQweL1-record/install-record.txt --single-version-externally-managed:
running install
running build
running build_ext
building 'pydeep' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.6 -c pydeep.c -o build/temp.linux-x86_64-2.6/pydeep.o
pydeep.c:2:19: error: fuzzy.h: No such file or directory
pydeep.c: In function ‘pydeep_hash_file’:
pydeep.c:33: error: ‘FUZZY_MAX_RESULT’ undeclared (first use in this function)
pydeep.c:33: error: (Each undeclared identifier is reported only once
pydeep.c:33: error: for each function it appears in.)
pydeep.c:38: warning: implicit declaration of function ‘fuzzy_hash_file’
pydeep.c: In function ‘pydeep_hash_buf’:
pydeep.c:64: error: ‘FUZZY_MAX_RESULT’ undeclared (first use in this function)
pydeep.c:72: warning: implicit declaration of function ‘fuzzy_hash_buf’
pydeep.c: In function ‘pydeep_compare’:
pydeep.c:90: warning: implicit declaration of function ‘fuzzy_compare’
error: command 'gcc' failed with exit status 1
----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-bogdan/pydeep/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-EQweL1-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip-build-bogdan/pydeep
Storing complete log in /root/.pip/pip.log
If you need the full log or some specific info, I`ll provide it ASAP.
Thanks in advance!
For anyone else stumbling on this, running the following fixed the pydeep compile problems for me in Ubuntu:
sudo apt-get install python-dev libfuzzy-dev
pydeep's setup.py needs to be run as root
I have some trouble installing phpredis on my Mac OSX Maverics.
I do have redis server installed and running. I used sudo pecl install redis to install phpredis.
Now when I was doing that, this what came up:
running: make
/bin/sh /private/tmp/pear/temp/pear-build-rootEsw0Wz/redis-2.2.4/libtool --mode=compile cc -I. -I/private/tmp/pear/temp/redis -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootEsw0Wz/redis-2.2.4/include -I/private/tmp/pear/temp/pear-build-rootEsw0Wz/redis-2.2.4/main -I/private/tmp/pear/temp/redis -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/redis/redis.c -o redis.lo
mkdir .libs
cc -I. -I/private/tmp/pear/temp/redis -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-rootEsw0Wz/redis-2.2.4/include -I/private/tmp/pear/temp/pear-build-rootEsw0Wz/redis-2.2.4/main -I/private/tmp/pear/temp/redis -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/redis/redis.c -fno-common -DPIC -o .libs/redis.o
In file included from /private/tmp/pear/temp/redis/redis.c:27:
/private/tmp/pear/temp/redis/common.h:1:10: fatal error: 'php.h' file not found
#include "php.h"
^
1 error generated.
make: *** [redis.lo] Error 1
ERROR: `make' failed
What's this all about? seams like make failed because of missing php.h file. But why is that and how can I solve this?
Looks like your php is not available in environment variable path or installation is picking php from some default location.
I keep getting this error while installing the gem wdm from inside cygwin. Does anybody had the same issue and know now to fix it. Thanks. (I am Trying to install Guard gem)
$ gem install wdm
Building native extensions. This could take a while...
ERROR: Error installing wdm:
ERROR: Failed to build gem native extension.
/usr/bin/ruby.exe extconf.rb
checking for main() in -lkernel32... yes
checking for windows.h... yes
checking for ruby.h... yes
checking for HAVE_RUBY_ENCODING_H... yes
creating Makefile
make
gcc -I. -I/usr/include/ruby-1.9.1/i386-cygwin -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -DHAVE_WINDOWS_H -DHAVE_RUBY_H -DHAVE_CONST_HAVE_RUBY_ENCODING_H -ggdb -O2 -pipe -fno-strict-aliasing -o entry.o -c entry.c
gcc -I. -I/usr/include/ruby-1.9.1/i386-cygwin -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -DHAVE_WINDOWS_H -DHAVE_RUBY_H -DHAVE_CONST_HAVE_RUBY_ENCODING_H -ggdb -O2 -pipe -fno-strict-aliasing -o memory.o -c memory.c
gcc -I. -I/usr/include/ruby-1.9.1/i386-cygwin -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -DHAVE_WINDOWS_H -DHAVE_RUBY_H -DHAVE_CONST_HAVE_RUBY_ENCODING_H -ggdb -O2 -pipe -fno-strict-aliasing -o monitor.o -c monitor.c
gcc -I. -I/usr/include/ruby-1.9.1/i386-cygwin -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -DHAVE_WINDOWS_H -DHAVE_RUBY_H -DHAVE_CONST_HAVE_RUBY_ENCODING_H -ggdb -O2 -pipe -fno-strict-aliasing -o queue.o -c queue.c
gcc -I. -I/usr/include/ruby-1.9.1/i386-cygwin -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -DHAVE_WINDOWS_H -DHAVE_RUBY_H -DHAVE_CONST_HAVE_RUBY_ENCODING_H -ggdb -O2 -pipe -fno-strict-aliasing -o rb_change.o -c rb_change.c
rb_change.c: In function ‘extract_absolute_path_from_notification’:
rb_change.c:47:16: error: ‘_MAX_FNAME’ undeclared (first use in this function)
rb_change.c:47:16: note: each undeclared identifier is reported only once for each function it appears in
rb_change.c:47:33: error: ‘_MAX_EXT’ undeclared (first use in this function)
Makefile:206: recipe for target `rb_change.o' failed
make: *** [rb_change.o] Error 1
Gem files will remain installed in /usr/lib/ruby/gems/1.9.1/gems/wdm-0.1.0 for inspection.
Results logged to /usr/lib/ruby/gems/1.9.1/gems/wdm-0.1.0/ext/wdm/gem_make.out
A colleague of mine had an issue with wdm the other day.
We fixed it by downloading the Ruby DevKit (Not sure if you already had this installed).
I found some pretty decent step by steps online, I'll paste them here - hope they help
Development kit is here: http://rubyinstaller.org/downloads/
Download the Development Kit and install it in say c:\devkit.
Open a command window and type c:.
Change folders by typing cd devkit.
Type ruby dk.rb init to generate the config.yml file to be used later.
Your installed Rubies will be listed there (only those installed by a RubyInstaller package are detected at present). This needs to be done only once.
Finally type, ruby dk.rb install for DevKit enhance your installed Rubies. This needs to be done only once.
Confirm your Ruby environment is correctly using the DevKit by running:
gem install wdm --platform=ruby
It’s crucial that you include the --platform=ruby option to force RubyGems to build the native gem rather than potentially installing an incorrect binary gem.
I am trying to install Kyoto Cabinet via ruby gems. I am putting inside the Gemfile
gem "kyotocabinet", "~> 1.0"
as opposed here
but when I run bundle it fails with
setting variables ...
$CFLAGS = -I. -I/usr/local/include -Wall $(cflags) -fPIC -O2
$LDFLAGS = -L. -rdynamic -Wl,-export-dynamic -L. -L/usr/local/lib
$libs = -lkyotocabinet -lz -lstdc++ -lrt -lpthread -lm -lc
checking for kccommon.h... yes
creating Makefile
make
g++ -I. -I/home/gerry/.rvm/rubies/ruby-1.9.2-p136/include/ruby-1.9.1/x86_64-linux -I/home/gerry/.rvm/rubies/ruby-1.9.2-p136/include/ruby-1.9.1/ruby/backward -I/home/gerry/.rvm/rubies/ruby-1.9.2-p136/include/ruby-1.9.1 -I. -DHAVE_KCCOMMON_H -fPIC -I. -I/usr/local/include -Wall -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -O2 -o kyotocabinet.o -c kyotocabinet.cc
kyotocabinet.cc:29: error: ‘INT32_MAX’ was not declared in this scope
kyotocabinet.cc:30: error: ‘INT32_MAX’ was not declared in this scope
kyotocabinet.cc:61: warning: type qualifiers ignored on function return type
kyotocabinet.cc:320: warning: type qualifiers ignored on function return type
kyotocabinet.cc: In function ‘void init_err()’:
kyotocabinet.cc:387: error: ‘NOFILE’ is not a member of ‘kyotocabinet::BasicDB::Error’
kyotocabinet.cc: In function ‘VALUE db_increment(int, VALUE*, VALUE)’:
kyotocabinet.cc:1009: error: ‘INT64_MIN’ was not declared in this scope
kyotocabinet.cc: In function ‘VALUE db_synchronize(int, VALUE*, VALUE)’:
kyotocabinet.cc:1094: error: cannot declare variable ‘proc’ to be of abstract type ‘SoftFileProcessor’
kyotocabinet.cc:288: note: because the following virtual functions are pure within ‘SoftFileProcessor’:
/usr/local/include/kcdb.h:1070: note: virtual bool
kyotocabinet::BasicDB::FileProcessor::process(const std::string&, int64_t, int64_t)
make: *** [kyotocabinet.o] Error 1
If anyone knows a way to bypass this error please help! I am using Ubuntu 10.10 FYI.
Thanks a lot for any help!
Try using the gem "kyotocabinet-ruby" instead.
You need to install the libkyotocabinet-dev package:
sudo apt-get install libkyotocabinet-dev
And then you can use kyotocabinet-ruby:
sudo gem install kyotocabinet-ruby
Using RVM, I tried to install ree-1.8.7-2011.03 after installing Fedora 15 and I get the following error. Using rvm install ree-1.8.7-2011.03 on Ubuntu 11.04 works fine..
Same error (and solution) with MRI ruby-1.8.7-p334 on Fedora 15.
Any ideas as to how to fix this?
make[1]: Entering directory `/home/ryguy/.rvm/src/ree-1.8.7-2011.03/source/ext/dl'
gcc -I/opt/local/include -I. -I/opt/local/include -I../.. -I../../. -I../.././ext/dl -DHAVE_DLFCN_H -DHAVE_DLOPEN -DHAVE_DLCLOSE -DHAVE_DLSYM -DHAVE_DLERROR -I. -fPIC -g -O2 -fno-defer-pop -fno-omit-frame-pointer -c ptr.c
gcc -I/opt/local/include -I. -I/opt/local/include -I../.. -I../../. -I../.././ext/dl -DHAVE_DLFCN_H -DHAVE_DLOPEN -DHAVE_DLCLOSE -DHAVE_DLSYM -DHAVE_DLERROR -I. -fPIC -g -O2 -fno-defer-pop -fno-omit-frame-pointer -c handle.c
Generating callback.func
Generating cbtable.func
gcc -I/opt/local/include -I. -I/opt/local/include -I../.. -I../../. -I../.././ext/dl -DHAVE_DLFCN_H -DHAVE_DLOPEN -DHAVE_DLCLOSE -DHAVE_DLSYM -DHAVE_DLERROR -I. -fPIC -g -O2 -fno-defer-pop -fno-omit-frame-pointer -c dl.c
In file included from dl.c:104:0:
callback.func:1:1: warning: data definition has no type or storage class [enabled by default]
callback.func:1:7: error: expected identifier or ‘(’ before ‘long’
In file included from dl.c:104:0:
callback.func:78:33: error: expected ‘)’ before ‘(’ token
callback.func:79:3: warning: data definition has no type or storage class [enabled by default]
callback.func:79:24: error: ‘proc’ undeclared here (not in a function)
callback.func:79:39: error: ‘argc’ undeclared here (not in a function)
callback.func:79:45: error: ‘argv’ undeclared here (not in a function)
callback.func:82:1: error: expected identifier or ‘(’ before ‘}’ token
dl.c:106:1: error: expected ‘;’, ‘,’ or ‘)’ before ‘static’
make[1]: *** [dl.o] Error 1
make[1]: Leaving directory `/home/ryguy/.rvm/src/ree-1.8.7-2011.03/source/ext/dl'
make: *** [all] Error 1
This also happens when installing ruby-1.8.7 with rvm in Fedora 15.
Reinier Balt's answer also works, in my case I had to install system wide ruby using yum.
Here's what I did:
cd ~/.rvm/src/ruby-1.8.7-p334/ext/dl
ruby mkcallback.rb > callback.func
ruby mkcbtable.rb > cbtable.func
I saw this too
I went into the src/ext/dl directory and manually generated callback.func and cbtable.func which are both incomplete. I had to do
rm callback.func
touch callback.func
ruby mkcallback.rb >> callback.func
(repeat for cbtable)
Somehow the simple ruby mkcallback.rb > callback.func did not work
then rerun rvm install 1.8.7 which will not overwrite your changes.
https://bugs.ruby-lang.org/issues/5108
[[tl;dr: see patch at bottom]]
I don't know why this happens, but it appears that the redirection to the file doesn't completely redirect the output. As a temporary hack/fix, that does get it working, you can pipe it through tee. It gets the job done, but is certainly not the proper solution.
Patch:
https://gist.github.com/1083163
This patch when applied like so: rvm install --patch /path/to/Fedora-15-ruby-1.8.7-p352.patch%0 ruby-1.8.7 will work. I will test it with ree as well and update.
EDIT: This same patch also works with ree.
rvm install --patch /path/to/Fedora-15-ruby-1.8.76-p352.patch%0 ree successfully installed a working ree for me.
patch from user865548 is now available in RVM (will be 1.9.1 or just rvm get head)