Skip to content
Tcl Source Code History Of Ticket 8a7ec8a389
Login

History Of Ticket 8a7ec8a389

Artifacts Associated With Ticket 8a7ec8a389

  1. Ticket change [e8dfc901fe] (rid 199025) by mwdavis on 2022-03-10 22:19:12:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized 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 initialized to: "8.7.a6"
    6. is_private initialized to: "0"
    7. login: "mwdavis"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "c049613c3531c2c2d284805e97714923d04d10d2"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "mwdavis"
    14. subsystem initialized to: "53. Configuration and Build Tools"
    15. title initialized to: "error when compiling a fat binary for Mac M1"
    16. type initialized to: "Bug"
  2. Ticket change [060a82b064] (rid 199026) by sl1200mk2 on 2022-03-11 08:17:38:

    1. icomment:
      Hi,
      if you want to compile on the M1 for the M1, you don't need the -arch flag.
      here on the M1 uname -m gives arm64
      
      do you want to compile or cross-compile?
      
      ++
      
    2. login: "sl1200mk2"
    3. mimetype: "text/plain"
  3. Ticket change [041f01b70d] (rid 199031) by jan.nijtmans on 2022-03-11 08:50:59:

    1. assignee changed to: "jan.nijtmans"
    2. closedate changed to: "2459649.86874649"
    3. closer changed to: "jan.nijtmans"
    4. icomment:
      I think I see what's happening. When configuring on an Intel machine, the configure script decides that the cpuid instruction is available. But the arm part of the compile doesn't support that.
      
      Should be fixed [47f36d76128e3615|here]
      
      Thanks for the report!
      
    5. login: "jan.nijtmans"
    6. mimetype: "text/x-fossil-wiki"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"