[erlang-questions] tk requirement?
Tue Nov 17 18:52:31 CET 2009
On Mon, Nov 16, 2009 at 6:32 PM, Paul Davis <>wrote:
> On Mon, Nov 16, 2009 at 5:03 PM, Joshua Bronson <>
> > Hey Paul,
> > On Mon, Nov 16, 2009 at 4:00 PM, Paul Davis <
> > wrote:
> >> On Mon, Nov 16, 2009 at 3:48 PM, Joshua Bronson <>
> >> wrote:
> >> > Hey Erlang folks,
> >> >
> >> > I know relatively little about the Erlang distribution (my exposure is
> >> > pretty much limited to installing it as a requirement of couchdb and
> >> > rabbitmq-server). I was wondering if tk is (or has to be?) a hard
> >> > requirement of the distribution or if (like e.g. Python) it's possible
> >> > to build Erlang with a no_tk variant / USE flag / etc. in the case
> >> > that you know you won't be needing to do any gui stuff. (This query is
> >> > prompted by http://trac.macports.org/ticket/20006.)
> >> >
> >> > Thanks!
> >> >
> >> > Josh
> >> >
> >> Josh,
> >> I've never had any issue with it using the system installed wx
> >> libraries on 10.5 or 10.6. Reading through the ticket, the library you
> >> want to check for linkage is probably
> >> For instance:
> >> $ otool -L
> >> <snip/>
> > hrm, i looked in /usr/local/lib/erlang/lib and there's a wx-0.98.3
> > (must be the version the latest macports version (R13B02) ships with?
> > on my Snow Leopard machine "/usr/bin/wx-config --version" gives 2.8.8)
> > all it contains are the directories doc, ebin, include, and src; "find
> > /opt/local/lib/erlang/lib/wx-0.98.3/ -name \*.so" gives no output.
> > do i take it that by commenting out "port:wxWidgets" from my erlang
> > Portfile's depends_build, I built erlang without wxwidgets?
> >> Granted, that's not the same as disabling the whole thing altogether.
> > indeed! would still love to know if there's actual official support for
> > disabling wx/tk :)
> >> HTH,
> >> Paul Davis
> > Thanks,
> > Josh
> Curiosity got the better of me. It appears that there is'nt a specific
> option in the autoconf scripts to disable building the wx code, but it
> does handle the inability just fine. I tracked it down to
> AC_CONFIG_SUBDIRS in $(top_srcdir)/lib/configure.in running all the
> configure scripts in subdirectories. The configure in wx will detect
> when it can't be built and exits with an error message. Unfortunately
> the docs on AC_CONFIG_SUBDIRS aren't very particular on what happens
> if a sub-configure exits with an error. Seeing as though it works, it
> looks like the exit status is ignored and the library won't be built
> (due to no Makefiles being built).
> If you want to prevent any attempt at building wx widgets at all, the
> quickest thing would be to just delete $(top_srcdir)/lib/wx/configure
> before running the top level configure script. The longer approach
> would be to add a --with option for it's configure that just exits the
> processing, but that'd require autoconfing before building.
> Paul Davis
Thanks Paul, it sounds like MacPorts package can definitely have a no_tk
variant, supported either with a patch deleting
the $(top_srcdir)/lib/wx/configure file or by adding a --with option for it
(MacPorts can assume autoconf is available).
Of course upstream support is always preferable... Is this the wrong mailing
list to be asking whether the Erlang developers see value in adding this
More information about the erlang-questions