#12 Sun CC static libs don't start with "lib"

closed-fixed
nobody
None
5
2004-04-24
2002-10-30
Anonymous
No

I'm trying to compile using the <cc> task on Solaris with
Sun Forte compiler version 6.2 (name="CC").
I have encountered two problems:
1. The ant process get stuck on CC -help and continues
only after I do a kill on the "CC -help" process.
2. If I create a static library this task does not append
a "lib" prefix to the library name , although it should.

Discussion

  • Guy Peer

    Guy Peer - 2002-11-07

    Logged In: YES
    user_id=639151

    I'm also having the same probelms.

     
  • Rajesh Jain

    Rajesh Jain - 2003-02-01

    Logged In: YES
    user_id=702131

    "CC -help" dumps tonnes of data on Output stream. No one
    is cleaning the output and error stream buffer association with
    the process in which "CC -help" is run. Because of this, the
    ant process gets stuck.

    The hackneyed way of fixing this problem is to avoid calling
    CC -help. This could be done by adding following function to
    ForteCCLinker.java

    public String getIdentifier() { return "CC"; }

    The right fix would be to continously read data from Output
    and ErrorStream associated with the newly created process.
    This is to ensure that the output and error stream buffer don't
    get overflowed.

     
  • Davy Virdee

    Davy Virdee - 2003-02-05

    Logged In: YES
    user_id=704986

    I get the same "hang" just trying to invoke a compile using
    CC
    <target name="compile" description="compile up the
    source">
    <cc name="CC" objdir=".">
    <fileset dir=".">
    <patternset id="cppFiles">
    <include name="*.cpp"/>
    </patternset>
    </fileset>
    </cc>
    </target>

    Anyone actually got the Sun forte compiler to work with ant??

     
  • Nobody/Anonymous

    Logged In: NO

    >> Anyone actually got the Sun forte compiler to work with
    ant??
    Yes, i managed to get the Sun Forte compiler working with
    the fix described below..

     
  • Nobody/Anonymous

    Logged In: NO

    Just tried that - still hangs.

     
  • Patrick Swieskowski

    Logged In: YES
    user_id=151781

    The proper fix for this seems to be just changing -help to -V
    in ForteCCLinker.java. -V gives the behavior that is intended,
    I can't imagine why they decided to go with -help. The -V
    switch may be new though, not really sure.

     
  • Curt Arnold

    Curt Arnold - 2004-04-24
    • summary: Problems using CC on Solaris --> Sun CC static libs don't start with "lib"
    • status: open --> closed-fixed
     
  • Curt Arnold

    Curt Arnold - 2004-04-24

    Logged In: YES
    user_id=27193

    The locking was fixed by changing "-help" to "-V" under a
    previous bug report. The static library name problem is fixed
    by:

    Index: ForteCCLinker.java

    =====================
    RCS file: /cvsroot/ant-
    contrib/cpptasks/src/net/sf/antcontrib/cpptasks/sun/ForteCCL
    inker.java,v
    retrieving revision 1.10
    diff -u -r1.10 ForteCCLinker.java
    --- ForteCCLinker.java 28 Feb 2004 20:03:11 -0000 1.10
    +++ ForteCCLinker.java 24 Apr 2004 19:20:38 -0000
    @@ -32,7 +32,7 @@
    ".sl"};
    private static final String[] objFiles = new String[]
    {".o", ".a", ".lib"};
    private static final ForteCCLinker arLinker = new
    ForteCCLinker("CC",
    - objFiles, discardFiles, "", ".a");
    + objFiles, discardFiles, "lib", ".a");
    private static final ForteCCLinker dllLinker = new
    ForteCCLinker("CC",
    objFiles, discardFiles, "lib", ".so");
    private static final ForteCCLinker instance = new
    ForteCCLinker("CC",

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks