Understanding the gibberish error when compiling LLVM from source - gcc

Here are the things I did,
Compiled and installed gcc-9.2.
Compiled and installed GNU binutils-2.32
Compiled and installed GNU Make-4.2
I downloaded the source codes for LLVM, Clang, LLD, libcxx, libcxxabi, lldb, polly, openmp and compiler-rt from the LLVM site (for version 8.0.1).
I proceeded to compile LLVM alongwith the above projects.
During compilation I get some gibberish errors. I reproduce a part of the output below :
In file included from /data/stars/user/uujjwal/collection-stars/gcc-9.2/include/c++/9.2.0/iomanip:43,
from /tmp/llvm/llvm/utils/PerfectShuffle/PerfectShuffle.cpp:19:
/usr/bin/locale:112:4: error: stray ‘\10’ in program
/usr/bin/locale:112:12: error: stray ‘\30’ in program
/usr/bin/locale:112:20: error: stray ‘\302’ in program
/usr/bin/locale:112:24: error: stray ‘\1’ in program
/usr/bin/locale:112:28: error: stray ‘\6’ in program
/usr/bin/locale:112:37: error: stray ‘\27’ in program
/usr/bin/locale:112:38: error: stray ‘#’ in program
/usr/bin/locale:112:45: error: stray ‘\27’ in program
/usr/bin/locale:112:52: error: stray ‘\32’ in program
/usr/bin/locale:112:68: error: stray ‘\4’ in program
/usr/bin/locale:112:84: error: stray ‘\315’ in program
/usr/bin/locale:112:88: error: stray ‘\1’ in program
/usr/bin/locale:112:92: error: stray ‘\6’ in program
/usr/bin/locale:112:100: error: stray ‘\220’ in program
/usr/bin/locale:112:101: error: stray ‘\27’ in program
/usr/bin/locale:112:102: error: stray ‘#’ in program
/usr/bin/locale:112:108: error: stray ‘\220’ in program
/usr/bin/locale:112:109: error: stray ‘\27’ in program
/usr/bin/locale:112:117: error: stray ‘\4’ in program
/usr/bin/locale:112:132: error: stray ‘\20’ in program
/usr/bin/locale:112:140: error: stray ‘\20’ in program
/usr/bin/locale:112:148: error: stray ‘\340’ in program
/usr/bin/locale:112:152: error: stray ‘\1’ in program
/usr/bin/locale:112:156: error: stray ‘\6’ in program
/usr/bin/locale:112:165: error: stray ‘\34’ in program
/usr/bin/locale:112:166: error: stray ‘#’ in program
/usr/bin/locale:112:173: error: stray ‘\34’ in program
/usr/bin/locale:112:180: error: stray ‘\362’ in program
/usr/bin/locale:112:196: error: stray ‘\20’ in program
/usr/bin/locale:112:216: error: stray ‘\1’ in program
/usr/bin/locale:112:220: error: stray ‘\6’ in program
/usr/bin/locale:112:228: error: stray ‘\364’ in program
/usr/bin/locale:112:230: error: stray ‘#’ in program
/usr/bin/locale:112:236: error: stray ‘\364’ in program
/usr/bin/locale:112:260: error: stray ‘\4’ in program
/usr/bin/locale:112:276: error: stray ‘\7’ in program
/usr/bin/locale:112:280: error: stray ‘\1’ in program
/usr/bin/locale:112:284: error: stray ‘\2’ in program
/usr/bin/locale:112:294: error: stray ‘#’ in program
/usr/bin/locale:112:308: error: stray ‘\331’ in program
/usr/bin/locale:112:309: error: stray ‘\25’ in program
/usr/bin/locale:112:340: error: stray ‘\247’ in program
/usr/bin/locale:112:344: error: stray ‘\1’ in program
/usr/bin/locale:112:348: error: stray ‘\2’ in program
/usr/bin/locale:112:356: error: stray ‘\334’ in program
/usr/bin/locale:112:358: error: stray ‘#’ in program
/usr/bin/locale:112:364: error: stray ‘\334’ in program
/usr/bin/locale:112:373: error: stray ‘\1’ in program
/usr/bin/locale:112:388: error: stray ‘\4’ in program
/usr/bin/locale:112:408: error: stray ‘\1’ in program
/usr/bin/locale:112:412: error: stray ‘\2’ in program
/usr/bin/locale:112:420: error: stray ‘\20’ in program
/usr/bin/locale:112:422: error: stray ‘#’ in program
/usr/bin/locale:112:428: error: stray ‘\20’ in program
/usr/bin/locale:112:436: error: stray ‘\354’ in program
/usr/bin/locale:112:437: error: stray ‘\6’ in program
/usr/bin/locale:112:452: error: stray ‘\10’ in program
/usr/bin/locale:112:468: error: stray ‘\362’ in program
/usr/bin/locale:112:472: error: stray ‘\16’ in program
/usr/bin/locale:112:476: error: stray ‘\3’ in program
/usr/bin/locale:112:486: error: stray ‘`’ in program
/usr/bin/locale:112:500: error: stray ‘\10’ in program
/usr/bin/locale:112:516: error: stray ‘\10’ in program
/usr/bin/locale:112:532: error: stray ‘\346’ in program
/usr/bin/locale:112:536: error: stray ‘\17’ in program
/usr/bin/locale:112:540: error: stray ‘\3’ in program
/usr/bin/locale:112:548: error: stray ‘\10’ in program
/usr/bin/locale:112:550: error: stray ‘`’ in program
/usr/bin/locale:112:556: error: stray ‘\10’ in program
/usr/bin/locale:112:564: error: stray ‘\10’ in program
/usr/bin/locale:112:580: error: stray ‘\10’ in program
/usr/bin/locale:112:596: error: stray ‘\242’ in program
/usr/bin/locale:112:600: error: stray ‘\1’ in program
/usr/bin/locale:112:604: error: stray ‘\3’ in program
/usr/bin/locale:112:612: error: stray ‘\20’ in program
/usr/bin/locale:112:614: error: stray ‘`’ in program
/usr/bin/locale:112:620: error: stray ‘\20’ in program
/usr/bin/locale:112:628: error: stray ‘\10’ in program
/usr/bin/locale:112:644: error: stray ‘\10’ in program
/usr/bin/locale:112:660: error: stray ‘\31’ in program
/usr/bin/locale:112:664: error: stray ‘\6’ in program
/usr/bin/locale:112:668: error: stray ‘\3’ in program
/usr/bin/locale:112:676: error: stray ‘\30’ in program
/usr/bin/locale:112:678: error: stray ‘`’ in program
/usr/bin/locale:112:684: error: stray ‘\30’ in program
/usr/bin/locale:112:692: error: stray ‘\340’ in program
/usr/bin/locale:112:693: error: stray ‘\1’ in program
/usr/bin/locale:112:700: error: stray ‘\7’ in program
/usr/bin/locale:112:708: error: stray ‘\10’ in program
/usr/bin/locale:112:716: error: stray ‘\20’ in program
/usr/bin/locale:112:724: error: stray ‘\333’ in program
/usr/bin/locale:112:728: error: stray ‘\1’ in program
/usr/bin/locale:112:732: error: stray ‘\3’ in program
/usr/bin/locale:112:740: error: stray ‘\370’ in program
/usr/bin/locale:112:742: error: stray ‘`’ in program
/usr/bin/locale:112:748: error: stray ‘\370’ in program
/usr/bin/locale:112:756: error: stray ‘\10’ in program
/usr/bin/locale:112:772: error: stray ‘\10’ in program
/usr/bin/locale:112:780: error: stray ‘\10’ in program
/usr/bin/locale:112:788: error: stray ‘\322’ in program
/usr/bin/locale:112:792: error: stray ‘\1’ in program
/usr/bin/locale:112:796: error: stray ‘\3’ in program
/usr/bin/locale:112:806: error: stray ‘`’ in program
/usr/bin/locale:112:821: error: stray ‘\2’ in program
/usr/bin/locale:112:836: error: stray ‘\10’ in program
/usr/bin/locale:112:844: error: stray ‘\10’ in program
/usr/bin/locale:112:852: error: stray ‘\1’ in program
/usr/bin/locale:112:856: error: stray ‘\1’ in program
/usr/bin/locale:112:860: error: stray ‘\3’ in program
/usr/bin/locale:112:868: error: stray ‘`’ in program
/usr/bin/locale:112:870: error: stray ‘`’ in program
/usr/bin/locale:112:876: error: stray ‘`’ in program
/usr/bin/locale:112:885: error: stray ‘\34’ in program
/usr/bin/locale:112:916: error: stray ‘\275’ in program
/usr/bin/locale:112:920: error: stray ‘\10’ in program
/usr/bin/locale:112:924: error: stray ‘\3’ in program
/usr/bin/locale:112:932: error: stray ‘\320’ in program
/usr/bin/locale:112:933: error: stray ‘\216’ in program
/usr/bin/locale:112:934: error: stray ‘`’ in program
/usr/bin/locale:112:940: error: stray ‘\304’ in program
/usr/bin/locale:112:941: error: stray ‘\216’ in program
/usr/bin/locale:112:964: error: stray ‘\20’ in program
/usr/bin/locale:112:984: error: stray ‘\1’ in program
/usr/bin/locale:112:1004: error: stray ‘\304’ in program
/usr/bin/locale:112:1005: error: stray ‘\216’ in program
/usr/bin/locale:112:1012: error: stray ‘\24’ in program
/usr/bin/locale:112:1028: error: stray ‘\4’ in program
/usr/bin/locale:112:1044: error: stray ‘\17’ in program
/usr/bin/locale:112:1048: error: stray ‘\3’ in program
/usr/bin/locale:112:1068: error: stray ‘\330’ in program
/usr/bin/locale:112:1069: error: stray ‘\216’ in program
/usr/bin/locale:112:1076: error: stray ‘\376’ in program
/usr/bin/locale:112:1092: error: stray ‘\1’ in program
In file included from /data/stars/user/uujjwal/collection-stars/gcc-9.2/include/c++/9.2.0/iomanip:43,
from /tmp/llvm/llvm/utils/PerfectShuffle/PerfectShuffle.cpp:19:
/usr/bin/locale:4:109: error: ‘t’ does not name a type; did you mean ‘tm’?
4 | pp`
xp`
�p` �p` �p` �p` �p` �p` �p` �p` �p` �p` �p` �p` �p` �p` �p` �p` D q` q` q` q` q` (q` ! 0q` " 8q` # #q` $ Hq` % Pq` & Xq` ' `q` ( hq` ) pq` * xq` + �q` , �q` - �q` J �q` . �q` / �q` G �q` 0 �q` 1 �q` 2 �q` 3 �q` 4 �q` 5 �q` 6 �q` 7 �q` 8 �q` 9 r` : r` ; r` < r` = r` > (r` ? 0r` # 8r` A #r` B H�H��X H��t�� H�� �5rX �%tX # �%rX h ������%jX h ������%bX h ������%ZX h ������%RX h ������%JX h ������%BX h ������%:X h �p����%2X �`����%*X h �P����%"X h
| ^
| tm
In file included from /data/stars/user/uujjwal/collection-stars/gcc-9.2/include/c++/9.2.0/iomanip:43,
from /tmp/llvm/llvm/utils/PerfectShuffle/PerfectShuffle.cpp:19:
/usr/bin/locale:5:721: error: ‘libc’ does not name a type
5 | �#����%X h
�0����%X h
� ����%
| ^
In file included from /data/stars/user/uujjwal/collection-stars/gcc-9.2/include/c++/9.2.0/iomanip:43,
from /tmp/llvm/llvm/utils/PerfectShuffle/PerfectShuffle.cpp:19:
/usr/bin/locale:12:234: error: expected unqualified-id before numeric constant
12 | []A\A]�����D D�j E���� 1��{~C� �;��w���H��tH�5�i H�������H�5�i �; �������C��9�ŋ;��<���H��tH�5`i H�������D� �i E���X���H�5Ai �" �7����B���f��?������ si H�Ņ��( H�������E �������L# ��<E�1�����������D �?�����H��H���E H�������A�ċi ���� A���* A�D$�A�����H�\f��E ��L# <��AD�1�H���s���H9�u���������<E�H���L# 1�[]A\A]�H���� �?����H�ŋ�h ��u����� H�[]A\A]�D H���L# 1�� �������# H���L# 1�������7��� H���L# 1����������� H�1���L# ��������� H�1���L# ���������� H���L# 1����������� E1������E��D u
| ^
In file included from /data/stars/user/uujjwal/collection-stars/gcc-9.2/include/c++/9.2.0/iomanip:43,
from /tmp/llvm/llvm/utils/PerfectShuffle/PerfectShuffle.cpp:19:
/usr/bin/locale:16:279: error: expected declaration before ‘}’ token
16 | �� I�WH����u fD H��H����� �DV t�� �SH��H�0�f� H���H���DF u���tr�CH�K��u�-# H�����tH���DV t�<
| ^
/usr/bin/locale:16:282: error: ‘H’ does not name a type
16 | �� I�WH����u fD H��H����� �DV t�� �SH��H�0�f� H���H���DF u���tr�CH�K��u�-# H�����tH���DV t�<
| ^
/usr/bin/locale:16:316: error: expected declaration before ‘}’ token
16 | �� I�WH����u fD H��H����� �DV t�� �SH��H�0�f� H���H���DF u���tr�CH�K��u�-# H�����tH���DV t�<
| ^
/usr/bin/locale:16:319: error: ‘u4’ does not name a type
16 | �� I�WH����u fD H��H����� �DV t�� �SH��H�0�f� H���H���DF u���tr�CH�K��u�-# H�����tH���DV t�<
| ^
/usr/bin/locale:16:355: error: ‘H’ does not name a type
16 | �� I�WH����u fD H��H����� �DV t�� �SH��H�0�f� H���H���DF u���tr�CH�K��u�-# H�����tH���DV t�<
| ^
/usr/bin/locale:16:398: error: ‘M’ does not name a type
16 | �� I�WH����u fD H��H����� �DV t�� �SH��H�0�f� H���H���DF u���tr�CH�K��u�-# H�����tH���DV t�<
| ^
/usr/bin/locale:16:412: error: ‘u’ does not name a type
16 | �� I�WH����u fD H��H����� �DV t�� �SH��H�0�f� H���H���DF u���tr�CH�K��u�-# H�����tH���DV t�<
| ^
/usr/bin/locale:19:70: error: expected declaration before ‘}’ token
19 | H�������H��t�A�$�����L������L������� ƅ����
| ^
/usr/bin/locale:19:74: error: expected unqualified-id before numeric constant
19 | H�������H��t�A�$�����L������L������� ƅ����
| ^
make[2]: *** [utils/PerfectShuffle/CMakeFiles/llvm-PerfectShuffle.dir/build.make:63: utils/PerfectShuffle/CMakeFiles/llvm-PerfectShuffle.dir/PerfectShuffle.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:20749: utils/PerfectShuffle/CMakeFiles/llvm-PerfectShuffle.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
The output of locale is as below :
(base) -bash-4.2$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
I am unable to understand exactly, why I am getting this sort of error. I have searched hard but cannot find absolutely anything on it. To the best of my knowledge, this kind of problem comes owing to gibberish symbols in a code. Considering that it is a stable release of LLVM, I hope that is not the case. Could someone help ?

I had the exact same error.
Turns out an export typo in my ~/.zshrc was the cause
export CPATH=<some_stuff>:$PATH // <---- TYPO

Make sure you include the right locale file which is a C source located in /usr/inlcude/c++/7, in your case, you may wrongly include the locale executable.

Related

Installing eggs in Chicken Scheme

In MSYS2, I tried to intall a Chicken egg with::
chicken-install http-client
I get several errors like the following:
"c:\msys64\usr\local\bin\csc" -feature compiling-extension -setup-mode mathh.scm -shared -optimize-leaf-routines -inline -output-file mathh.so -emit-import-library mathh -emit-type-file mathh.types -local -no-procedure-checks
mathh.c:24:1: error: static declaration of 'log2' follows non-static declaration
log2( double x )
^~~~
In file included from c:/msys64/usr/local/include/chicken/chicken.h:131:0,
from mathh.c:11:
C:/msys64/mingw64/x86_64-w64-mingw32/include/math.h:773:25: note: previous declaration of 'log2' was here
extern double __cdecl log2 (double);
^~~~
mathh.c:41:1: error: static declaration of 'log1p' follows non-static declaration
log1p( double x )
^~~~~
Edit
The dependency:
chicken-install mathh
gives:
...
mathh.c: In function 'stub181':
mathh.c:357:19: warning: implicit declaration of function 'mm_hypot'; did you mean '_hypot'? [-Wimplicit-function-declaration]
C_r=C_flonum(&C_a,mm_hypot(t0,t1));
^~~~~~~~
_hypot
mathh.o:mathh.c:(.text+0x177f): undefined reference to `mm_hypot'
collect2.exe: error: ld returned 1 exit status
Error: shell command terminated with non-zero exit status 1: ""gcc" "mathh.o" -o "mathh.so" -Wl,--enable-auto-import -shared -Lc:\msys64\usr\local\lib\ -lchicken -lm -lws2_32"
Error: shell command failed with nonzero exit status 1:
""c:\msys64\usr\local\bin\csc" -feature compiling-extension -setup-mode mathh.scm -shared -optimize-leaf-routines -inline -output-file mathh.so -emit-import-library mathh -emit-type-file mathh.types -local -no-procedure-checks"
Error: shell command terminated with nonzero exit code
70
"\"\"c:\\msys64\\usr\\local\\bin\\csi\" -bnq -setup-mode -e \"(require-lib...
Edit
Fix proposed by #krl:
msys2_shell.cmd -mingw64 # see http://wiki.call-cc.org/msys2
export CHICKEN_PREFIX="c:\msys64\usr\local\\"
export CHICKEN_REPOSITORY="c:\msys64\usr\local\lib\chicken\8\\"
chicken-install -retrieve mathh
sed -i.bak -r 's/define +mathh-compile-options.+\(/&\n -C -mwin32/' ./mathh/mathh.setup
chicken-install test
chicken-install -test -transport local -location . mathh
That still gives the following errors:
...
installing mathh: ...
changing current directory to C:\msys64\home\user\.\mathh
""c:\msys64\usr\local\bin\csi" -bnq -setup-mode -e "(require-library setup-api)" -e "(import setup-api)" -e "(setup-error-handling)" -e "(extension-name-and-version '(\"mathh\" \"\"))" "mathh.setup""
"c:\msys64\usr\local\bin\csc" -feature compiling-extension -setup-mode mathh.scm -shared -optimize-leaf-routines -inline -output-file mathh.so -emit-import-library mathh -emit-type-file mathh.types -local -no-procedure-checks
mathh.c:29:1: error: static declaration of 'log2' follows non-static declaration
log2( double x )
^~~~
In file included from c:/msys64/usr/local/include/chicken/chicken.h:131:0,
from mathh.c:11:
C:/msys64/mingw64/x86_64-w64-mingw32/include/math.h:773:25: note: previous declaration of 'log2' was here
extern double __cdecl log2 (double);
^~~~
... further errors like above
It looks like this is a bug in the mathh egg. I've asked its author to take a look and he's published a new version. Can you try again?
from http://www.davidegrayson.com/windev/msys2/ it appears the MSYS2 -mwin32 gcc option is needed to define _WIN32. mathh uses defined(_WIN32) to trigger expansion of the q&d implementations of log2, etc. for windows.
the mathh egg mathh.setup file can be modified to supply compile-options. see the definition of mathh-compile-options in mathh.setup.
ex: (define mathh-compile-options '(-local -no-procedure-checks -mwin32))
I've just released http-client version 0.16 where I ripped out the overly complex md5 dependency, and replaced it with the new simple-md5 egg.
This should be much easier to install. It should appear on the egg mirrors shortly.

MAC OSX10.11.4 python3 import theano error

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...

error: expected ‘,’ or ‘;’ before ‘__attribute_alloc_size__’

I am using a x64 cpu and trying to build a cross compiler, when making this command below some error comes:
export PATH=/home/me/lab1/crossgcc2/bin:$PATH
/home/me/lab1/gcc-5.1.0/configure \
--prefix=/home/me/lab1/crossgcc2 \
--target=arm-unknown-linux-gnueabihf \
--enable-languages=c \
--with-sysroot=/home/eric/lab1/sysroot \
--with-tune=cortex-a9 --with-float=hard
make
error message:
In file included from /home/fly/lab1/gcc-5.1.0/libgcc/../gcc/tsystem.h:101:0,
from /home/fly/lab1/gcc-5.1.0/libgcc/libgcc2.c:27:
/home/fly/lab1/sysroot/usr/include/stdlib.h:510:35: error: expected ‘,’ or ‘;’ before ‘__attribute_alloc_size__’
__THROW __attribute_malloc__ __attribute_alloc_size__ ((2)) __wur;
^
In file included from /home/fly/lab1/gcc-5.1.0/libgcc/../gcc/tsystem.h:108:0,
from /home/fly/lab1/gcc-5.1.0/libgcc/libgcc2.c:27:
/home/fly/lab1/sysroot/usr/include/time.h:123:5: error: unknown type name ‘__syscall_slong_t’
__syscall_slong_t tv_nsec; /* Nanoseconds. */
can anybody tell me what's wrong please? Thanks

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

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