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

[Bug report] Installation Fails: python do.py run-python #2036

Closed
blankjul opened this issue Nov 1, 2021 · 2 comments
Closed

[Bug report] Installation Fails: python do.py run-python #2036

blankjul opened this issue Nov 1, 2021 · 2 comments
Labels

Comments

@blankjul
Copy link

blankjul commented Nov 1, 2021

python do.py run-python does not run successfully.
The rights should be fine and even sudo did not help.

Any easy fix for this?

  • Operating system: Mac 12.0.1
  • COCO version: Github Version
  • Apple clang version 13.0.0 (clang-1300.0.29.3)

(I have experimented with to modifying coco.h and interface.pyx but was not successful)


/----------------------------< EXCEPTION MESSAGE >----------------------------\
|                                                                             |
| NOTE: Using precompiled C file to build interface.                          |
| running install                                                             |
| running bdist_egg                                                           |
| running egg_info                                                            |
| creating cocoex.egg-info                                                    |
| writing cocoex.egg-info/PKG-INFO                                            |
| writing dependency_links to cocoex.egg-info/dependency_links.txt            |
| writing top-level names to cocoex.egg-info/top_level.txt                    |
| writing manifest file 'cocoex.egg-info/SOURCES.txt'                         |
| reading manifest file 'cocoex.egg-info/SOURCES.txt'                         |
| reading manifest template 'MANIFEST.in'                                     |
| adding license file 'LICENSE'                                               |
| adding license file 'AUTHORS'                                               |
| writing manifest file 'cocoex.egg-info/SOURCES.txt'                         |
| installing library code to build/bdist.macosx-10.9-x86_64/egg               |
| running install_lib                                                         |
| running build_py                                                            |
| creating build                                                              |
| creating build/lib.macosx-10.9-x86_64-3.8                                   |
| creating build/lib.macosx-10.9-x86_64-3.8/cocoex                            |
| copying python/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/cocoex       |
| copying python/solvers.py -> build/lib.macosx-10.9-x86_64-3.8/cocoex        |
| copying python/exceptions.py -> build/lib.macosx-10.9-x86_64-3.8/cocoex     |
| copying python/utilities.py -> build/lib.macosx-10.9-x86_64-3.8/cocoex      |
| running build_ext                                                           |
| building 'cocoex.interface' extension                                       |
| creating build/temp.macosx-10.9-x86_64-3.8                                  |
| creating build/temp.macosx-10.9-x86_64-3.8/cython                           |
| gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrap |
| v -O3 -Wall -Wstrict-prototypes -I/Users/blankjul/anaconda3/anaconda3/envs/ |
| dev/include -arch x86_64 -I/Users/blankjul/anaconda3/anaconda3/envs/dev/inc |
| lude -arch x86_64 -I/Users/blankjul/anaconda3/anaconda3/envs/dev/lib/python |
| 3.8/site-packages/numpy/core/include -I/Users/blankjul/anaconda3/anaconda3/ |
| envs/dev/include/python3.8 -c cython/interface.c -o build/temp.macosx-10.9- |
| x86_64-3.8/cython/interface.o                                               |
| In file included from cython/interface.c:593:                               |
| In file included from /Users/blankjul/anaconda3/anaconda3/envs/dev/lib/pyth |
| on3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4:               |
| In file included from /Users/blankjul/anaconda3/anaconda3/envs/dev/lib/pyth |
| on3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:            |
| In file included from /Users/blankjul/anaconda3/anaconda3/envs/dev/lib/pyth |
| on3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1969:           |
| /Users/blankjul/anaconda3/anaconda3/envs/dev/lib/python3.8/site-packages/nu |
| mpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using depre |
| cated NumPy API, disable it with "          "#define NPY_NO_DEPRECATED_API  |
| NPY_1_7_API_VERSION" [-W#warnings]                                          |
| #warning "Using deprecated NumPy API, disable it with " \                   |
|  ^                                                                          |
| cython/interface.c:12008:7: error: implicit declaration of function 'bbob_b |
| iobj_problem_best_parameter_print' is invalid in C99 [-Werror,-Wimplicit-fu |
| nction-declaration]                                                         |
|       bbob_biobj_problem_best_parameter_print(__pyx_v_self->problem);       |
|       ^                                                                     |
| cython/interface.c:12028:7: error: implicit declaration of function 'bbob_p |
| roblem_best_parameter_print' is invalid in C99 [-Werror,-Wimplicit-function |
| -declaration]                                                               |
|       bbob_problem_best_parameter_print(__pyx_v_self->problem);             |
|       ^                                                                     |
| cython/interface.c:18650:39: warning: 'tp_print' is deprecated [-Wdeprecate |
| d-declarations]                                                             |
|   __pyx_type_6cocoex_9interface_Suite.tp_print = 0;                         |
|                                       ^                                     |
| /Users/blankjul/anaconda3/anaconda3/envs/dev/include/python3.8/cpython/obje |
| ct.h:260:5: note: 'tp_print' has been explicitly marked deprecated here     |
|     Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);            |
|     ^                                                                       |
| /Users/blankjul/anaconda3/anaconda3/envs/dev/include/python3.8/pyport.h:515 |
| :54: note: expanded from macro 'Py_DEPRECATED'                              |
| #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))       |
|                                                      ^                      |
| cython/interface.c:18679:42: warning: 'tp_print' is deprecated [-Wdeprecate |
| d-declarations]                                                             |
|   __pyx_type_6cocoex_9interface_Observer.tp_print = 0;                      |
|                                          ^                                  |
| /Users/blankjul/anaconda3/anaconda3/envs/dev/include/python3.8/cpython/obje |
| ct.h:260:5: note: 'tp_print' has been explicitly marked deprecated here     |
|     Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);            |
|     ^                                                                       |
| /Users/blankjul/anaconda3/anaconda3/envs/dev/include/python3.8/pyport.h:515 |
| :54: note: expanded from macro 'Py_DEPRECATED'                              |
| #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))       |
|                                                      ^                      |
| cython/interface.c:18689:41: warning: 'tp_print' is deprecated [-Wdeprecate |
| d-declarations]                                                             |
|   __pyx_type_6cocoex_9interface_Problem.tp_print = 0;                       |
|                                         ^                                   |
| /Users/blankjul/anaconda3/anaconda3/envs/dev/include/python3.8/cpython/obje |
| ct.h:260:5: note: 'tp_print' has been explicitly marked deprecated here     |
|     Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);            |
|     ^                                                                       |
| /Users/blankjul/anaconda3/anaconda3/envs/dev/include/python3.8/pyport.h:515 |
| :54: note: expanded from macro 'Py_DEPRECATED'                              |
| #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))       |
|                                                      ^                      |
| cython/interface.c:18708:62: warning: 'tp_print' is deprecated [-Wdeprecate |
| d-declarations]                                                             |
|   __pyx_type_6cocoex_9interface___pyx_scope_struct____iter__.tp_print = 0;  |
|                                                              ^              |
| /Users/blankjul/anaconda3/anaconda3/envs/dev/include/python3.8/cpython/obje |
| ct.h:260:5: note: 'tp_print' has been explicitly marked deprecated here     |
|     Py_DEPRECATED(3.8) int (*tp_print)(PyObject *, FILE *, int);            |
|     ^                                                                       |
| /Users/blankjul/anaconda3/anaconda3/envs/dev/include/python3.8/pyport.h:515 |
| :54: note: expanded from macro 'Py_DEPRECATED'                              |
| #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))       |
|                                                      ^                      |
| 5 warnings and 2 errors generated.                                          |
| /Users/blankjul/anaconda3/anaconda3/envs/dev/lib/python3.8/site-packages/se |
| tuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py inst |
| all is deprecated. Use build and pip and other standards-based tools.       |
|   warnings.warn(                                                            |
| /Users/blankjul/anaconda3/anaconda3/envs/dev/lib/python3.8/site-packages/se |
| tuptools/command/easy_install.py:156: EasyInstallDeprecationWarning: easy_i |
| nstall command is deprecated. Use build and pip and other standards-based t |
| ools.                                                                       |
|   warnings.warn(                                                            |
| error: command 'gcc' failed with exit status 1                              |
@blankjul blankjul added the bug label Nov 1, 2021
@ttusar
Copy link
Contributor

ttusar commented Nov 1, 2021

Thanks for the report. We are aware of the issue (#2028), but have yet to publish a fix. In the meantime, you can work around it by making some non-consequential change to the file code-experiments/build/python/cython/interface.pyx (such as adding a space or comment) and rerunning the command. This should trigger cython compilation (instead of using precompiled files) and the error should disappear.

In case that doesn’t work, remove lines 770-775 of the file code-experiments/build/python/cython/interface.pyx.

Let us know how it goes.

@blankjul
Copy link
Author

blankjul commented Nov 2, 2021

Rerunning cython did not do the job. I have tried this before and even added the method declaration to the file.

Commenting out the lines - as you have suggested - worked! Thanks for your quick help!

@blankjul blankjul closed this as completed Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants