Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcc doesn't cope with newly built openssl on r151014 #85

Open
lotheac opened this issue Apr 12, 2016 · 5 comments
Open

gcc doesn't cope with newly built openssl on r151014 #85

lotheac opened this issue Apr 12, 2016 · 5 comments

Comments

@lotheac
Copy link
Contributor

lotheac commented Apr 12, 2016

% cpp -include openssl/opensslconf.h -xc <<EOF
#ifndef OPENSSL_NO_MD2
#include <openssl/md2.h>
#endif
EOF
#1 "<stdin>"
#1 "<command-line>"
#1 "/opt/gcc-4.8.1/lib/gcc/i386-pc-solaris2.11/4.8.1/include-fixed/openssl/opensslconf.h" 1 3 4
#1 "<command-line>" 2
#1 "<stdin>"
<stdin>:2:25: fatal error: openssl/md2.h: No such file or directory
compilation terminated.

OPENSSL_NO_MD2 is defined in openssl/opensslconf.h, but gcc "fixes" that
header at build time by copying it to its 'include-fixed' directory (shown in
cpp output above).

% diff /opt/gcc-4.8.1/lib/gcc/i386-pc-solaris2.11/4.8.1/include-fixed/openssl/opensslconf.h /usr/include/openssl/opensslconf.h
1,9d0
< /*  DO NOT EDIT THIS FILE.
< 
<     It has been auto-edited by fixincludes from:
< 
<       "/usr/include/openssl/opensslconf.h"
< 
<     This had to be done to correct non-standard usages in the
<     original, manufacturer supplied header file.  */
< 
34a26,28
> #ifndef OPENSSL_NO_MD2
> # define OPENSSL_NO_MD2
> #endif
52a47,49
> #ifndef OPENSSL_NO_WEAK_SSL_CIPHERS
> # define OPENSSL_NO_WEAK_SSL_CIPHERS
> #endif
82a80,82
> # if defined(OPENSSL_NO_MD2) && !defined(NO_MD2)
> #  define NO_MD2
> # endif
100a101,103
> # if defined(OPENSSL_NO_WEAK_SSL_CIPHERS) && !defined(NO_WEAK_SSL_CIPHERS)
> #  define NO_WEAK_SSL_CIPHERS
> # endif
208c211
< YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!

---
> #error YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
227c230
< #if defined( __sun__ )                /* Newer Sparc's */

---
> #if defined( __sun ) || defined ( sun )               /* Newer Sparc's */

So effectively this means that gcc needs to be rebuilt if openssl configuration
changes. Although you could probably patch opensslconf.h instead to make gcc's
fixincludes not fix it.

In any case, this means that a fully updated 151014 box cannot build eg. perl
Net::SSLeay. A republished gcc package is required to fix that (either to
update the include-fixed header or to make it not end up there in the first
place).

Also interesting to note that there are 18 header files in that include-fixed
path on my 151014 box, whereas gcc-4.4.4's path only contains two...

@danmcd
Copy link
Member

danmcd commented Apr 12, 2016

Thanks a lot GCC... I wonder if this affects r151016 as well?

@lotheac
Copy link
Contributor Author

lotheac commented Apr 12, 2016

On Tue, Apr 12 2016 06:47:19 -0700, Dan McDonald wrote:

Thanks a lot GCC... I wonder if this affects r151016 as well?

Yep, and bloody too.

Lauri Tirkkonen | lotheac @ IRCnet

@lotheac
Copy link
Contributor Author

lotheac commented Apr 12, 2016

On Tue, Apr 12 2016 17:07:08 +0300, Lauri Tirkkonen wrote:

On Tue, Apr 12 2016 06:47:19 -0700, Dan McDonald wrote:

Thanks a lot GCC... I wonder if this affects r151016 as well?

Yep, and bloody too.

I'll rephrase: the header exists in include-fixed on r151016 and
bloody, but only r151016 is actually broken (because its opensslconf.h
has changed after its gcc package was last built).

Lauri Tirkkonen | lotheac @ IRCnet

@danmcd
Copy link
Member

danmcd commented May 16, 2016

Fixed.

danmcd-ol(~)[4]% sudo pkg update -nv
            Packages to update:         1
     Estimated space available:  18.19 GB
Estimated space to be consumed: 643.32 MB
       Create boot environment:        No
Create backup boot environment:       Yes
          Rebuild boot archive:        No

Changed packages:
omnios
  developer/gcc48
    4.8.1-0.151014:20150402T205830Z -> 4.8.1-0.151014:20160516T163714Z
danmcd-ol(~)[0]% source gcc-test
# 1 "<stdin>"
# 1 "<command-line>"
# 1 "/opt/gcc-4.8.1/lib/gcc/i386-pc-solaris2.11/4.8.1/include-fixed/openssl/opensslconf.h" 1 3 4
# 1 "<command-line>" 2
# 1 "<stdin>"
<stdin>:2:25: fatal error: openssl/md2.h: No such file or directory
compilation terminated.
danmcd-ol(~)[1]% sudo pkg update
            Packages to update:   1
       Create boot environment:  No
Create backup boot environment: Yes

DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                                1/1         74/74  139.4/139.4  6.7M/s

PHASE                                          ITEMS
Removing old actions                             1/1
Installing new actions                           2/2
Updating modified actions                      88/88
Updating package state database                 Done 
Updating package cache                           1/1 
Updating image state                            Done 
Creating fast lookup database                   Done 

---------------------------------------------------------------------------
NOTE: Please review release notes posted at:

http://omnios.omniti.com/ReleaseNotes
---------------------------------------------------------------------------

danmcd-ol(~)[0]% source gcc-test
# 1 "<stdin>"
# 1 "<command-line>"
# 1 "/opt/gcc-4.8.1/lib/gcc/i386-pc-solaris2.11/4.8.1/include-fixed/openssl/opensslconf.h" 1 3 4
# 1 "<command-line>" 2
# 1 "<stdin>"
danmcd-ol(~)[0]% 

@danmcd danmcd closed this as completed May 16, 2016
@danmcd
Copy link
Member

danmcd commented May 16, 2016

Per the original filer, I'm keeping this open --> like the illumos-building gcc44, gcc51 (or any of its replacements) shouldn't included extra header files like this.

@danmcd danmcd reopened this May 16, 2016
dagbrown pushed a commit to dagbrown/omnios-build that referenced this issue Sep 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants