Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e8dfc901fe9fc26907114ca25b37ed90564a26b3f01dda5ad52f270af8956268
Ticket: 8a7ec8a38915d1de37404272895337b98afa9a83
error when compiling a fat binary for Mac M1
User & Date: mwdavis on 2022-03-10 22:19:12
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    I don't know if this is a bug or a mistake on my part.
    I've always compiled a mac version of Tcl and Tk using the basic recommended make from the macos Readme.md:
    make CFLAGS="-O2 -mmacosx-version-min=10.12 -arch x86_64"
    
    I'm now trying to make a fat binary version (or just arm64 version) for the new mac M1 hardware. 
    I'm trying these new cflags (based on some searching):
    make CFLAGS="-O2 -mmacosx-version-min=10.12 -arch x86_64 -arch arm64e"
    or
    make CFLAGS="-O2 -mmacosx-version-min=10.12 -arch arm64e"
    or
    make CFLAGS="-O2 -mmacosx-version-min=10.12 -arch arm64"
    
    but tcl gives the error:
    /Users/jorgensenlab/Documents/Tcl_Tk_8_7_a6/tcl-f67b1bb0bb/unix/tclUnixCompat.c:1008:20: error: invalid output constraint '=a' in asm
                     : "=a"(regsPtr[0]), "=S"(regsPtr[1]), "=c"(regsPtr[2]), "=d"(regsPtr[3])
                       ^
    1 error generated.
    make[3]: *** [tclUnixCompat.o] Error 1
    make[2]: *** [build-tcl] Error 2
    make[1]: *** [tcl] Error 2
    make: *** [develop] Error 2
    
    
    which seems like something it would have a problem with, since my vague understanding is that line is referencing registers in an i386 CPU. 
    Should I have some different/new flags set to make it ignore this, or does it need to be specially dealt with in the source?
    
  5. foundin changed to: "8.7.a6"
  6. is_private changed to: "0"
  7. login: "mwdavis"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "c049613c3531c2c2d284805e97714923d04d10d2"
  10. resolution changed to: "None"
  11. severity changed to: "Important"
  12. status changed to: "Open"
  13. submitter changed to: "mwdavis"
  14. subsystem changed to: "53. Configuration and Build Tools"
  15. title changed to: "error when compiling a fat binary for Mac M1"
  16. type changed to: "Bug"