Opened 2 years ago

Last modified 6 months ago

#64606 new defect

ld64-97 and ld64-127 fail to build against llvm-3.5 on 10.6.8 Rosetta (while earlier llvm fail to build)

Reported by: barracuda156 Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: powerpc, snowleopard, rosetta Cc: cooljeanius (Eric Gallager)
Port: ld64-97, ld64-127

Description

So ld64-127 fails on this:

In file included from src/ld/passes/stubs/stubs.cpp:37:0:
src/ld/Options.h: In member function 'bool Options::CStringEquals::operator()(const char*, const char*) const':
src/ld/Options.h:301:72: error: 'strcmp' was not declared in this scope
   bool operator()(const char* left, const char* right) const { return (strcmp(left, right) == 0); }
                                                                        ^~~~~~
src/ld/Options.h:301:72: note: suggested alternative: 'wcscmp'
   bool operator()(const char* left, const char* right) const { return (strcmp(left, right) == 0); }
                                                                        ^~~~~~
                                                                        wcscmp
src/ld/passes/stubs/stubs.cpp: In member function 'bool ld::passes::stubs::Pass::AtomByNameSorter::operator()(const ld::Atom*, const ld::Atom*)':
src/ld/passes/stubs/stubs.cpp:65:14: error: 'strcmp' was not declared in this scope
      return (strcmp(left->name(), right->name()) < 0);
              ^~~~~~
src/ld/passes/stubs/stubs.cpp:65:14: note: suggested alternative: 'wcscmp'
      return (strcmp(left->name(), right->name()) < 0);
              ^~~~~~
              wcscmp
