Artifacts Associated With Ticket d19aef1487
Ticket change [6f9bf20fd4] (rid 139010) by anonymous on 2014-07-29 09:21:24:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- 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 - foundin initialized to: "8.6.1"
- is_private initialized to: "0"
- login: "anonymous"
- priority initialized to: "5 Medium"
- private_contact initialized to: "37918056d323dc69a2f76cecc85476189094f3b8"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "anonymous"
- subsystem initialized to: "52. Portability Support"
- title initialized to: "Does not cross-compile for iOS 6 - patch included."
- type initialized to: "Bug"
Ticket change [b981a80071] (rid 139012) by aku on 2014-07-29 17:24:35:
- assignee changed to: "kevin_walzer"
- icomment: "Assigned to our Apple person."
- login: "aku"
- mimetype: "text/plain"
Ticket change [158a054a7c] (rid 139014) by kevin_walzer on 2014-07-29 21:27:50:
- 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.
- login: "kevin_walzer"
- mimetype: "text/plain"
- icomment:
Ticket change [c6df68e337] (rid 139023) by anonymous on 2014-07-30 06:58:13:
- 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. - login: "anonymous"
- mimetype: "text/plain"
- username: "bef"
- icomment:
Ticket change [41023d79ee] (rid 139025) by dgp on 2014-07-30 13:38:37:
- 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
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [f611ad3985] (rid 139034) by kevin_walzer on 2014-07-31 02:06:13:
- 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? - login: "kevin_walzer"
- mimetype: "text/plain"
- icomment:
Ticket change [864631792d] (rid 139037) by anonymous on 2014-07-31 07:47:36:
- 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).
- login: "anonymous"
- mimetype: "text/plain"
- username: "bef"
- icomment: