GithubHelp home page GithubHelp logo

falcon's People

Contributors

arne-cl avatar hydrogen18 avatar iskandr avatar kotnik avatar rjpower avatar tyilo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

falcon's Issues

Overly-aggressive optimization at module level

Running pystone with optimizations enabled causes it to prune too much of the program and results in it not actually running the benchmark. I'm guessing that LOAD/STORE_NAME are being treated improperly.

power kermit:/tmp/falcon-master [10520]% PYTHONPATH=src/ python -mfalcon benchmarks/pystone.py              
I 0.000 [ 9819] ../../src/falcon/rcompile.cc:888 COMPILED code, 36 registers, 113 operations, 155 stack ops.
I 0.000 [ 9819] ../../src/falcon/rcompile.cc:888 COMPILED Record, 5 registers, 8 operations, 15 stack ops.
power kermit:/tmp/falcon-master [10521]% DISABLE_OPT=1 PYTHONPATH=src/ python -mfalcon benchmarks/pystone.py
I 0.000 [ 9820] ../../src/falcon/rcompile.cc:888 COMPILED code, 97 registers, 113 operations, 155 stack ops.
I 0.000 [ 9820] ../../src/falcon/rcompile.cc:888 COMPILED Record, 8 registers, 8 operations, 15 stack ops.
I 0.000 [ 9820] ../../src/falcon/rcompile.cc:888 COMPILED main, 14 registers, 15 operations, 21 stack ops.
I 0.000 [ 9820] ../../src/falcon/rcompile.cc:888 COMPILED pystones, 4 registers, 3 operations, 4 stack ops.
I 0.001 [ 9820] ../../src/falcon/rcompile.cc:888 COMPILED Proc0, 105 registers, 120 operations, 182 stack ops.
I 0.002 [ 9820] ../../src/falcon/rcompile.cc:888 COMPILED Proc5, 3 registers, 4 operations, 6 stack ops.
I 0.002 [ 9820] ../../src/falcon/rcompile.cc:888 COMPILED Proc4, 7 registers, 10 operations, 12 stack ops.
I 0.002 [ 9820] ../../src/falcon/rcompile.cc:888 COMPILED Func2, 28 registers, 33 operations, 60 stack ops.
I 0.002 [ 9820] ../../src/falcon/rcompile.cc:888 COMPILED Func1, 8 registers, 8 operations, 14 stack ops.
I 0.002 [ 9820] ../../src/falcon/rcompile.cc:888 COMPILED Proc7, 8 registers, 5 operations, 10 stack ops.
I 0.002 [ 9820] ../../src/falcon/rcompile.cc:888 COMPILED Proc8, 31 registers, 30 operations, 70 stack ops.
I 0.002 [ 9820] ../../src/falcon/rcompile.cc:888 COMPILED Proc1, 27 registers, 37 operations, 59 stack ops.
I 0.002 [ 9820] ../../src/falcon/rcompile.cc:888 COMPILED copy, 9 registers, 8 operations, 13 stack ops.
I 0.002 [ 9820] ../../src/falcon/rcompile.cc:888 COMPILED Proc3, 12 registers, 15 operations, 18 stack ops.
I 0.002 [ 9820] ../../src/falcon/rcompile.cc:888 COMPILED Proc6, 24 registers, 42 operations, 51 stack ops.
I 0.002 [ 9820] ../../src/falcon/rcompile.cc:888 COMPILED Func3, 7 registers, 8 operations, 10 stack ops.
I 0.003 [ 9820] ../../src/falcon/rcompile.cc:888 COMPILED Proc2, 16 registers, 17 operations, 29 stack ops.
Pystone(1.1) time for 50000 passes = 0.19
This machine benchmarks at 263158 pystones/second
power kermit:/tmp/falcon-master [10522]% 

Install errors

Hi There,

I am trying to install falcon and it appears that I am missing some development tools, and I am getting gcc errors.

Are you able to please tell me what are all the requirements for installing falcon using pip.

EG:
running develop
running egg_info
writing src/falcon.egg-info/PKG-INFO
writing top-level names to src/falcon.egg-info/top_level.txt
writing dependency_links to src/falcon.egg-info/dependency_links.txt
reading manifest file 'src/falcon.egg-info/SOURCES.txt'
writing manifest file 'src/falcon.egg-info/SOURCES.txt'
running build_ext
building '_falcon_core' extension
swigging src/falcon/rmodule.i to src/falcon/rmodule_wrap.cpp
swig -python -Isrc -modern -O -c++ -w312,509 -o src/falcon/rmodule_wrap.cpp src/falcon/rmodule.i
src/falcon/reval.h:49: Warning(389): operator[] ignored (consider using %extend)
src/falcon/reval.h:114: Warning(451): Setting a const char * variable may leak memory.
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/usr/kerberos/include -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I./src -I/usr/include/python2.6 -c src/falcon/rexcept.cc -o build/temp.linux-x86_64-2.6/src/falcon/rexcept.o -fno-gcse -fno-crossjumping -ggdb2 -std=c++0x -Isrc/sparsehash-2.0.2/src
cc1plus: error: unrecognized command line option "-std=c++0x"
error: command 'gcc' failed with exit status 1

ERROR in install

Hi,
I have Ubuntu Ubuntu 12.04.2 x64. The problem is:

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I./src -I/usr/include/python2.7 -c src/falcon/reval.cc -o build/temp.linux-i686-2.7/src/falcon/reval.o -fno-gcse -fno-crossjumping -ggdb2 -std=c++0x -Isrc/sparsehash-2.0.2/src
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
In file included from src/falcon/reval.cc:11:0:
src/falcon/reval.h:9:33: fatal error: boost/noncopyable.hpp: Nie ma takiego pliku ani katalogu (There is no such a file or folder)
compilation terminated.

Can you help me with tahat?

Decorator crashes with simple python function

running the following code:

import falcon

print 0

@falcon.wrap
def my_function(l):
    su = 0
    for li in l:
        su += li
    return su

if __name__ == "__main__":
    l = range(35)
    print my_function(l)

gives the following output:

$ python myscript.py
0
I 0.000 [13344] src/falcon/rcompile.cc:1751 COMPILED my_function, 7 registers, 6 operations, 15 stack ops.
F 0.000 [13344] src/falcon/reval.cc:315 Keywords not supported.
Abort trap: 6

if you comment out the decorator, the function runs as normal, as you see the output:

$ python myscript_nodecorator.py
0
595

If you use the non-decorated file, and run with python -m falcon script.py the code actually works:

$ python -m falcon myscript_nodecorator.py
I 0.000 [13360] src/falcon/rcompile.cc:1751 COMPILED code, 8 registers, 19 operations, 26 stack ops.
0
I 0.000 [13360] src/falcon/rcompile.cc:1751 COMPILED my_function, 7 registers, 6 operations, 15 stack ops.
595

it is only with the decorator that this fails. Additionally, the same failure occurs inside an IPython shell with the decorator, as well as in a script.

