-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
fix the swab bug to compile on solaris system #6628
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
Conversation
on smartos will met below error when try to build: In file included from /opt/local/include/python2.7/Python.h:44:0, from src/mplutils.h:21, from src/ft2font_wrapper.cpp:1: /usr/include/unistd.h:521:75: error: declaration of C function 'void swab(const void*, void*, ssize_t)' conflicts with In file included from /opt/local/include/python2.7/Python.h:42:0, from src/mplutils.h:21, from src/ft2font_wrapper.cpp:1: /usr/include/stdlib.h:170:13: error: previous declaration 'void swab(const char*, char*, ssize_t)' here error: command 'gcc' failed with exit status 1 Signed-off-by: Frank Yu <[email protected]>
Signed-off-by: Frank Yu <[email protected]>
Why does this work? Is this a know conflict? We obviously have no CI on this change. |
someone has report this problem http://matplotlib.1069221.n5.nabble.com/Runtime-Error-on-Solaris-Error-Closing-Dupe-File-Handle-td45601.html why this work: on smartos: #sed -n 512,525p /usr/include/unistd.h swab was declared 'if defined(_XPG4)'. So add 'undef _XPG4' to avoid the twice declaration of swab. #git show d0d21
diff --git a/CHANGELOG b/CHANGELOG
What should I do if we need setup CI env for this? |
Is there any links that you could include as a comment so help guide future developers? |
no link. I can update this patch with comment about that. Is it ok? |
That'll have to do, I suppose. I don't think any of the regular developers have much experience developing on a sun-like system, so we don't know what the implications are of undef-ing that macro. |
@WeatherGod |
For CI would would need access to a solaris (like) box to run on. (slightly better formatted version git log) 09:43 $ git show d0d2110f3fd6ba00403f949cc519760bb3ee3e2e
commit d0d2110f3fd6ba00403f949cc519760bb3ee3e2e
Author: John Hunter <[email protected]>
Date: Fri Jul 2 18:06:25 2010 +0000
fix swab bug so mpl will compile on solaris with cxx 6
svn path=/trunk/matplotlib/; revision=8484
diff --git a/CHANGELOG b/CHANGELOG
index c49196d..af6023d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,7 @@
+2010-07-02 Modified CXX/WrapPython.h to fix "swab bug" on solaris so
+ mpl can compile on Solaris with CXX6 in the trunk. Closes
+ tracker bug 3022815 - JDH
+
2010-06-30 Added autoscale convenience method and corresponding
pyplot function for simplified control of autoscaling;
and changed axis, set_xlim, and set_ylim so that by
diff --git a/CXX/WrapPython.h b/CXX/WrapPython.h
index 118a874..ef97cf1 100644
--- a/CXX/WrapPython.h
+++ b/CXX/WrapPython.h
@@ -48,6 +48,9 @@
#if defined(_XPG4)
#undef _XPG4
#endif
+#if defined(_XPG3)
+#undef _XPG3
+#endif
#endif
// Python.h will redefine these and generate warning in the process
attn @mdboom It looks like this is something we lost in the CXX-ectomy @FrankYu Thanks for your diligent footwork on this! Can you put in the XDG3 undef as well? Given that we still have not cut 1.5.2 and we now have win+mac+linux testing in this branch I think this should be backported to 1.5.x |
Signed-off-by: Frank Yu <[email protected]>
fix the swab bug to compile on solaris system
backported to v1.5.x via bf6e785 |
on smartos will met below error when try to build:
In file included from /opt/local/include/python2.7/Python.h:44:0,
/usr/include/unistd.h:521:75: error: declaration of C function 'void swab(const void_, void_, ssize_t)' conflicts with
In file included from /opt/local/include/python2.7/Python.h:42:0,
/usr/include/stdlib.h:170:13: error: previous declaration 'void swab(const char_, char_, ssize_t)' here
error: command 'gcc' failed with exit status 1
Signed-off-by: Frank Yu [email protected]