Sun Studio 10 gives compilation error on Solaris X86 (Opteron) with -xarch=amd64 - Solaris

This is a discussion on Sun Studio 10 gives compilation error on Solaris X86 (Opteron) with -xarch=amd64 - Solaris ; Hello, This test (C++) program fails to compile in Studio 10 in Solaris x86 (Opteron) when -xarch=amd64 specified. It compiles with -xarch=generic or -xarch=sse2. Anyone has inputs on what's happening ? test.cpp : ----------- #include namespace nms { class someclass; ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Sun Studio 10 gives compilation error on Solaris X86 (Opteron) with -xarch=amd64

  1. Sun Studio 10 gives compilation error on Solaris X86 (Opteron) with -xarch=amd64

    Hello,

    This test (C++) program fails to compile in Studio 10 in Solaris x86
    (Opteron) when -xarch=amd64 specified. It compiles with -xarch=generic
    or -xarch=sse2. Anyone has inputs on what's happening ?

    test.cpp :
    -----------

    #include
    namespace nms {

    class someclass;

    class parent
    {
    public:
    virtual size_t func1(std::map &ids) const =
    0;
    };

    class child : public parent
    {
    public:
    child();
    virtual size_t func1(std::map&) const;
    };

    size_t child::func1( std::map &ids) const
    {
    return parent::func1(ids);
    }

    } // namespace


    To compile :
    ---------------
    /opt/SUNWspro/bin/CC -c 1.cpp -xarch=amd64 (FAILS to compile)
    /opt/SUNWspro/bin/CC -c 1.cpp -xarch=generic (Compiles)

    $ /opt/SUNWspro/bin/CC -V
    CC: Sun C++ 5.7 2005/01/07

    $ uname -a
    SunOS solx86_1a 5.10 Generic_118844-08 i86pc i386 i86pc


  2. Re: Sun Studio 10 gives compilation error on Solaris X86 (Opteron)with -xarch=amd64

    sundarms@gmail.com wrote:
    > To compile :
    > ---------------
    > /opt/SUNWspro/bin/CC -c 1.cpp -xarch=amd64 (FAILS to compile)
    > /opt/SUNWspro/bin/CC -c 1.cpp -xarch=generic (Compiles)
    >
    > $ /opt/SUNWspro/bin/CC -V
    > CC: Sun C++ 5.7 2005/01/07
    >
    > $ uname -a
    > SunOS solx86_1a 5.10 Generic_118844-08 i86pc i386 i86pc
    >

    Looks like you are missing some patches:

    # /opt/studio10/SUNWspro/bin/CC -c -xarch=amd64 ~/temp/x.cc
    # /opt/studio10/SUNWspro/bin/CC -V
    CC: Sun C++ 5.7 Patch 117831-04 2005/09/14

    --
    Ian Collins.

  3. Re: Sun Studio 10 gives compilation error on Solaris X86 (Opteron) with -xarch=amd64

    On 2006-07-05 08:19:29 +0100, sundarms@gmail.com said:

    > /opt/SUNWspro/bin/CC -c 1.cpp -xarch=amd64 (FAILS to compile)
    > /opt/SUNWspro/bin/CC -c 1.cpp -xarch=generic (Compiles)
    >
    > $ /opt/SUNWspro/bin/CC -V
    > CC: Sun C++ 5.7 2005/01/07
    >
    > $ uname -a
    > SunOS solx86_1a 5.10 Generic_118844-08 i86pc i386 i86pc


    Try Sun Studio 11 (also free) - both compile lines worked OK for me.

    % CC -V
    CC: Sun C++ 5.8 Patch 121018-02 2006/04/26

    You could also make sure you're up-to-date on your Studio 10 patches
    first, I guess.

    Cheers,

    Chris


  4. Re: Sun Studio 10 gives compilation error on Solaris X86 (Opteron) with -xarch=amd64

    Thanks Ian and Chris for your quick response. I will download the patch
    and try.

    regards,
    sundar.

    Chris Ridd wrote:
    > On 2006-07-05 08:19:29 +0100, sundarms@gmail.com said:
    >
    > > /opt/SUNWspro/bin/CC -c 1.cpp -xarch=amd64 (FAILS to compile)
    > > /opt/SUNWspro/bin/CC -c 1.cpp -xarch=generic (Compiles)
    > >
    > > $ /opt/SUNWspro/bin/CC -V
    > > CC: Sun C++ 5.7 2005/01/07
    > >
    > > $ uname -a
    > > SunOS solx86_1a 5.10 Generic_118844-08 i86pc i386 i86pc

    >
    > Try Sun Studio 11 (also free) - both compile lines worked OK for me.
    >
    > % CC -V
    > CC: Sun C++ 5.8 Patch 121018-02 2006/04/26
    >
    > You could also make sure you're up-to-date on your Studio 10 patches
    > first, I guess.
    >
    > Cheers,
    >
    > Chris



  5. Re: Sun Studio 10 gives compilation error on Solaris X86 (Opteron) with -xarch=amd64

    hello,


    Part Pic

    If you are interested in the computer,you can come to my picture
    www.flickr.com/photos/partpic/.
    We are the professional photograph website about the computer.
    there are o lot of picture of some kinds of computer ,include
    BIM,SUN,HP,EMC,HDS and others.Welcome you!


    sundarms@gmail.com wrote:
    > Hello,
    >
    > This test (C++) program fails to compile in Studio 10 in Solaris x86
    > (Opteron) when -xarch=amd64 specified. It compiles with -xarch=generic
    > or -xarch=sse2. Anyone has inputs on what's happening ?
    >
    > test.cpp :
    > -----------
    >
    > #include
    > namespace nms {
    >
    > class someclass;
    >
    > class parent
    > {
    > public:
    > virtual size_t func1(std::map &ids) const =
    > 0;
    > };
    >
    > class child : public parent
    > {
    > public:
    > child();
    > virtual size_t func1(std::map&) const;
    > };
    >
    > size_t child::func1( std::map &ids) const
    > {
    > return parent::func1(ids);
    > }
    >
    > } // namespace
    >
    >
    > To compile :
    > ---------------
    > /opt/SUNWspro/bin/CC -c 1.cpp -xarch=amd64 (FAILS to compile)
    > /opt/SUNWspro/bin/CC -c 1.cpp -xarch=generic (Compiles)
    >
    > $ /opt/SUNWspro/bin/CC -V
    > CC: Sun C++ 5.7 2005/01/07
    >
    > $ uname -a
    > SunOS solx86_1a 5.10 Generic_118844-08 i86pc i386 i86pc



+ Reply to Thread