MSVC 2015 internal compiler error

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

MSVC 2015 internal compiler error

Bill Bierman
Hello.  I'm sorry I cannot reply to the thread.  I only just now have subscribed to the list.

I can confirm that this problem exists with Visual Studio 2015 on HEAD.

I spoke to a friend of mine who works at MS who relayed this to the compiler team.  A senior dev there is aware of the issue and they are working on a fix.

--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: MSVC 2015 internal compiler error

Bill Bierman
The Microsoft compiler team has suggested removing the include of ssl.h from srtp.h as it creates a circular reference which is likely confusing the compiler.

On Mon, Feb 22, 2016 at 2:19 PM, Bill Bierman <[hidden email]> wrote:
Hello.  I'm sorry I cannot reply to the thread.  I only just now have subscribed to the list.

I can confirm that this problem exists with Visual Studio 2015 on HEAD.

I spoke to a friend of mine who works at MS who relayed this to the compiler team.  A senior dev there is aware of the issue and they are working on a fix.


--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: MSVC 2015 internal compiler error

Viktor Dukhovni
On Mon, Feb 22, 2016 at 03:55:12PM -1000, Bill Bierman wrote:

> The Microsoft compiler team has suggested removing the include of ssl.h
> from srtp.h as it creates a circular reference which is likely confusing
> the compiler.

Could you test the patch below.  It tries to avoid incompatible
loss of the implicit inclusion, by making it conditional:

--
        Viktor.

diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
index 9709103..ee61451 100644
--- a/include/openssl/ssl.h
+++ b/include/openssl/ssl.h
@@ -901,7 +901,9 @@ __owur int SSL_extension_supported(unsigned int ext_type);
 # include <openssl/ssl3.h>
 # include <openssl/tls1.h>      /* This is mostly sslv3 with a few tweaks */
 # include <openssl/dtls1.h>     /* Datagram TLS */
-# include <openssl/srtp.h>      /* Support for the use_srtp extension */
+# ifndef HEADER_D1_SRTP_H
+#  include <openssl/srtp.h>     /* Support for the use_srtp extension */
+# endif
 
 #ifdef  __cplusplus
 extern "C" {
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: MSVC 2015 internal compiler error

Gisle Vanem-3
Viktor Dukhovni wrote:

> On Mon, Feb 22, 2016 at 03:55:12PM -1000, Bill Bierman wrote:
>
>> The Microsoft compiler team has suggested removing the include of ssl.h
>> from srtp.h as it creates a circular reference which is likely confusing
>> the compiler.
>
> Could you test the patch below.  It tries to avoid incompatible
> loss of the implicit inclusion, by making it conditional:

Nice try, but your patch doesn't help here:

F:\MingW32\src\inet\Crypto\OpenSSL\ssl\s3_lib.c :
  fatal error C1001: An internal error has occurred in the compiler.
  (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 246)
   To work around this problem, try simplifying or changing the program near the locations listed above.
  Please choose the Technical Support command on the Visual C++
   Help menu, or open the Technical Support help file for more information

INTERNAL COMPILER ERROR in 'f:\gv\VC_2015\bin\cl.exe'
    Please choose the Technical Support command on the Visual C++
    Help menu, or open the Technical Support help file for more information

------------

BTW1, using '-DOPENSSL_NO_SRTP' doesn't fix this. One of the .h-files seems to
  trigger this fault (no option I've tried so far has prevent it).

BTW2, I get a lot of these warnings:
  include\openssl/lhash.h(270): warning C4090: 'function': different 'const' qualifiers
  which seems related to include/openssl/lhash.h:
     typedef const char *OPENSSL_CSTRING;

  or one of the hideous lhash.h/safestack.h macros (?!)

And I'm still using this cl:
  Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x86
  on Win-10.



--
--gv
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: MSVC 2015 internal compiler error

Jeffrey Walton-3
> ...
> F:\MingW32\src\inet\Crypto\OpenSSL\ssl\s3_lib.c :
>   fatal error C1001: An internal error has occurred in the compiler.
>   (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 246)
>    To work around this problem, try simplifying or changing the program near the locations listed above.
>   Please choose the Technical Support command on the Visual C++
>    Help menu, or open the Technical Support help file for more information
>
> INTERNAL COMPILER ERROR in 'f:\gv\VC_2015\bin\cl.exe'
>     Please choose the Technical Support command on the Visual C++
>     Help menu, or open the Technical Support help file for more information

I've seen these mystery breaks quite a few times under the VS
compilers. Mostly it was the old days of VC++ 5.0 and 6.0, but they
crop up on occasion.

As crazy as it sounds, you might try re-ordering functions in the
headers and source files. That is, if the order is:

  void fn1(...) { ... }
  void fn2(...) { ... }
  void fn3(...) { ... }

Then try:

  void fn3(...) { ... }
  void fn1(...) { ... }
  void fn2(...) { ... }

I don't know why it works on occasion.

Jeff
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: MSVC 2015 internal compiler error

Matt Caswell-2
In reply to this post by Bill Bierman


On 23/02/16 01:55, Bill Bierman wrote:

> The Microsoft compiler team has suggested removing the include of ssl.h
> from srtp.h as it creates a circular reference which is likely confusing
> the compiler.
>
> On Mon, Feb 22, 2016 at 2:19 PM, Bill Bierman <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hello.  I'm sorry I cannot reply to the thread.  I only just now
>     have subscribed to the list.
>
>     I can confirm that this problem exists with Visual Studio 2015 on HEAD.
>
>     I spoke to a friend of mine who works at MS who relayed this to the
>     compiler team.  A senior dev there is aware of the issue and they
>     are working on a fix.

The attached seems to avoid the problem - but then for reasons I cannot
understand link errors result later on in the build.

Matt

--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev

vs2015-bug.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: MSVC 2015 internal compiler error

Matt Caswell-2


On 23/02/16 15:59, Matt Caswell wrote:

>
>
> On 23/02/16 01:55, Bill Bierman wrote:
>> The Microsoft compiler team has suggested removing the include of ssl.h
>> from srtp.h as it creates a circular reference which is likely confusing
>> the compiler.
>>
>> On Mon, Feb 22, 2016 at 2:19 PM, Bill Bierman <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>>     Hello.  I'm sorry I cannot reply to the thread.  I only just now
>>     have subscribed to the list.
>>
>>     I can confirm that this problem exists with Visual Studio 2015 on HEAD.
>>
>>     I spoke to a friend of mine who works at MS who relayed this to the
>>     compiler team.  A senior dev there is aware of the issue and they
>>     are working on a fix.
>
>
> The attached seems to avoid the problem - but then for reasons I cannot
> understand link errors result later on in the build.

Ahhh, mkdef.pl had fallen over...fix coming up.

Matt

--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: MSVC 2015 internal compiler error

Gisle Vanem-3
In reply to this post by Matt Caswell-2
Matt Caswell wrote:

> The attached seems to avoid the problem - but then for reasons I cannot
> understand link errors result later on in the build.

I too can confirm that your patch fixes MSVC-2105 compilation.
Thanks a million!

But as you wrote, the link fails. Due to util/mkdef.pl needs
an update? I looked at this .pl-file, but I'm a n00b when it
comes to Perl. So I fail to see how it now should define all
needed .def symbols.

As it's now, ssleay32.dll export only these:
  BIO_f_ssl
  BIO_new_ssl
  BIO_ssl_copy_session_id
  BIO_ssl_shutdown
  BIO_new_buffer_ssl_connect
  BIO_new_ssl_connect

But is building with -DOPENSSL_OPT_WINDLL (i.e. __declspec(dllimport)
while using the OpenSSL .DLLs) still supported? If so, what is the
.def-files good for then?

--
--gv
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: MSVC 2015 internal compiler error

Matt Caswell-2


On 24/02/16 10:29, Gisle Vanem wrote:

> Matt Caswell wrote:
>
>> The attached seems to avoid the problem - but then for reasons I cannot
>> understand link errors result later on in the build.
>
> I too can confirm that your patch fixes MSVC-2105 compilation.
> Thanks a million!
>
> But as you wrote, the link fails. Due to util/mkdef.pl needs
> an update? I looked at this .pl-file, but I'm a n00b when it
> comes to Perl. So I fail to see how it now should define all
> needed .def symbols.
>
> As it's now, ssleay32.dll export only these:
>   BIO_f_ssl
>   BIO_new_ssl
>   BIO_ssl_copy_session_id
>   BIO_ssl_shutdown
>   BIO_new_buffer_ssl_connect
>   BIO_new_ssl_connect
>
> But is building with -DOPENSSL_OPT_WINDLL (i.e. __declspec(dllimport)
> while using the OpenSSL .DLLs) still supported? If so, what is the
> .def-files good for then?
>
The complete patch is attached. This is currently going through review,
and solves the link issue.

Matt

--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev

vs2015-bug.patch (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: MSVC 2015 internal compiler error

Gisle Vanem-3
Matt Caswell wrote:

> The complete patch is attached. This is currently going through review,
> and solves the link issue.

That brought MSVC-2015 back on track. Thanks!

--
--gv
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|

Re: MSVC 2015 internal compiler error

Matt Caswell-2


On 24/02/16 16:48, Gisle Vanem wrote:
> Matt Caswell wrote:
>
>> The complete patch is attached. This is currently going through review,
>> and solves the link issue.
>
> That brought MSVC-2015 back on track. Thanks!
>

This has now been committed, so hopefully this should work again now.

Matt
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev