[erlang-questions] tk requirement?

6 views
Skip to first unread message

Joshua Bronson

unread,
Nov 16, 2009, 3:48:26 PM11/16/09
to erlang-questions
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

Paul Davis

unread,
Nov 16, 2009, 4:00:25 PM11/16/09
to Joshua Bronson, erlang-questions

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
$PREFIX/lib/erlang/lib/wx-0.98.1/priv/i386-apple-darwin9.6.0/wxe_driver.so.

For instance:

$ otool -L /usr/local/lib/erlang/lib/wx-0.98.1/priv/i386-apple-darwin9.6.0/wxe_driver.so
/usr/local/lib/erlang/lib/wx-0.98.1/priv/i386-apple-darwin9.6.0/wxe_driver.so:
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
(compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
(compatibility version 1.0.0, current version 1290.0.0)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
(compatibility version 1.0.0, current version 275.0.0)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
(compatibility version 2.0.0, current version 136.0.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
(compatibility version 1.0.0, current version 12.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 111.1.3)
/usr/lib/libwx_macud_stc-2.8.0.dylib (compatibility version 2.6.0,
current version 2.8.4)
/usr/lib/libwx_macud-2.8.0.dylib (compatibility version 2.6.0,
current version 2.8.4)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)

Granted, that's not the same as disabling the whole thing altogether.

HTH,
Paul Davis

________________________________________________________________
erlang-questions mailing list. See http://www.erlang.org/faq.html
erlang-questions (at) erlang.org

Joshua Bronson

unread,
Nov 16, 2009, 5:03:11 PM11/16/09
to Paul Davis, erlang-q...@erlang.org
Hey Paul,

On Mon, Nov 16, 2009 at 4:00 PM, Paul Davis <paul.jos...@gmail.com>wrote:

> On Mon, Nov 16, 2009 at 3:48 PM, Joshua Bronson <jabr...@gmail.com>
> 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
> $PREFIX/lib/erlang/lib/wx-0.98.1/priv/i386-apple-darwin9.6.0/wxe_driver.so.
>
> For instance:
>
> $ otool -L
> /usr/local/lib/erlang/lib/wx-0.98.1/priv/i386-apple-darwin9.6.0/wxe_driver.so

> <snip/>
>

hrm, i looked in /usr/local/lib/erlang/lib and there's a wx-0.98.3 directory
(must be the version the latest macports version (R13B02) ships with? though
on my Snow Leopard machine "/usr/bin/wx-config --version" gives 2.8.8) but
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

Joshua Bronson

unread,
Nov 16, 2009, 5:04:49 PM11/16/09
to erlang-questions
On Mon, Nov 16, 2009 at 5:03 PM, Joshua Bronson <jabr...@gmail.com> wrote:

> hrm, i looked in /usr/local/lib/erlang/lib
>

by which I meant /opt/local/lib/erlang/lib of course, sorry!

Joshua Bronson

unread,
Nov 17, 2009, 12:52:31 PM11/17/09
to Paul Davis, erlang-questions
On Mon, Nov 16, 2009 at 6:32 PM, Paul Davis <paul.jos...@gmail.com>wrote:

> On Mon, Nov 16, 2009 at 5:03 PM, Joshua Bronson <jabr...@gmail.com>

> 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.
>
> HTH,
> 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
configure option?

Joshua Bronson

unread,
Nov 22, 2009, 4:49:13 PM11/22/09
to erlang-q...@erlang.org, Paul Davis
On Nov 17, 12:52 pm, Joshua Bronson <jabr...@gmail.com> wrote:
> 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).

I asked about this on erlang-bugs and it turns out there's already a
way to do
this:

On 2009/11/21 Björn Gustavsson <bgust...@gmail.com> wrote:
> There already is a mechanism to skip the building of certain applications,
> namely to create a file named SKIP in the application directory:
>
> touch lib/wx/SKIP lib/gs/SKIP

(from http://www.erlang.org/cgi-bin/ezmlm-cgi?2:mss:1606:200911:gpimfjjkfgneonnhogad)

Reply all
Reply to author
Forward
0 new messages