src/ld/passes/stubs/stubs.cpp: In member function 'void ld::passes::stubs::Pass::process(ld::Internal&)':
src/ld/passes/stubs/stubs.cpp:338:22: error: 'strcmp' was not declared in this scope
                 if ( strcmp(sect->segmentName(), "__TEXT") == 0) {
                      ^~~~~~
src/ld/passes/stubs/stubs.cpp:338:22: note: suggested alternative: 'wcscmp'
                 if ( strcmp(sect->segmentName(), "__TEXT") == 0) {
                      ^~~~~~
                      wcscmp
make: *** [src/ld/passes/stubs/stubs.o] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_ld64/ld64-127/work/ld64-127.2'
Command failed:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_ld64/ld64-127/work/ld64-127.2" && /usr/bin/make -j4 -w all CC="/opt/local/bin/gcc-mp-7" CXX="/opt/local/bin/g++-mp-7" OTHER_CPPFLAGS="-I/opt/local/include -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_ld64/ld64-127/work/dyld-655.1.1/include" OTHER_CFLAGS="-Os -arch ppc" OTHER_CXXFLAGS="-Os  -arch ppc" OTHER_LDFLAGS="-L/opt/local/lib -Wl,-headerpad_max_install_names  -arch ppc" LLVM_CONFIG=/opt/local/bin/llvm-config-mp-3.5 OTHER_LDFLAGS_LD64="-I/opt/local/libexec/llvm-3.5/include/llvm-c" 
Exit code: 2
Error: Failed to build ld64-127: command execution failed

ld64-97 fails on this:

src/other/rebase.cpp: In function 'void rebase(const fileInfo&)':
src/other/rebase.cpp:873:7: error: 'realpath' was not declared in this scope
  if ( realpath(info.path, realFilePath) == NULL ) {
       ^~~~~~~~
src/other/rebase.cpp:873:7: note: suggested alternative: 'realFilePath'
  if ( realpath(info.path, realFilePath) == NULL ) {
       ^~~~~~~~
       realFilePath
src/other/rebase.cpp: In function 'int main(int, const char**)':
src/other/rebase.cpp:993:19: error: 'strtoull' was not declared in this scope
      lowAddress = strtoull(argv[++i], &endptr, 16);
                   ^~~~~~~~
src/other/rebase.cpp:993:19: note: suggested alternative: 'strcoll'
      lowAddress = strtoull(argv[++i], &endptr, 16);
                   ^~~~~~~~
                   strcoll
src/other/rebase.cpp:996:20: error: 'strtoull' was not declared in this scope
      highAddress = strtoull(argv[++i], &endptr, 16);
                    ^~~~~~~~
src/other/rebase.cpp:996:20: note: suggested alternative: 'strcoll'
      highAddress = strtoull(argv[++i], &endptr, 16);
                    ^~~~~~~~
                    strcoll
make: *** [src/other/rebase.o] Error 1
make: *** Waiting for unfinished jobs....
src/other/machochecker.cpp: In instantiation of 'void MachOChecker<A>::checkLoadCommands() [with A = ppc64]':
src/other/machochecker.cpp:227:19:   required from 'MachOChecker<A>::MachOChecker(const uint8_t*, uint32_t, const char*) [with A = ppc64; uint8_t = unsigned char; uint32_t = unsigned int]'
src/other/machochecker.cpp:62:24:   required from 'static MachOChecker<A>* MachOChecker<A>::make(const uint8_t*, uint32_t, const char*) [with A = ppc64; uint8_t = unsigned char; uint32_t = unsigned int]'
src/other/machochecker.cpp:921:28:   required from here
src/other/machochecker.cpp:333:66: error: no matching function for call to 'make_pair<MachOChecker<ppc64>::pint_t, MachOChecker<ppc64>::pint_t>(uint64_t&, uint64_t&)'
     segmentAddressRanges.push_back(std::make_pair<pint_t, pint_t>(startAddr, endAddr));
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/local/include/gcc7/c++/bits/stl_algobase.h:64:0,
                 from /opt/local/include/gcc7/c++/vector:60,
                 from src/other/machochecker.cpp:34:
/opt/local/include/gcc7/c++/bits/stl_pair.h:524:5: note: candidate: template<class _T1, class _T2> constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&)
     make_pair(_T1&& __x, _T2&& __y)
     ^~~~~~~~~
/opt/local/include/gcc7/c++/bits/stl_pair.h:524:5: note:   template argument deduction/substitution failed:
src/other/machochecker.cpp:333:66: note:   cannot convert 'startAddr' (type 'uint64_t {aka long long unsigned int}') to type 'long long unsigned int&&'
     segmentAddressRanges.push_back(std::make_pair<pint_t, pint_t>(startAddr, endAddr));
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
src/other/machochecker.cpp:350:69: error: no matching function for call to 'make_pair<MachOChecker<ppc64>::pint_t, MachOChecker<ppc64>::pint_t>(uint64_t&, uint64_t&)'
     segmentFileOffsetRanges.push_back(std::make_pair<pint_t, pint_t>(startOffset, endOffset));
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/local/include/gcc7/c++/bits/stl_algobase.h:64:0,
                 from /opt/local/include/gcc7/c++/vector:60,
                 from src/other/machochecker.cpp:34:
/opt/local/include/gcc7/c++/bits/stl_pair.h:524:5: note: candidate: template<class _T1, class _T2> constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&)
     make_pair(_T1&& __x, _T2&& __y)
     ^~~~~~~~~
/opt/local/include/gcc7/c++/bits/stl_pair.h:524:5: note:   template argument deduction/substitution failed:
src/other/machochecker.cpp:350:69: note:   cannot convert 'startOffset' (type 'uint64_t {aka long long unsigned int}') to type 'long long unsigned int&&'
     segmentFileOffsetRanges.push_back(std::make_pair<pint_t, pint_t>(startOffset, endOffset));
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
src/other/machochecker.cpp: In instantiation of 'void MachOChecker<A>::checkLoadCommands() [with A = x86_64]':
src/other/machochecker.cpp:227:19:   required from 'MachOChecker<A>::MachOChecker(const uint8_t*, uint32_t, const char*) [with A = x86_64; uint8_t = unsigned char; uint32_t = unsigned int]'
src/other/machochecker.cpp:62:24:   required from 'static MachOChecker<A>* MachOChecker<A>::make(const uint8_t*, uint32_t, const char*) [with A = x86_64; uint8_t = unsigned char; uint32_t = unsigned int]'
src/other/machochecker.cpp:927:29:   required from here
src/other/machochecker.cpp:333:66: error: no matching function for call to 'make_pair<MachOChecker<x86_64>::pint_t, MachOChecker<x86_64>::pint_t>(uint64_t&, uint64_t&)'
     segmentAddressRanges.push_back(std::make_pair<pint_t, pint_t>(startAddr, endAddr));
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /opt/local/include/gcc7/c++/bits/stl_algobase.h:64:0,
                 from /opt/local/include/gcc7/c++/vector:60,
                 from src/other/machochecker.cpp:34:
/opt/local/include/gcc7/c++/bits/stl_pair.h:524:5: note: candidate: template<class _T1, class _T2> constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&)
     make_pair(_T1&& __x, _T2&& __y)
     ^~~~~~~~~
/opt/local/include/gcc7/c++/bits/stl_pair.h:524:5: note:   template argument deduction/substitution failed:
src/other/machochecker.cpp:333:66: note:   cannot convert 'startAddr' (type 'uint64_t {aka long long unsigned int}') to type 'long long unsigned int&&'
     segmentAddressRanges.push_back(std::make_pair<pint_t, pint_t>(startAddr, endAddr));
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
src/other/machochecker.cpp:350:69: error: no matching function for call to 'make_pair<MachOChecker<x86_64>::pint_t, MachOChecker<x86_64>::pint_t>(uint64_t&, uint64_t&)'
     segmentFileOffsetRanges.push_back(std::make_pair<pint_t, pint_t>(startOffset, endOffset));
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/local/include/gcc7/c++/bits/stl_algobase.h:64:0,
                 from /opt/local/include/gcc7/c++/vector:60,
                 from src/other/machochecker.cpp:34:
/opt/local/include/gcc7/c++/bits/stl_pair.h:524:5: note: candidate: template<class _T1, class _T2> constexpr std::pair<typename std::__decay_and_strip<_Tp>::__type, typename std::__decay_and_strip<_T2>::__type> std::make_pair(_T1&&, _T2&&)
     make_pair(_T1&& __x, _T2&& __y)
     ^~~~~~~~~
/opt/local/include/gcc7/c++/bits/stl_pair.h:524:5: note:   template argument deduction/substitution failed:
src/other/machochecker.cpp:350:69: note:   cannot convert 'startOffset' (type 'uint64_t {aka long long unsigned int}') to type 'long long unsigned int&&'
     segmentFileOffsetRanges.push_back(std::make_pair<pint_t, pint_t>(startOffset, endOffset));
                                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
make: *** [src/other/machochecker.o] Error 1
make: Leaving directory `/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_ld64/ld64-97/work/ld64-97.17'
Command failed:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_ld64/ld64-97/work/ld64-97.17" && /usr/bin/make -j4 -w all CC="/opt/local/bin/gcc-mp-7" CXX="/opt/local/bin/g++-mp-7" OTHER_CPPFLAGS="-I/opt/local/include -I/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_devel_ld64/ld64-97/work/dyld-655.1.1/include" OTHER_CFLAGS="-Os -arch ppc" OTHER_CXXFLAGS="-Os  -arch ppc" OTHER_LDFLAGS="-L/opt/local/lib -Wl,-headerpad_max_install_names  -arch ppc" LLVM_CONFIG=/opt/local/bin/llvm-config-mp-3.5 OTHER_LDFLAGS_LD64="-I/opt/local/libexec/llvm-3.5/include/llvm-c" 
Exit code: 2
Error: Failed to build ld64-97: command execution failed

llvm-3.5 installed:

Sergey-Fedorovs-Mac-mini:~ svacchanda$ port -v installed llvm-3.5
The following ports are currently installed:
  llvm-3.5 @3.5.2_9 (active) requested_variants='' platform='darwin 10' archs='ppc' date='2022-02-04T00:07:49+0800'
  1. S. llvm-3.7 and llvm-5.0 ask for libcxx, which fails.

Attachments (2)

ld64-97_main.log (727.6 KB) - added by barracuda156 2 years ago.
ld64-127_main.log (224.1 KB) - added by barracuda156 2 years ago.

Download all attachments as: .zip

Change History (3)

Changed 2 years ago by barracuda156

Attachment: ld64-97_main.log added

Changed 2 years ago by barracuda156

Attachment: ld64-127_main.log added

comment:1 Changed 6 months ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added
Note: See TracTickets for help on using tickets.