MAC OSX10.11.4 python3 import theano error - macos

I upgraded my Mac to a OSX 10.11.4, and sadly I found my theano cannot be imported anymore.
Here is information about my machine:
➜ ~ gcc --version
Configured with: -prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/c++/4.2.1
Apple LLVM version 7.3.0 (clang-703.0.29)
Target: x86_64-apple-darwin15.4.0
Thread model: posix
InstalledDir:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
The logs are list below and I hope somebody can help me out. The output is very long and I just listed part of it here. The full version can be found here.
Python 3.5.1 (v3.5.1:37a07cee5969, Dec 5 2015, 21:12:44)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import theano
00001 #include <Python.h>
00002 #include "theano_mod_helper.h"
00003 #include "structmember.h"
00004 #include <sys/time.h>
00005
00006 #if PY_VERSION_HEX >= 0x03000000
00007 #include "numpy/npy_3kcompat.h"
00008 #define PyCObject_AsVoidPtr NpyCapsule_AsVoidPtr
00009 #define PyCObject_GetDesc NpyCapsule_GetDesc
00010 #define PyCObject_Check NpyCapsule_Check
00011 #endif
00012
00013 #ifndef Py_TYPE
00014 #define Py_TYPE(obj) obj->ob_type
00015 #endif
00016
00017 /**
00018
00019 TODO:
00020 - Check max supported depth of recursion
00021 - CLazyLinker should add context information to errors caught during evaluation. Say what node we were on, add the traceback attached to the node.
00022 - Clear containers of fully-useed intermediate results if allow_gc is 1
00023 - Add timers for profiling
00024 - Add support for profiling space used.
00025
00026
00027 */
00028 static double pytime(const struct timeval * tv)
00029 {
00030 struct timeval t;
00031 if (!tv)
00032 {
00033 tv = &t;
00034 gettimeofday(&t, NULL);
00035 }
00036 return (double) tv->tv_sec + (double) tv->tv_usec / 1000000.0;
00037 }
00038
00039 /**
00040 Helper routine to convert a PyList of integers to a c array of integers.
00041 */
00042 static int unpack_list_of_ssize_t(PyObject * pylist, Py_ssize_t **dst, Py_ssize_t *len,
00043 const char* kwname)
00044 {
00045 Py_ssize_t buflen, *buf;
00046 if (!PyList_Check(pylist))
00047 {
00048 PyErr_Format(PyExc_TypeError, "%s must be list", kwname);
00049 return -1;
00050 }
00051 assert (NULL == *dst);
00052 *len = buflen = PyList_Size(pylist);
00053 *dst = buf = (Py_ssize_t*)calloc(buflen, sizeof(Py_ssize_t));
00054 assert(buf);
00055 for (int ii = 0; ii < buflen; ++ii)
00056 {
00057 PyObject * el_i = PyList_GetItem(pylist, ii);
00058 Py_ssize_t n_i = PyNumber_AsSsize_t(el_i, PyExc_IndexError);
00059 if (PyErr_Occurred())
00060 {
00061 free(buf);
00062 *dst = NULL;
00063 return -1;
00064 }
00065 buf[ii] = n_i;
00066 }
00067 return 0;
00068 }
00069
00070 /**
00071
00072 CLazyLinker
00075 */
00076 typedef struct {
00077 PyObject_HEAD
00078 /* Type-specific fields go here. */
00079 PyObject * nodes; // the python list of nodes
00080 PyObject * thunks; // python list of thunks
00081 PyObject * pre_call_clear; //list of cells to clear on call.
00082 int allow_gc;
00083 Py_ssize_t n_applies;
00084 int n_vars; // number of variables in the graph
00085 int * var_computed; // 1 or 0 for every variable
00086 PyObject ** var_computed_cells;
00087 PyObject ** var_value_cells;
00088 Py_ssize_t **dependencies; // list of vars dependencies for GC
00089 Py_ssize_t *n_dependencies;
00090
00091 Py_ssize_t n_output_vars;
00092 Py_ssize_t * output_vars; // variables that *must* be evaluated by call
00093
00094 int * is_lazy; // 1 or 0 for every thunk
00095
00096 Py_ssize_t * var_owner; // nodes[[var_owner[var_idx]]] is var[var_idx]->owner
00097 int * var_has_owner; // 1 or 0
00098
00099 Py_ssize_t * node_n_inputs;
00100 Py_ssize_t * node_n_outputs;
00101 Py_ssize_t ** node_inputs;
00102 Py_ssize_t ** node_outputs;
00103 Py_ssize_t * node_inputs_outputs_base; // node_inputs and node_outputs point into this
00104 Py_ssize_t * node_n_prereqs;
00105 Py_ssize_t ** node_prereqs;
00106
00107 Py_ssize_t * update_storage; // input cells to update with the last outputs in output_vars
00108 Py_ssize_t n_updates;
00109
00110 void ** thunk_cptr_fn;
00111 void ** thunk_cptr_data;
00112 PyObject * call_times;
00113 PyObject * call_counts;
00114 int do_timing;
00115 int need_update_inputs;
00116 int position_of_error; // -1 for no error, otw the index into `thunks` that failed.
00117 } CLazyLinker;
...............
= ==============================
Problem occurred during compilation with the command line below:
/usr/bin/clang++ -dynamiclib -g -march=haswell -target-feature -sse4a -target-feature -avx512bw -target-feature +cx16 -target-feature -tbm -target-feature +xsave -target-feature -fma4 -target-feature -avx512vl -target-feature -prfchw -target-feature +bmi2 -target-feature -adx -target-feature -xsavec -target-feature +fsgsbase -target-feature +avx -target-feature -avx512cd -target-feature -avx512pf -target-feature -rtm -target-feature +popcnt -target-feature +fma -target-feature +bmi -target-feature +aes -target-feature +rdrnd -target-feature -xsaves -target-feature +sse4.1 -target-feature +sse4.2 -target-feature +avx2 -target-feature -avx512er -target-feature +sse -target-feature +lzcnt -target-feature +pclmul -target-feature -avx512f -target-feature +f16c -target-feature +ssse3 -target-feature +mmx -target-feature +cmov -target-feature -xop -target-feature -rdseed -target-feature +movbe -target-feature -hle -target-feature +xsaveopt -target-feature -sha -target-feature +sse2 -target-feature +sse3 -target-feature -avx512dq -D NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -fPIC -undefined dynamic_lookup -I/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5m -I/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/theano/gof -fvisibility=hidden -o /Users/liuwei/.theano/compiledir_Darwin-15.4.0-x86_64-i386-64bit-i386-3.5.1-64/lazylinker_ext/lazylinker_ext.so /Users/liuwei/.theano/compiledir_Darwin-15.4.0-x86_64-i386-64bit-i386-3.5.1-64/lazylinker_ext/mod.cpp -L/Library/Frameworks/Python.framework/Versions/3.5/lib
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-sse4a'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-tbm'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-fma4'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-prfchw'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-rtm'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-rdseed'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-hle'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-sha'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: unknown argument: '-target-feature'
clang: error: no such file or directory: '+cx16'
clang: error: no such file or directory: '+xsave'
clang: error: no such file or directory: '+bmi2'
clang: error: language not recognized: 'savec'
clang: error: no such file or directory: '+fsgsbase'
clang: error: no such file or directory: '+avx'
clang: error: no such file or directory: '+popcnt'
clang: error: no such file or directory: '+fma'
clang: error: no such file or directory: '+bmi'
clang: error: no such file or directory: '+aes'
clang: error: no such file or directory: '+rdrnd'
clang: error: language not recognized: 'saves'
clang: error: no such file or directory: '+sse4.1'
clang: error: no such file or directory: '+sse4.2'
clang: error: no such file or directory: '+avx2'
clang: error: no such file or directory: '+sse'
clang: error: no such file or directory: '+lzcnt'
clang: error: no such file or directory: '+pclmul'
clang: error: no such file or directory: '+f16c'
clang: error: no such file or directory: '+ssse3'
clang: error: no such file or directory: '+mmx'
clang: error: no such file or directory: '+cmov'
clang: error: language not recognized: 'op'
clang: error: no such file or directory: '+movbe'
clang: error: no such file or directory: '+xsaveopt'
clang: error: no such file or directory: '+sse2'
clang: error: no such file or directory: '+sse3'
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/theano/gof/lazylinker_c.py", line 74, in <module>
raise ImportError()
ImportError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/theano/gof/lazylinker_c.py", line 91, in <module>
raise ImportError()
ImportError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/theano/__init__.py", line 63, in <module>
from theano.compile import (
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/theano/compile/__init__.py", line 9, in <module>
from theano.compile.function_module import *
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/theano/compile/function_module.py", line 22, in <module>
import theano.compile.mode
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/theano/compile/mode.py", line 12, in <module>
import theano.gof.vm
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/theano/gof/vm.py", line 638, in <module>
from . import lazylinker_c
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/theano/gof/lazylinker_c.py", line 126, in <module>
preargs=args)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/theano/gof/cmodule.py", line 2196, in compile_str
(status, compile_stderr.replace('\n', '. ')))
Exception: Compilation failed (return status=1):
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-sse4a'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-tbm'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-fma4'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-prfchw'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-rtm'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-rdseed'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-hle'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-sha'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: unknown argument: '-target-feature'.
clang: error: no such file or directory: '+cx16'.
clang: error: no such file or directory: '+xsave'.
clang: error: no such file or directory: '+bmi2'.
clang: error: language not recognized: 'savec'.
clang: error: no such file or directory: '+fsgsbase'.
clang: error: no such file or directory: '+avx'.
clang: error: no such file or directory: '+popcnt'.
clang: error: no such file or directory: '+fma'.
clang: error: no such file or directory: '+bmi'.
clang: error: no such file or directory: '+aes'.
clang: error: no such file or directory: '+rdrnd'.
clang: error: language not recognized: 'saves'.
clang: error: no such file or directory: '+sse4.1'.
clang: error: no such file or directory: '+sse4.2'.
clang: error: no such file or directory: '+avx2'.
clang: error: no such file or directory: '+sse'.
clang: error: no such file or directory: '+lzcnt'.
clang: error: no such file or directory: '+pclmul'.
clang: error: no such file or directory: '+f16c'.
clang: error: no such file or directory: '+ssse3'.
clang: error: no such file or directory: '+mmx'.
clang: error: no such file or directory: '+cmov'.
clang: error: language not recognized: 'op'.
clang: error: no such file or directory: '+movbe'.
clang: error: no such file or directory: '+xsaveopt'.
clang: error: no such file or directory: '+sse2'.
clang: error: no such file or directory: '+sse3'.

The problem comes from an interface change in Xcode 7.3. It is fixed in the current master of Theano and there will be release 0.8.1 next Tuesday (2016/03/29) that will be 0.8.0 + the fix.
In the meantime you can either run the master: http://deeplearning.net/software/theano/install.html#bleeding-edge-install-instructions or install version 7.2 of the command line tools and select those with xcode-select to make Theano work.

A new Numpy release (1.11.0) came out yesterday, 3/27/16. Installed it and finally everything on my MacBook OS-X Canopy Python started working correctly. Installed scikit-neuralnetwork, which installs Theano, Numpy, and others. Whew...

Related

Issue with zlib while running makefile MacOS sierra

I am trying to run a make file in MacOS sierra, but it seems to have trouble with the header of the Zlib (see below).
I have tried to install a separate version with brew and pass the directory of the brew zlib installation in the configure file.
./configure --prefix=/usr/local/etherlab --with-xml-prefix=/usr/local/opt/libxml2 --with-zlib-dir=/usr/local/opt/zlib CXXFLAGS=-std=c++11
However, when I run make I got the error
$ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in proto
make[2]: Nothing to be done for `all'.
Making all in lib
Making all in LibDLS
make[3]: Nothing to be done for `all'.
/bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/local/etherlab/include -Wall -I/usr/local/include -I/usr/local/opt/zlib/include -I/usr/local/opt/libxml2/include/libxml2 -std=c++11 -MT libdls_la-ZLib.lo -MD -MP -MF .deps/libdls_la-ZLib.Tpo -c -o libdls_la-ZLib.lo `test -f 'ZLib.cpp' || echo './'`ZLib.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/local/etherlab/include -Wall -I/usr/local/include -I/usr/local/opt/zlib/include -I/usr/local/opt/libxml2/include/libxml2 -std=c++11 -MT libdls_la-ZLib.lo -MD -MP -MF .deps/libdls_la-ZLib.Tpo -c ZLib.cpp -fno-common -DPIC -o .libs/libdls_la-ZLib.o
ZLib.cpp:22:10: warning: non-portable path to file '<ZLib.h>'; specified path differs in case from file name on disk
[-Wnonportable-include-path]
#include <zlib.h>
^~~~~~~~
<ZLib.h>
In file included from ZLib.cpp:22:
./zlib.h:42:17: error: unknown type name 'string'; did you mean 'std::string'?
EZLib(const string &pmsg) : Exception(pmsg) {};
^~~~~~
std::string
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:194:65: note:
'std::string' declared here
typedef basic_string<char, char_traits<char>, allocator<char> > string;
^
ZLib.cpp:90:5: error: unknown type name 'uLongf'
uLongf out_size;
^
ZLib.cpp:104:17: error: use of undeclared identifier 'uLongf'
out_size = (uLongf) (src_size * 1.01 + 12 + 0.5);
^
ZLib.cpp:117:28: error: use of undeclared identifier 'Bytef'
comp_ret = ::compress((Bytef *) _out_buf, &out_size,
^
ZLib.cpp:117:35: error: expected expression
comp_ret = ::compress((Bytef *) _out_buf, &out_size,
^
ZLib.cpp:118:34: error: unknown type name 'Bytef'
(const Bytef *) src, src_size);
^
ZLib.cpp:117:16: error: no member named 'compress' in the global namespace; did you mean simply 'compress'?
comp_ret = ::compress((Bytef *) _out_buf, &out_size,
^~~~~~~~~~
compress
ZLib.cpp:88:12: note: 'compress' declared here
void ZLib::compress(const char *src, unsigned int src_size)
^
ZLib.cpp:120:21: error: use of undeclared identifier 'Z_OK'
if (comp_ret != Z_OK) // Fehler beim Komprimieren
^
ZLib.cpp:123:25: error: use of undeclared identifier 'Z_BUF_ERROR'
if (comp_ret == Z_BUF_ERROR) err << " (BUFFER ERROR)";
^
ZLib.cpp:155:5: error: unknown type name 'uLongf'
uLongf zlib_out_size = out_size;
^
ZLib.cpp:173:32: error: use of undeclared identifier 'Bytef'
uncomp_ret = ::uncompress((Bytef *) _out_buf, &zlib_out_size,
^
ZLib.cpp:173:39: error: expected expression
uncomp_ret = ::uncompress((Bytef *) _out_buf, &zlib_out_size,
^
ZLib.cpp:174:38: error: unknown type name 'Bytef'
(const Bytef *) src, src_size);
^
ZLib.cpp:173:18: error: no member named 'uncompress' in the global namespace; did you mean simply 'uncompress'?
uncomp_ret = ::uncompress((Bytef *) _out_buf, &zlib_out_size,
^~~~~~~~~~~~
uncompress
ZLib.cpp:150:12: note: 'uncompress' declared here
void ZLib::uncompress(const char *src, unsigned int src_size,
^
ZLib.cpp:176:23: error: use of undeclared identifier 'Z_OK'
if (uncomp_ret != Z_OK) // Fehler beim Dekomprimieren
^
ZLib.cpp:179:27: error: use of undeclared identifier 'Z_BUF_ERROR'
if (uncomp_ret == Z_BUF_ERROR) {
^
1 warning and 16 errors generated.
make[3]: *** [libdls_la-ZLib.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Digging a bit more I found that I could try to add
#include <string>
#include <cstring>
to the header zlib.h but this does not work either.
What else can I do to solve this issue?.

How to fix **__attribute__(( packed ))** error

I cloned a copy of feng multimedia server, after running autoreconf -i in its directory, a configure script was created, but when I run this script, it gets stuck and exit with the following error:
checking if gcc -std=gnu99 supports __attribute__(( packed ))... no
configure: error: unable to find how the compiler declares packed structures
Any idea of how I can fix such a problem ?
Output of gcc --verbose :
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)
Output of the config.log file:
| }
configure:7344: result: no
configure:7355: WARNING: POSIX realtime features not available
configure:7363: checking if gcc -std=gnu99 supports __attribute__(( packed ))
configure:7385: gcc -std=gnu99 -c -g -O2 -Wall -Wwrite-strings -fdiagnostics-show-option -Wformat=2 -Werror=implicit-function-declaration -Werror=return-type -DNDEBUG $
conftest.c:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'm4_ifnblank'
conftest.c:33:3: error: invalid preprocessing directive #Check
conftest.c:35: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'enableval'
conftest.c:36: error: expected identifier or '(' before 'else'
conftest.c:41:3: error: invalid preprocessing directive #Check
conftest.c:43: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'enableval'
conftest.c:47: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'if'
conftest.c:50: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'cat'
conftest.c:50: error: stray '\' in program
cc1: warnings being treated as errors
conftest.c:54: error: empty declaration
conftest.c:55: error: invalid application of 'sizeof' to incomplete type 'struct astructure'
conftest.c:55: error: size of array 'assert' is negative
configure:7392: $? = 1
configure: failed program was:
| /* confdefs.h. */
//...........OUTPUT TRIMMED.............//
#define _TANDEM_SOURCE 1
#define HAVE_LIBEV 1
_ACEOF
m4_ifnblank(, )
else
m4_ifnblank(AC_MSG_ERROR([libev not found, feng requires libev]), AC_MSG_ERROR([libev not found, feng requires libev]))
fi
# Check whether --enable-trace was given.
if test "${enable_trace+set}" = set; then
enableval=$enable_trace;
else
enable_trace="no"
fi
# Check whether --enable-tables was given.
if test "${enable_tables+set}" = set; then
enableval=$enable_tables;
fi
if test "x$enable_tables" = "xno"; then
cat >>confdefs.h <<\_ACEOF
#define AVOID_TABLES 1
#define HAVE_DECL_STRERROR_R 0
configure: exit 1

Error installing pygraphviz 1.2 on Mac OS X 10.9 (missing library)

I'm using Mac OS X 10.9. I have already installed graphviz 2.36.0.
After downloading pygraphviz 1.2, I modified in setup.py the variables "library_path" and "include_path":
library_path='/usr/local/lib/graphviz'
include_path='/usr/local/include/graphviz'
When I try to install graphviz with python setup.py install, I get the following message:
library_path=/usr/local/lib/graphviz
include_path=/usr/local/include/graphviz
running install
running build
running build_py
running build_ext
building 'pygraphviz._graphviz' extension
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/usr/local/include/graphviz -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pygraphviz/graphviz_wrap.c -o build/temp.macosx-10.9-intel-2.7/pygraphviz/graphviz_wrap.o
pygraphviz/graphviz_wrap.c:2040:11: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign]
res = SWIG_AddCast(res);
~~~ ^ ~~~
pygraphviz/graphviz_wrap.c:2043:11: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign]
res = SWIG_AddCast(res);
~~~ ^ ~~~
pygraphviz/graphviz_wrap.c:2829:15: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
len = strlen(val);
~ ^~~~~~~~~~~
pygraphviz/graphviz_wrap.c:2855:12: warning: incompatible pointer to integer conversion returning 'Agsym_t *' (aka 'struct Agsym_s *') from a function with result type 'int' [-Wint-conversion]
return agattr(g, kind, name, val);
^~~~~~~~~~~~~~~~~~~~~~~~~~
pygraphviz/graphviz_wrap.c:2847:15: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
len = strlen(val);
~ ^~~~~~~~~~~
pygraphviz/graphviz_wrap.c:4806:14: warning: explicitly assigning a variable of type 'void *' to itself [-Wself-assign]
clientdata = clientdata;
~~~~~~~~~~ ^ ~~~~~~~~~~
6 warnings generated.
pygraphviz/graphviz_wrap.c:2040:11: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign]
res = SWIG_AddCast(res);
~~~ ^ ~~~
pygraphviz/graphviz_wrap.c:2043:11: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign]
res = SWIG_AddCast(res);
~~~ ^ ~~~
pygraphviz/graphviz_wrap.c:2855:12: warning: incompatible pointer to integer conversion returning 'Agsym_t *' (aka 'struct Agsym_s *') from a function with result type 'int' [-Wint-conversion]
return agattr(g, kind, name, val);
^~~~~~~~~~~~~~~~~~~~~~~~~~
pygraphviz/graphviz_wrap.c:4806:14: warning: explicitly assigning a variable of type 'void *' to itself [-Wself-assign]
clientdata = clientdata;
~~~~~~~~~~ ^ ~~~~~~~~~~
4 warnings generated.
cc -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. build/temp.macosx-10.9-intel-2.7/pygraphviz/graphviz_wrap.o -L/usr/local/lib/graphviz -L/usr/local/lib/graphviz -lcgraph -lcdt -o build/lib.macosx-10.9-intel-2.7/pygraphviz/_graphviz.so
ld: library not found for -lcgraph
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'cc' failed with exit status 1
Does anybody know how I can fix this?
Make sure your XCode is updated to the latest version and then try this:
xcode-select --install
When prompted install the command line tools. Then try rebuilding.

Florist install Ada

Tried to install Florist on this video but the installation process after ./Configure --prefix=/usr/gnat
I have not gone
checking how to run the C preprocessor ... /lib/cpp
checking for aio.h. .. no
checking for dirent.h ... no
checking for errno.h ... no
checking for fcntl.h ... no
checking for grp.h. .. no
checking for locale.h ... no
checking for mqueue.h ... no
...
Socket interface Looks like BSD 4.3
checking for getaddrinfo ... no
configure: WARNING: No getaddrinfo provided by the OS. Will use our own version.
checking for pthread_self in-lpthread ... yes
checking for aio_read in-laio ... no
checking for clock_gettime in-lposix4 ... no
checking for clock_gettime in-lrt ... yes
checking for gethostbyname in-lnsl ... yes
checking for t_bind in-lnsl ... no
checking for t_bind in-lnsl_s ... no
checking for accept in-lsocket ... no
checking for h_errno in-lresolv ... no
using LIBS =-lnsl-lrt-lpthread
checking for egrep ... grep-E
In general, all 'no'
what's the catch?
GNAT and florist ( 2013 )
if you continue, then take off the following errors
ebanat#ebanat:~/Program/florist$ make -j 4
gcc -c -O2 posix-macros.c
gcc -c -O2 posix-macros-sockets.c
gcc -O2 -DVERSION="\"Florist-2013 (20130319)\"" -DLIBS="\"-lnsl -lrt -lpthread \"" -o c-posix c-posix.c -lnsl -lrt -lpthread
gnatprep posix-implementation.gpb posix-implementation.adb gnatprep.config -c -r
In file included from pconfig.h:10:0,
from posix-macros-sockets.c:13:
addrinfo.h:18:3: error: unknown type name 'size_t'
addrinfo.h:43:42: error: unknown type name 'size_t'
addrinfo.h:43:58: error: unknown type name 'size_t'
addrinfo.h:44:46: error: unknown type name 'size_t'
In file included from pconfig.h:10:0,
from c-posix.c:56:
addrinfo.h:18:3: error: unknown type name 'size_t'
In file included from pconfig.h:10:0,
from posix-macros.c:45:
addrinfo.h:18:3: error: unknown type name 'size_t'
addrinfo.h:43:42: error: unknown type name 'size_t'
addrinfo.h:43:58: error: unknown type name 'size_t'
addrinfo.h:44:46: error: unknown type name 'size_t'
addrinfo.h:43:42: error: unknown type name 'size_t'
addrinfo.h:43:58: error: unknown type name 'size_t'
addrinfo.h:44:46: error: unknown type name 'size_t'
In file included from /usr/include/errno.h:29:0,
from c-posix.c:57:
/usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory
compilation terminated.
In file included from /usr/include/unistd.h:26:0,
from posix-macros.c:46:
/usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory
compilation terminated.
make: *** [posix-macros-sockets.o] Ошибка 1
make: *** Ожидание завершения заданий...
make: *** [c-posix] Ошибка 1
make: *** [posix-macros.o] Ошибка 1

can't install apt on macports

THe following error appears
:info:build Compiling contrib/hashes.cc to /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_apt/work/apt-0.5.27/build/obj/apt-pkg/hashes.opic
:info:build Compiling depcache.cc to /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_apt/work/apt-0.5.27/build/obj/apt-pkg/depcache.opic
:info:build contrib/hashes.cc: In member function 'bool Hashes::AddFD(int, long unsigned int)':
:info:build contrib/hashes.cc:33: error: expected primary-expression before '?' token
:info:build contrib/hashes.cc:33: error: expected `:' before ')' token
:info:build contrib/hashes.cc:33: error: expected primary-expression before ')' token
:info:build contrib/hashes.cc:34: error: expected primary-expression before '?' token
:info:build contrib/hashes.cc:34: error: expected `:' before ')' token
:info:build contrib/hashes.cc:34: error: expected primary-expression before ')' token
:info:build gnumake[2]: *** [/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_apt/work/apt-0.5.27/build/obj/apt-pkg/hashes.opic] Error 1
:info:build gnumake[2]: *** Waiting for unfinished jobs....
:info:build contrib/md5.cc: In member function 'bool MD5Summation::AddFD(int, long unsigned int)':
:info:build contrib/md5.cc:302: error: expected primary-expression before '?' token
:info:build contrib/md5.cc:302: error: expected `:' before ')' token
:info:build contrib/md5.cc:302: error: expected primary-expression before ')' token
:info:build contrib/md5.cc:303: error: expected primary-expression before '?' token
:info:build contrib/md5.cc:303: error: expected `:' before ')' token
:info:build contrib/md5.cc:303: error: expected primary-expression before ')' token
:info:build contrib/sha1.cc: In member function 'bool SHA1Summation::AddFD(int, long unsigned int)':
:info:build contrib/sha1.cc:348: error: expected primary-expression before '?' token
:info:build contrib/sha1.cc:348: error: expected `:' before ')' token
:info:build contrib/sha1.cc:348: error: expected primary-expression before ')' token
:info:build contrib/sha1.cc:349: error: expected primary-expression before '?' token
:info:build contrib/sha1.cc:349: error: expected `:' before ')' token
:info:build contrib/sha1.cc:349: error: expected primary-expression before ')' token
:info:build gnumake[2]: *** [/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_apt/work/apt-0.5.27/build/obj/apt-pkg/md5.opic] Error 1
:info:build gnumake[2]: *** [/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_apt/work/apt-0.5.27/build/obj/apt-pkg/sha1.opic] Error 1
:info:build gnumake[1]: *** [all] Error 2
:info:build gnumake: *** [all] Error 2
:info:build shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_apt/work/apt-0.5.27/build" && /usr/bin/gnumake -j2 all " returned error 2
:error:build Target org.macports.build returned: shell command failed
:debug:build Backtrace: shell command failed
while executing
"command_exec build"
(procedure "portbuild::build_main" line 8)
invoked from within
"$procedure $targetname"
:info:build Warning: the following items did not execute (for apt): org.macports.activate org.macports.build org.macports.destroot org.macports.install
:notice:build Log for apt is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_apt/main.log
I'm using Mac OS 10.6. Any idea?

Resources