Opened 3 years ago

Closed 3 years ago

#62516 closed defect (fixed)

ccache fails to compile on PowerPC - invalid mnemonic 'brk'

Reported by: rmottola (Riccardo) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: leopard tiger powerpc haspatch Cc: evanmiller (Evan Miller)
Port: ccache

Description

Compiling on 10.5 PPC with gcc 7

{standard input}:20271:Invalid mnemonic 'brk'
{standard input}:20322:Invalid mnemonic 'brk'
{standard input}:20373:Invalid mnemonic 'brk'
make[2]: *** [unittest/CMakeFiles/unittest.dir/test_Args.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
{standard input}:11816:Invalid mnemonic 'brk'
{standard input}:11879:Invalid mnemonic 'brk'
make[2]: *** [unittest/CMakeFiles/unittest.dir/main.cpp.o] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ccache/ccache/work/build'
make[1]: *** [unittest/CMakeFiles/unittest.dir/all] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ccache/ccache/work/build'
make: *** [all] Error 2

I don't have this issue on 10.5 Intel - I fear it is soemthing specific to PPC or to ts configuration.

Attachments (5)

main.log (103.3 KB) - added by rmottola (Riccardo) 3 years ago.
build log on ppc 10.5
patch-ccache-powerpc-darwin.diff (1.1 KB) - added by kencu (Ken) 3 years ago.
ccache-powerpc-leopard-test-run.log (40.2 KB) - added by kencu (Ken) 3 years ago.
ccache-powerpc-leopard-test-run-console.txt (10.5 KB) - added by kencu (Ken) 3 years ago.
patch-ccache-no-posix-tiger.diff (406 bytes) - added by kencu (Ken) 3 years ago.

Download all attachments as: .zip

Change History (22)

Changed 3 years ago by rmottola (Riccardo)

Attachment: main.log added

build log on ppc 10.5

comment:1 Changed 3 years ago by kencu (Ken)

comment:2 Changed 3 years ago by rmottola (Riccardo)

Not very helpful... but it would show that it affects also i386 and much more modern MacOS versions. However... apparently I had no issues with 10.5 & 10.7 intel.

comment:3 Changed 3 years ago by mf2k (Frank Schima)

Cc: ryandesign removed
Owner: set to ryandesign
Status: newassigned

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

comment:5 Changed 3 years ago by kencu (Ken)

here's one guy's implementation of doing it for powerpc darwin; looks kinda messy:

https://www.cocoawithlove.com/2008/03/break-into-debugger.html

comment:6 in reply to:  1 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to kencu:

not very helpful clue:

https://www.gitmemory.com/issue/ccache/ccache/731/734685932

That is a web site that unhelpfully republishes information from GitHub and other sources without making it obvious where the original is. The original is a bug report I filed with ccache last year which was supposed to have been fixed already.

comment:7 Changed 3 years ago by kencu (Ken)

it was fixed for i386. Riccardo wants ppc.

I found the links to the likely fixes there, but will leave it to Riccardo to actually do it.

comment:8 Changed 3 years ago by kencu (Ken)

I couldn't resist the PowerPC assembly:

$ port -v installed ccache
The following ports are currently installed:
  ccache @4.2_0 (active) platform='darwin 9' archs='ppc' date='2021-03-23T11:47:24-0700'

test suite looks quite good.

94% tests passed, 2 tests failed out of 36

Total Test time (real) = 227.44 sec

The following tests did not run:
	  6 - test.color_diagnostics (Skipped)
	  7 - test.cpp1 (Skipped)
	  8 - test.debug_prefix_map (Skipped)
	 12 - test.fileclone (Skipped)
	 17 - test.modules (Skipped)
	 21 - test.nvcc (Skipped)
	 22 - test.nvcc_direct (Skipped)
	 23 - test.nvcc_ldir (Skipped)
	 24 - test.nvcc_nocpp2 (Skipped)
	 26 - test.profiling (Skipped)
	 27 - test.profiling_clang (Skipped)
	 29 - test.profiling_hip_clang (Skipped)
	 32 - test.sanitize_blacklist (Skipped)
	 33 - test.serialize_diagnostics (Skipped)
	 34 - test.source_date_epoch (Skipped)
	 35 - test.split_dwarf (Skipped)

The following tests FAILED:
	  9 - test.depend (Failed)
	 28 - test.profiling_gcc (Failed)

one probably real error (test 9):

 9/36 Test  #9: test.depend ......................***Failed    6.64 sec
Compiler:         gcc (/usr/bin/gcc)
Compiler version: powerpc-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493)
CUDA compiler:    not available

Running test suite depend.......
FAILED

Test suite:     depend
Test case:      Source file with special characters
Failure reason: file with$special#characters.d and reference.d differ

and one bogus error (test 28):

Running test suite profiling_gcc..cc1: error: unrecognized command line option "-fprofile-dir=data"
Last edited 3 years ago by kencu (Ken) (previous) (diff)

Changed 3 years ago by kencu (Ken)

Changed 3 years ago by kencu (Ken)

Changed 3 years ago by kencu (Ken)

comment:9 Changed 3 years ago by kencu (Ken)

I have not tested on Tiger PPC as yet.

comment:10 Changed 3 years ago by kencu (Ken)

Tiger is good too, with one minor additional fix:

$ port -v installed ccache
The following ports are currently installed:
  ccache @4.2_0 (active) platform='darwin 8' archs='ppc' date='2021-03-24T19:19:09-0700'

Test suite looks quite good. Only one real error I would say, in the special characters test. The other two are bogus.

92% tests passed, 3 tests failed out of 36

Total Test time (real) = 256.36 sec

The following tests did not run:
          6 - test.color_diagnostics (Skipped)
          7 - test.cpp1 (Skipped)
          8 - test.debug_prefix_map (Skipped)
         12 - test.fileclone (Skipped)
         17 - test.modules (Skipped)
         21 - test.nvcc (Skipped)
         22 - test.nvcc_direct (Skipped)
         23 - test.nvcc_ldir (Skipped)
         24 - test.nvcc_nocpp2 (Skipped)
         26 - test.profiling (Skipped)
         27 - test.profiling_clang (Skipped)
         29 - test.profiling_hip_clang (Skipped)
         32 - test.sanitize_blacklist (Skipped)
         33 - test.serialize_diagnostics (Skipped)
         34 - test.source_date_epoch (Skipped)
         35 - test.split_dwarf (Skipped)

The following tests FAILED:
          9 - test.depend (Failed)
         18 - test.multi_arch (Failed)
         28 - test.profiling_gcc (Failed)

test 9 (real error) and 28 (bogus error) are the same failures as Leopard.

Test 18 is an artifact from using apple-gcc42 for the test, and it doesn't cross-compile.

Last edited 3 years ago by kencu (Ken) (previous) (diff)

Changed 3 years ago by kencu (Ken)

comment:11 Changed 3 years ago by kencu (Ken)

Tiger's headers do not have the DARWIN_C_SOURCE workaround that was applied to Leopard and onward. Removing the POSIX definition is sufficient to fix the build on Tiger.

comment:12 Changed 3 years ago by kencu (Ken)

Keywords: tiger haspatch added; gcc removed

comment:13 Changed 3 years ago by kencu (Ken)

Summary: ccache fails to compile - invalid mnemonic 'brk'ccache fails to compile on PowerPC - invalid mnemonic 'brk'

comment:14 Changed 3 years ago by kencu (Ken)

Cc: kencu removed

comment:16 Changed 3 years ago by evanmiller (Evan Miller)

Cc: evanmiller added

comment:17 Changed 3 years ago by evanmiller (Evan Miller)

Resolution: fixed
Status: assignedclosed

In 50689d1972aadbde80c9b1f60d2d8d62da7bed68/macports-ports (master):

ccache: fix build on Tiger

Patches adapted from @kencu's TigerPorts

Closes: #62516

Note: See TracTickets for help on using tickets.