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

warnings during compile of pyzmq #78

Closed
lookfirst opened this issue Sep 14, 2010 · 12 comments
Closed

warnings during compile of pyzmq #78

lookfirst opened this issue Sep 14, 2010 · 12 comments

Comments

@lookfirst
Copy link

I was asked by the pyzmq developer to file this ticket with you.

ubuntu 10.4.1. zeromq 2.0.9

root@ubuntu:~/checkout/pyzmq# python setup.py build_ext --rpath=/usr/local/zeromq --inplace
running build_ext
building 'zmq.zmq' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/zeromq-dev/include -I/usr/include/python2.6 -c zmq/zmq.c -o build/temp.linux-x86_64-2.6/zmq/zmq.o
In file included from zmq/zmq.c:205:
/usr/local/zeromq-dev/include/zmq.h:94: warning: function declaration isn’t a prototype In file included from zmq/zmq.c:206:
/usr/local/zeromq-dev/include/zmq_utils.h:42: warning: function declaration isn’t a prototype gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-x86_64-2.6/zmq/zmq.o -L/usr/local/zeromq-dev/lib -Wl,-R/usr/local/zeromq -lzmq -o /home/jon/checkout/pyzmq/zmq/_zmq.so
@ellisonbg
Copy link

I asked that this be filed here because the warning is coming from the zmq header files.

@sustrik
Copy link
Member

sustrik commented Sep 29, 2010

Aren't you forward declaring zmq_errno(void) and zmq_stopwatch_start(void) incidentally?

@ellisonbg
Copy link

I will check on this...

@ellisonbg
Copy link

I don't think we are forward declaring these. What makes you think that?

@sustrik
Copy link
Member

sustrik commented Sep 30, 2010

It seems that this particular warning is caused by mixing foo() and foo(void) declarations. The explanation seems plausible as the two functions complained about are exactly those that have no arguments.

@ellisonbg
Copy link

I just looked and we are following the foo() convention that is in the main header files of zeromq. Should we change this or do you think this would be resolve by a change in zeromq itself?

@sustrik
Copy link
Member

sustrik commented Sep 30, 2010

No. It should be the same at both places. More investigation needed...

@sustrik
Copy link
Member

sustrik commented Sep 30, 2010

The problem may be that foo() in C is a different prototype than foo() in C++. Can you point me where the forward declaration in pyzmq is?

@ellisonbg
Copy link

We don't really forward declare C functions in pyzmq. We simply include the zmq header file and use the functions. The stuff that appears here:

http://github.com/zeromq/pyzmq/blob/master/zmq/_zmq.pxd#L68

Is not used in any way in the generate C code. It just serves as a hint to the Cython compiler so it can get the types correct.

@sustrik
Copy link
Member

sustrik commented Oct 1, 2010

Maybe cython transleates foo() in pxd file into foo(void)... Anyway the simplest way to check whether that's the problem would be to change two prototypes in zmq.h (zmq_errno() => zme_errno(void) etc.) and see whether the warnings go away. Can you do that for me?

@ellisonbg
Copy link

Yep i will have a look.

@ellisonbg
Copy link

This seems to be fixed.

drahosp pushed a commit to LuaDist/libzmq that referenced this issue Feb 13, 2014
Backport of test_last_endpoint shutdown fix, resolves LIBZMQ-462
benjdero pushed a commit to benjdero/libzmq that referenced this issue Feb 20, 2023
zre_interface only destroy context if it created it
bluca pushed a commit that referenced this issue Oct 31, 2023
This issue was closed.
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