Skip to content
Tcl Source Code History Of Ticket d19aef1487
Login

History Of Ticket d19aef1487

Artifacts Associated With Ticket d19aef1487

  1. Ticket change [6f9bf20fd4] (rid 139010) by anonymous on 2014-07-29 09:21:24:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      When building for iOS 6 as target (--host=arm-apple-darwin) with load disabled (--disable-load), two problems occur:
      * The declaration of TclpLoadMemory differs from its definition.
      * Some defines do not distinguish between __APPLE__ and ios/macosx.
      
      diff -rupN tcl8.6.1.orig/generic/tclLoadNone.c tcl8.6.1/generic/tclLoadNone.c
      --- tcl8.6.1.orig/generic/tclLoadNone.c	2013-09-19 21:04:14.000000000 +0200
      +++ tcl8.6.1/generic/tclLoadNone.c	2014-07-29 08:57:30.000000000 +0200
      @@ -104,7 +104,7 @@ TclpLoadMemory(
           int size,			/* Dummy: unused by this implementation */
           int codeSize,		/* Dummy: unused by this implementation */
           Tcl_LoadHandle *loadHandle,	/* Dummy: unused by this implementation */
      -    Tcl_FSUnloadFileProc **unloadProcPtr)
      +    Tcl_FSUnloadFileProc **unloadProcPtr, int flags)
       				/* Dummy: unused by this implementation */
       {
           Tcl_SetObjResult(interp, Tcl_NewStringObj("dynamic loading from memory "
      diff -rupN tcl8.6.1.orig/unix/tclUnixPort.h tcl8.6.1/unix/tclUnixPort.h
      --- tcl8.6.1.orig/unix/tclUnixPort.h	2013-09-19 21:04:17.000000000 +0200
      +++ tcl8.6.1/unix/tclUnixPort.h	2014-07-29 11:01:56.000000000 +0200
      @@ -541,7 +541,11 @@ extern int errno;
        *---------------------------------------------------------------------------
        */
       
      -#if defined(__APPLE__) && defined(__DYNAMIC__)
      +#ifdef __APPLE__
      +#include "TargetConditionals.h"
      +#endif
      +
      +#if defined(__APPLE__) && defined(__DYNAMIC__) && TARGET_OS_MAC
       #   include <crt_externs.h>
       #   define environ	(*_NSGetEnviron())
       #   define USE_PUTENV	1
      
    5. foundin initialized to: "8.6.1"
    6. is_private initialized to: "0"
    7. login: "anonymous"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "37918056d323dc69a2f76cecc85476189094f3b8"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "anonymous"
    14. subsystem initialized to: "52. Portability Support"
    15. title initialized to: "Does not cross-compile for iOS 6 - patch included."
    16. type initialized to: "Bug"
  2. Ticket change [b981a80071] (rid 139012) by aku on 2014-07-29 17:24:35:

    1. assignee changed to: "kevin_walzer"
    2. icomment: "Assigned to our Apple person."
    3. login: "aku"
    4. mimetype: "text/plain"
  3. Ticket change [158a054a7c] (rid 139014) by kevin_walzer on 2014-07-29 21:27:50:

    1. icomment:
      iOS is not a supported platform and I am not familiar with steps required to compile for it, or test builds. Please provide more information on the steps you are following to achieve these ends.
      
    2. login: "kevin_walzer"
    3. mimetype: "text/plain"
  4. Ticket change [c6df68e337] (rid 139023) by anonymous on 2014-07-30 06:58:13:

    1. icomment:
      compile with (Makefile syntax) in <tcldir>/unix/:
      GCC_BIN=$(shell xcrun --sdk iphoneos --find gcc)
      IOS_SDK=$(shell xcrun --sdk iphoneos --show-sdk-path)
      CFLAGS=-arch armv7 -Os -F$(IOS_SDK)/System/Library/Frameworks -isysroot "$(IOS_SDK)" -Wimplicit -pipe -miphoneos-version-min=6.1 -no-cpp-precomp -I$(IOS_SDK)/usr/include/
      
      all:
          ./configure CC="$(GCC_BIN)" CFLAGS="$(CFLAGS)" --host=arm-apple-darwin --disable-load
          make
          make install DESTDIR=/tmp/tcl-root
      
      Note: The unsigned software runs on a jailbroken iOS device, e.g. iPod touch 4g, iPhone 4, ...
      
      Also, the first of the proposed changes may allow --disable-load for other platforms as well. This is not iOS or Apple specific. The second of the proposed changes (#ifdef...) does no harm whatsoever, as long as Tcl still compiles on OSX.
      
    2. login: "anonymous"
    3. mimetype: "text/plain"
    4. username: "bef"
  5. Ticket change [41023d79ee] (rid 139025) by dgp on 2014-07-30 13:38:37:

    1. icomment:
      Just glancing from the side, it appears that bitrot has
      caused --disable-load to stop working.  At a minimum that
      requires a fix, and is important not only on Apple systems.
      
      It's an exciting opportunity to add a new platform too.
      We appreciate the patience and assistance working through
      the startup pains
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  6. Ticket change [f611ad3985] (rid 139034) by kevin_walzer on 2014-07-31 02:06:13:

    1. icomment:
      I've opened an ios branch for these patches, but I'm not sure I'm doing the build right. I get these errors when running make per your instructions: 
      
      ld: warning: ignoring file tclAppInit.o, file was built for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03 0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being linked (i386): tclAppInit.o
      ld: warning: ignoring file /Users/kevin/tcl-ios/unix/libtcl8.6.a, file was built for archive which is not the architecture being linked (i386): /Users/kevin/tcl-ios/unix/libtcl8.6.a
      ld: warning: ignoring file libtclstub8.6.a, file was built for archive which is not the architecture being linked (i386): libtclstub8.6.a
      Undefined symbols for architecture i386:
        "_main", referenced from:
           implicit entry/start for main executable
      ld: symbol(s) not found for architecture i386
      
      Also, I'm not sure how to test the build once I get something build--I refuse to jailbreak my iPhone. Do you know of a way to run this in the simulator, assuming I can get it to build?
      
    2. login: "kevin_walzer"
    3. mimetype: "text/plain"
  7. Ticket change [864631792d] (rid 139037) by anonymous on 2014-07-31 07:47:36:

    1. icomment:
      It looks like your configuration is trying to link against the wrong architecture (i386) instead of arm.
      Maybe there are some files remaining from a previous build? (make distclean)
      Or the 'configure' was not set to cross-compile, e.g. --host=arm-apple-darwin
      
      As far as testing is concerned, the ARM build of Tcl for iOS works only on a jailbroken device out of the box.
      However It may be possible to build the Tcl library as framework for iOS (--enable-framework) and use it in a sample iOS application. This application will then have to be signed and deployed on a registered developer device, which requires an Apple developer account (charges apply - approx $100/y).
      
    2. login: "anonymous"
    3. mimetype: "text/plain"
    4. username: "bef"