[MacPorts] #52828: Use of --with-local-prefix= produces compilers which can mismatch headers and libs from /usr/local/lib by default

MacPorts noreply at macports.org
Sun Nov 6 13:38:06 CET 2016


#52828: Use of --with-local-prefix= produces compilers which can mismatch headers
and libs from /usr/local/lib by default
-------------------------------------------------+-------------------------
  Reporter:  jwhowarth                           |      Owner:  macports-
                                                 |  tickets@…
      Type:  defect                              |     Status:  new
  Priority:  Normal                              |  Milestone:
 Component:  ports                               |    Version:  2.3.4
Resolution:                                      |   Keywords:
      Port:  gcc43 gcc44 gcc45 gcc46 gcc47       |
  gcc48 gcc49 gcc5 gcc6 gcc7                     |
-------------------------------------------------+-------------------------

Comment (by jwhowarth):

 Actually this issue appears to be trivial to fix. The use of --with-local-
 prefix= can be dropped entirely for builds of FSF gcc within an Apple
 sandbox that denies file accesses to /usr/local if the following change is
 made...


 {{{
 --- gcc/incpath.c.bak   2015-01-05 07:33:28.000000000 -0500
 +++ gcc/incpath.c       2016-11-06 07:25:20.000000000 -0500
 @@ -256,7 +256,7 @@
        if (stat (cur->name, &st))
         {
           /* Dirs that don't exist are silently ignored, unless verbose.
 */
 -         if (errno != ENOENT)
 +         if ((errno != ENOENT) && (errno != EPERM))
             cpp_errno (pfile, CPP_DL_ERROR, cur->name);
           else
             {
 }}}

 for the Apple llvmgcc42-2336.11 build this will have to be....


 {{{
 --- gcc/c-incpath.c.bak 2009-02-14 23:17:54.000000000 -0500
 +++ gcc/c-incpath.c     2016-11-06 07:28:39.000000000 -0500
 @@ -384,7 +384,7 @@
        if (stat (cur->name, &st))
         {
           /* Dirs that don't exist are silently ignored, unless verbose.
 */
 -         if (errno != ENOENT)
 +         if ((errno != ENOENT) && (errno != EPERM))
             cpp_errno (pfile, CPP_DL_ERROR, cur->name);
           else
             {
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/52828#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS



More information about the macports-tickets mailing list