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

Error compiling pyvle #12

Open
rtrepos opened this issue Jul 2, 2019 · 5 comments
Open

Error compiling pyvle #12

rtrepos opened this issue Jul 2, 2019 · 5 comments

Comments

@rtrepos
Copy link
Member

rtrepos commented Jul 2, 2019

I get this error when compiling pyvle :

/pub/src/vledev/pyvle/src/convert.cpp:52:18: error: ‘PyInt_FromLong’ was not declared in this scope
result = PyInt_FromLong(
^~~~~~~~~~~~~~
/pub/src/vledev/pyvle/src/convert.cpp:52:18: note: suggested alternative: ‘PyLong_FromLong’

I try to compile pyvle with :

  • Ubuntu 18.04
  • vle master
  • Python 2.7.15rc1
  • libboost-python1.65-dev
@quesnel
Copy link
Member

quesnel commented Jul 2, 2019 via email

@rtrepos
Copy link
Member Author

rtrepos commented Jul 2, 2019

Thanks,
Yes exactly, but I am using python 2.7.15
and according 2.7.16 documentation it should be available :

https://docs.python.org/2/c-api/int.html

There is something that I d'ont understand here.

@rtrepos
Copy link
Member Author

rtrepos commented Jul 2, 2019

Ok I have both python2.7 and python 3.6 installed.
By default python is the version 2.7.
Maybe the Cmake command INCLUDE(FindPythonLibs) search for 3.6 version

@quesnel
Copy link
Member

quesnel commented Jul 2, 2019 via email

@rtrepos
Copy link
Member Author

rtrepos commented Jul 2, 2019

The directive in CMakeList :

EXECUTE_PROCESS(
COMMAND
python -c "from distutils import sysconfig; print sysconfig.get_python_version()"
OUTPUT_VARIABLE PYTHON_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)

return version 2.7, but that is not the version found by cmake.
I will suggest a commit.

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