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
Related
I've already built libxslt(1.1.31) and libxml2(2.9.7) with homebrew and made link:
brew install libxml2
Warning: libxml2 2.9.7 is already installed
brew install libxslt
Warning: libxslt 1.1.31 is already installed
installed Xcode and tried to reinstall the command-line tools:
xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
exported C_INCLUDE_PATH:
echo $C_INCLUDE_PATH
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/
tried this:
STATIC_DEPS=true pip install lxml
tried easy_install and tried to build it from the source code.
But, all methods failed. It really makes me confused.
The error message is :
/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -DCYTHON_CLINE_IN_TRACEBACK=1 -I/usr/local/Cellar/libxslt/1.1.31/include -I/usr/local/Cellar/libxml2/2.9.7/include/libxml2 -Isrc -Isrc/lxml/includes -I/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/lxml/etree.c -o build/temp.macosx-10.6-intel-3.7/src/lxml/etree.o -w -flat_namespace
src/lxml/etree.c:243289:21: error: no member named 'exc_state' in 'struct _ts'
*type = tstate->exc_state.exc_type;
~~~~~~ ^
src/lxml/etree.c:243290:22: error: no member named 'exc_state' in 'struct _ts'
*value = tstate->exc_state.exc_value;
~~~~~~ ^
[...(same error omitted)]
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
Compile failed: command '/usr/bin/clang' failed with exit status 1
creating var
creating var/folders
creating var/folders/5m
creating var/folders/5m/61f2z4pn75q0jbg65kn4cjzc0000gn
creating var/folders/5m/61f2z4pn75q0jbg65kn4cjzc0000gn/T
cc -I/usr/local/Cellar/libxslt/1.1.31/include -I/usr/local/Cellar/libxml2/2.9.7/include/libxml2 -I/usr/include/libxml2 -c /var/folders/5m/61f2z4pn75q0jbg65kn4cjzc0000gn/T/xmlXPathInitmvd417vw.c -o var/folders/5m/61f2z4pn75q0jbg65kn4cjzc0000gn/T/xmlXPathInitmvd417vw.o
/var/folders/5m/61f2z4pn75q0jbg65kn4cjzc0000gn/T/xmlXPathInitmvd417vw.c:2:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
main (int argc, char **argv) {
^
1 warning generated.
cc var/folders/5m/61f2z4pn75q0jbg65kn4cjzc0000gn/T/xmlXPathInitmvd417vw.o -L/usr/local/Cellar/libxslt/1.1.31/lib -L/usr/local/Cellar/libxml2/2.9.6/lib -lxml2 -o a.out
ld: warning: directory not found for option '-L/usr/local/Cellar/libxml2/2.9.6/lib'
error: command '/usr/bin/clang' failed with exit status 1
Failed building wheel for lxml
Try using:
CFLAGS="-O0" sudo pip install lxml
Hope this heps!
When I try to install vowpal wabbit on CentOS (vmware image) I keep getting this error :
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-unused-local-typedef" [enabled by default]
make[1]: *** [lda_core.lo] Error 1
make[1]: Leaving directory `/home/tom/vowpal_wabbit/vowpalwabbit'
make: *** [install-recursive] Error 1
full error info :
Making install in vowpalwabbit
make[1]: Entering directory `/home/tom/vowpal_wabbit/vowpalwabbit'
depbase=`echo lda_core.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I/usr/include -I/include -Wall -Wno-unused-local-typedef -pedantic -ffast-math -O3 -fomit-frame-pointer -fno-strict-aliasing -DNDEBUG -std=gnu++11 -MT lda_core.lo -MD -MP -MF $depbase.Tpo -c -o lda_core.lo lda_core.cc &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/usr/include -I/include -Wall -Wno-unused-local-typedef -pedantic -ffast-math -O3 -fomit-frame-pointer -fno-strict-aliasing -DNDEBUG -std=gnu++11 -MT lda_core.lo -MD -MP -MF .deps/lda_core.Tpo -c lda_core.cc -fPIC -DPIC -o .libs/lda_core.o
lda_core.cc: In function ‘T ldamath::lgamma(T)’:
lda_core.cc:361:94: error: there are no arguments to ‘BOOST_STATIC_ASSERT_MSG’ that depend on a template parameter, so a declaration of ‘BOOST_STATIC_ASSERT_MSG’ must be available [-fpermissive]
BOOST_STATIC_ASSERT_MSG(true, "ldamath::lgamma is not defined for this type and math mode.");
^
lda_core.cc:361:94: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
lda_core.cc: In function ‘T ldamath::digamma(T)’:
lda_core.cc:367:95: error: there are no arguments to ‘BOOST_STATIC_ASSERT_MSG’ that depend on a template parameter, so a declaration of ‘BOOST_STATIC_ASSERT_MSG’ must be available [-fpermissive]
BOOST_STATIC_ASSERT_MSG(true, "ldamath::digamma is not defined for this type and math mode.");
^
lda_core.cc: In function ‘T ldamath::exponential(T)’:
lda_core.cc:373:99: error: there are no arguments to ‘BOOST_STATIC_ASSERT_MSG’ that depend on a template parameter, so a declaration of ‘BOOST_STATIC_ASSERT_MSG’ must be available [-fpermissive]
BOOST_STATIC_ASSERT_MSG(true, "ldamath::exponential is not defined for this type and math mode.");
^
lda_core.cc: In function ‘T ldamath::powf(T, T)’:
lda_core.cc:379:92: error: there are no arguments to ‘BOOST_STATIC_ASSERT_MSG’ that depend on a template parameter, so a declaration of ‘BOOST_STATIC_ASSERT_MSG’ must be available [-fpermissive]
BOOST_STATIC_ASSERT_MSG(true, "ldamath::powf is not defined for this type and math mode.");
^
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-unused-local-typedef" [enabled by default]
make[1]: *** [lda_core.lo] Error 1
make[1]: Leaving directory `/home/tom/vowpal_wabbit/vowpalwabbit'
make: *** [install-recursive] Error 1
Please help. How can I solve it? I already have "g++ (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)" version.
This is linking issue between files please run following commands
Testing run
# yum install devtoolset-2-gcc-4.8.2 devtoolset-2-gcc-c++-4.8.2
# /opt/rh/devtoolset-2/root/usr/bin/gcc --version
export
ln -s /opt/rh/devtoolset-2/root/usr/bin/* /usr/local/bin/
hash -r
gcc --version
for more info : http://www.computerhope.com/unix/uln.htm
This is what I do on CentOs 6.8 before running pip install vowpalwabbit both to conda or to main python distribution which builds native part and a python egg. Contains commented lines for a case of building a docker image. Pretty sure the same should help with just building the vowpal-wabbit library.
The original problem with BOOST_STATIC_ASSERT_MSG is being fixed by installing boost-devel:1.59.
yum -y install wget make python-devel zlib-devel
# Boost 1.59 required for vowpal wabbit, Boost 1.41 is going with CentOs 6.8 image and repo
wget http://repo.enetres.net/enetres.repo -O /etc/yum.repos.d/enetres.repo
yum -y install boost-devel
# This step is done for the original author, but will be needed if you didn't install updated gcc/g++ yet.
# GCC and G++ 4.8.2 for vowpal wabbit build, 4.4.x is going with CentOs 6.8 image by default.
# Don't go with too new gcc versions like gcc 5.x, it will not work
wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo
yum -y install devtoolset-2-gcc devtoolset-2-gcc-c++ devtoolset-2-binutils devtoolset-2-runtime devtoolset-2-libstdc++-devel
scl enable devtoolset-2 bash
# Set PATH, because "scl enable" does not have any effects inside "docker build"
#-docker- PATH /opt/rh/devtoolset-2/root/usr/bin:$PATH
# Set CC, CXX, LD variables for make, because "scl enable" does not have any effects inside "docker build"
#-docker- ENV CC /opt/rh/devtoolset-2/root/usr/bin/gcc
#-docker- ENV CXX /opt/rh/devtoolset-2/root/usr/bin/g++
#-docker- ENV LD /opt/rh/devtoolset-2/root/usr/bin/ld
# Python 2.7 for vowpal wabbit, CentOs 6.8 comes with python 2.6
# --enable-shared flag is important for the vowpal wabbit build
cd /opt &&\
wget --no-check-certificate https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz &&\
tar xf Python-2.7.6.tar.xz &&\
cd Python-2.7.6 &&\
./configure --enable-shared --prefix=/usr/local &&\
make && make altinstall
ln -s /usr/local/bin/python2.7 /usr/bin/python2.7
echo "/usr/local/lib/python2.7" > /etc/ld.so.conf.d/python27.conf
echo "/usr/local/lib" >> /etc/ld.so.conf.d/python27.conf
ldconfig
After this steps pip install vowpalwabbit or make for the original native library should work.
Related discussion in vowpal-wabbit issues tracker.
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 am trying to install ffmpeg and ffmpeg-php and am getting an error when I try to use make. I've tried to get to the bottom of it but it has me stumped. I tried finding which file has references to swscale.h but didn't have any luck. Has anyone encountered this error before?
root#vps [/usr/local/src/ffmpeg-php-0.6.0]# make
/bin/sh /usr/local/src/ffmpeg-php-0.6.0/libtool --mode=compile gcc -I. -
I/usr/local/src/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/usr/local/src/ffmpeg-
I/usr/local/src/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -I/usr/local/src/ffmpeg-
php-0.6.0/include -I/usr/local/src/ffmpeg-php-0.6.0/main -
I/usr/local/src/ffmpeg-php-0.6.0 -I/usr/local/include/php -
I/usr/local/include/php/main -I/usr/local/include/php/TSRM -
I/usr/local/include/php/Zend -I/usr/local/include/php/ext -
I/usr/local/include/php/ext/date/lib -I/usr/local/include/libavcodec/ -
I/usr/local/include/libavformat/ -I/usr/local/include/libavutil/ -
I/usr/local/include/libswscale/ -I/usr/local/include/libavfilter/ -
I/usr/local/include/libavdevice/ -I/usr/local/include/php -DHAVE_CONFIG_H
-g -O2 -Wall -fno-strict-aliasing -c /usr/local/src/ffmpeg-php-
0.6.0/ffmpeg-php.c -o ffmpeg-php.lo
gcc -I. -I/usr/local/src/ffmpeg-php-0.6.0 -DPHP_ATOM_INC -
I/usr/local/src/ffmpeg-php-0.6.0/include -I/usr/local/src/ffmpeg-php-
0.6.0/main -I/usr/local/src/ffmpeg-php-0.6.0 -I/usr/local/include/php -
I/usr/local/include/php/main -I/usr/local/include/php/TSRM -
I/usr/local/include/php/Zend -I/usr/local/include/php/ext -
I/usr/local/include/php/ext/date/lib -I/usr/local/include/libavcodec/ -
I/usr/local/include/libavformat/ -I/usr/local/include/libavutil/ -
I/usr/local/include/libswscale/ -I/usr/local/include/libavfilter/ -
I/usr/local/include/libavdevice/ -I/usr/local/include/php -DHAVE_CONFIG_H -g
-O2 -Wall -fno-strict-aliasing -c /usr/local/src/ffmpeg-php-0.6.0/ffmpeg-
php.c -fPIC -DPIC -o .libs/ffmpeg-php.o
/usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c:46:21: error: swscale.h: No
such file or directory
/usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c: In function 'zm_info_ffmpeg':
/usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c:156: error: 'LIBSWSCALE_IDENT'
undeclared (first use in this function)
/usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c:156: error: (Each undeclared
identifier is reported only once
/usr/local/src/ffmpeg-php-0.6.0/ffmpeg-php.c:156: error: for each function
it appears in.)
make: *** [ffmpeg-php.lo] Error 1
Installing libswscale-dev helped me on Debian Squeeze
It looks like it can't find swscale.h. You should check to see if that file was included with your FFmpeg install, and, if so, that ffmpeg-php has the correct set of paths specified with -I/path/to/includes to find it. If it doesn't, you can add the correct directory with something like:
CFLAGS=-I/path/to/ffmpeg/includes ./configure
make
If you can't find swscale.h, it could be that there's some version mismatch between FFmpeg and ffmpeg-php. The former is pretty actively developed, and pieces that ffmpeg-php expects to find might no longer be present. Check the docs for ffmpeg-php to see if it's tied to a particular version.
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)