[MacPorts] #64498: llvm-3.3/3.4 fail to build for ppc on 10.6.8 (Rosetta): Undefined symbols: "_main", referenced from: start in crt1.10.5.o

MacPorts noreply at macports.org
Sat Jul 16 23:10:57 UTC 2022


#64498: llvm-3.3/3.4 fail to build for ppc on 10.6.8 (Rosetta): Undefined symbols:
"_main", referenced from: start in crt1.10.5.o
-------------------------+-------------------------------------------------
  Reporter:              |      Owner:  jeremyhu
  barracuda156           |
      Type:  defect      |     Status:  assigned
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:  2.7.2
Resolution:              |   Keywords:  powerpc, llvm, snowleopard, rosetta
      Port:  llvm-3.3,   |
  llvm-3.4               |
-------------------------+-------------------------------------------------

Comment (by barracuda156):

 Replying to [comment:9 kencu]:

 In fact it has built successfully now. I am not sure what exactly helped
 though, since I changed this in 004 patch to 10,6:
 {{{
      MCObjectWriter *createObjectWriter(raw_ostream &OS) const {
        bool is64 = getPointerSize() == 8;
 +      MachO::CPUSubTypePowerPC CS = MachO::CPU_SUBTYPE_POWERPC_ALL;
 +
 +      if (TheTriple.isOSDarwin() && !TheTriple.isMacOSXVersionLT(10,6)) {
 +          CS = MachO::CPU_SUBTYPE_POWERPC_7400;
 +      }
 +
 }}}

 And used `gcc10` instead of `gcc-4.2`.

 Notably, neither was needed on 10.6 PPC – this failure has been exclusive
 to 10.6.8 Rosetta.

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


More information about the macports-tickets mailing list