Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#186 icl compiler hang on any fileset with cpptask v1.0b4

open
Curt Arnold
cpptasks (103)
5
2006-10-17
2006-10-17
nnataly
No

When trying to build anything using cpptasks-1.0b4 on
win32, Intel C Compiler v9.0 just hangs. The proccess
(icl.exe) is visible from TaskManager and via
cygwin "ps". After one kills this proccess the
compiler works further. This problem appears only
with cpptasks-1.0b4, everything works fine with
cpptasks-1.0b3.

The problem can be related with [ 896048 ] support
request ("cc element hangs with CC Forte 6 Update 1
compiler"), because when I change the
net\sf\antcontrib\cpptasks\intel\IntelWin32CCompiler.j
ava file (remove the second patameter "-help"),
everything seemed to be ok here.

Discussion

  • Logged In: NO

    The problem looks like a Intel-compiler specific issue, as
    the commands used
    to determine compiler identifier ('icl -help', 'xilib -qv',
    'xilink -qv').
    These programs wait for keyboard input in case of long output.

    The two workarounds are:
    1) either remove the command line options that cause long
    output (and thus paging) (diff below)
    2) remove the compiler dry-run altogether (diff further below)

    1)

    ---
    src/net/sf/antcontrib/cpptasks/intel/IntelWin32CCompiler.java
    +++
    src/net/sf/antcontrib/cpptasks/intel/IntelWin32CCompiler.java
    @@ -35,7 +35,7 @@ public final class IntelWin32CCompiler e
    return instance;
    }
    private IntelWin32CCompiler(boolean newEnvironment,
    Environment env) {
    - super("icl", "-help", newEnvironment, env);
    + super("icl", "-bogus", newEnvironment, env);
    }
    public Processor changeEnvironment(boolean
    newEnvironment, Environment env) {
    if (newEnvironment || env != null) {
    ---
    src/net/sf/antcontrib/cpptasks/intel/IntelWin32Librarian.java
    +++
    src/net/sf/antcontrib/cpptasks/intel/IntelWin32Librarian.java
    @@ -30,7 +30,7 @@ public class IntelWin32Librarian extends
    return instance;
    }
    protected IntelWin32Librarian() {
    - super("xilib", "-qv");
    + super("xilib", "-bogus");
    }
    public Linker getLinker(LinkType type) {
    return IntelWin32Linker.getInstance().getLinker(type);
    --- src/net/sf/antcontrib/cpptasks/intel/IntelWin32Linker.java
    +++ src/net/sf/antcontrib/cpptasks/intel/IntelWin32Linker.java
    @@ -32,7 +32,7 @@ public final class IntelWin32Linker exte
    return instance;
    }
    private IntelWin32Linker(String outputSuffix) {
    - super("xilink", "-qv", outputSuffix);
    + super("xilink", "-bogus", outputSuffix);
    }
    public Linker getLinker(LinkType type) {
    if (type.isStaticLibrary()) {

    2)

    ---
    src/net/sf/antcontrib/cpptasks/compiler/AbstractProcessor.java
    +++
    src/net/sf/antcontrib/cpptasks/compiler/AbstractProcessor.java
    @@ -44,16 +44,7 @@ public abstract class AbstractProcessor
    * @return identifier for the processor
    */
    protected static String getIdentifier(String[] command,
    String fallback) {
    - String identifier = fallback;
    - try {
    - String[] cmdout =
    CaptureStreamHandler.run(command);
    - if (cmdout.length > 0) {
    - identifier = cmdout[0];
    - }
    - } catch (Throwable ex) {
    - identifier = fallback + ":" + ex.toString();
    - }
    - return identifier;
    + return fallback;
    }
    private final String[] headerExtensions;
    private final String[] sourceExtensions;
    --
    Salikh Zakirov