Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 573360 - www-client/links-2.12-r1 automagic dep on dev-libs/libevent
Summary: www-client/links-2.12-r1 automagic dep on dev-libs/libevent
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrice Clement
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-30 07:56 UTC by Duncan
Modified: 2016-11-16 20:05 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan 2016-01-30 07:56:16 UTC
# emerge --ask --depclean
[snip]
 * In order to avoid breakage of link level dependencies, one or more
 * packages will not be removed. This can be solved by rebuilding the
 * packages that pulled them in.
 * 
 *   dev-libs/libevent-2.1.5-r4 pulled in by:
 *     www-client/links-2.12-r1 needs libevent-2.1.so.5
 * 
[snip]

Except, rebuilding links doesn't solve the problem, because it's automagically linking to libevent without depending on it:

$ equery d libevent
 * These packages depend on libevent:
[nothing listed]
$

links' USE flags (from emerge --pretend):

[ebuild   R    ] www-client/links-2.12-r1:2::gentoo  USE="X bzip2 fbcon gpm jpeg lzma ssl tiff unicode zlib -directfb -ipv6 -libressl -livecd (-suid) (-svga)" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

Excerpts from links' configure step (hits on event):

checking event.h usability... yes
checking event.h presence... yes
checking for event.h... yes
checking ev-event.h usability... no
checking ev-event.h presence... no
checking for ev-event.h... no
checking for event_loop in -levent... yes
checking for event_base_set... yes
checking for event_get_version... yes
checking for event_get_method... yes
checking for event_base_free... yes
checking for event_base_new... yes
checking for event_reinit... yes
checking for event_base_get_method... yes
checking for event_config_set_flag... yes
checking for event_get_struct_event_size... yes
checking for pow in -lm... yes
checking for pow... yes
checking for powf... yes
checking gpm.h usability... yes
checking gpm.h presence... yes
checking for gpm.h... yes
checking for Gpm_Open in -lgpm... (cached) yes
checking for Gpm_GetLibVersion... yes
checking for Gpm_Event wdx and wdy... yes
[snip]
---------------------------------------------------------
Configuration results:

Event handler:          LIBEVENT
IPv6:                   NO
Supported compression:  ZLIB BZIP2 LZMA
SSL support:            OPENSSL
UTF-8 terminal:         YES
GPM support:            YES
Graphics enabled:       YES
Graphics drivers:       FB X
Image formats:          GIF PNG XBM JPEG TIFF SVG
OpenMP:                 YES
---------------------------------------------------------

Excerpt from the end of the compile step (only hit on event in compile):

x86_64-pc-linux-gnu-gcc  -march=native -pipe -O2 -frename-registers -fweb -fmerge-all-constants  -fgcse-sm -fgcse-las -fgcse-after-reload -ftree-vectorize -freorder-blocks-and-partition -fopenmp  -Wl,-z,now,--as-needed,-O1,--hash-style=gnu,--sort-common -o links af_unix.o auth.o beos.o bfu.o block.o bookmark.o cache.o charsets.o compress.o connect.o cookies.o data.o default.o dip.o directfb.o dither.o dns.o dos.o drivers.o error.o file.o finger.o fn_impl.o font_inc.o framebuf.o ftp.o gif.o grx.o hpux.o html.o html_gr.o html_r.o html_tbl.o http.o https.o img.o imgcache.o jpeg.o jsint.o kbd.o language.o listedit.o lru.o mailto.o main.o memory.o menu.o objreq.o os_dep.o pmshell.o png.o sched.o select.o session.o smb.o string.o svg.o svgalib.o terminal.o tiff.o types.o url.o view.o view_gr.o vms.o x.o xbm.o  -lpthread -lrsvg-2 -lm -lgio-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lcairo -ltiff -ljpeg -lpng16 -lX11 -llzma -lbz2 -lz -lssl -lcrypto -lgpm -lm -levent 
session.o: In function `continue_download':
session.c:(.text+0x4b54): warning: the use of `tempnam' is dangerous, better use `mkstemp'
make[1]: Leaving directory '/tmp/portage/www-client/links-2.12-r1/work/links-2.12'
>>> Source compiled.


So it's obviously detecting libevent and linking to it, despite not explicitly depending on it. =:(

After manually unmerging (emerge -C) libevent, the corresponding parts of configure look like this:

