Picon
Favicon
Gravatar

Re: Symbol not found: _TclFreeObj on 64-bit builds


On Jan 30, 2012, at 3:01 PM, Michael Schlenker wrote:

> 
> Am 30.01.2012 um 05:14 schrieb Hans-Christoph Steiner:
> 
>> 
>> We have an odd error in our app Pd-extended.  Its a media programming environment that we recently added
the ability to write objects in Tcl.  This is done using swig to wrap the Pd C API for Tcl.  That's working
great, but we have this odd error:
>> 
>> On 32-bit builds, everything works fine, they are currently built on 10.5.8 and seem to run fine on 10.5 -
10.7.  For the 64-bit builds, when the 'tclpd' library is loaded, it throws this error:
>> 
>> Symbol not found: _TclFreeObj
>> 
>> The 64-bit builds are built on 10.6.8 and I'm running it on 10.6.8.  Both of these apps are using a custom
build of plain vanilla Tcl/Tk 8.5.10.
> 
> TclFreeObj() should be an internal symbol from the name, which is only exposed due to the Tcl_DecRefCount
macro, but is actually defined in the Stubs Table slot 30, so it should be visible for a stubs enabled build
at least.
> 
> Are you using stubs or linking directly?
> 
> Michael

I don't quite understand the question.  So tclpd.pd_darwin is a bundle/plugin that is linking to the Tcl
framework using "-framework Tcl"  That Tcl 8.5.10 framework is built using:

(Continue reading)

Kevin Walzer | 5 Feb 15:27

Re: Symbol not found: _TclFreeObj on 64-bit builds

On 2/4/12 11:58 PM, Hans-Christoph Steiner wrote:
>   /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4"

Could this be the issue--support for 10.4? 10.5 is the minimum supported 
OS for 64-bit Tk-Cocoa. Try adjusting these flags.

--

-- 
Kevin Walzer
Code by Kevin
http://www.codebykevin.com

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
Picon
Favicon
Gravatar

Re: Symbol not found: _TclFreeObj on 64-bit builds


On Feb 5, 2012, at 9:27 AM, Kevin Walzer wrote:

> On 2/4/12 11:58 PM, Hans-Christoph Steiner wrote:
>>  /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4"
> 
> Could this be the issue--support for 10.4? 10.5 is the minimum supported 
> OS for 64-bit Tk-Cocoa. Try adjusting these flags.

I figured it out.  The included Tcl.framework is built as 32-bit, which this 64-bit plugin then tries to use
at runtime.  Normally in this app, it works find to have a 32-bit Tcl/Tk while the core of the app is 64-bit
because they talk via a network socket. For this particular plugin, the 64-bit binary side needs to use the
Tcl.framework, and the included one is only 32-bit.

I guess I need to work on the transition to Tk/Cocoa :)

.hc

----------------------------------------------------------------------------

"[W]e have invented the technology to eliminate scarcity, but we are deliberately throwing it away to
benefit those who profit from scarcity."        -John Gilmore

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
(Continue reading)

Kevin Walzer | 5 Feb 23:54

Re: Symbol not found: _TclFreeObj on 64-bit builds

On 2/5/12 12:56 PM, Hans-Christoph Steiner wrote:
> I guess I need to work on the transition to Tk/Cocoa:)

You won't regret it. :-) I'd love to play with a stable Cocoa build of PD.

--

-- 
Kevin Walzer
Code by Kevin
http://www.codebykevin.com

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
Picon
Favicon
Gravatar

Re: Symbol not found: _TclFreeObj on 64-bit builds


On Feb 5, 2012, at 5:54 PM, Kevin Walzer wrote:

> On 2/5/12 12:56 PM, Hans-Christoph Steiner wrote:
>> I guess I need to work on the transition to Tk/Cocoa:)
> 
> You won't regret it. :-) I'd love to play with a stable Cocoa build of PD.

Yeah, I think its a big improvement, but Pd is an old Tcl app, started in '94, so moving it forward always comes
with little pains ;)

.hc

----------------------------------------------------------------------------

I spent 33 years and four months in active military service and during that period I spent most of my time as a
high class muscle man for Big Business, for Wall Street and the bankers.      - General Smedley Butler

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
Adrian Robert | 13 Feb 20:20
Picon

Display refresh / painting in Tk-Cocoa

Hi,

I've been trying to port an application to Tk Cocoa and one of the differences I've been running into is
display refresh.  I don't know if there is just one problem or multiple problems, but it seems like updates
from the Tk side are prioritized lower than in Carbon.  Observations on 10.6 (all differences from
Mac/Carbon, Windows, and X):

1) if you make changes to a canvas widget, and then take it offscreen, the changes are not visible the next
time you bring it onscreen (instead they come after a short delay)

2) when extending the size of a window by PACKing something onto the bottom, the sequence happens thusly: a)
the window size is extended; b) the entire contents of the window are redrawn starting from the new bottom;
c) the height information for the contents of the new piece start getting paid attention to, which causes a
second redraw of the contents back in the original position

3) the bug here
(http://sourceforge.net/tracker/?func=detail&aid=3166688&group_id=12997&atid=112997),
where using pack / pack forget to switch a tabbed display fails to refresh in timely fashion

Before I dive into the event loop and display refresh code in Tk Cocoa (and who knows if I'll come out), has
anyone else taken a look at this and/or have any insights or suggestions to offer from other experience
with refresh/event loop in Cocoa or Tk?

thanks,
Adrian

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
(Continue reading)

Kevin Walzer | 13 Feb 23:20

Re: Display refresh / painting in Tk-Cocoa

On 2/13/12 2:20 PM, Adrian Robert wrote:
> Hi,
>
> I've been trying to port an application to Tk Cocoa and one of the differences I've been running into is
display refresh.  I don't know if there is just one problem or multiple problems, but it seems like updates
from the Tk side are prioritized lower than in Carbon.  Observations on 10.6 (all differences from
Mac/Carbon, Windows, and X):
>
> 1) if you make changes to a canvas widget, and then take it offscreen, the changes are not visible the next
time you bring it onscreen (instead they come after a short delay)
>
> 2) when extending the size of a window by PACKing something onto the bottom, the sequence happens thusly:
a) the window size is extended; b) the entire contents of the window are redrawn starting from the new
bottom; c) the height information for the contents of the new piece start getting paid attention to, which
causes a second redraw of the contents back in the original position
>
> 3) the bug here
(http://sourceforge.net/tracker/?func=detail&aid=3166688&group_id=12997&atid=112997),
where using pack / pack forget to switch a tabbed display fails to refresh in timely fashion
>
>
> Before I dive into the event loop and display refresh code in Tk Cocoa (and who knows if I'll come out), has
anyone else taken a look at this and/or have any insights or suggestions to offer from other experience
with refresh/event loop in Cocoa or Tk?
>
>
> thanks,
> Adrian
>
Hi Adrian,
(Continue reading)

Zbigniew Diaczyszyn | 20 Feb 18:31
Picon
Picon

Re: Display refresh / painting in Tk-Cocoa

Am 13.02.2012 20:20, schrieb Adrian Robert:
> Hi,
>
> I've been trying to port an application to Tk Cocoa and one of the
> differences I've been running into is display refresh.  I don't know
> if there is just one problem or multiple problems, but it seems like
> updates from the Tk side are prioritized lower than in Carbon.
> Observations on 10.6 (all differences from Mac/Carbon, Windows, and
> X):

I have ported my application to MacOSX Tk 8.5.11 and try to synchronize 
the Tk event loop and Cocoa's event loop by inserting often an "update 
idletasks" before using critical GUI commands like menu, grab, focus, wm 
iconify and so on. Sometimes the "grab" command has to be omitted at all.

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
Kevin Walzer | 21 Feb 03:33

Re: Display refresh / painting in Tk-Cocoa

On 2/20/12 12:31 PM, Zbigniew Diaczyszyn wrote:
> Am 13.02.2012 20:20, schrieb Adrian Robert:
>> Hi,
>>
>> I've been trying to port an application to Tk Cocoa and one of the
>> differences I've been running into is display refresh.  I don't know
>> if there is just one problem or multiple problems, but it seems like
>> updates from the Tk side are prioritized lower than in Carbon.
>> Observations on 10.6 (all differences from Mac/Carbon, Windows, and
>> X):
>
> I have ported my application to MacOSX Tk 8.5.11 and try to synchronize
> the Tk event loop and Cocoa's event loop by inserting often an "update
> idletasks" before using critical GUI commands like menu, grab, focus, wm
> iconify and so on. Sometimes the "grab" command has to be omitted at all.
>

These types of workarounds are the most effective way to deal with the 
event loop issue--it may require some trial and error.

--

-- 
Kevin Walzer
Code by Kevin
http://www.codebykevin.com

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
(Continue reading)

Kevin Walzer | 23 Feb 00:44

Xcode 4.3 and Tcl/Tk

Hi all,

Apple released Xcode 4.3 this week, and the new version has some 
significant differences over previous iterations of the IDE. Xcode no 
longer installs in /Developer, but is instead a single app bundle that 
installs in /Applications. Additionally, Xcode no longer installs 
numerous command-line tools such as llvm, clang, gcc, etc. These can 
either be installed from Xcode 4.3's preferences menu, or as a separate 
download from Apple's developer site.

The reason I'm mentioning this is that I ran into significant issues 
trying to patch and build a new version of Tk with Xcode 4.3. (I'm not 
alone in this respect. Many open-source projects, such as MacPorts, 
Fink, and Homebrew are also finding a lot of their packages are breaking 
because of the changes in Xcode.) Tk couldn't find standard headers like 
stdio.h, let alone the Cocoa and Carbon headers it depends on for the 
Aqua version.

After a lot of Googling, trial and error, I got a new build of Tcl and 
Tk to work. Here's what I did:

1. Before installing Xcode 4.3 from the Mac App Store, I removed all 
previous installations of Xcode using the uninstall script that is found 
in /Developer. (Xcode 4.3 also allows you to do this.) I did this to 
avoid path conflicts.

2. Installed Xcode 4.3 and the command-line tools.

3. Ran this command: sudo xcode-select -switch 
/Applications/Xcode.app/Contents/Developer/. This command points system 
(Continue reading)


Gmane