Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 209272 - dev-lang/erlang ebuilds have typo with USE="kpoll"
Summary: dev-lang/erlang ebuilds have typo with USE="kpoll"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Christian Faulhammer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-07 17:26 UTC by Holger Hoffstätte
Modified: 2008-02-08 10:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fix for USE="kpoll" typo to pass the correct option to configure (erlang-12.2.1.ebuild.patch,87 bytes, patch)
2008-02-07 17:26 UTC, Holger Hoffstätte
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Hoffstätte 2008-02-07 17:26:01 UTC
erlang uses the kpoll flag but contains a typo. This is the case at least with 12.2.0 and 12.2.1.


Reproducible: Always

Steps to Reproduce:




Apparently fixing this typo does not cause erl to recognize kpoll:

#erl
Erlang (BEAM) emulator version 5.6.1 [source] [smp:1] [async-threads:0] [hipe] [kernel-poll:false]

..even though configure recognized the option, but still selected "epoll". Might just be a problem with the erl output though.
The typo needs to be fixed in any case.
Comment 1 Holger Hoffstätte 2008-02-07 17:26:38 UTC
Created attachment 142912 [details, diff]
fix for USE="kpoll" typo to pass the correct option to configure
Comment 2 Christian Faulhammer (RETIRED) gentoo-dev 2008-02-07 19:42:57 UTC
This typo was there since this...

  24 Feb 2007; Christian Faulhammer <opfer@gentoo.org>
  +erlang-11.2.3-r1.ebuild:
  added smp and kpoll USE flags to enable/disable those features, adjusted
  some bits; thanks to Max Loparyev <max@city.veganet.ru>

nearly one year and nobody noticed.

Fixed.
Comment 3 Holger Hoffstätte 2008-02-07 20:58:44 UTC
Great, thanks. FWIW I figured out the kpoll mystery - you have to start erl with "+K true" to explicitly make it use kpoll:
holger>erl +K true     
Erlang (BEAM) emulator version 5.6.1 [source] [smp:1] [async-threads:0] [hipe] [kernel-poll:true]

so the flag works and all is good. :)
Comment 4 Christian Faulhammer (RETIRED) gentoo-dev 2008-02-08 08:57:14 UTC
(In reply to comment #3)
> Great, thanks. FWIW I figured out the kpoll mystery - you have to start erl
> with "+K true" to explicitly make it use kpoll:

 How can this be activated by default?  Because someone requesting USE=kpoll wants it to work out of the box.
Comment 5 Holger Hoffstätte 2008-02-08 10:58:59 UTC
Good question. The easiest/non-intrusive way seems to be to define a default environment variable as documented in man erl. There are two, ERL_FLAGS (appended to the end of the commandline) and ERL_AFLAGS (prepended to the beginning) so it seems ERL_AFLAGS is a good candidate for setting defaults. Overriding works too:

holger>unset ERL_FLAGS 
holger>unset ERL_AFLAGS
holger>erl
Erlang (BEAM) emulator version 5.6.1 [source] [smp:1] [async-threads:0] [hipe] [kernel-poll:false]

holger>export ERL_AFLAGS="+K true"
holger>erl                        
Erlang (BEAM) emulator version 5.6.1 [source] [smp:1] [async-threads:0] [hipe] [kernel-poll:true]

holger>erl +K false               
Erlang (BEAM) emulator version 5.6.1 [source] [smp:1] [async-threads:0] [hipe] [kernel-poll:false]

Looks like a reasonable approach instead of patching around in the source, right? The argument handling can be found in erts/etc/common/erlexec.c:main but that seems to be the wrong place to force +K. A quick read through the various erl_poll.(c,h) files didn't show any simple switches either.