checking event.h usability... no
checking event.h presence... no
checking for event.h... no
checking ev-event.h usability... no
checking ev-event.h presence... no
checking for ev-event.h... no
checking for pow in -lm... yes
checking for pow... yes
checking for powf... yes
checking gpm.h usability... yes
checking gpm.h presence... yes
checking for gpm.h... yes
checking for Gpm_Open in -lgpm... (cached) yes
checking for Gpm_GetLibVersion... yes
checking for Gpm_Event wdx and wdy... yes
[snip]
---------------------------------------------------------
Configuration results:

Event handler:          NO
IPv6:                   NO
Supported compression:  ZLIB BZIP2 LZMA
SSL support:            OPENSSL
UTF-8 terminal:         YES
GPM support:            YES
Graphics enabled:       YES
Graphics drivers:       FB X
Image formats:          GIF PNG XBM JPEG TIFF SVG
OpenMP:                 YES
---------------------------------------------------------

And compile (now no hit on event):

x86_64-pc-linux-gnu-gcc  -march=native -pipe -O2 -frename-registers -fweb -fmerge-all-constants  -fgcse-sm -fgcse-las -fgcse-after-reload -ftree-vectorize -freorder-blocks-and-partition -fopenmp  -Wl,-z,now,--as-needed,-O1,--hash-style=gnu,--sort-common -o links af_unix.o auth.o beos.o bfu.o block.o bookmark.o cache.o charsets.o compress.o connect.o cookies.o data.o default.o dip.o directfb.o dither.o dns.o dos.o drivers.o error.o file.o finger.o fn_impl.o font_inc.o framebuf.o ftp.o gif.o grx.o hpux.o html.o html_gr.o html_r.o html_tbl.o http.o https.o img.o imgcache.o jpeg.o jsint.o kbd.o language.o listedit.o lru.o mailto.o main.o memory.o menu.o objreq.o os_dep.o pmshell.o png.o sched.o select.o session.o smb.o string.o svg.o svgalib.o terminal.o tiff.o types.o url.o view.o view_gr.o vms.o x.o xbm.o  -lpthread -lrsvg-2 -lm -lgio-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lcairo -ltiff -ljpeg -lpng16 -lX11 -llzma -lbz2 -lz -lssl -lcrypto -lgpm -lm 
session.o: In function `continue_download':
session.c:(.text+0x4b54): warning: the use of `tempnam' is dangerous, better use `mkstemp'
make[1]: Leaving directory '/tmp/portage/www-client/links-2.12-r1/work/links-2.12'
>>> Source compiled.

So there you are, automagic dep on libevent, if it's installed. =:^(

Meanwhile, if I ebuild prepare and then run the configure --help, I see this:

[snip]
Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  --without-getaddrinfo   compile without getaddrinfo function
  --without-ipv6          compile without ipv6
  --without-libevent      compile without libevent
[snip]

So it's a configurable option.  Gentoo's ebuild simply doesn't (yet) take advantage of that.

TIA. =:^)
Comment 1 Duncan 2016-01-30 08:01:03 UTC
[CCing maintainers from equery m links, since I can't assign.]
Comment 2 Patrice Clement gentoo-dev 2016-01-30 08:24:16 UTC
Thanks for filing this bug. I'm at FOSDEM at the moment but will take a look when I get round to it.
Comment 3 Duncan 2016-03-31 06:33:25 UTC
(In reply to Patrice Clement from comment #2)
> Thanks for filing this bug. I'm at FOSDEM at the moment but will take a look
> when I get round to it.

Bump?

No undue rush but... well I don't think FOSDEM is two months... so as I'm going thru my open bugs ATM, I'm just wondering based on the comment if this fell thru the cracks and you need a reminder.  No problem if you're snowed under ATM, tho; it's a "should fix" but not urgent as the symptoms are easily resolved manually.

In any case, thanks for the quick initial reply and ACK (or even NACK were it more appropriate).  That doesn't help with the technical bug, but it definitely eliminates the "if a bug is filed and nobody responds, did it actually ever get filed?" /social/ bug all too common on many (happily mostly non-gentoo/upstream, from my experience) projects. =:^)

Duncan
Comment 4 Pacho Ramos gentoo-dev 2016-10-31 09:19:20 UTC
I hitted this yesterday too ;)
Comment 5 Pacho Ramos gentoo-dev 2016-11-16 20:05:11 UTC
[master cc24207] www-client/links: Fix libevent automagic dep (#573360 by Duncan)
 2 files changed, 139 insertions(+)
 create mode 100644 www-client/links/links-2.12-r3.ebuild