New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #31709 (closed defect: fixed)

Opened 19 months ago

Last modified 15 months ago

configure.compiler apple-gcc40 and apple-gcc42 don't set configure.cxx

Reported by: ryandesign@… Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts 2.0.4
Component: base Version: 2.0.3
Keywords: Cc: jeremyhu@…
Port:

Description

When you set configure.compiler to apple-gcc40 or apple-gcc42, MacPorts sets configure.cc but not configure.cxx, causing problems like #30309. Jeremy Huddleston already fixed apple-gcc42 in r80248; apple-gcc40 remains to be fixed.

Change History

comment:1 follow-up: ↓ 2 Changed 19 months ago by jeremyhu@…

apple-gcc40 is not a valid option for configure.compiler when using C++

What do you propose setting it to? How about:

--- src/port1.0/portconfigure.tcl	(revision 86213)
+++ src/port1.0/portconfigure.tcl	(working copy)
@@ -377,6 +377,9 @@
                 objc { set ret /usr/bin/cc }
                 cxx  { set ret /usr/bin/c++ }
                 cpp  { set ret /usr/bin/cpp }
+                fc   { set ret /usr/bin/false }
+                f77  { set ret /usr/bin/false }
+                f90  { set ret /usr/bin/false }
             }
         }
         gcc {
@@ -385,6 +388,9 @@
                 objc { set ret /usr/bin/gcc }
                 cxx  { set ret /usr/bin/g++ }
                 cpp  { set ret /usr/bin/cpp }
+                fc   { set ret /usr/bin/false }
+                f77  { set ret /usr/bin/false }
+                f90  { set ret /usr/bin/false }
             }
         }
         gcc-3.3 {
@@ -393,6 +399,9 @@
                 objc { set ret /usr/bin/gcc-3.3 }
                 cxx  { set ret /usr/bin/g++-3.3 }
                 cpp  { set ret /usr/bin/cpp-3.3 }
+                fc   { set ret /usr/bin/false }
+                f77  { set ret /usr/bin/false }
+                f90  { set ret /usr/bin/false }
             }
         }
         gcc-4.0 {
@@ -401,6 +410,9 @@
                 objc { set ret /usr/bin/gcc-4.0 }
                 cxx  { set ret /usr/bin/g++-4.0 }
                 cpp  { set ret /usr/bin/cpp-4.0 }
+                fc   { set ret /usr/bin/false }
+                f77  { set ret /usr/bin/false }
+                f90  { set ret /usr/bin/false }
             }
         }
         gcc-4.2 {
@@ -409,6 +421,9 @@
                 objc { set ret /usr/bin/gcc-4.2 }
                 cxx  { set ret /usr/bin/g++-4.2 }
                 cpp  { set ret /usr/bin/cpp-4.2 }
+                fc   { set ret /usr/bin/false }
+                f77  { set ret /usr/bin/false }
+                f90  { set ret /usr/bin/false }
             }
         }
         llvm-gcc-4.2 {
@@ -417,6 +432,9 @@
                 objc { set ret ${developer_dir}/usr/bin/llvm-gcc-4.2 }
                 cxx  { set ret ${developer_dir}/usr/bin/llvm-g++-4.2 }
                 cpp  { set ret ${developer_dir}/usr/bin/llvm-cpp-4.2 }
+                fc   { set ret /usr/bin/false }
+                f77  { set ret /usr/bin/false }
+                f90  { set ret /usr/bin/false }
             }
         }
         clang {
@@ -429,6 +447,9 @@
                     } else {
                         set ret ${developer_dir}/usr/bin/llvm-g++-4.2
                     }
+                fc   { set ret /usr/bin/false }
+                f77  { set ret /usr/bin/false }
+                f90  { set ret /usr/bin/false }
                 }
             }
         }
@@ -437,6 +458,10 @@
                 cc   { set ret ${prefix}/bin/gcc-apple-4.0 }
                 objc { set ret ${prefix}/bin/gcc-apple-4.0 }
                 cpp  { set ret ${prefix}/bin/cpp-apple-4.0 }
+                cxx  { set ret /usr/bin/false }
+                fc   { set ret /usr/bin/false }
+                f77  { set ret /usr/bin/false }
+                f90  { set ret /usr/bin/false }
             }
         }
         apple-gcc-4.2 {
@@ -445,6 +470,9 @@
                 objc { set ret ${prefix}/bin/gcc-apple-4.2 }
                 cpp  { set ret ${prefix}/bin/cpp-apple-4.2 }
                 cxx  { set ret ${prefix}/bin/g++-apple-4.2 }
+                fc   { set ret /usr/bin/false }
+                f77  { set ret /usr/bin/false }
+                f90  { set ret /usr/bin/false }
             }
         }
         macports-gcc-4.0 {

comment:2 in reply to: ↑ 1 Changed 19 months ago by ryandesign@…

Replying to jeremyhu@…:

apple-gcc40 is not a valid option for configure.compiler when using C++

Ok, I didn't know; hadn't gotten around to trying to install apple-gcc40 yet. I'm not aware of anyone needing apple-gcc40 anyway.

Mostly I just wanted the apple-gcc42 configure.cxx problem documented in a ticket, so it could be closed with the correct milestone and we wouldn't forget to put it in the changelog.

What do you propose setting it to? How about:

Setting unavailable compilers to false might be helpful...

I'm slightly worried because I know from recent experience that a libtool bug makes it fail to make dylibs when a fortran compiler is found but doesn't work (as would be the case for "false"). But I'm going to work around that in the libtool port, and if any other ports that have embedded libtools have the problem, we can deal with it then. Silently using whatever the default compiler is is probably the worse option.

comment:3 Changed 15 months ago by jmr@…

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.