Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
fix the swab bug to compile on solaris system #6628
Conversation
mdboom
added the
needs_review
label
Jun 23, 2016
tacaswell
modified the milestone: 2.0 (style change major release), 2.0.1 (next bug fix release)
Jun 23, 2016
|
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 |
tacaswell
modified the milestone: 1.5.2 (Critical bug fix release), 2.0.1 (next bug fix release)
Jun 23, 2016
|
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 <jdh2358@gmail.com>
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 |
WeatherGod
merged commit 5de9c44
into matplotlib:master
Jun 24, 2016
mdboom
removed the
needs_review
label
Jun 24, 2016
WeatherGod
added a commit
that referenced
this pull request
Jun 24, 2016
|
|
WeatherGod |
bf6e785
|
|
backported to v1.5.x via bf6e785 |
FrankYu commentedJun 23, 2016
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 flyxiaoyu@gmail.com