Re: whim configure script needs "jpeg library" -- what does that mean exactly



Webb S. wrote:

Try editing the build.conf that the configure.tcl produced.

edit these in the build.conf:
LD gcc
LD_FLAGS -shared

make them be:
LD ld
LD_FLAGS -dylib

Did this and got:

(0) foobar:Whim-2399 [0]% /usr/local/bin/tclsh8.5
build.tcl <1204>
BUILDING:/Users/wsprague/Whim-2399/build/arch/i386/Darwin/
megaimage.dylib
gcc -O -D_XOPEN_SOURCE=500 -D_SVID_SOURCE -D_ISOC99_SOURCE -pipe -fPIC
-DPIC -DUSE_X11 -DUSE_SHM -DUSE_TCL_STUBS -DUSE_TK_STUBS -finline-
functions -DLITTLE_ENDIAN=1 -DBIG_ENDIAN=2 -DBYTE_ORDER=LITTLE_ENDIAN -
I/usr/local/include -I/usr/local/include -I../include -c
megaimage_compile.c
ld -dylib megaimage_compile.o /usr/local/lib/libtclstub8.5.a -lm -o /
Users/wsprague/Whim-2399/build/arch/i386/Darwin/megaimage.dylib
ERROR:ld: Undefined symbols:
___divdi3

That appears to be some sort of libgcc issue with a missing symbol that
libgcc provides. I looked up how I did this with another project. It
seems I sent you in the wrong direction by suggesting ld, sorry about that.
I had forgotten that I did use gcc. While it's possible to use ld, it's
more work, so we might as well let gcc do some of the heavier lifting.

Try:
LD gcc
LD_FLAGS "-dynamiclib -Wl,-single_module"

You might need to change that last part to this if the build fails:

LD_FLAGS "-dynamiclib -Wl,-single_module -flat_namespace"


-single_module should be the default in Leopard based on the manual. If
you're using an older Mac release it might not be.

I haven't tried to build Whim yet on the Mac, and I haven't built Tcl
extensions from scratch on a Mac. I have however build some extensions
that used TEA that were a bit broken without some Makefile edits. If
anyone here at comp.lang.tcl has further advice please speak up.

By the way if the resulting binary doesn't work you can use this to start
over:
tclsh build.tcl build.conf clean


I suggest you make certain you're using an X11 libtk that works with
XQuartz.

Not to be stupid, but as opposed to what? And how might I make sure?

There are 2 versions of Tk for the Mac. The Mac ships with Tk 8.4 in
Leopard. That particular build uses Mac-specific code, and doesn't require
X11. You can also build Tk from sources or perhaps via an installer, and
have it use the XQuartz in /usr/X11 (assuming you have that installed).
Whim uses X11, which you can get from here (I suggest the .dmg downloads):

http://xquartz.macosforge.org/trac/wiki

Apple also provides XQuartz on the OS install media AFAIK, but it may be a
different (older) version than what you find at the macosforge.org site.
Some Apple software updates also will update X11 IIRC, if it's installed.

In any case: Whim requires an X11 Tk, because it's an X11 window manager.
It's probably best adapted for use with the fullscreen option of recent
XQuartz, which can be toggled with: "command-option-a" when you enable the
fullscreen option in the XQuartz preferences. Remember the
command-option-a or write it down, so that you can remember how to get out
of it if needed.

You can build Tk for X11 using macports I believe, though in practice I
manually build Tcl and Tk on some systems using: --with-tcl (for Tk)
and --prefix ./configure options.

I don't know which version of Tk ActiveState provides for the Mac.

Thanks!

You're welcome. Good luck :)

-George
.



Relevant Pages

  • Re: whim configure script needs "jpeg library" -- what does that mean exactly
    ... I had forgotten that I did use gcc. ... I haven't tried to build Whim yet on the Mac, ... Whim uses X11, which you can get from here: ...
    (comp.lang.tcl)
  • Re: Mackbook experiences ..
    ... because this Mac had recently been installed by a 'Mac Man'. ... I suggested Open Office, ... Open Office using X11 ... What were we saying about installer packages the other day? ...
    (uk.comp.sys.mac)
  • Re: Maccies miss the point
    ... You Mac haters have ... I think the primary reasons are between Jobs and IBM. ... Gcc just isn't good ...
    (comp.sys.mac.advocacy)
  • Re: [SLE] Sometimes Linux makes me crazy.
    ... > out of X. That's why we have KDE and Gnome, ... X11 provides a network-transparent means of displaying windows, ... the mac comes with an OS ... network transparency - presuming you keep that linux box around. ...
    (SuSE)
  • Re: OT: Desktop wars
    ... actually X11 is an application running on top of any operating ... Can a Mac display windowed application on another Mac without ... If you mean can a Mac serve it's native GUI to an application on another Mac ...
    (comp.os.vms)