Solaris 10 と Sun Studio 11 の切っても切れない関係,,,

なぜかはしらんが、Sun Studio 11 でコンパイルすると、gcc でコンパイルできなかったものがコンパイルできたり、gcc でコンパイルしたものより実行速度が改善されたりといいこと尽くめ。なんか Sun が Solaris 上では、gcc が不利なようにしてるんじゃないw?
実際は、gcc が汎用なのに対して、Solaris (もっと厳密に言えば AMD CPU)用にコードを最適化してくれるらしいよ。
とにかく、Solaris でコンパイルするときはこっちでやるのが賢い。

ダウンロードサイト:
http://jp.sun.com/products/software/tools/studio11/get.html
http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=8&PartDetailId=SSSI9-110-TF9M&TransactionId=try
※ダウンロードには、Sun Download Center にアカウント(無料)が必要。
 Solaris 10 をダウンロードするときにアカウントを登録しているはず,,,

上記から studio11-sol-x86.tar.bz2 をダウンロードする。

Solaris x86 Platform – Sun Studio 11
Sun Studio 11 Software, English/Japanese/Simplified Chinese
studio11-sol-x86.tar.bz2 (332.58 MB)

$ cd pkg/
$ wget $studio11-sol-x86.tar.bz2
$ gtar jxvf studio11-sol-x86.tar.bz2
$ cd studio11-sol-x86/
$ su
# ./installer

Java Accessibility Bridge for GNOME loaded.



Welcome to the Install Wizard for Sun Studio 11 developer tools, an integrated
set of tools for the development and deployment of enterprise-class
applications.

<Press ENTER to continue> {"!" exits} [Enter]

ENTITLEMENT for SOFTWARE
THIS ENTITLEMENT EVIDENCES YOUR LICENSE TO USE THE SUN SOFTWARE SET
FORTH BELOW UNDER THE TERMS OF THE SUN MICROSYSTEMS, INC. SOFTWARE
LICENSE AGREEMENT.
Licensee/Company: Entity receiving Software.
Effective Date: Date Sun delivers the Software to You.
Software: Sun Studio 11.
Permitted Use: You may reproduce and use the Software for Individual,
Commercial, and Research and Instructional Use.
License Term: Perpetual (subject to termination under the SLA).
Licensed Unit: Software Copy.
Licensed Unit Count: Unlimited.
Sun Microsystems, Inc. ("Sun") SOFTWARE LICENSE AGREEMENT
READ THE TERMS OF THIS AGREEMENT ("AGREEMENT") CAREFULLY BEFORE OPENING
SOFTWARE MEDIA PACKAGE. BY OPENING SOFTWARE MEDIA PACKAGE, YOU AGREE TO
THE TERMS OF THIS AGREEMENT. IF YOU ARE ACCESSING SOFTWARE
ELECTRONICALLY, INDICATE YOUR ACCEPTANCE OF THESE TERMS BY SELECTING
THE "ACCEPT" BUTTON AT THE END OF THIS AGREEMENT. IF YOU DO NOT AGREE
TO ALL OF THE TERMS, PROMPTLY RETURN THE UNUSED SOFTWARE TO YOUR PLACE
OF PURCHASE FOR A REFUND OR, IF SOFTWARE IS ACCESSED ELECTRONICALLY,

<--[10%]--[ENTER To Continue]--[n To Finish]--> {"<" goes back, "!" exits} [Enter]

SELECT THE "DECLINE" (OR "EXIT") BUTTON AT THE END OF THIS AGREEMENT.
IF YOU HAVE SEPARATELY AGREED TO LICENSE TERMS ("MASTER TERMS") FOR
YOUR LICENSE TO THIS SOFTWARE, THEN SECTIONS 1-5 OF THIS AGREEMENT
("SUPPLEMENTAL LICENSE TERMS") SHALL SUPPLEMENT AND SUPERSEDE THE
MASTER TERMS IN RELATION TO THIS SOFTWARE.
1. Definitions.
(a) "Entitlement" means the collective set of applicable documents
authorized by Sun evidencing your obligation to pay associated fees (if
any) for the license, associated Services, and the authorized scope of
use of Software under this Agreement.
(b) "Licensed Unit" means the unit of measure by which your use of
Software and/or Service is licensed, as described in your Entitlement.
(c) "Permitted Use" means the licensed Software use(s) authorized
in this Agreement as specified in your Entitlement. The Permitted Use
for any bundled Sun software not specified in your Entitlement will be
evaluation use as provided in Section 3.
(d) "Service" means the service(s) that Sun or its delegate will
provide, if any, as selected in your Entitlement and as further
described in the applicable service listings at
www.sun.com/service/servicelist.

<--[20%]--[ENTER To Continue]--[n To Finish]--> {"<" goes back, "!" exits} [Enter]

(e) "Software" means the Sun software described in your
Entitlement. Also, certain software may be included for evaluation use
under Section 3.
(f) "You" and "Your" means the individual or legal entity specified
in the Entitlement, or for evaluation purposes, the entity performing
the evaluation.
2. License Grant and Entitlement.
Subject to the terms of your Entitlement, Sun grants you a
nonexclusive, nontransferable limited license to use Software for its
Permitted Use for the license term. Your Entitlement will specify (a)
Software licensed, (b) the Permitted Use, (c) the license term, and (d)
the Licensed Units.
Additionally, if your Entitlement includes Services, then it will also
specify the (e) Service and (f) service term.
If your rights to Software or Services are limited in duration and the
date such rights begin is other than the purchase date, your
Entitlement will provide that beginning date(s).
The Entitlement may delivered to you in various ways depending on the
manner in which you obtain Software and Services, for example, the
Entitlement may be provided in your receipt, invoice or your contract

<--[30%]--[ENTER To Continue]--[n To Finish]--> {"<" goes back, "!" exits} [Enter]
with Sun or authorized Sun reseller. It may also be in electronic
format if you download Software.
3. Permitted Use.
As selected in your Entitlement, one or more of the following Permitted
Uses will apply to your use of Software. Unless you have an Entitlement
that expressly permits it, you may not use Software for any of the
other Permitted Uses. If you don't have an Entitlement, or if your
Entitlement doesn't cover additional software delivered to you, then
such software is for your Evaluation Use.
(a) Evaluation Use. You may evaluate Software internally for a period
of 90 days from your first use.
(b) Research and Instructional Use. You may use Software internally to
design, develop and test, and also to provide instruction on such
uses.
(c) Individual Use. You may use Software internally for personal,
individual use.
(d) Commercial Use. You may use Software internally for your own
commercial purposes.
(e) Service Provider Use. You may make Software functionality
accessible (but not by providing Software itself or through outsourcing

<--[41%]--[ENTER To Continue]--[n To Finish]--> {"<" goes back, "!" exits} [Enter]

services) to your end users in an extranet deployment, but not to your
affiliated companies or to government agencies.
4. Licensed Units.
Your Permitted Use is limited to the number of Licensed Units stated in
your Entitlement. If you require additional Licensed Units, you will
need additional Entitlement(s).
5. Restrictions.
(a) The copies of Software provided to you under this Agreement are
licensed, not sold, to you by Sun. Sun reserves all rights not
expressly granted. (b) You may make a single archival copy of Software,
but otherwise may not copy, modify, or distribute Software. However if
the Sun documentation accompanying Software lists specific portions of
Software, such as header files, class libraries, reference source code,
and/or redistributable files , that may be handled differently, you may
do so only as provided in the Sun documentation. (c) You may not rent,
lease, lend or encumber Software. (d) Unless enforcement is prohibited
by applicable law, you may not decompile, or reverse engineer Software.
(e) The terms and conditions of this Agreement will apply to any
Software updates, provided to you at Sun's discretion, that replace
and/or supplement the original Software, unless such update contains a

<--[51%]--[ENTER To Continue]--[n To Finish]--> {"<" goes back, "!" exits} [Enter]

separate license. (f) You may not publish or provide the results of any
benchmark or comparison tests run on Software
6. Term and Termination.
The license and service term are set forth in your Entitlement(s). Your
rights under this Agreement will terminate immediately without notice
from Sun if you materially breach it or take any action in derogation
of Sun's and/or its licensors' rights to Software. Sun may terminate
this Agreement should any Software become, or in Sun's reasonable
opinion likely to become, the subject of a claim of intellectual
property infringement or trade secret misappropriation. Upon
termination, you will cease use of, and destroy, Software and confirm
compliance in writing to Sun. Sections 1, 5, 6, 7, and 9-15 will
survive termination of the Agreement.
7. Java Compatibility and Open Source.
Software may contain Java technology. You may not create additional
classes to, or modifications of, the Java technology, except under
compatibility requirements available under a separate agreement
available at www.java.net.
Sun supports and benefits from the global community of open source
developers, and thanks the community for its important contributions

<--[61%]--[ENTER To Continue]--[n To Finish]--> {"<" goes back, "!" exits} [Enter]

