Opened 4 years ago

Closed 4 years ago

#61347 closed defect (fixed)

ccache 4.0 command execution failed while executing "system {*}$notty {*}$nice $fullcmdstring"

Reported by: thetrial (alabay) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.6.3
Keywords: legacy-os, elcapitan Cc: chrstphrchvz (Christopher Chavez)
Port: ccache

Description

ccache-4.0 seems not to build under 10.11:

:info:build Exit code: 2
:error:build Failed to build ccache: command execution failed
:debug:build Error code: CHILDSTATUS 7183 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec build"
:debug:build     (procedure "portbuild::build_main" line 8)
:debug:build     invoked from within
:debug:build "$procedure $targetname"

Change History (9)

comment:1 Changed 4 years ago by chrstphrchvz (Christopher Chavez)

It is not clear what the reporter's exact issue is; need to provide main.log.

Maybe the reporter's issue is the same one encountered by the macOS 10.8-10.11 builders (errors involving AVX intrinsics—which clang 9.0 used on macOS 10.6-10.7 recognize, and could indicate code that won't run on older CPUs):

/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_ccache/ccache/work/ccache-4.0/src/hashutil.cpp:128:18: warning: unknown attribute 'target' ignored [-Wattributes]
  __attribute__((target("avx2")));
                 ^
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_ccache/ccache/work/ccache-4.0/src/hashutil.cpp:139:9: error: unknown type name '__m256i'
  const __m256i first = _mm256_set1_epi8('_');
        ^
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_ccache/ccache/work/ccache-4.0/src/hashutil.cpp:139:25: error: use of undeclared identifier '_mm256_set1_epi8'; did you mean '_mm_set1_epi8'?
  const __m256i first = _mm256_set1_epi8('_');
                        ^~~~~~~~~~~~~~~~
                        _mm_set1_epi8
/usr/bin/../lib/clang/5.1/include/emmintrin.h:1141:1: note: '_mm_set1_epi8' declared here
_mm_set1_epi8(char __b)
^
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_ccache/ccache/work/ccache-4.0/src/hashutil.cpp:140:9: error: unknown type name '__m256i'
  const __m256i last = _mm256_set1_epi8('E');
        ^
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_ccache/ccache/work/ccache-4.0/src/hashutil.cpp:140:24: error: use of undeclared identifier '_mm256_set1_epi8'; did you mean '_mm_set1_epi8'?
  const __m256i last = _mm256_set1_epi8('E');
                       ^~~~~~~~~~~~~~~~
                       _mm_set1_epi8
/usr/bin/../lib/clang/5.1/include/emmintrin.h:1141:1: note: '_mm_set1_epi8' declared here
_mm_set1_epi8(char __b)
^
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_ccache/ccache/work/ccache-4.0/src/hashutil.cpp:147:11: error: unknown type name '__m256i'
    const __m256i block_first =
          ^
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_ccache/ccache/work/ccache-4.0/src/hashutil.cpp:148:49: error: unknown type name '__m256i'
      _mm256_loadu_si256(reinterpret_cast<const __m256i*>(&str[pos]));
                                                ^
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_ccache/ccache/work/ccache-4.0/src/hashutil.cpp:148:7: error: use of undeclared identifier '_mm256_loadu_si256'; did you mean '_mm_loadu_si128'?
      _mm256_loadu_si256(reinterpret_cast<const __m256i*>(&str[pos]));
      ^~~~~~~~~~~~~~~~~~
      _mm_loadu_si128
/usr/bin/../lib/clang/5.1/include/emmintrin.h:1069:1: note: '_mm_loadu_si128' declared here
_mm_loadu_si128(__m128i const *__p)
^
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_ccache/ccache/work/ccache-4.0/src/hashutil.cpp:148:59: error: cannot initialize a parameter of type 'const __m128i *' with an rvalue of type 'const char *'
      _mm256_loadu_si256(reinterpret_cast<const __m256i*>(&str[pos]));
                                                          ^~~~~~~~~
