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

work_queue compile error with Python 3.7 #2039

Closed
yudongqiu opened this issue Mar 13, 2019 · 5 comments
Closed

work_queue compile error with Python 3.7 #2039

yudongqiu opened this issue Mar 13, 2019 · 5 comments
Assignees

Comments

@yudongqiu
Copy link

Hi there, we recently encountered a project that uses a python package requiring Python=3.7. I tried the latest release 7.0.10 but got some errors during compilation.

I used the following configure command:

$ ./configure --prefix /home/qyd/opt/cctools-7.0.10 --with-python3-path /home/qyd/codes/anaconda3/envs/tdtest --with-swig-path /home/qyd/codes/anaconda3/envs/tdtest --with-perl-path no --with-globus-path no

Then when I tried to compile by make, I got the following error related to swig:

SWIG work_queue.i (python)
ln -sf /System/Library/Frameworks/Python.framework .
COMPILE work_queue_wrap.o
In file included from /home/qyd/codes/anaconda3/envs/tdtest/include/python3.7m/Python.h:51:0,
                 from work_queue_wrap.c:149:
work_queue_wrap.c: In function ‘SWIG_Python_UnpackTuple’:
/home/qyd/codes/cctools/cctools-release-7.0.10/dttools/src/assert.h:14:2: error: expected expression before ‘do’
  do {\
  ^
/home/qyd/codes/cctools/cctools-release-7.0.10/dttools/src/assert.h:26:22: note: in expansion of macro ‘cctools_assert’
 #define assert(expr) cctools_assert(expr)
                      ^~~~~~~~~~~~~~
/home/qyd/codes/anaconda3/envs/tdtest/include/python3.7m/tupleobject.h:59:34: note: in expansion of macro ‘assert’
 #define PyTuple_GET_SIZE(op)    (assert(PyTuple_Check(op)),Py_SIZE(op))
                                  ^~~~~~
work_queue_wrap.c:1331:20: note: in expansion of macro ‘PyTuple_GET_SIZE’
     Py_ssize_t l = PyTuple_GET_SIZE(args);
                    ^~~~~~~~~~~~~~~~
../../../rules.mk:6: recipe for target 'work_queue_wrap.o' failed
make[3]: *** [work_queue_wrap.o] Error 1

The python environment was created using Anaconda. Could you please let me know if there is a good way to install the python binding for work_queue that works with Python 3.7?

@yudongqiu
Copy link
Author

As a side note, in a previous PR #2002 @btovar helped us to get it work with Python 3.6, and he mentioned that Python 3.7 was not working at that time

@btovar btovar self-assigned this Mar 14, 2019
@btovar
Copy link
Member

btovar commented Mar 14, 2019

I was able to reproduce with anaconda/python3.7.

@btovar
Copy link
Member

btovar commented Mar 14, 2019

Could you give #2040 a try?

@yudongqiu
Copy link
Author

@btovar Thanks a lot for the quick fix! I can confirm that it now compiles successfully and I'm able to import the work_queue module in python 3.7. 👍

@btovar
Copy link
Member

btovar commented Mar 14, 2019

Excellent, thanks for letting us know. Please don't hesitate to contact us if you find any other issue.

@btovar btovar closed this as completed May 10, 2019
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

2 participants