and open standards-based technology, which Sun has adopted into many of
its products.
Please note that portions of Software may be provided with notices and
open source licenses from such communities and third parties that
govern the use of those portions, and any licenses granted hereunder do
not alter any rights and obligations you may have under such open
source licenses, however, the disclaimer of warranty and limitation of
liability provisions in this Agreement will apply to all Software in
this distribution.
8. Limited Warranty.
Sun warrants to you that for a period of 90 days from the date of
purchase, as evidenced by a copy of the receipt, the media on which
Software is furnished (if any) will be free of defects in materials and
workmanship under normal use. Except for the foregoing, Software is
provided "AS IS". Your exclusive remedy and Sun's entire liability
under this limited warranty will be at Sun's option to replace Software
media or refund the fee paid for Software. Some states do not allow
limitations on certain implied warranties, so the above may not apply
to you. This limited warranty gives you specific legal rights. You may
have others, which vary from state to state.

<--[71%]--[ENTER To Continue]--[n To Finish]--> {"<" goes back, "!" exits} [Enter]

9. Disclaimer of Warranty.
UNLESS SPECIFIED IN THIS AGREEMENT, ALL EXPRESS OR IMPLIED CONDITIONS,
REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT
ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT THESE DISCLAIMERS ARE HELD TO
BE LEGALLY INVALID.
10. Limitation of Liability.
TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL SUN OR ITS
LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR
SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES,
HOWEVER CAUSED REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF OR
RELATED TO THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS
BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. In no event will Sun's
liability to you, whether in contract, tort (including negligence), or
otherwise, exceed the amount paid by you for Software under this
Agreement. The foregoing limitations will apply even if the above
stated warranty fails of its essential purpose. Some states do not
allow the exclusion of incidental or consequential damages, so some of
the terms above may not be applicable to you.
11. Export Regulations.

<--[82%]--[ENTER To Continue]--[n To Finish]--> {"<" goes back, "!" exits} [Enter]

All Software, documents, technical data, and any other materials
delivered under this Agreement are subject to U.S. export control laws
and may be subject to export or import regulations in other countries.
You agree to comply strictly with these laws and regulations and
acknowledge that you have the responsibility to obtain any licenses to
export, re-export, or import as may be required after delivery to you.
12. U.S. Government Restricted Rights.
If Software is being acquired by or on behalf of the U.S. Government or
by a U.S. Government prime contractor or subcontractor (at any tier),
then the Government's rights in Software and accompanying documentation
will be only as set forth in this Agreement; this is in accordance with
48 CFR 227.7201 through 227.7202-4 (for Department of Defense (DOD)
acquisitions) and with 48 CFR 2.101 and 12.212 (for non-DOD
acquisitions).
13. Governing Law.
Any action related to this Agreement will be governed by California law
and controlling U.S. federal law. No choice of law rules of any
jurisdiction will apply.
14. Severability.
If any provision of this Agreement is held to be unenforceable, this

<--[92%]--[ENTER To Continue]--[n To Finish]--> {"<" goes back, "!" exits} [Enter]

Agreement will remain in effect with the provision omitted, unless
omission would frustrate the intent of the parties, in which case this
Agreement will immediately terminate.
15. Integration.
This Agreement, including any terms contained in your Entitlement, is
the entire agreement between you and Sun relating to its subject
matter. It supersedes all prior or contemporaneous oral or written
communications, proposals, representations and warranties and prevails
over any conflicting or additional terms of any quote, order,
acknowledgment, or other communication between the parties relating to
its subject matter during the term of this Agreement. No modification
of this Agreement will be binding, unless in writing and signed by an
authorized representative of each party.
Please contact Sun Microsystems, Inc. 4150 Network Circle, Santa Clara,
California 95054 if you have questions.

Accept this agreement by typing "Accept"
at the following prompt. If you do not accept this agreement,
type "Decline", or select "!" to exit. {"<" goes back, "!" exits} Accept



Select Locale localized data for the languages showing a checked box will be
installed:


[X] 1 English [en] [CURRENT LOCALE]
[X] 2 Japanese [ja]
[X] 3 Chinese [zh]

To check a particular locale, enter its number, or 0 when you are finished
[0] {"<" goes back, "!" exits}: 3

Select Locale localized data for the languages showing a checked box will be
installed:


[X] 1 English [en] [CURRENT LOCALE]
[X] 2 Japanese [ja]
[ ] 3 Chinese [zh]

To check a particular locale, enter its number, or 0 when you are finished
[0] {"<" goes back, "!" exits}: [Enter]

