I am trying to cross-compile the GNU Scientific Library (gsl, v1.16) for ARM architecture (specifically the Raspberry Pi). I have used the following to configure;
CROSS=armv6j-hardfloat-linux-gnueabi
./configure --host=x86_64-pc-linux-gnu --build=$CROSS --target=$CROSS \
CC=/usr/bin/$CROSS-gcc \
CXX=/usr/bin/$CROSS-g++ \
AR=/usr/bin/$CROSS-ar \
RANLIB=/usr/bin/$CROSS-ranlib \
CFLAGS="-march=armv6 -mfloat-abi=hard -mfpu-vfp"
I get the following error messages:
libtool: compile: /usr/bin/armv6j-hardfloat-linux-gnueabi-gcc
-DHAVE_CONFIG_H -I. -I.. -I.. -march=armv6 -mfloat-abi=hard -mfpu=vfp
-MT read.lo -MD -MP -MF .deps/read.Tpo -c read.c -o read.o
In file included from fp.c:10:0:
fp-gnux86.c: In function 'gsl_ieee_set_mode':
fp-gnux86.c:42:15: error: '_FPU_SINGLE' undeclared (first use in this function)
fp-gnux86.c:42:15: note: each undeclared identifier is reported only once for each function it appears in
fp-gnux86.c:45:15: error: '_FPU_DOUBLE' undeclared (first use in this function)
fp-gnux86.c:48:15: error: '_FPU_EXTENDED' undeclared (first use in this function)
fp-gnux86.c:57:15: error: '_FPU_RC_NEAREST' undeclared (first use in this function)
fp-gnux86.c:60:15: error: '_FPU_RC_DOWN' undeclared (first use in this function)
fp-gnux86.c:63:15: error: '_FPU_RC_UP' undeclared (first use in this function)
fp-gnux86.c:66:15: error: '_FPU_RC_ZERO' undeclared (first use in this function)
fp-gnux86.c:76:13: error: '_FPU_MASK_DM' undeclared (first use in this function)
make[2]: *** [fp.lo] Error 1
I am compiling on a 64 bit Linux Gentoo system. I have used the Gentoo toolchain to set-up my cross-compiler. Any pointers to what I am doing wrong are highly appreciated.
Thanks in advance!
Your configuration was not correct ,to Cross-compile build=(your x86 gcc),and host=target=(arm-tool-chain).Try this below command.
./configure --host=armv6j-hardfloat-linux-gnueabi --build=x86_64-pc-linux-gnu --target=armv6j-hardfloat-linux-gnueabi \
CFLAGS="-march=armv6 -mfloat-abi=hard -mfpu-vfp"
I can't promise it'll work but you'd probably have better luck using the emerge wrapper.
armv6j-hardfloat-linux-gnueabi-emerge gsl
I've worked on a collection of scripts that make this sort of thing more reliable but unfortunately I got tangled up in the hell that is cross-compiling Python modules and never got it into a releasable state.
Related
We are facing issues on compiling x264 on qnap.
We need to compile ffmpeg with x264 library, qnap packages have the built-in x264 0.66 library but ffmpeg-0.9.2 doesn't support too old version of x264 and produces the following error on compiling x264 from source.
[/share/MD0_DATA/.qpkg/x264-snapshot-20130208-2245] # make
gcc -Wshadow -O3 -ffast-math -m32 -Wall -I. -I. -march=i686 -mfpmath=sse -msse -std=gnu99 -I/opt/include -I/opt/include -fomit-frame-pointer -fno-tree-vectorize -c -o x264.o x264.c
x264.c: In function 'help':
x264.c:401: error: 'X264_VERSION' undeclared (first use in this function)
x264.c:401: error: (Each undeclared identifier is reported only once
x264.c:401: error: for each function it appears in.)
make: *** [x264.o] Error 1
[/share/MD0_DATA/.qpkg/x264-snapshot-20130208-2245] # cat /proc/version
Linux version 2.6.33.2 (root#NasX86-4) (gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)) #1 SMP Wed Dec 5 06:48:23 CST 2012
Can someone assist me on that ?
Probably version.sh does not have execution permission. So, chmod 744 version.sh then retry configure and make.
X264_VERSION define is generated in x264_config.h during configure script execution by calling to version.sh. So either it wasn't generated in x264_config.h (some fault of your building environment and need analyze of config.log) or you have old x264.h headers somewhere in you include path which for some reason used instead of new one.
Removing --prefix="path" from the ./configure arguments fixed this error for me.
I am ubuntu guy and not able to install win32-api.
Please find my log
Building native extensions. This could take a while...
ERROR: Error installing win32-api:
ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
checking for strncpy_s()... no
creating Makefile
make
gcc -I. -I/usr/local/rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/i686-linux -I/usr/local/rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/usr/local/rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 -Iwin32 -D_FILE_OFFSET_BITS=64 -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -fPIC -o api.o -c win32/api.c
win32/api.c:2:21: error: windows.h: No such file or directory
win32/api.c:33: error: expected specifier-qualifier-list before ‘HANDLE’
win32/api.c: In function ‘api_free’:
win32/api.c:40: error: ‘Win32API’ has no member named ‘library’
win32/api.c:41: error: ‘Win32API’ has no member named ‘library’
win32/api.c: At top level:
win32/api.c:58: error: expected ‘)’ before ‘dwError’
win32/api.c: In function ‘callback_init’:
win32/api.c:189: error: ‘LPARAM’ undeclared (first use in this function)
win32/api.c:189: error: (Each undeclared identifier is reported only once
win32/api.c:189: error: for each function it appears in.)
win32/api.c:189: error: expected ‘)’ before ‘find_callback’
win32/api.c: In function ‘api_init’:
The Win32 API only exists on Windows. Or in WINE, but going that route is more complex than you're ready for.
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)
So not to familiar with installing extensions by here is my process and the moment of fail.
$ sudo pecl install uuid
then all is good until...
creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /private/var/tmp/pear-build-root/uuid-1.0.2/libtool --mode=compile cc -I. -I/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid -DPHP_ATOM_INC -I/private/var/tmp/pear-build-root/uuid-1.0.2/include -I/private/var/tmp/pear-build-root/uuid-1.0.2/main -I/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid -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 -I/include -DHAVE_CONFIG_H -g -O2 -c /private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c -o uuid.lo
mkdir .libs
cc -I. "-I/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid" -DPHP_ATOM_INC -I/private/var/tmp/pear-build-root/uuid-1.0.2/include -I/private/var/tmp/pear-build-root/uuid-1.0.2/main "-I/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid" -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 -I/include -DHAVE_CONFIG_H -g -O2 -c "/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c" -fno-common -DPIC -o .libs/uuid.o
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c: In function ‘zm_startup_uuid’:
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:89: error: ‘UUID_TYPE_DCE_TIME’ undeclared (first use in this function)
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:89: error: (Each undeclared identifier is reported only once
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:89: error: for each function it appears in.)
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:90: error: ‘UUID_TYPE_DCE_RANDOM’ undeclared (first use in this function)
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c: In function ‘zif_uuid_create’:
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:168: error: ‘UUID_TYPE_DCE_TIME’ undeclared (first use in this function)
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:171: error: ‘UUID_TYPE_DCE_RANDOM’ undeclared (first use in this function)
/private/var/tmp/apache_mod_php/apache_mod_php-53~1/Build/tmp/pear/temp/uuid/uuid.c:181: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long int’
make: *** [uuid.lo] Error 1
ERROR: `make' failed
Follow this tutorial --
http://unrealexpectations.com/blog/2010/04/mamp-pecluuid-module-working-on-snow-leopard/
When you go to make the patch make sure the file to patch are entered correctly, you want to have it be tests/uuid_mac.phpt
If that doesn't work make sure you have you have your php.ini configured with the extension_dir and have the extension=uuid.so there as well.
This also works for OS X 10.7
You will need an updated version of uuid from util-linux. It is available on Homebrew.
brew install util-linux
But util-linux is a keg-only package and will not be symlinked to /usr/local. Hence you will have to specify the following path when prompted for uuid installation directory
/usr/local/opt/util-linux
For unattended installations, you can use
printf "/usr/local/opt/util-linux" | pecl install uuid
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