Menu

#4834 gcc5-5.4.0-3 and gcc6-5.2.0-3 tweaks for fink Apple sandbox builds

Added_to_Fink
closed-accepted
nobody
5
2016-11-12
2016-11-04
No

The attached Info file changes tweak the builds of gcc5-5.4.0-3 and gcc6-5.2.0-3 with the additional ConfiiguraParams parameter of...

--with-local-prefix=%p \

added to allow the compiler bootstrap to succeed when performed within an Apple sandbox that denies file reads in /usr/local. The info file changes are...

Index: gcc5.info
===================================================================
RCS file: /cvsroot/fink/dists/10.9-libcxx/stable/main/finkinfo/languages/gcc5.info,v
retrieving revision 1.9
diff -u -r1.9 gcc5.info
--- gcc5.info   8 Oct 2016 11:03:42 -0000   1.9
+++ gcc5.info   4 Nov 2016 09:14:37 -0000
@@ -1,7 +1,7 @@
 Info2: <<
 Package: gcc5
 Version: 5.4.0
-Revision: 2
+Revision: 3
 Source: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%v/gcc-%v.tar.bz2
 Source-MD5: 4c626ac2a83ef30dfb9260e6f59c2b30
 Source2: ftp://sourceware.org/pub/java/ecj-4.9.jar
@@ -71,6 +71,7 @@
    --with-isl=%p \
    --with-mpc=%p \
    --with-system-zlib \

+   --with-local-prefix=%p \
    --program-suffix=-fsf-5
 <<
 InfoTest: <<

and

Index: gcc6.info
===================================================================
RCS file: /cvsroot/fink/dists/10.9-libcxx/stable/main/finkinfo/languages/gcc6.info,v
retrieving revision 1.4
diff -u -r1.4 gcc6.info
--- gcc6.info   8 Oct 2016 20:26:47 -0000   1.4
+++ gcc6.info   4 Nov 2016 09:14:37 -0000
@@ -1,7 +1,7 @@
 Info2: <<
 Package: gcc6
 Version: 6.2.0
-Revision: 2
+Revision: 3
 Source: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%v/gcc-%v.tar.bz2
 Source-MD5: 9768625159663b300ae4de2f4745fcc4
 Source2: ftp://sourceware.org/pub/java/ecj-4.9.jar
@@ -71,6 +71,7 @@
    --with-isl=%p \
    --with-mpc=%p \
    --with-system-zlib \

+   --with-local-prefix=%p \
    --program-suffix=-fsf-6
 <<
 InfoTest: <<

Tested on 10.11 with 'fink -m' against fink-0.41.0 with the proposed sandboxing changes from https://github.com/fink/fink/pull/135 applied to deny file reads with /usr/local and /opt/local. This uaage of --with-local-prefix=%p is already present in the MacPorts gcc5 package which has been built under a sandbox for several years now.

Note that the revision bump is required because the addition of --with-local-prefix=%p to the configure options removes /usr/local/include from the compiler's default search include path.

Discussion

  • Jack Howarth

    Jack Howarth - 2016-11-04

    Info file for gcc5-5.4.0-3

     

    Last edit: Jack Howarth 2016-11-04
  • Jack Howarth

    Jack Howarth - 2016-11-04

    Info file for gcc6-5.2.0-3

     
  • Jack Howarth

    Jack Howarth - 2016-11-04

    Use --with-local-prefix=/ instead to avoid adding %p/include to the compiler header search path which would break package builds that depend on 'NoSetCPPFLAGS: true' being honored.

    Index: gcc5.info
    ===================================================================
    RCS file: /cvsroot/fink/dists/10.9-libcxx/stable/main/finkinfo/languages/gcc5.info,v
    retrieving revision 1.9
    diff -u -r1.9 gcc5.info
    --- gcc5.info   8 Oct 2016 11:03:42 -0000   1.9
    +++ gcc5.info   4 Nov 2016 11:49:05 -0000
    @@ -1,7 +1,7 @@
     Info2: <<
     Package: gcc5
     Version: 5.4.0
    -Revision: 2
    +Revision: 3
     Source: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%v/gcc-%v.tar.bz2
     Source-MD5: 4c626ac2a83ef30dfb9260e6f59c2b30
     Source2: ftp://sourceware.org/pub/java/ecj-4.9.jar
    @@ -71,6 +71,7 @@
        --with-isl=%p \
        --with-mpc=%p \
        --with-system-zlib \
    
    +   --with-local-prefix=/ \
        --program-suffix=-fsf-5
     <<
     InfoTest: <<
    

    and

    Index: gcc6.info
    ===================================================================
    RCS file: /cvsroot/fink/dists/10.9-libcxx/stable/main/finkinfo/languages/gcc6.info,v
    retrieving revision 1.4
    diff -u -r1.4 gcc6.info
    --- gcc6.info   8 Oct 2016 20:26:47 -0000   1.4
    +++ gcc6.info   4 Nov 2016 11:49:05 -0000
    @@ -1,7 +1,7 @@
     Info2: <<
     Package: gcc6
     Version: 6.2.0
    -Revision: 2
    +Revision: 3
     Source: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%v/gcc-%v.tar.bz2
     Source-MD5: 9768625159663b300ae4de2f4745fcc4
     Source2: ftp://sourceware.org/pub/java/ecj-4.9.jar
    @@ -71,6 +71,7 @@
        --with-isl=%p \
        --with-mpc=%p \
        --with-system-zlib \
    
    +   --with-local-prefix=/ \
        --program-suffix=-fsf-6
     <<
     InfoTest: <<
    
     
  • Jack Howarth

    Jack Howarth - 2016-11-04

    revised Info file for gcc5-5.4.0-3

     
  • Jack Howarth

    Jack Howarth - 2016-11-04

    revised Info file for gcc6-5.2.0-3

     
  • Jack Howarth

    Jack Howarth - 2016-11-06

    Use proper fix proposed upstream at https://gcc.gnu.org/ml/gcc-patches/2016-11/msg00521.html

    Index: gcc5.info
    ===================================================================
    RCS file: /cvsroot/fink/dists/10.9-libcxx/stable/main/finkinfo/languages/gcc5.info,v
    retrieving revision 1.9
    diff -u -r1.9 gcc5.info
    --- gcc5.info   8 Oct 2016 11:03:42 -0000   1.9
    +++ gcc5.info   6 Nov 2016 13:41:25 -0000
    @@ -1,7 +1,7 @@
     Info2: <<
     Package: gcc5
     Version: 5.4.0
    -Revision: 2
    +Revision: 3
     Source: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%v/gcc-%v.tar.bz2
     Source-MD5: 4c626ac2a83ef30dfb9260e6f59c2b30
     Source2: ftp://sourceware.org/pub/java/ecj-4.9.jar
    @@ -22,6 +22,8 @@
        perl -pi -e "s|/usr/lpp/Xamples|/opt/X11|" libjava/configure
        # don't update live infodoc dir
        find . -name Makefile.in | xargs perl -pi -e 's/install-info --version/false/g'
    
    +   # make remove_duplicates() sandbox friendly
    +   perl -pi.bak -e "s|if \(errno \!\= ENOENT\)|if \(\(errno \!\= ENOENT\) \&\& \(errno \!\= EPERM\)\)|g" gcc/incpath.c
     <<
     Type: -64bit .
     NoSetCPPFLAGS: True
    

    and

    Index: gcc6.info
    ===================================================================
    RCS file: /cvsroot/fink/dists/10.9-libcxx/stable/main/finkinfo/languages/gcc6.info,v
    retrieving revision 1.4
    diff -u -r1.4 gcc6.info
    --- gcc6.info   8 Oct 2016 20:26:47 -0000   1.4
    +++ gcc6.info   6 Nov 2016 13:41:25 -0000
    @@ -1,7 +1,7 @@
     Info2: <<
     Package: gcc6
     Version: 6.2.0
    -Revision: 2
    +Revision: 3
     Source: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%v/gcc-%v.tar.bz2
     Source-MD5: 9768625159663b300ae4de2f4745fcc4
     Source2: ftp://sourceware.org/pub/java/ecj-4.9.jar
    @@ -22,6 +22,8 @@
        perl -pi -e "s|/usr/lpp/Xamples|/opt/X11|" libjava/configure
        # don't update live infodoc dir
        find . -name Makefile.in | xargs perl -pi -e 's/install-info --version/false/g'
    
    +   # make remove_duplicates() sandbox friendly
    +   perl -pi.bak -e "s|if \(errno \!\= ENOENT\)|if \(\(errno \!\= ENOENT\) \&\& \(errno \!\= EPERM\)\)|g" gcc/incpath.c
     <<
     Type: -64bit .
     NoSetCPPFLAGS: True
    

    Tested on 10.11 with Apple sandbox build using 'fink -m'

     
  • Jack Howarth

    Jack Howarth - 2016-11-06

    Info file for gcc5-5.4.0-3 to make package Apple sandbox friendly

     

    Last edit: Jack Howarth 2016-11-06
  • Jack Howarth

    Jack Howarth - 2016-11-06

    Info file for gcc6-6.2.0-3 to make package Apple sandbox friendly

     
  • Jack Howarth

    Jack Howarth - 2016-11-08

    Sync the proposed package updates with the latest darwin-specific patches pushed upstream....

    Index: gcc5.info
    ===================================================================
    RCS file: /cvsroot/fink/dists/10.9-libcxx/stable/main/finkinfo/languages/gcc5.info,v
    retrieving revision 1.9
    diff -u -r1.9 gcc5.info
    --- gcc5.info   8 Oct 2016 11:03:42 -0000   1.9
    +++ gcc5.info   8 Nov 2016 13:27:01 -0000
    @@ -1,7 +1,7 @@
     Info2: <<
     Package: gcc5
     Version: 5.4.0
    -Revision: 2
    +Revision: 3
     Source: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%v/gcc-%v.tar.bz2
     Source-MD5: 4c626ac2a83ef30dfb9260e6f59c2b30
     Source2: ftp://sourceware.org/pub/java/ecj-4.9.jar
    @@ -14,14 +14,16 @@
     PatchFile2-MD5: 162849cbc1db4ca299456d1727bfa06e
     # upsteam fix to avoid __textcoal_nt deprecated linker warnings
     # See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71767
    -PatchFile3: %n-PR71767.patch
    -PatchFile3-MD5: faff80d5179210298cc3c57c772f5e97
    +PatchFile3: %n-PR71767_PR57438_PR67710.patch
    +PatchFile3-MD5: 4c4624e685c691399f7d26700aef6ee4
     PatchScript: <<
        %{default_script}
        # autoconf2.6ish patch for modern XQuartz paths
        perl -pi -e "s|/usr/lpp/Xamples|/opt/X11|" libjava/configure
        # don't update live infodoc dir
        find . -name Makefile.in | xargs perl -pi -e 's/install-info --version/false/g'
    
    +   # make remove_duplicates() sandbox friendly
    +   perl -pi.bak -e "s|if \(errno \!\= ENOENT\)|if \(\(errno \!\= ENOENT\) \&\& \(errno \!\= EPERM\)\)|g" gcc/incpath.c
     <<
     Type: -64bit .
     NoSetCPPFLAGS: True
    @@ -314,6 +316,16 @@
      Build with -fsf-5 suffix and place non-overlapping files into new gcc5-compiler
      package which can co-exist with other gccXX-compiler packages. Overlapping files
      are left in main gcc5 package which still conflicts with other gccXX packages.
    +
    + Backport darwin-specific patches:
    + https://gcc.gnu.org/ml/gcc-patches/2015-10/msg01676.html
    + https://gcc.gnu.org/ml/gcc-patches/2015-09/msg00453.html
    + https://gcc.gnu.org/ml/gcc-patches/2015-10/msg01682.html
    + PR71767 1/4 https://gcc.gnu.org/ml/gcc-patches/2016-11/msg00537.html
    + PR71767 2/4 https://gcc.gnu.org/ml/gcc-patches/2016-11/msg00538.html
    + PR71767 3/4 https://gcc.gnu.org/ml/gcc-patches/2016-11/msg00539.html
    + PR71767 4/4 https://gcc.gnu.org/ml/gcc-patches/2016-11/msg00540.html
    + PR57438 https://gcc.gnu.org/ml/gcc-patches/2016-11/msg00541.html
     <<
     Homepage: http://gcc.gnu.org/
     Maintainer: None <fink-devel@lists.sourceforge.net>
    

    and

    Index: gcc6.info
    ===================================================================
    RCS file: /cvsroot/fink/dists/10.9-libcxx/stable/main/finkinfo/languages/gcc6.info,v
    retrieving revision 1.4
    diff -u -r1.4 gcc6.info
    --- gcc6.info   8 Oct 2016 20:26:47 -0000   1.4
    +++ gcc6.info   8 Nov 2016 13:27:28 -0000
    @@ -1,7 +1,7 @@
     Info2: <<
     Package: gcc6
     Version: 6.2.0
    -Revision: 2
    +Revision: 3
     Source: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%v/gcc-%v.tar.bz2
     Source-MD5: 9768625159663b300ae4de2f4745fcc4
     Source2: ftp://sourceware.org/pub/java/ecj-4.9.jar
    @@ -14,14 +14,16 @@
     PatchFile2-MD5: 52fa69b98d5a657b7a6d8c26e39b4e28
     # upsteam fix to avoid __textcoal_nt deprecated linker warnings
     # See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71767
    -PatchFile3: %n-PR71767.patch
    -PatchFile3-MD5: 467e60f3421c67d1745f555bb5d54a11
    +PatchFile3: %n-PR71767_PR57438_PR67710.patch
    +PatchFile3-MD5: cb9dde840984fc68e3f47810db071f79
     PatchScript: <<
        %{default_script}
        # autoconf2.6ish patch for modern XQuartz paths
        perl -pi -e "s|/usr/lpp/Xamples|/opt/X11|" libjava/configure
        # don't update live infodoc dir
        find . -name Makefile.in | xargs perl -pi -e 's/install-info --version/false/g'
    
    +   # make remove_duplicates() sandbox friendly
    +   perl -pi.bak -e "s|if \(errno \!\= ENOENT\)|if \(\(errno \!\= ENOENT\) \&\& \(errno \!\= EPERM\)\)|g" gcc/incpath.c
     <<
     Type: -64bit .
     NoSetCPPFLAGS: True
    @@ -313,6 +315,14 @@
      are left in main gcc6 package which still conflicts with other gccXX packages.
      Backport r235222 and r235372 from gcc trunk for dejagnu 1.6 compatibility.
      Backport r235547 from gcc-6-branch to fix ABI detection breakage of PR70839.
    +
    + Backport darwin-specific patches:
    + PR71767 1/4 https://gcc.gnu.org/ml/gcc-patches/2016-11/msg00537.html
    + PR71767 2/4 https://gcc.gnu.org/ml/gcc-patches/2016-11/msg00538.html
    + PR71767 3/4 https://gcc.gnu.org/ml/gcc-patches/2016-11/msg00539.html
    + PR71767 4/4 https://gcc.gnu.org/ml/gcc-patches/2016-11/msg00540.html
    + PR57438 https://gcc.gnu.org/ml/gcc-patches/2016-11/msg00541.html
    + PR67710 https://gcc.gnu.org/ml/gcc-patches/2016-11/msg00545.html
     <<
     Homepage: http://gcc.gnu.org/
     Maintainer: None <fink-devel@lists.sourceforge.net>
    
     
  • Jack Howarth

    Jack Howarth - 2016-11-08

    Updated info file for Info file for gcc5-5.4.0-3

     
  • Jack Howarth

    Jack Howarth - 2016-11-08

    Updated info file for Info file for gcc6-5.2.0-3

     
  • Jack Howarth

    Jack Howarth - 2016-11-08

    New gcc6-PR71767_PR57438_PR67710.patch

     
  • Hanspeter Niederstrasser

    • labels: --> languages, Updated Revision of Existing
    • status: open --> closed-accepted
    • Group: Undergoing_Validation --> Added_to_Fink
     

Log in to post a comment.

MongoDB Logo MongoDB