<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>素心如何天上月 &#187; sunstudio</title> <atom:link href="http://yongsun.me/tag/sunstudio/feed/" rel="self" type="application/rss+xml" /><link>http://yongsun.me</link> <description>Yong Sun&#039;s Blog</description> <lastBuildDate>Mon, 19 Mar 2012 02:29:22 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>build matplotlib-0.98.3 on Solaris with SunStudio 12</title><link>http://yongsun.me/2008/11/build-matplotlib-0-98-3-on-solaris-with-sunstudio-12/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=build-matplotlib-0-98-3-on-solaris-with-sunstudio-12</link> <comments>http://yongsun.me/2008/11/build-matplotlib-0-98-3-on-solaris-with-sunstudio-12/#comments</comments> <pubDate>Mon, 03 Nov 2008 08:43:43 +0000</pubDate> <dc:creator>yongsun</dc:creator> <category><![CDATA[OSS]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[sunstudio]]></category> <guid
isPermaLink="false">http://yongsun.wordpress.com/2008/11/03/build-matplotlib-0-98-3-on-solaris-with-sunstudio-12/</guid> <description><![CDATA[1. Set the CBE environment (/opt/jdsbld/bin/env.sh), and export CC=$CXX, so that /usr/lib/python2.4/pycc would eventually use the C++ compiler in SunStudio. 2. Download the source code from http://matplotlib.sourceforge.net, then apply the following patch, --- setupext.py 2008-08-04 02:15:22.000000000 +0800 +++ setupext.py 2008-11-03 &#8230; <a
href="http://yongsun.me/2008/11/build-matplotlib-0-98-3-on-solaris-with-sunstudio-12/">Continue reading <span
class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>1. Set the CBE environment (/opt/jdsbld/bin/env.sh), and export CC=$CXX, so that /usr/lib/python2.4/pycc would eventually use the C++ compiler in SunStudio.</p><p>2. Download the source code from <a
href="http://matplotlib.sourceforge.net">http://matplotlib.sourceforge.net,</a> then apply the following patch,</p><pre>--- setupext.py	2008-08-04 02:15:22.000000000 +0800
+++ setupext.py	2008-11-03 17:08:41.387138200 +0800
@@ -218,6 +218,8 @@ def get_win32_compiler():
 win32_compiler = get_win32_compiler()
 if sys.platform == 'win32' and win32_compiler == 'msvc':
     std_libs = []
+elif sys.platform == 'sunos5':
+    std_libs = ['Crun', 'Cstd']
 else:
     std_libs = ['stdc++', 'm']
@@ -298,6 +300,7 @@ def check_for_freetype():
         for d in basedirs:
             module.include_dirs.append(os.path.join(d, 'freetype2'))
+    module.include_dirs.append('/usr/include')
     print_status("freetype2", get_pkgconfig_version('freetype2'))
     if not find_include_file(module.include_dirs, 'ft2build.h'):
         print_message(
--- src/_backend_gdk.c	2008-08-04 02:14:18.000000000 +0800
+++ src/_backend_gdk.c	2008-11-03 17:31:32.896210699 +0800
@@ -62,6 +62,7 @@ static PyMethodDef _backend_gdk_function
     { NULL, NULL, 0 }
 };
+extern "C"
 DL_EXPORT(void)
 init_backend_gdk(void)
 {</pre><p>3. Then build and install,</p><pre>$ python setup.py build
$ pfexec python setup.py install</pre><p><strong>Note</strong>: this version of matplotlib requires numpy-1.1 or higher version, you need build and install a newer one since solaris only has 1.0.4.</p> ]]></content:encoded> <wfw:commentRss>http://yongsun.me/2008/11/build-matplotlib-0-98-3-on-solaris-with-sunstudio-12/feed/</wfw:commentRss> <slash:comments>9</slash:comments> </item> <item><title>build scipy-0.6.0 on Solaris with SunStudio 12</title><link>http://yongsun.me/2008/10/build-scipy-0-6-0-on-solaris-with-sunstudio-12/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=build-scipy-0-6-0-on-solaris-with-sunstudio-12</link> <comments>http://yongsun.me/2008/10/build-scipy-0-6-0-on-solaris-with-sunstudio-12/#comments</comments> <pubDate>Fri, 31 Oct 2008 10:45:23 +0000</pubDate> <dc:creator>yongsun</dc:creator> <category><![CDATA[OSS]]></category> <category><![CDATA[Python]]></category> <category><![CDATA[sunstudio]]></category> <guid
isPermaLink="false">http://yongsun.wordpress.com/2008/10/31/build-scipy-0-6-0-on-solaris-with-sunstudio-12/</guid> <description><![CDATA[I finally got some clues about how to build scipy with SunStudio and Sun Performance library from this discussion thread. And here are the steps I sumerized: 1. Download the source tar file of scipy, SciPy 0.6.0 tarball, and extract &#8230; <a
href="http://yongsun.me/2008/10/build-scipy-0-6-0-on-solaris-with-sunstudio-12/">Continue reading <span
class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>I finally got some clues about how to build scipy with SunStudio and Sun Performance library from this <a
href="http://projects.scipy.org/pipermail/scipy-user/2008-July/017464.html">discussion thread</a>. And here are the steps I sumerized:</p><p>1. Download the source tar file of scipy, <a
class="http" href="http://prdownloads.sourceforge.net/scipy/scipy-0.6.0.tar.gz?download">SciPy 0.6.0 tarball</a>, and extract it to anywhere. Apply the following changes to /usr/lib/python2.4/vendor-packages/numpy/distutils/fcompiler/sun.py, since f77compat library is not available on x86/x64 platform,</p><pre>--- sun.py.orig	2008-10-31 18:30:17.519425733 +0800
+++ sun.py	2008-10-31 18:30:23.842495794 +0800
@@ -38,7 +38,7 @@
         return ['-xtarget=generic']
     def get_libraries(self):
         opt = []
-        opt.extend(['fsu','sunmath','mvec','f77compat'])
+        opt.extend(['fsu','sunmath','mvec'])
         return opt
 if __name__ == '__main__':
</pre><p>and apply the following patch,</p><p> <code><br
/> --- scipy/sparse/sparsetools/sparsetools.h&nbsp;&nbsp;&nbsp; 2007-09-22 15:55:25.000000000 +0800<br
/>+++ scipy/sparse/sparsetools/sparsetools.h&nbsp;&nbsp;&nbsp; 2008-10-31 17:54:47.317379521 +0800<br
/>@@ -22,6 +22,7 @@</p><p>&nbsp;#include &lt;vector&gt;<br
/>&nbsp;#include &lt;algorithm&gt;<br
/>+#include &lt;functional&gt;</p><p>&nbsp;/*</code></p><p>2. Set CBE environment (/opt/jdsbld/bin/env.sh), and the following environment variables,</p><pre>$ export LDFLAGS="-lCrun -lCstd"
$ export LAPACK=/opt/SUNWspro/lib/libsunmath.so
$ export BLAS=/opt/SUNWspro/lib/libsunperf.so
</pre><p>3. Then build, install, and test</p><pre>$ python setup.py build
$ pfexec setup.py install
$ cd ~ # don't run the test under the source directory
$ python
&gt;&gt;&gt; import scipy
&gt;&gt;&gt; scipy.test()
</pre><p>Though, you would see several errors, most of the tests passed.</p> ]]></content:encoded> <wfw:commentRss>http://yongsun.me/2008/10/build-scipy-0-6-0-on-solaris-with-sunstudio-12/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>SunStudio 12 released, but VLA in C++ is still not supported :(</title><link>http://yongsun.me/2007/06/sunstudio-12-released-but-vla-in-c-is-still-not-supported/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sunstudio-12-released-but-vla-in-c-is-still-not-supported</link> <comments>http://yongsun.me/2007/06/sunstudio-12-released-but-vla-in-c-is-still-not-supported/#comments</comments> <pubDate>Tue, 05 Jun 2007 04:20:51 +0000</pubDate> <dc:creator>yongsun</dc:creator> <category><![CDATA[OSS]]></category> <category><![CDATA[c++]]></category> <category><![CDATA[sunstudio]]></category> <guid
isPermaLink="false">http://yongsun.wordpress.com/2007/06/04/sunstudio-12-released-but-vla-in-c-is-still-not-supported/</guid> <description><![CDATA[SunStudio 12 was released, it resolved my 2nd problem listed in my blog &#34;2 Tips of C++ Programming with const&#34;, but VLA in C++ is still not supported yet]]></description> <content:encoded><![CDATA[<p>SunStudio 12 was released, it resolved my 2nd problem listed in my blog &quot;<a
href="../../yongsun/entry/2_tips_of_c_programming" name="2_tips_of_c_programming" id="2_tips_of_c_programming">2 Tips of C++ Programming with const</a>&quot;, but VLA in C++ is still not supported yet <img
src='http://yongsun.me/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /></p> ]]></content:encoded> <wfw:commentRss>http://yongsun.me/2007/06/sunstudio-12-released-but-vla-in-c-is-still-not-supported/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>SunStudio C/C++ compiler can not initialize the pointer member within a packed structure</title><link>http://yongsun.me/2007/05/sunstudio-cc-compiler-can-not-initialize-the-pointer-member-within-a-packed-structure/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sunstudio-cc-compiler-can-not-initialize-the-pointer-member-within-a-packed-structure</link> <comments>http://yongsun.me/2007/05/sunstudio-cc-compiler-can-not-initialize-the-pointer-member-within-a-packed-structure/#comments</comments> <pubDate>Tue, 15 May 2007 05:59:46 +0000</pubDate> <dc:creator>yongsun</dc:creator> <category><![CDATA[OSS]]></category> <category><![CDATA[sunstudio]]></category> <guid
isPermaLink="false">http://yongsun.wordpress.com/2007/05/14/sunstudio-cc-compiler-can-not-initialize-the-pointer-member-within-a-packed-structure/</guid> <description><![CDATA[#include&#60;stdio.h&#62; #pragma pack(1) struct foo{&#160;&#160;&#160;&#160;&#160;&#160;&#160; char a;&#160;&#160;&#160;&#160;&#160;&#160;&#160; char *str;}; int main(){&#160;&#160;&#160;&#160;&#160;&#160;&#160; struct&#160; foo bar={'a', &#34;test&#34;};&#160;&#160;&#160;&#160;&#160;&#160;&#160; printf (&#34;%p, %p\n&#34;, &#38;(bar.a), &#38;(bar.str));} $ cc test.c&#34;test.c&#34;, line 12: cannot use an address to initialize a field of a packed struct (#pragma pack) While, &#8230; <a
href="http://yongsun.me/2007/05/sunstudio-cc-compiler-can-not-initialize-the-pointer-member-within-a-packed-structure/">Continue reading <span
class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p><code>#include&lt;stdio.h&gt;</p><p>#pragma pack(1)</p><p>struct foo{<br
/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; char a;<br
/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; char *str;<br
/>};</p><p>int main()<br
/>{<br
/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; struct&nbsp; foo bar={'a', &quot;test&quot;};<br
/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf (&quot;%p, %p\n&quot;, &amp;(bar.a), &amp;(bar.str));<br
/>}</p><p></code><br
/> <code>$ cc test.c<br
/>&quot;test.c&quot;, line 12: cannot use an address to initialize a field of a packed struct (#pragma pack)</p><p></code><br
/> While, gcc (even on sparc) could compile this test program, and from the output we could see that the &quot;str&quot; member just follows the char member -- 'a', and does not align with the 4/8 byte boundary. So it's not limitation of architecture, but a constraint of compiler.</p> ]]></content:encoded> <wfw:commentRss>http://yongsun.me/2007/05/sunstudio-cc-compiler-can-not-initialize-the-pointer-member-within-a-packed-structure/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