Select the components you want to install by clicking the radio button in the
Default Install column or Custom Install column. If you choose a Custom
Install, you can select which subcomponents you want to install. To continue,
click Next.

No Install Default Install Custom Install Product
---------- --------------- -------------- -------
0. [ ] [X] [ ] Solaris patches
1. [ ] [X] [ ] Sun Studio Software
2. [ ] [X] [ ] Documentation
3. [ ] [X] [ ] Source Distribution
4. [ ] [X] [ ] Sun Performance Library
5. Done
Enter the number that corresponds with the product you want to change.
Select the number that corresponds with Done when you are finished. [5] {"<"
goes back, "!" exits} [Enter]

Enter the directory name where you want to install the product.

Studio Software [/opt] {"<" goes back, "!" exits} [Enter]

Checking disk space.


The following items will be installed:

Product: Solaris patches
Location: /opt
Size: 11.86 MB
------------------------
Shared library patch for C++ for x86 5.48 MB
libmtsk patch required by compilers for x86 378.91 KB
Shared library patch for C++ for SPARC 6.02 MB

Product: Sun Studio Software
Location: /opt
Size: 662.49 MB
----------------------------
Standalone Tools: DBX Debugging Tools 17.81 MB
Standalone Tools: Building Software 2.17 MB
IDE 54.45 MB
External editors 290.44 MB
Compilers C++ 187.95 MB
X-designer 41.2 MB
Compilers C 39.31 MB
Garbage Collectors 2.5 MB
Performance Tools 8.61 MB
Sun Studio 11 Demos 9 bytes
Demos 394.24 KB
Compilers Fortran 95 81.49 MB

Product: Documentation
Location: /opt
Size: 22.84 MB
----------------------
Documentation Set 22.84 MB

Product: Source Distribution
Location: /opt
Size: 2.02 MB
----------------------------
Exuberant ctags source code 254.88 KB
DwarfLibrary 20.4 1.26 MB
Red-Black Tree Library 1.1 518.51 KB
Sun Studio 11 STLPort 1.83 MB

Product: Sun Performance Library
Location: /opt
Size: 151.34 MB
--------------------------------
Sun Performance Library 194.04 MB



Ready to Install

1. Install Now
2. Start Over
3. Exit Installation

What would you like to do [1] {"<" goes back, "!" exits}? [Enter]

Installing Solaris patches
|-1%--------------25%-----------------50%-----------------75%--------------100%|

Installing Sun Studio Software
|-1%--------------25%-----------------50%-----------------75%--------------100%|

Installing Documentation
|-1%--------------25%-----------------50%-----------------75%--------------100%|

Installing Source Distribution
|-1%--------------25%-----------------50%-----------------75%--------------100%|

Installing Sun Performance Library
|-1%--------------25%-----------------50%-----------------75%--------------100%|


Installation details:

Product Result More Info
1. Solaris patches Installed Available
2. Sun Studio Software Installed Available
3. Documentation Installed Available
4. Source Distribution Installed Available
5. Sun Performance Library Installed Available

6. Done

Enter the number corresponding to the desired selection for more
information, or enter 6 to continue [6] {"!" exits}: [Enter]


The installation and licensing log files are located at /var/sadm/install/logs.
To view a log file, type at the prompt:
% cd /var/sadm/install/logs; more <filename>


The installed product contains Update Notification, a feature that checks
a web service at Sun Microsystems and informs you of relevant updates.
Please refer to the Release Notes for further information.


If you installed any component of the Sun Studio 11 developer tools on a
network server, you can use the email template /<install-
directory>/SUNWspro/READMEs/email_template.txt to send getting started
information to the developers who use the network-installed software.


You should now set your PATH to include <install-directory>/SUNWspro/bin
For instance, if <install-directory> is /opt (the default)
for Bourne-family shells (sh, bash, ksh)
$ PATH=/opt/SUNWspro/bin:$PATH; export PATH
for C-family shells (csh, tcsh)
% setenv PATH /opt/SUNWspro/bin:$PATH
Then, to run the IDE, type at the prompt:
% sunstudio





<Press ENTER to continue> {"<" goes back, "!" exits} [Enter]

Sun Studio 11 用の環境変数

使うときは適時、環境変数をいぢくること。

$ PATH=/opt/SUNWspro/bin:$PATH
$ CC=/opt/SUNWspro/bin/cc
$ CXX=/opt/SUNWspro/bin/CC
$ F77=/opt/SUNWspro/bin/f77
$ export PATH CC CXX F77
タイトルとURLをコピーしました