|
List Info
Thread: Updated critcl for universal binaries?
|
|
| Updated critcl for universal binaries? |

|
2007-01-06 16:29:26 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Last fall I was trying to compile a Tcl library as a
universal binary
via critcl using this command:
critcl -target universal-macosx -pkg myscript.tcl
It worked, in that the resulting .dylib had both the pcc and
i386
architectures. However, the dylib was stored in
lib/myscript/powerpc-macosx/myscript.dylib.
To have the dylib successfully load on Intel as well as PPC,
I had to
hack lib/myscript/critcl as follows:
set plat macosx
set cpu universal
and then I had to change the directory the dylib was stored
in to
"universal-macosx."
At the time, when this was discussed on-list, Steve Landers
said that
the new version of critcl was more or less still in beta
mode, and still
had some bugs in handling unviersal binaries; hence the
hacks required
above. I am wondering if has been updated in the interim to
automate
this process. Looking at the most recent build of ActiveTcl,
I see that
ActiveState does something similar for its universal
binaries based on
critcl (Daniel Steffen's carboncrit package, for instance),
but I'm not
sure if criticl did this or someone at AS had to edit the
files by hand,
as I did.
If critcl has been updated to handle universal binaries more
gracefully,
can someone please let me know, and also provide a download
link? Thanks.
- --
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFn85lEsLm8HXyq4sRAq5+AJ96ra5PHxgTVWGzKu8BJjJq/eY6OACd
H0OD
MyMQ18C6EApEaXjdIGGfOZ4=
=3B0P
-----END PGP SIGNATURE-----
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief surveys -
and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Tcl-mac mailing list
tcl-mac lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tcl-mac
|
|
| Updated critcl for universal binaries? |

|
2007-01-08 00:13:34 |
On 07/01/2007, at 1:29 AM, Kevin Walzer wrote:
> Last fall I was trying to compile a Tcl library as a
universal binary
> via critcl using this command:
>
> critcl -target universal-macosx -pkg myscript.tcl
>
> It worked, in that the resulting .dylib had both the
pcc and i386
> architectures. However, the dylib was stored in
> lib/myscript/powerpc-macosx/myscript.dylib.
>
> To have the dylib successfully load on Intel as well as
PPC, I had to
> hack lib/myscript/critcl as follows:
>
> set plat macosx
> set cpu universal
>
> and then I had to change the directory the dylib was
stored in to
> "universal-macosx."
>
> At the time, when this was discussed on-list, Steve
Landers said that
> the new version of critcl was more or less still in
beta mode, and
> still
> had some bugs in handling unviersal binaries; hence
the hacks
> required
> above. I am wondering if has been updated in the
interim to automate
> this process.
Yes - but it's still in my half-bakery and not formally
released (I
still have to merge Pat Thoyts' MSVC patches and finish the
documentation).
> Looking at the most recent build of ActiveTcl, I see
that
> ActiveState does something similar for its universal
binaries based on
> critcl (Daniel Steffen's carboncrit package, for
instance), but I'm
> not
> sure if criticl did this or someone at AS had to edit
the files by
> hand,
> as I did.
I provided a copy of the beta critcl to Andreas Kupries, so
it's
likely that AS used that.
> If critcl has been updated to handle universal binaries
more
> gracefully,
> can someone please let me know, and also provide a
download link?
> Thanks.
Yes - see ht
tp://www.digitalsmarties.com/pub/critcl-new.kit.
The current behaviour is to generate universal binaries if
built
using OSX 4.0 SDK. There are also some smarts so that if
the
resulting package is loaded on OSX >= 10.4.0 it will look
first for a
universal version of the shared library.
So, if you're building on OSX with a SDK >= 10.4 you'll
just need to run
critcl -pkg myscript
If you also want to build a PPC version for earlier OSX
releases then
you can set the SDKROOT variable to the appropriate value
and run
critcl -pkg -target powerpc-macosx myscript
BTW, this version of Critcl uses the new platform package
that formed
the basis of TIP #291.
Good luck, and don't hesitate to mail me directly if you
have any
problems
Steve
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief surveys -
and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Tcl-mac mailing list
tcl-mac lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tcl-mac
|
|
| Re: Updated critcl for universal
binaries? |
  United States |
2007-02-07 17:22:00 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Steve Landers wrote:
>> If critcl has been updated to handle universal
binaries more gracefully,
>> can someone please let me know, and also provide a
download link? Thanks.
>
> Yes - see ht
tp://www.digitalsmarties.com/pub/critcl-new.kit.
>
> The current behaviour is to generate universal binaries
if built using
> OSX 4.0 SDK. There are also some smarts so that if the
resulting
> package is loaded on OSX >= 10.4.0 it will look
first for a universal
> version of the shared library.
>
> So, if you're building on OSX with a SDK >= 10.4
you'll just need to run
>
> critcl -pkg myscript
>
Steve,
I'm having difficulty with the new version of critcl
(critcl-new.kit
from your website, dated 8 January 2007). Builds that worked
with
previous versions of critcl are failing.
Per your suggestion, I have the following variables defined
in my
~/.profile:
CFLAGS="-arch ppc -arch i386 -isysroot
/Developer/SDKs/MacOSX10.4u.sdk
- -mmacosx-version-min=10.4"
export CFLAGS
I did this so critcl will automatically try to build a
universal binary
(I'm on 10.4.8, using XCode 2.4.x).
As a test case, I'm using Daniel Steffen's tclAuthorization
package
(http://wiki.tcl.tk/13401
), which I have built before.
I use this command: critcl -pkg tclAuthorization.tcl
The build fails with the following errors:
Wed Feb 07 18:17:22 EST 2007 -
/Library/Tcl/bin/critcl/lib/app-critcl/critcl.tcl
gcc -c -arch i386 -arch ppc -isysroot $SDKROOT
- -mmacosx-version-min=$osxmin -arch ppc -arch i386
-isysroot
/Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4
- -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1
- -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DHAVE_READDIR_R=1
-DTCL_THREADS=1
- -DUSE_TCL_STUBS -I/Users/kevin/.critcl/universal-macosx
-o
/Users/kevin/.critcl/universal-macosx/v20_2c42003f504bda09b2
1dc9bec7eb3e88_pic.o
/Users/kevin/.critcl/universal-macosx/v20_2c42003f504bda09b2
1dc9bec7eb3e88.c
- -O2 -DNDEBUG
/Users/kevin/.critcl/universal-macosx/v20_2c42003f504bda09b2
1dc9bec7eb3e88_pic.o:
9632 bytes
gcc -bundle -arch i386 -arch ppc -arch ppc -arch i386
-isysroot
/Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4
/Users/kevin/.critcl/universal-macosx/v20_2c42003f504bda09b2
1dc9bec7eb3e88_pic.o
/Users/kevin/.critcl/universal-macosx/v20_3b5477fd4e83e8177
00ebafd3295c953_pic.o
-o
/Users/kevin/.critcl/universal-macosx/v20_2c42003f504bda09b2
1dc9bec7eb3e88.dylib
/usr/bin/ld: for architecture i386
/usr/bin/ld: Undefined symbols:
_AuthorizationCreate
_AuthorizationExecuteWithPrivileges
_AuthorizationFree
collect2: ld returned 1 exit status
/usr/bin/ld: for architecture ppc
/usr/bin/ld: Undefined symbols:
_AuthorizationCreate
_AuthorizationExecuteWithPrivileges
_AuthorizationFree
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccyE6pDA.out (No such
file or
directory)
ERROR while linking
/Users/kevin/.critcl/universal-macosx/v20_2c42003f504bda09b2
1dc9bec7eb3e88.dylib:
critcl build failed
(/Library/Tcl/bin/critcl/lib/app-critcl/critcl.tcl)
Files left in /Users/kevin/.critcl/universal-macosx
Any idea what I am doing wrong here? I made the mistake of
overwriting
my old version of critcl (dating back from last fall), which
did
successfully compile universal binaries. So I can't use that
as a fallback.
Regards,
Kevin Walzer
- --
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD4DBQFFyl8XEsLm8HXyq4sRAmcoAJ0Q9nq8C5fL+KREC96kkSgZHURlKACW
O3ME
2OWAqvojG9kL9rCil2odSQ==
=FLCN
-----END PGP SIGNATURE-----
------------------------------------------------------------
-------------
Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Tcl-mac mailing list
tcl-mac lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tcl-mac
|
|
| Re: Updated critcl for universal
binaries? |
  Australia |
2007-02-07 17:44:58 |
Kevin,
On 08/02/2007, at 10:22, Kevin Walzer wrote:
> The build fails with the following errors:
>
> /usr/bin/ld: Undefined symbols:
> _AuthorizationCreate
> _AuthorizationExecuteWithPrivileges
> _AuthorizationFree
this is most likely due to internal changes in critcl 2
rendering
inoperative the hack I used to link with frameworks; luckily
there is
now an api to do that, i.e. replacing
lappend ::critcl::v::compile -framework Security
by
::critcl::framework Security
will fix the error in tclAuthorization.tcl (and similarly
for other
extensions in carboncritlib), see critcl-new.vfs/lib/critcl/
critcl.tcl for details.
Cheers,
Daniel
--
** Daniel A. Steffen Dept. of Mathematics **
** Macquarie University NSW 2109 Australia **
------------------------------------------------------------
-------------
Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Tcl-mac mailing list
tcl-mac lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tcl-mac
|
|
| Re: Updated critcl for universal
binaries? |
  United States |
2007-02-07 17:53:45 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Daniel A. Steffen wrote:
> Kevin,
>
> On 08/02/2007, at 10:22, Kevin Walzer wrote:
>
>> The build fails with the following errors:
>>
>> /usr/bin/ld: Undefined symbols:
>> _AuthorizationCreate
>> _AuthorizationExecuteWithPrivileges
>> _AuthorizationFree
>
> this is most likely due to internal changes in critcl 2
rendering
> inoperative the hack I used to link with frameworks;
luckily there is
> now an api to do that, i.e. replacing
> lappend ::critcl::v::compile -framework Security
> by
> ::critcl::framework Security
> will fix the error in tclAuthorization.tcl (and
similarly for other
> extensions in carboncritlib), see
critcl-new.vfs/lib/critcl/critcl.tcl
> for details.
>
> Cheers,
>
> Daniel
>
> --** Daniel A. Steffen Dept. of Mathematics **
> ** Macquarie University NSW 2109 Australia **
>
>
>
>
Daniel,
Thank you! This solved the problem. I also patched
tclAppleHelp.tcl (my
own package) to fix the errors I was having there.
- --Kevin
- --
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFymaJEsLm8HXyq4sRAg5SAJwNP0RWeUJLWUApUVxAmTHn7l4rowCf
VTJo
3rKMRZ8mfaS6uniS/FBPejk=
=+P+R
-----END PGP SIGNATURE-----
------------------------------------------------------------
-------------
Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Tcl-mac mailing list
tcl-mac lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tcl-mac
|
|
[1-5]
|
|