Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails on Ubuntu, MacOS #89

Open
iapyeh opened this issue Jun 23, 2019 · 5 comments
Open

Build fails on Ubuntu, MacOS #89

iapyeh opened this issue Jun 23, 2019 · 5 comments

Comments

@iapyeh
Copy link

iapyeh commented Jun 23, 2019

It seems to have problem when building with cython 0.29.10 (currently installed by pip3).
"pip3 install coro" failed as well as build from source by "python3 setup.py build.
Platform: Ubuntu and MacOS (10.14.5)
Python: 3.7.3

@vijaysharma136-git
Copy link

I am also getting build issue while compiling with python3 (python3.5) Cython 0.29.10. while same code was working fine with Python2.7. i compare the log it found below difference
cythoning coro/_coro.pyx to coro/_coro.c ---> Python 2.7
while in python3.x it show
skipping 'coro/_coro.c' Cython extension (up-to-date)
while look at the build command i found one difference in the build that "fno-strict-aliasing" is not getting popup within in Python3. not sure how it invoke in while using Pythion2.
wanted to know from where gcc command get invoke with different parameter.

@vijaysharma136-git
Copy link

the complete Error logs as below:

user@user-OptiPlex-7010:~/PycharmProjects/sharpnel1.5/shrapnel-1.0.5$ python3 setup.py build
detected NPN-capable OpenSSL
running build
running build_py
file backdoor.py (for module backdoor) not found
file coro_process.py (for module coro_process) not found
file coro_unittest.py (for module coro_unittest) not found
creating build
creating build/lib.linux-x86_64-3.5
creating build/lib.linux-x86_64-3.5/coro
copying coro/init.py -> build/lib.linux-x86_64-3.5/coro
copying coro/read_stream.py -> build/lib.linux-x86_64-3.5/coro
copying coro/tb.py -> build/lib.linux-x86_64-3.5/coro
copying coro/print_profile.py -> build/lib.linux-x86_64-3.5/coro
copying coro/signal_handler.py -> build/lib.linux-x86_64-3.5/coro
copying coro/backdoor.py -> build/lib.linux-x86_64-3.5/coro
copying coro/frontdoor.py -> build/lib.linux-x86_64-3.5/coro
copying coro/optional.py -> build/lib.linux-x86_64-3.5/coro
copying coro/profiler.py -> build/lib.linux-x86_64-3.5/coro
creating build/lib.linux-x86_64-3.5/coro/ssl
copying coro/ssl/init.py -> build/lib.linux-x86_64-3.5/coro/ssl
creating build/lib.linux-x86_64-3.5/coro/dns
copying coro/dns/reply.py -> build/lib.linux-x86_64-3.5/coro/dns
copying coro/dns/exceptions.py -> build/lib.linux-x86_64-3.5/coro/dns
copying coro/dns/cache.py -> build/lib.linux-x86_64-3.5/coro/dns
copying coro/dns/init.py -> build/lib.linux-x86_64-3.5/coro/dns
copying coro/dns/stub_resolver.py -> build/lib.linux-x86_64-3.5/coro/dns
creating build/lib.linux-x86_64-3.5/coro/asn1
copying coro/asn1/init.py -> build/lib.linux-x86_64-3.5/coro/asn1
copying coro/asn1/data_file.py -> build/lib.linux-x86_64-3.5/coro/asn1
creating build/lib.linux-x86_64-3.5/coro/db
copying coro/db/init.py -> build/lib.linux-x86_64-3.5/coro/db
creating build/lib.linux-x86_64-3.5/coro/amqp
copying coro/amqp/rpc.py -> build/lib.linux-x86_64-3.5/coro/amqp
copying coro/amqp/amqp.py -> build/lib.linux-x86_64-3.5/coro/amqp
copying coro/amqp/codegen.py -> build/lib.linux-x86_64-3.5/coro/amqp
copying coro/amqp/init.py -> build/lib.linux-x86_64-3.5/coro/amqp
copying coro/amqp/wire.py -> build/lib.linux-x86_64-3.5/coro/amqp
copying coro/amqp/spec.py -> build/lib.linux-x86_64-3.5/coro/amqp
creating build/lib.linux-x86_64-3.5/coro/clocks
copying coro/clocks/init.py -> build/lib.linux-x86_64-3.5/coro/clocks
creating build/lib.linux-x86_64-3.5/coro/http
copying coro/http/json_rpc.py -> build/lib.linux-x86_64-3.5/coro/http
copying coro/http/handlers.py -> build/lib.linux-x86_64-3.5/coro/http
copying coro/http/protocol.py -> build/lib.linux-x86_64-3.5/coro/http
copying coro/http/session_handler.py -> build/lib.linux-x86_64-3.5/coro/http
copying coro/http/websocket.py -> build/lib.linux-x86_64-3.5/coro/http
copying coro/http/client.py -> build/lib.linux-x86_64-3.5/coro/http
copying coro/http/server.py -> build/lib.linux-x86_64-3.5/coro/http
copying coro/http/init.py -> build/lib.linux-x86_64-3.5/coro/http
copying coro/http/spdy.py -> build/lib.linux-x86_64-3.5/coro/http
copying coro/http/http_date.py -> build/lib.linux-x86_64-3.5/coro/http
creating build/lib.linux-x86_64-3.5/coro/log
copying coro/log/init.py -> build/lib.linux-x86_64-3.5/coro/log
copying coro/log/asn1.py -> build/lib.linux-x86_64-3.5/coro/log
creating build/lib.linux-x86_64-3.5/coro/ssh
copying coro/ssh/init.py -> build/lib.linux-x86_64-3.5/coro/ssh
creating build/lib.linux-x86_64-3.5/coro/test
copying coro/test/init.py -> build/lib.linux-x86_64-3.5/coro/test
copying coro/test/coro_unittest.py -> build/lib.linux-x86_64-3.5/coro/test
creating build/lib.linux-x86_64-3.5/coro/emulation
copying coro/emulation/thread.py -> build/lib.linux-x86_64-3.5/coro/emulation
copying coro/emulation/threading.py -> build/lib.linux-x86_64-3.5/coro/emulation
copying coro/emulation/init.py -> build/lib.linux-x86_64-3.5/coro/emulation
copying coro/emulation/socket.py -> build/lib.linux-x86_64-3.5/coro/emulation
creating build/lib.linux-x86_64-3.5/coro/db/postgres
copying coro/db/postgres/postgres.py -> build/lib.linux-x86_64-3.5/coro/db/postgres
copying coro/db/postgres/init.py -> build/lib.linux-x86_64-3.5/coro/db/postgres
creating build/lib.linux-x86_64-3.5/coro/ssh/keys
copying coro/ssh/keys/openssh_authorized_keys.py -> build/lib.linux-x86_64-3.5/coro/ssh/keys
copying coro/ssh/keys/key_storage.py -> build/lib.linux-x86_64-3.5/coro/ssh/keys
copying coro/ssh/keys/public_private_key.py -> build/lib.linux-x86_64-3.5/coro/ssh/keys
copying coro/ssh/keys/remote_host.py -> build/lib.linux-x86_64-3.5/coro/ssh/keys
copying coro/ssh/keys/openssh_key_formats.py -> build/lib.linux-x86_64-3.5/coro/ssh/keys
copying coro/ssh/keys/dss.py -> build/lib.linux-x86_64-3.5/coro/ssh/keys
copying coro/ssh/keys/init.py -> build/lib.linux-x86_64-3.5/coro/ssh/keys
copying coro/ssh/keys/static_key_storage.py -> build/lib.linux-x86_64-3.5/coro/ssh/keys
copying coro/ssh/keys/openssh_key_storage.py -> build/lib.linux-x86_64-3.5/coro/ssh/keys
copying coro/ssh/keys/openssh_known_hosts.py -> build/lib.linux-x86_64-3.5/coro/ssh/keys
copying coro/ssh/keys/rebuild.py -> build/lib.linux-x86_64-3.5/coro/ssh/keys
copying coro/ssh/keys/rsa.py -> build/lib.linux-x86_64-3.5/coro/ssh/keys
creating build/lib.linux-x86_64-3.5/coro/ssh/cipher
copying coro/ssh/cipher/des3_cbc.py -> build/lib.linux-x86_64-3.5/coro/ssh/cipher
copying coro/ssh/cipher/init.py -> build/lib.linux-x86_64-3.5/coro/ssh/cipher
copying coro/ssh/cipher/none.py -> build/lib.linux-x86_64-3.5/coro/ssh/cipher
copying coro/ssh/cipher/blowfish_cbc.py -> build/lib.linux-x86_64-3.5/coro/ssh/cipher
creating build/lib.linux-x86_64-3.5/coro/ssh/scp
copying coro/ssh/scp/core.py -> build/lib.linux-x86_64-3.5/coro/ssh/scp
copying coro/ssh/scp/cli.py -> build/lib.linux-x86_64-3.5/coro/ssh/scp
copying coro/ssh/scp/client.py -> build/lib.linux-x86_64-3.5/coro/ssh/scp
copying coro/ssh/scp/init.py -> build/lib.linux-x86_64-3.5/coro/ssh/scp
creating build/lib.linux-x86_64-3.5/coro/ssh/wrapper
copying coro/ssh/wrapper/coro_interactive_ssh_wrapper.py -> build/lib.linux-x86_64-3.5/coro/ssh/wrapper
copying coro/ssh/wrapper/init.py -> build/lib.linux-x86_64-3.5/coro/ssh/wrapper
creating build/lib.linux-x86_64-3.5/coro/ssh/mac
copying coro/ssh/mac/hmac_md5.py -> build/lib.linux-x86_64-3.5/coro/ssh/mac
copying coro/ssh/mac/hmac.py -> build/lib.linux-x86_64-3.5/coro/ssh/mac
copying coro/ssh/mac/init.py -> build/lib.linux-x86_64-3.5/coro/ssh/mac
copying coro/ssh/mac/none.py -> build/lib.linux-x86_64-3.5/coro/ssh/mac
copying coro/ssh/mac/hmac_sha1.py -> build/lib.linux-x86_64-3.5/coro/ssh/mac
creating build/lib.linux-x86_64-3.5/coro/ssh/util
copying coro/ssh/util/mpint.py -> build/lib.linux-x86_64-3.5/coro/ssh/util
copying coro/ssh/util/password.py -> build/lib.linux-x86_64-3.5/coro/ssh/util
copying coro/ssh/util/debug.py -> build/lib.linux-x86_64-3.5/coro/ssh/util
copying coro/ssh/util/random.py -> build/lib.linux-x86_64-3.5/coro/ssh/util
copying coro/ssh/util/init.py -> build/lib.linux-x86_64-3.5/coro/ssh/util
copying coro/ssh/util/packet.py -> build/lib.linux-x86_64-3.5/coro/ssh/util
creating build/lib.linux-x86_64-3.5/coro/ssh/transport
copying coro/ssh/transport/client.py -> build/lib.linux-x86_64-3.5/coro/ssh/transport
copying coro/ssh/transport/server.py -> build/lib.linux-x86_64-3.5/coro/ssh/transport
copying coro/ssh/transport/init.py -> build/lib.linux-x86_64-3.5/coro/ssh/transport
copying coro/ssh/transport/transport.py -> build/lib.linux-x86_64-3.5/coro/ssh/transport
copying coro/ssh/transport/constants.py -> build/lib.linux-x86_64-3.5/coro/ssh/transport
creating build/lib.linux-x86_64-3.5/coro/ssh/connection
copying coro/ssh/connection/tty_modes.py -> build/lib.linux-x86_64-3.5/coro/ssh/connection
copying coro/ssh/connection/data_buffer.py -> build/lib.linux-x86_64-3.5/coro/ssh/connection
copying coro/ssh/connection/init.py -> build/lib.linux-x86_64-3.5/coro/ssh/connection
copying coro/ssh/connection/channel.py -> build/lib.linux-x86_64-3.5/coro/ssh/connection
copying coro/ssh/connection/connect.py -> build/lib.linux-x86_64-3.5/coro/ssh/connection
copying coro/ssh/connection/interactive_session.py -> build/lib.linux-x86_64-3.5/coro/ssh/connection
copying coro/ssh/connection/constants.py -> build/lib.linux-x86_64-3.5/coro/ssh/connection
creating build/lib.linux-x86_64-3.5/coro/ssh/compression
copying coro/ssh/compression/init.py -> build/lib.linux-x86_64-3.5/coro/ssh/compression
copying coro/ssh/compression/none.py -> build/lib.linux-x86_64-3.5/coro/ssh/compression
creating build/lib.linux-x86_64-3.5/coro/ssh/l4_transport
copying coro/ssh/l4_transport/init.py -> build/lib.linux-x86_64-3.5/coro/ssh/l4_transport
copying coro/ssh/l4_transport/coro_socket_transport.py -> build/lib.linux-x86_64-3.5/coro/ssh/l4_transport
creating build/lib.linux-x86_64-3.5/coro/ssh/key_exchange
copying coro/ssh/key_exchange/diffie_hellman.py -> build/lib.linux-x86_64-3.5/coro/ssh/key_exchange
copying coro/ssh/key_exchange/init.py -> build/lib.linux-x86_64-3.5/coro/ssh/key_exchange
creating build/lib.linux-x86_64-3.5/coro/ssh/auth
copying coro/ssh/auth/userauth.py -> build/lib.linux-x86_64-3.5/coro/ssh/auth
copying coro/ssh/auth/init.py -> build/lib.linux-x86_64-3.5/coro/ssh/auth
file backdoor.py (for module backdoor) not found
file coro_process.py (for module coro_process) not found
file coro_unittest.py (for module coro_unittest) not found
running build_ext
skipping 'coro/event_queue.cpp' Cython extension (up-to-date)
building 'coro.event_queue' extension
creating build/temp.linux-x86_64-3.5
creating build/temp.linux-x86_64-3.5/coro
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c coro/event_queue.cpp -o build/temp.linux-x86_64-3.5/coro/event_queue.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.5/coro/event_queue.o -o build/lib.linux-x86_64-3.5/coro/event_queue.cpython-35m-x86_64-linux-gnu.so
skipping 'coro/_coro.c' Cython extension (up-to-date)
building 'coro._coro' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/user/PycharmProjects/sharpnel1.5/shrapnel-1.0.5/. -I/home/user/PycharmProjects/sharpnel1.5/shrapnel-1.0.5/include -I/usr/include/python3.5m -c coro/_coro.c -o build/temp.linux-x86_64-3.5/coro/_coro.o -Wno-unused-function
In file included from coro/_coro.c:615:0:
/home/user/PycharmProjects/sharpnel1.5/shrapnel-1.0.5/include/pyrex_helpers.h: In function ‘cmp’:
/home/user/PycharmProjects/sharpnel1.5/shrapnel-1.0.5/include/pyrex_helpers.h:69:8: warning: implicit declaration of function ‘PyObject_Cmp’ [-Wimplicit-function-declaration]
if(PyObject_Cmp(o1, o2, &result)) {
^
/home/user/PycharmProjects/sharpnel1.5/shrapnel-1.0.5/include/pyrex_helpers.h: In function ‘minimal_ulonglong’:
/home/user/PycharmProjects/sharpnel1.5/shrapnel-1.0.5/include/pyrex_helpers.h:204:17: warning: implicit declaration of function ‘PyInt_GetMax’ [-Wimplicit-function-declaration]
if (value > PyInt_GetMax()) {
^
In file included from coro/_coro.c:616:0:
/home/user/PycharmProjects/sharpnel1.5/shrapnel-1.0.5/include/tsc_time.h: In function ‘init_tsc_time_pointers’:
/home/user/PycharmProjects/sharpnel1.5/shrapnel-1.0.5/include/tsc_time.h:134:23: warning: implicit declaration of function ‘PyCObject_AsVoidPtr’ [-Wimplicit-function-declaration]
c_ptr = (void **) PyCObject_AsVoidPtr(c_obj);
^
/home/user/PycharmProjects/sharpnel1.5/shrapnel-1.0.5/include/tsc_time.h:134:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
c_ptr = (void **) PyCObject_AsVoidPtr(c_obj);
^
coro/_coro.c: In function ‘__pyx_f_4coro_5_coro_4coro___yield’:
coro/_coro.c:8227:15: error: ‘_PyThreadState_Current’ undeclared (first use in this function)
__pyx_t_3 = _PyThreadState_Current->frame;
^
coro/_coro.c:8227:15: note: each undeclared identifier is reported only once for each function it appears in
coro/_coro.c: In function ‘__pyx_f_4coro_5_coro_4coro___resume’:
coro/_coro.c:8541:17: error: ‘_PyThreadState_Current’ undeclared (first use in this function)
__pyx_t_3 = _PyThreadState_Current->frame;
^
coro/_coro.c: In function ‘__pyx_f_4coro_5_coro_4coro_save_exception_data’:
coro/_coro.c:8819:15: error: ‘_PyThreadState_Current’ undeclared (first use in this function)
__pyx_t_1 = _PyThreadState_Current->curexc_type;
^
coro/_coro.c: In function ‘__pyx_f_4coro_5_coro_4coro_restore_exception_data’:
coro/_coro.c:8969:15: error: ‘_PyThreadState_Current’ undeclared (first use in this function)
__pyx_t_1 = _PyThreadState_Current->curexc_type;
^
coro/_coro.c: In function ‘__pyx_pf_4coro_5_coro_4coro_24get_frame’:
coro/_coro.c:10933:32: error: ‘_PyThreadState_Current’ undeclared (first use in this function)
__pyx_t_2 = void_as_object(_PyThreadState_Current->frame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 609, __pyx_L1_error)
^
coro/_coro.c: In function ‘__pyx_f_4coro_5_coro_info’:
coro/_coro.c:60619:15: error: ‘_PyThreadState_Current’ undeclared (first use in this function)
__pyx_t_2 = _PyThreadState_Current->frame;
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

@samrushing
Copy link
Member

Did you try the 'py3' branch? I think it requires a recent version, like 3.7+

@vijaysharma136-git
Copy link

Hi after try with 3.7 now i am getting Error

coro/ssl/openssl.c: In function ‘__Pyx_ExceptionReset’:
coro/ssl/openssl.c:25681:22: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tmp_type = tstate->exc_type;
^
coro/ssl/openssl.c:25682:23: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tmp_value = tstate->exc_value;
^
coro/ssl/openssl.c:25683:20: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tmp_tb = tstate->exc_traceback;
^
coro/ssl/openssl.c:25684:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_type’
tstate->exc_type = type;
^
coro/ssl/openssl.c:25685:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_value’
tstate->exc_value = value;
^
coro/ssl/openssl.c:25686:11: error: ‘PyThreadState {aka struct _ts}’ has no member named ‘exc_traceback’
tstate->exc_traceback = tb;
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Process finished with exit code 1

@samrushing
Copy link
Member

Did you try the 'py3' branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants