Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 744628 - net-libs/libwebsockets USE=socks5 should require USE="client http-proxy"
Summary: net-libs/libwebsockets USE=socks5 should require USE="client http-proxy"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jaco Kroon
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-09-25 13:10 UTC by Jeroen Roovers (RETIRED)
Modified: 2020-10-07 00:31 UTC (History)
3 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 Jeroen Roovers (RETIRED) gentoo-dev 2020-09-25 13:10:28 UTC
When net-libs/libwebsockets is built with USE="-client socks5" it fails to resolve some socks5 related symbols because lib/core-net/socks5-client.c is not compiled and linked in, causing failures like this:

configure:5157: checking for lws_create_context in -lwebsockets
configure:5182: x86_64-pc-linux-gnu-gcc -o conftest -O2 -g -DDEBUG  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed conftest.c -lwebsockets  -ljpeg -lpng -lgif -lgdk-x11-2.0 -lgtk-x11-2.0 -lgobject-2.0 -lglib-2.0 -lpthread -lpcap  >&5
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib64/libwebsockets.so: undefined reference to `lws_socks5c_handle_state'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib64/libwebsockets.so: undefined reference to `lws_client_connect_4_established'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib64/libwebsockets.so: undefined reference to `lws_inform_client_conn_fail'
/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib64/libwebsockets.so: undefined reference to `lws_socks5c_ads_server'
collect2: error: ld returned 1 exit status

This can be fixed by adding a line to REQUIRED_USE:
        socks5? ( client )
Comment 1 Jakov Smolić archtester gentoo-dev 2020-09-25 13:20:23 UTC
(In reply to Jeroen Roovers from comment #0)
> When net-libs/libwebsockets is built with USE="-client socks5" it fails to
> resolve some socks5 related symbols because lib/core-net/socks5-client.c is
> not compiled and linked in, causing failures like this:
> 
> configure:5157: checking for lws_create_context in -lwebsockets
> configure:5182: x86_64-pc-linux-gnu-gcc -o conftest -O2 -g -DDEBUG  -Wl,-O1
> -Wl,--hash-style=gnu -Wl,--as-needed conftest.c -lwebsockets  -ljpeg -lpng
> -lgif -lgdk-x11-2.0 -lgtk-x11-2.0 -lgobject-2.0 -lglib-2.0 -lpthread -lpcap 
> >&5
> /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/
> ld:
> /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib64/libwebsockets.so:
> undefined reference to `lws_socks5c_handle_state'
> /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/
> ld:
> /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib64/libwebsockets.so:
> undefined reference to `lws_client_connect_4_established'
> /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/
> ld:
> /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib64/libwebsockets.so:
> undefined reference to `lws_inform_client_conn_fail'
> /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bin/
> ld:
> /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib64/libwebsockets.so:
> undefined reference to `lws_socks5c_ads_server'
> collect2: error: ld returned 1 exit status
> 
> This can be fixed by adding a line to REQUIRED_USE:
>         socks5? ( client )

Thanks, will prepare a PR shortly
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2020-09-25 13:24:02 UTC
USE=socks5 appears to additionally require USE="http-proxy", so make that:

socks5? ( client http-proxy )
Comment 3 Jakov Smolić archtester gentoo-dev 2020-09-25 13:26:36 UTC
(In reply to Jeroen Roovers from comment #2)
> USE=socks5 appears to additionally require USE="http-proxy", so make that:
> 
> socks5? ( client http-proxy )

Thanks, done
Comment 4 Larry the Git Cow gentoo-dev 2020-10-07 00:31:03 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0989b7c5ac1dfe2ba03f5204ecbc7f8a296740c2

commit 0989b7c5ac1dfe2ba03f5204ecbc7f8a296740c2
Author:     Jakov Smolic <jakov.smolic@sartura.hr>
AuthorDate: 2020-09-25 13:20:11 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2020-10-07 00:30:55 +0000

    net-libs/libwebsockets: add socks5? ( client http-proxy ) to REQUIRED_USE
    
    Reported-by: Jeroen Roovers <jer@gentoo.org>
    Closes: https://bugs.gentoo.org/744628
    Package-Manager: Portage-3.0.4, Repoman-3.0.1
    Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr>
    Closes: https://github.com/gentoo/gentoo/pull/17661
    Signed-off-by: Sam James <sam@gentoo.org>

 net-libs/libwebsockets/libwebsockets-4.0.20.ebuild | 1 +
 net-libs/libwebsockets/libwebsockets-4.1.1.ebuild  | 1 +
 2 files changed, 2 insertions(+)