/usr/bin/../lib/clang/5.1/include/emmintrin.h:1069:32: note: passing argument to parameter '__p' here
_mm_loadu_si128(__m128i const *__p)
                               ^
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_ccache/ccache/work/ccache-4.0/src/hashutil.cpp:149:11: error: unknown type name '__m256i'
    const __m256i block_last =
          ^
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_ccache/ccache/work/ccache-4.0/src/hashutil.cpp:150:49: error: unknown type name '__m256i'
      _mm256_loadu_si256(reinterpret_cast<const __m256i*>(&str[pos + 5]));
                                                ^
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_ccache/ccache/work/ccache-4.0/src/hashutil.cpp:150:7: error: use of undeclared identifier '_mm256_loadu_si256'; did you mean '_mm_loadu_si128'?
      _mm256_loadu_si256(reinterpret_cast<const __m256i*>(&str[pos + 5]));
      ^~~~~~~~~~~~~~~~~~
      _mm_loadu_si128
/usr/bin/../lib/clang/5.1/include/emmintrin.h:1069:1: note: '_mm_loadu_si128' declared here
_mm_loadu_si128(__m128i const *__p)
^
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_ccache/ccache/work/ccache-4.0/src/hashutil.cpp:150:59: error: cannot initialize a parameter of type 'const __m128i *' with an rvalue of type 'const char *'
      _mm256_loadu_si256(reinterpret_cast<const __m256i*>(&str[pos + 5]));
                                                          ^~~~~~~~~~~~~
/usr/bin/../lib/clang/5.1/include/emmintrin.h:1069:32: note: passing argument to parameter '__p' here
_mm_loadu_si128(__m128i const *__p)
                               ^
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_ccache/ccache/work/ccache-4.0/src/hashutil.cpp:154:11: error: unknown type name '__m256i'
    const __m256i eq_first = _mm256_cmpeq_epi8(first, block_first);
          ^
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_ccache/ccache/work/ccache-4.0/src/hashutil.cpp:155:11: error: unknown type name '__m256i'
    const __m256i eq_last = _mm256_cmpeq_epi8(last, block_last);
          ^
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_ccache/ccache/work/ccache-4.0/src/hashutil.cpp:224:7: error: use of undeclared identifier '__builtin_cpu_supports'
  if (__builtin_cpu_supports("avx2")) {
      ^
1 warning and 15 errors generated.

comment:2 Changed 4 years ago by chrstphrchvz (Christopher Chavez)

Cc: chrstphrchvz added

comment:3 Changed 4 years ago by jmroot (Joshua Root)

Owner: set to ryandesign

comment:4 Changed 4 years ago by kencu (Ken)

Software usually needs to do a bit of testing to see if a certain feature like __attribute__(target) is supported before using it, for example something like what is done here <https://github.com/inikep/lzbench/blob/master/libdeflate/compiler_gcc.h>.

comment:5 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Status: assignedaccepted

I've filed some upstream bug reports:

Build failure on 10.12: https://github.com/ccache/ccache/issues/688 See #61349
Build failure on 10.8-10.11: https://github.com/ccache/ccache/issues/689

Last edited 4 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:6 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

In 3a4f5058b038871a8741e89266183f88298e7e89/macports-ports (master):

ccache: Blacklist clang < 900

Temporary workaround to fix build on 10.8-10.11.

See: #61347

comment:7 Changed 4 years ago by thetrial (alabay)

Now it ran through, thank you.

comment:8 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

ccache 4.1 now builds without modifications on 10.10 and later, and on 10.9 and earlier prints a more helpful message that the compiler is too old.

comment:9 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: acceptedclosed

In b4438723077c7600e8fd6cb4e6875dc0b0004bb7/macports-ports (master):

ccache: Blacklist clang < 700

Closes: #61347

Note: See TracTickets for help on using tickets.