Closed utke1 closed 4 years ago
setup.py was modified as follows:
--- a/setup.py
+++ b/setup.py
@@ -6,12 +6,12 @@
# https://www.gnu.org/licenses/gpl-3.0.txt
# -----------------------------------------------------------------------------
# BEGIN_USER_SETTINGS
-verbose_makefile = "false"
+verbose_makefile = "true`"
build_type = "debug"
-swig_cxx_flags = "-Wno-sign-compare -Wno-catch-value -Wno-class-memaccess"
-cppad_cxx_flags = "-Wall -pedantic-errors -Wno-unused-result"
+swig_cxx_flags = "-Wno-sign-compare -Wno-catch-value -Wno-class-memaccess -std=c++11"
+cppad_cxx_flags = "-Wall -pedantic-errors -Wno-unused-result -std=c++11"
cppad_prefix = "build/prefix"
-test_cppad = "false"
+test_cppad = "true"
# END_USER_SETTINGS
# -----------------------------------------------------------------------------
import re
I have run the change above to setup.py with both python2 and python3 and make check works in both cases on my machine; e.g.
python3 setup.py build_ext --inplace
cd build
make check
What version of swig are you usinbuild>swig -version SWIG Version 3.0.12 Compiled with g++ [x86_64-redhat-linux-gnu] Configured options: +pcre
I have:
jutke@vb:/sandbox/jutke/work/Git/cppad_py$ swig -version
SWIG Version 3.0.8
Compiled with g++ [x86_64-pc-linux-gnu]
Configured options: +pcre
...
jutke@vb:/sandbox/jutke/work/Git/cppad_py$ python3
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609] on linux
but I could change to different versions if need be.
I downgraded to swig.3.0.8 and got the error: [ 22%] Generating error_message_xam.py TypeError: unsupported operand type(s) for /=: 'a_double' and 'a_double' Would you please try upgrading to a newer version of swig and see what happens.
with swig upgraded to 3.0.12 I see all the checks on https://bradbell.github.io/cppad_py/doc/testing.htm passing.
Should I close this now or do you want to use it to track implementing a check for the swig version during the setup?
Lets leave this issue open until we determine that there actually was a swig bug fix that corresponds to why this does not work for swig-3.0.8.
as in