The error seems to think that the function has keyword arguments (which it clearly doesn't.) from src/falcon/reval.cc:300 :

RegisterFrame* Evaluator::frame_from_pyfunc(PyObject* obj, PyObject* args, PyObject* kw) {
  if (args == NULL || !PyTuple_Check(args)) {
    throw RException(PyExc_TypeError, "Expected function argument tuple, got: %s", obj_to_str(PyObject_Type(args)));
  }

  RegisterCode* regcode = compile(obj);

  ObjVector v_args;
  v_args.resize(PyTuple_GET_SIZE(args) );
  for (size_t i = 0; i < v_args.size(); ++i) {
    v_args[i].store(PyTuple_GET_ITEM(args, i) );
  }

  ObjVector kw_args;
  if (kw != NULL && kw != Py_None) {
    Log_Fatal("Keywords not supported.");
//    kw_args.push_back()
  }

  return new RegisterFrame(regcode, obj, v_args, kw_args);
}

although the real mystery is why it behaves differently with -m falcon ...

Do you have unit test coverage calling code in different ways? if not, it might be good to add it!

Core dump in benchmark code

I just installed falcon from source (swig and libboost are installed as well). However, when I try to run the benchmark code, I find a core dump

devops@xmpp:~/falcon/benchmarks$ python quicksort.py
Original bytecode, qs:

  2           0 LOAD_GLOBAL              0 (len)
              3 LOAD_FAST                0 (x)
              6 CALL_FUNCTION            1
              9 LOAD_CONST               1 (1)
             12 COMPARE_OP               1 (<=)
             15 POP_JUMP_IF_FALSE       22

  3          18 LOAD_FAST                0 (x)
             21 RETURN_VALUE        

  5     >>   22 LOAD_GLOBAL              0 (len)
             25 LOAD_FAST                0 (x)
             28 CALL_FUNCTION            1
             31 LOAD_CONST               2 (2)
             34 BINARY_DIVIDE       
             35 STORE_FAST               1 (midpoint)

  6          38 LOAD_FAST                0 (x)
             41 LOAD_FAST                1 (midpoint)
             44 BINARY_SUBSCR       
             45 STORE_FAST               2 (pivot)

  7          48 BUILD_LIST               0
             51 STORE_FAST               3 (eq)

  8          54 BUILD_LIST               0
             57 STORE_FAST               4 (less)

  9          60 BUILD_LIST               0
             63 STORE_FAST               5 (greater)

 10          66 SETUP_LOOP              83 (to 152)
             69 LOAD_FAST                0 (x)
             72 GET_ITER            
        >>   73 FOR_ITER                75 (to 151)
             76 STORE_FAST               6 (xi)

 11          79 LOAD_FAST                6 (xi)
             82 LOAD_FAST                2 (pivot)
             85 COMPARE_OP               0 (<)
             88 POP_JUMP_IF_FALSE      107

 12          91 LOAD_FAST                4 (less)
             94 LOAD_ATTR                1 (append)
             97 LOAD_FAST                6 (xi)
            100 CALL_FUNCTION            1
            103 POP_TOP             
            104 JUMP_ABSOLUTE           73

 13     >>  107 LOAD_FAST                6 (xi)
            110 LOAD_FAST                2 (pivot)
            113 COMPARE_OP               4 (>)
            116 POP_JUMP_IF_FALSE      135

 14         119 LOAD_FAST                5 (greater)
            122 LOAD_ATTR                1 (append)
            125 LOAD_FAST                6 (xi)
            128 CALL_FUNCTION            1
            131 POP_TOP             
            132 JUMP_ABSOLUTE           73

 16     >>  135 LOAD_FAST                3 (eq)
            138 LOAD_ATTR                1 (append)
            141 LOAD_FAST                6 (xi)
            144 CALL_FUNCTION            1
            147 POP_TOP             
            148 JUMP_ABSOLUTE           73
        >>  151 POP_BLOCK           

 17     >>  152 LOAD_GLOBAL              2 (qs)
            155 LOAD_FAST                4 (less)
            158 CALL_FUNCTION            1
            161 LOAD_FAST                3 (eq)
            164 BINARY_ADD          
            165 LOAD_GLOBAL              2 (qs)
            168 LOAD_FAST                5 (greater)
            171 CALL_FUNCTION            1
            174 BINARY_ADD          
            175 RETURN_VALUE        
I 0.000 [27321] src/falcon/rcompile.cc:1804 COMPILED qs, 14 registers, 35 operations, 66 stack ops.
F 0.000 [27321] src/falcon/reval.cc:323 Keywords not yet supported, n_given = 1
Aborted (core dumped)

Environment: Amazon EC2
devops@xmpp:~/falcon/benchmarks$ uname -a
Linux xmpp.skunkwroks.vn 3.2.0-36-virtual #57-Ubuntu SMP Tue Jan 8 22:04:49 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

I am not testing on a physical server yet.

Is this a bug or am I missing something?

What is Falcon's software license?

A quick but careful inspection of Falcon's source directory did not reveal information as to what was Falcon's license.

This is an important issue as it means that, by default, Falcon is covered by the usual author copyright policy, which does not allow very much (in particular not reuse of the sources). Whatever your preference as authors are, it should be made explicit with, at the very least:

  • a mention of the software license you prefer in the README of the project, along with enough information to identify the authors (names and mail adresses)
  • if there is any ambiguity as to what this license is (eg. "the BSD license" may mean several), a copy of the license text in a LICENSE file at the root of the repository, or the src/ directory

Cautious licensing-aware open source developers also add a comment header to each source file in the project, recapitulating the authors copyright and the chosen license. I know that academic code dumps are not always that rigorous and that's probably ok, but the licensing information must still be provided somewhere.

PS: In case you would be unfamiliar with licensing questions and unwilling to make the investment to look at depth at those issues, I would recommend simply reusing the license of the upstream CPython code -- but I don't actually know which it is.

errror:Invalid register name

Hi

I am getting this below error when i am try to compile. Can you let me know what am i missing

src/falcon/reval.cc:1848:22 error: invalid register name for 'registers'
src/falcon/reval.cc:1848:22 error: invalid register name for 'pc'

Am i missing some dependencies here?

AttributeError: 'Evaluator' object has no attribute 'frame_from_codeobj'

I'm trying to install Falcon from sources (commit 9444f0f); I get no
errors but the resulting interpreter does not run scripts:

rmurri@idsgi02:~/sw/src> source rjpower-falcon-9444f0f/bin/activate

(rjpower-falcon-9444f0f)rmurri@idsgi02:~/sw/src> which python
/home/user/rmurri/sw/src/rjpower-falcon-9444f0f/bin/python

(rjpower-falcon-9444f0f)rmurri@idsgi02:~/sw/src> python -m falcon
Usage: -mfalcon <script> <args>

(rjpower-falcon-9444f0f)rmurri@idsgi02:~/sw/src> python -m falcon rjpower-falcon-9444f0f/test/test_math.py
Traceback (most recent call last):
  File "/home/user/rmurri/sw/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/home/user/rmurri/sw/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/user/rmurri/sw/src/rjpower-falcon-9444f0f/src/falcon/__main__.py", line 24, in <module>
    main()
  File "/home/user/rmurri/sw/src/rjpower-falcon-9444f0f/src/falcon/__main__.py", line 20, in main
    f_frame = falcon.evaluator.frame_from_codeobj(code)
AttributeError: 'Evaluator' object has no attribute 'frame_from_codeobj'

The only warning I can see in the installation log (details below) is the following:

src/falcon/rinst.h:47: Warning 503: Can't wrap 'operator PyObject*' unless renamed to a valid identifier.

How can I go on debugging this issue?

Thanks,
Riccardo

Full installation log:

> ./install-falcon.sh 2>&1 | tee install-falcon.log
+ tar -xz
+ wget https://github.com/rjpower/falcon/tarball/9444f0f25feba186cef8fb2dc249aad331edd980/falcon-9444f0f25feba186cef8fb2dc249aad331edd980.tar.gz -O -
--2013-08-19 14:41:01--  https://github.com/rjpower/falcon/tarball/9444f0f25feba186cef8fb2dc249aad331edd980/falcon-9444f0f25feba186cef8fb2dc249aad331edd980.tar.gz
Resolving proxy.uzh.ch... 130.60.206.69
Connecting to proxy.uzh.ch|130.60.206.69|:3128... connected.
Proxy request sent, awaiting response... 302 Found
Location: https://codeload.github.com/rjpower/falcon/legacy.tar.gz/9444f0f25feba186cef8fb2dc249aad331edd980 [following]
--2013-08-19 14:41:01--  https://codeload.github.com/rjpower/falcon/legacy.tar.gz/9444f0f25feba186cef8fb2dc249aad331edd980
Connecting to proxy.uzh.ch|130.60.206.69|:3128... connected.
Proxy request sent, awaiting response... 200 OK
Length: 305442 (298K) [application/x-gzip]
Saving to: `STDOUT'

     0K .......... .......... .......... .......... .......... 16%  257K 1s
    50K .......... .......... .......... .......... .......... 33%  256K 1s
   100K .......... .......... .......... .......... .......... 50%  170K 1s
   150K .......... .......... .......... .......... .......... 67%  255K 0s
   200K .......... .......... .......... .......... .......... 83%  257K 0s
   250K .......... .......... .......... .......... ........  100%  493K=1.2s

2013-08-19 14:41:04 (254 KB/s) - `-' saved [305442/305442]

++ cut -c1-7
++ echo 9444f0f25feba186cef8fb2dc249aad331edd980
+ cd rjpower-falcon-9444f0f
+ virtualenv .
New python executable in ./bin/python
Installing Setuptools..............................................................................................................................................................................................................................done.
Installing Pip.....................................................................................................................................................................................................................................................................................................................................done.
+ source bin/activate
++ deactivate nondestructive
++ unset pydoc
++ '[' -n '' ']'
++ '[' -n '' ']'
++ '[' -n /bin/sh -o -n '' ']'
++ hash -r
++ '[' -n '' ']'
++ unset VIRTUAL_ENV
++ '[' '!' nondestructive = nondestructive ']'
++ VIRTUAL_ENV=/home/user/rmurri/sw/src/rjpower-falcon-9444f0f
++ export VIRTUAL_ENV
++ _OLD_VIRTUAL_PATH=/home/user/rmurri/sw/bin:/opt/pbs/default/bin:/opt/sgi/mpt/mpt-2.07/bin:/home/user/rmurri/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin
++ PATH=/home/user/rmurri/sw/src/rjpower-falcon-9444f0f/bin:/home/user/rmurri/sw/bin:/opt/pbs/default/bin:/opt/sgi/mpt/mpt-2.07/bin:/home/user/rmurri/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin
++ export PATH
++ '[' -n '' ']'
++ '[' -z '' ']'
++ _OLD_VIRTUAL_PS1=
++ '[' x '!=' x ']'
+++ basename /home/user/rmurri/sw/src/rjpower-falcon-9444f0f
++ '[' rjpower-falcon-9444f0f = __ ']'
+++ basename /home/user/rmurri/sw/src/rjpower-falcon-9444f0f
++ PS1='(rjpower-falcon-9444f0f)'
++ export PS1
++ alias 'pydoc=python -m pydoc'
++ '[' -n /bin/sh -o -n '' ']'
++ hash -r
+ python setup.py develop
running develop
running egg_info
creating src/falcon.egg-info
writing src/falcon.egg-info/PKG-INFO
writing top-level names to src/falcon.egg-info/top_level.txt
writing dependency_links to src/falcon.egg-info/dependency_links.txt
writing manifest file 'src/falcon.egg-info/SOURCES.txt'
reading manifest file 'src/falcon.egg-info/SOURCES.txt'
writing manifest file 'src/falcon.egg-info/SOURCES.txt'
running build_ext
building '_falcon_core' extension
swigging src/falcon/rmodule.i to src/falcon/rmodule_wrap.cpp
swig -python -Isrc -modern -O -c++ -w312,509 -o src/falcon/rmodule_wrap.cpp src/falcon/rmodule.i
src/falcon/rinst.h:47: Warning 503: Can't wrap 'operator PyObject*' unless renamed to a valid identifier.
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
creating build/temp.linux-x86_64-2.7/src/falcon
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I./src -I/home/user/rmurri/sw/include/python2.7 -c src/falcon/basic_block.cc -o build/temp.linux-x86_64-2.7/src/falcon/basic_block.o -fno-gcse -fno-crossjumping -ggdb2 -std=c++0x -Isrc/sparsehash-2.0.2/src
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I./src -I/home/user/rmurri/sw/include/python2.7 -c src/falcon/compiler_op.cc -o build/temp.linux-x86_64-2.7/src/falcon/compiler_op.o -fno-gcse -fno-crossjumping -ggdb2 -std=c++0x -Isrc/sparsehash-2.0.2/src
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I./src -I/home/user/rmurri/sw/include/python2.7 -c src/falcon/compiler_state.cc -o build/temp.linux-x86_64-2.7/src/falcon/compiler_state.o -fno-gcse -fno-crossjumping -ggdb2 -std=c++0x -Isrc/sparsehash-2.0.2/src
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I./src -I/home/user/rmurri/sw/include/python2.7 -c src/falcon/oputil.cc -o build/temp.linux-x86_64-2.7/src/falcon/oputil.o -fno-gcse -fno-crossjumping -ggdb2 -std=c++0x -Isrc/sparsehash-2.0.2/src
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I./src -I/home/user/rmurri/sw/include/python2.7 -c src/falcon/rcompile.cc -o build/temp.linux-x86_64-2.7/src/falcon/rcompile.o -fno-gcse -fno-crossjumping -ggdb2 -std=c++0x -Isrc/sparsehash-2.0.2/src
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I./src -I/home/user/rmurri/sw/include/python2.7 -c src/falcon/register_stack.cc -o build/temp.linux-x86_64-2.7/src/falcon/register_stack.o -fno-gcse -fno-crossjumping -ggdb2 -std=c++0x -Isrc/sparsehash-2.0.2/src
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I./src -I/home/user/rmurri/sw/include/python2.7 -c src/falcon/reval.cc -o build/temp.linux-x86_64-2.7/src/falcon/reval.o -fno-gcse -fno-crossjumping -ggdb2 -std=c++0x -Isrc/sparsehash-2.0.2/src
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
src/falcon/reval.cc: In static member function ‘static void ImportStar::_eval(Evaluator*, RegisterFrame*, RegOp<1>&, Register*)’:
src/falcon/reval.cc:1610:13: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I./src -I/home/user/rmurri/sw/include/python2.7 -c src/falcon/rexcept.cc -o build/temp.linux-x86_64-2.7/src/falcon/rexcept.o -fno-gcse -fno-crossjumping -ggdb2 -std=c++0x -Isrc/sparsehash-2.0.2/src
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I./src -I/home/user/rmurri/sw/include/python2.7 -c src/falcon/rinst.cc -o build/temp.linux-x86_64-2.7/src/falcon/rinst.o -fno-gcse -fno-crossjumping -ggdb2 -std=c++0x -Isrc/sparsehash-2.0.2/src
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I./src -I/home/user/rmurri/sw/include/python2.7 -c src/falcon/util.cc -o build/temp.linux-x86_64-2.7/src/falcon/util.o -fno-gcse -fno-crossjumping -ggdb2 -std=c++0x -Isrc/sparsehash-2.0.2/src
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I./src -I/home/user/rmurri/sw/include/python2.7 -c src/falcon/rmodule_wrap.cpp -o build/temp.linux-x86_64-2.7/src/falcon/rmodule_wrap.o -fno-gcse -fno-crossjumping -ggdb2 -std=c++0x -Isrc/sparsehash-2.0.2/src
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
src/falcon/rmodule_wrap.cpp: In function ‘void SWIG_InitializeModule(void*)’:
src/falcon/rmodule_wrap.cpp:14025:21: warning: statement has no effect [-Wunused-value]
creating build/lib.linux-x86_64-2.7
g++ -pthread -shared build/temp.linux-x86_64-2.7/src/falcon/basic_block.o build/temp.linux-x86_64-2.7/src/falcon/compiler_op.o build/temp.linux-x86_64-2.7/src/falcon/compiler_state.o build/temp.linux-x86_64-2.7/src/falcon/oputil.o build/temp.linux-x86_64-2.7/src/falcon/rcompile.o build/temp.linux-x86_64-2.7/src/falcon/register_stack.o build/temp.linux-x86_64-2.7/src/falcon/reval.o build/temp.linux-x86_64-2.7/src/falcon/rexcept.o build/temp.linux-x86_64-2.7/src/falcon/rinst.o build/temp.linux-x86_64-2.7/src/falcon/util.o build/temp.linux-x86_64-2.7/src/falcon/rmodule_wrap.o -o build/lib.linux-x86_64-2.7/_falcon_core.so -lrt
copying build/lib.linux-x86_64-2.7/_falcon_core.so -> src
Creating /home/user/rmurri/sw/src/rjpower-falcon-9444f0f/lib/python2.7/site-packages/falcon.egg-link (link to src)
Adding falcon 0.04 to easy-install.pth file

Installed /home/user/rmurri/sw/src/rjpower-falcon-9444f0f/src
Processing dependencies for falcon==0.04
Finished processing dependencies for falcon==0.04

Compile-time error (GCC 4.4.7)

  • Python 2.7.5
  • CentOS 6

GCC:

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-3) (GCC)

running develop
running egg_info
writing src/falcon.egg-info/PKG-INFO
writing top-level names to src/falcon.egg-info/top_level.txt
writing dependency_links to src/falcon.egg-info/dependency_links.txt
reading manifest file 'src/falcon.egg-info/SOURCES.txt'
writing manifest file 'src/falcon.egg-info/SOURCES.txt'
running build_ext
building '_falcon_core' extension
swigging src/falcon/rmodule.i to src/falcon/rmodule_wrap.cpp
swig -python -Isrc -modern -O -c++ -w312,509 -o src/falcon/rmodule_wrap.cpp src/falcon/rmodule.i
src/falcon/rinst.h:47: Warning(503): Can't wrap 'operator PyObject*' unless renamed to a valid identifier.
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I./src -I/usr/local/include/python2.7 -c src/falcon/oputil.cc -o build/temp.linux-x86_64-2.7/src/falcon/oputil.o -fno-gcse -fno-crossjumping -ggdb2 -std=c++0x -Isrc/sparsehash-2.0.2/src
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I./src -I/usr/local/include/python2.7 -c src/falcon/rexcept.cc -o build/temp.linux-x86_64-2.7/src/falcon/rexcept.o -fno-gcse -fno-crossjumping -ggdb2 -std=c++0x -Isrc/sparsehash-2.0.2/src
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I./src -I/usr/local/include/python2.7 -c src/falcon/compiler_op.cc -o build/temp.linux-x86_64-2.7/src/falcon/compiler_op.o -fno-gcse -fno-crossjumping -ggdb2 -std=c++0x -Isrc/sparsehash-2.0.2/src
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I./src -I/usr/local/include/python2.7 -c src/falcon/register_stack.cc -o build/temp.linux-x86_64-2.7/src/falcon/register_stack.o -fno-gcse -fno-crossjumping -ggdb2 -std=c++0x -Isrc/sparsehash-2.0.2/src
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I./src -I/usr/local/include/python2.7 -c src/falcon/rcompile.cc -o build/temp.linux-x86_64-2.7/src/falcon/rcompile.o -fno-gcse -fno-crossjumping -ggdb2 -std=c++0x -Isrc/sparsehash-2.0.2/src
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
In file included from src/falcon/rcompile.h:15,
                 from src/falcon/rcompile.cc:5:
src/falcon/basic_block.h: In destructor ‘BasicBlock::~BasicBlock()’:
src/falcon/basic_block.h:31: error: expected initializer before ‘:’ token
src/falcon/basic_block.h:34: error: could not convert ‘((((BasicBlock*)this)->BasicBlock::entry_stack != 0u) ? (((BasicBlock*)this)->BasicBlock::entry_stack->RegisterStack::~RegisterStack(), operator delete(((void*)((BasicBlock*)this)->BasicBlock::entry_stack))) : 0)’ to ‘bool’
src/falcon/basic_block.h:35: error: expected primary-expression before ‘}’ token
src/falcon/basic_block.h:35: error: expected ‘)’ before ‘}’ token
src/falcon/basic_block.h:35: error: expected primary-expression before ‘}’ token
src/falcon/basic_block.h:35: error: expected ‘;’ before ‘}’ token
In file included from src/falcon/rcompile.h:17,
                 from src/falcon/rcompile.cc:5:
src/falcon/compiler_state.h: In destructor ‘CompilerState::~CompilerState()’:
src/falcon/compiler_state.h:58: error: expected initializer before ‘:’ token
src/falcon/compiler_state.h:61: error: expected primary-expression before ‘}’ token
src/falcon/compiler_state.h:61: error: expected ‘;’ before ‘}’ token
src/falcon/compiler_state.h:61: error: expected primary-expression before ‘}’ token
src/falcon/compiler_state.h:61: error: expected ‘)’ before ‘}’ token
src/falcon/compiler_state.h:61: error: expected primary-expression before ‘}’ token
src/falcon/compiler_state.h:61: error: expected ‘;’ before ‘}’ token
src/falcon/compiler_state.h: In member function ‘int CompilerState::num_ops()’:
src/falcon/compiler_state.h:65: error: expected initializer before ‘:’ token
src/falcon/compiler_state.h:68: error: expected primary-expression before ‘return’
src/falcon/compiler_state.h:68: error: expected ‘;’ before ‘return’
src/falcon/compiler_state.h:68: error: expected primary-expression before ‘return’
src/falcon/compiler_state.h:68: error: expected ‘)’ before ‘return’
In file included from src/falcon/rcompile.cc:801:
src/falcon/optimizations.h: In member function ‘virtual void RenameRegisters::visit_fn(CompilerState*)’:
src/falcon/optimizations.h:221: error: expected initializer before ‘:’ token
In file included from src/falcon/rcompile.cc:801:
src/falcon/optimizations.h:258: error: expected primary-expression at end of input
src/falcon/optimizations.h:258: error: expected ‘;’ at end of input
src/falcon/optimizations.h:258: error: expected primary-expression at end of input
src/falcon/optimizations.h:258: error: expected ‘)’ at end of input
src/falcon/optimizations.h:258: error: expected statement at end of input
src/falcon/optimizations.h:258: error: expected ‘}’ at end of input
error: command 'gcc' failed with exit status 1

Don't link to librt on OS X

I don't know how to support both Linux & OS X, but if you remove -lrt from extra_link_args, eg. extra_link_args=['-lrt'] -> extra_link_args=[], then it compiles on OS X.

compile fail

under OS X 10.8, (LLVM version 4.2 (clang-425.0.28)) I get the following compile error for file src/falcon/util.cc:

clang -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I./src -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/falcon/util.cc -o build/temp.macosx-10.8-intel-2.7/src/falcon/util.o -fno-gcse -fno-crossjumping -ggdb2 -std=c++0x -Isrc/sparsehash-2.0.2/src
clang: warning: argument unused during compilation: '-mno-fused-madd'
clang: warning: argument unused during compilation: '-fno-gcse'
clang: warning: argument unused during compilation: '-fno-crossjumping'
src/falcon/util.cc:23:17: error: use of undeclared identifier 'CLOCK_MONOTONIC'
  clock_gettime(CLOCK_MONOTONIC, &tp);

This is using the latest project HEAD, since there were no stable release tags.

Unable to compile Falcon

I just downloaded the source code to compile Falcon

cd /usr/src
git clone http://github.com/rjpower/falcon
cd falcon
python setup.py develop

However, it failed

root@xmpp:/usr/src/falcon# python setup.py develop
running develop
Checking .pth file support in /usr/local/lib/python2.7/dist-packages/
/usr/bin/python -E -c pass
TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth files
running egg_info
creating src/falcon.egg-info
writing src/falcon.egg-info/PKG-INFO
writing top-level names to src/falcon.egg-info/top_level.txt
writing dependency_links to src/falcon.egg-info/dependency_links.txt
writing manifest file 'src/falcon.egg-info/SOURCES.txt'
reading manifest file 'src/falcon.egg-info/SOURCES.txt'
writing manifest file 'src/falcon.egg-info/SOURCES.txt'
running build_ext
building '_falcon_core' extension
swigging src/falcon/rmodule.i to src/falcon/rmodule_wrap.cpp
swig -python -Isrc -modern -O -c++ -w312,509 -o src/falcon/rmodule_wrap.cpp src/falcon/rmodule.i
src/falcon/rinst.h:47: Warning 503: Can't wrap 'operator PyObject*' unless renamed to a valid identifier.
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
creating build/temp.linux-x86_64-2.7/src/falcon
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I./src -I/usr/include/python2.7 -c src/falcon/rlist.cc -o build/temp.linux-x86_64-2.7/src/falcon/rlist.o -fno-gcse -fno-crossjumping -ggdb2 -std=c++0x -Isrc/sparsehash-2.0.2/src
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
In file included from src/falcon/rlist.cc:1:0:
src/falcon/rlist.h: In member function ‘PyObject*&<anonymous struct>::operator[](int)’:
src/falcon/rlist.h:15:32: error: invalid initialization of non-const reference of type ‘PyObject*& {aka _object*&}’ from an rvalue of type ‘PyObject* {aka _object*}’
src/falcon/rlist.cc: In function ‘int rlist_contains(RListObject*, PyObject*)’:
src/falcon/rlist.cc:126:12: error: ‘struct Register’ has no member named ‘compare’
src/falcon/rlist.h: In member function ‘PyObject*& RListObject::operator[](int)’:
src/falcon/rlist.h:16:3: warning: control reaches end of non-void function [-Wreturn-type]
error: command 'gcc' failed with exit status 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.