You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Adrian Dick (JIRA)" <ax...@ws.apache.org> on 2005/10/13 15:39:06 UTC

[jira] Created: (AXISCPP-855) Incorrect combinations of multithreading flags for MS VC++ in ANT scripts

Incorrect combinations of multithreading flags for MS VC++ in ANT scripts
-------------------------------------------------------------------------

         Key: AXISCPP-855
         URL: http://issues.apache.org/jira/browse/AXISCPP-855
     Project: Axis-C++
        Type: Bug
  Components: Build - ANT  
    Versions: current (nightly)    
 Environment: MS Windows, MS Visual C++
    Reporter: Adrian Dick
    Priority: Minor


I have noticed we're not always using the correct compiler flag when producing multithreaded binaries on Windows with Visual C++.

Currently, the ANT scripts always use /MD for all built artefacts, but this isn't always correct.

In production builds (non-debug), the following should be used:
  /MD     for all libraries (DLLs)                      <--- This is currently correct!
  /MT      for all executables (EXEs, ie: SimpleAxisServer and test clients)

In debug builds:
  /MDd   for all libraries (DLLs)
  /MTd    for all executables (EXEs, ie: SimpleAxisServer and test clients)

So far, this isn't seen as causing problems on any our testcases, but this could be down to luck, or perhaps our testcases don't stress the system sufficiently to expose the problems.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-855) Incorrect combinations of multithreading flags for MS VC++ in ANT scripts

Posted by "Henrik Nordberg (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-855?page=comments#action_12332024 ] 

Henrik Nordberg commented on AXISCPP-855:
-----------------------------------------

Adrian wrote:
> Currently, the ANT scripts always use /MD for all built artefacts, but this isn't always correct.
>
> In production builds (non-debug), the following should be used:
>  /MD for all libraries (DLLs) <--- This is currently correct!
>  /MT for all executables (EXEs, ie: SimpleAxisServer and test clients)

Actually, I believe always using /MD is not incorrect.
The /Mxx switches just say what version of the run time library should be used. You can link to it either statically or dynamically (i.e., as a DLL), and you can link to the thread aware version or the non-thread aware version.

/MD links with the thread-aware run time library in a DLL, but this doesn't mean you can only do so when your code should be in a DLL.
/MT links with the thread-aware run time library statically, but this doesn't mean you cannot do so when your code should be in a DLL.

> Incorrect combinations of multithreading flags for MS VC++ in ANT scripts
> -------------------------------------------------------------------------
>
>          Key: AXISCPP-855
>          URL: http://issues.apache.org/jira/browse/AXISCPP-855
>      Project: Axis-C++
>         Type: Bug
>   Components: Build - ANT
>     Versions: current (nightly)
>  Environment: MS Windows, MS Visual C++
>     Reporter: Adrian Dick
>     Priority: Minor

>
> I have noticed we're not always using the correct compiler flag when producing multithreaded binaries on Windows with Visual C++.
> Currently, the ANT scripts always use /MD for all built artefacts, but this isn't always correct.
> In production builds (non-debug), the following should be used:
>   /MD     for all libraries (DLLs)                      <--- This is currently correct!
>   /MT      for all executables (EXEs, ie: SimpleAxisServer and test clients)
> In debug builds:
>   /MDd   for all libraries (DLLs)
>   /MTd    for all executables (EXEs, ie: SimpleAxisServer and test clients)
> So far, this isn't seen as causing problems on any our testcases, but this could be down to luck, or perhaps our testcases don't stress the system sufficiently to expose the problems.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (AXISCPP-855) Incorrect combinations of multithreading flags for MS VC++ in ANT scripts

Posted by "Adrian Dick (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-855?page=all ]
     
Adrian Dick closed AXISCPP-855:
-------------------------------

    Resolution: Invalid

As Henrick suggests, it is not wrong for the test clients to be using the /MD flag (which sets the version of runtime library to be used)

In fact, the advice within the MS VC++ help is that all the DLLs (and EXE) running within a single process should all be using the same runtime libraries to avoid stack issues.  Therefore, as the axis runtime libraries are compiled with /MD it is correct that the tests also be compiled with /MD.

> Incorrect combinations of multithreading flags for MS VC++ in ANT scripts
> -------------------------------------------------------------------------
>
>          Key: AXISCPP-855
>          URL: http://issues.apache.org/jira/browse/AXISCPP-855
>      Project: Axis-C++
>         Type: Bug
>   Components: Build - ANT
>     Versions: current (nightly)
>  Environment: MS Windows, MS Visual C++
>     Reporter: Adrian Dick
>     Priority: Minor

>
> I have noticed we're not always using the correct compiler flag when producing multithreaded binaries on Windows with Visual C++.
> Currently, the ANT scripts always use /MD for all built artefacts, but this isn't always correct.
> In production builds (non-debug), the following should be used:
>   /MD     for all libraries (DLLs)                      <--- This is currently correct!
>   /MT      for all executables (EXEs, ie: SimpleAxisServer and test clients)
> In debug builds:
>   /MDd   for all libraries (DLLs)
>   /MTd    for all executables (EXEs, ie: SimpleAxisServer and test clients)
> So far, this isn't seen as causing problems on any our testcases, but this could be down to luck, or perhaps our testcases don't stress the system sufficiently to expose the problems.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira