Subject: pkg/28412: SOCKS support in libwww's buildlink ?
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <sutre@labri.fr>
List: pkgsrc-bugs
Date: 11/24/2004 18:27:00
>Number:         28412
>Category:       pkg
>Synopsis:       Missing (?) SOCKS support in www/libwww's buildlink
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 24 18:27:00 +0000 2004
>Originator:     sutre@labri.fr
>Release:        NetBSD 2.0_RC4
>Organization:
>Environment:
	
	
System: NetBSD gavarnie 2.0_RC4 NetBSD 2.0_RC4 (STD-PC) #0: Tue Nov 2 07:32:08 CET 2004 instsoft@gavarnie:/usr/src/sys/arch/i386/compile/STD-PC i386
Architecture: i386
Machine: i386
>Description:

SOCKS support is included in www/libwww's Makefile, via the USE_SOCKS
variable (which can be set in /etc/mk.conf). However, there is no
SOCKS support in www/libwww's buildlink, which leads to packages that
do not build when USE_SOCKS is defined, such as teTeX-bin (I guess
other packages are also affected).  I guess that either SOCKS support
should be added to www/libwww's buildlink (see patch in Fix section),
or SOCKS support should be removed from www/libwww's Makefile.


>How-To-Repeat:

Add USE_SOCKS=5 in /etc/mk.conf, then do:

1. `make update' in www/libwww
2. `make' in print/teTeX-bin


Log (last lines) of `make' in print/teTeX-bin:

gcc -DHAVE_CONFIG_H  -I. -I. -I.. -I./.. -I/usr/pkg/include -I/usr/pkg/include/w3c-libwww -DHAVE_CONFIG_H -DHAVE_LIBWWW -DHAVE_WWWLIB_H -I/usr/pkg/include -DPS_GS -DOmega -DXSERVER_INFO -I../../libs/t1lib/lib/t1lib -I../kpathsea -I/usr/X11R6/include -I/usr/pkg/include -I/usr/include  -O2 -Dunix -I/usr/pkg/include -I/usr/include  -c alloca.c
gcc -DHAVE_CONFIG_H  -I. -I. -I.. -I./.. -I/usr/pkg/include -I/usr/pkg/include/w3c-libwww -DHAVE_CONFIG_H -DHAVE_LIBWWW -DHAVE_WWWLIB_H -I/usr/pkg/include -DPS_GS -DOmega -DXSERVER_INFO -I../../libs/t1lib/lib/t1lib -I../kpathsea -I/usr/X11R6/include -I/usr/pkg/include -I/usr/include  -O2 -Dunix -I/usr/pkg/include -I/usr/include  -c dvips.c
gcc -DHAVE_CONFIG_H  -I. -I. -I.. -I./.. -I/usr/pkg/include -I/usr/pkg/include/w3c-libwww -DHAVE_CONFIG_H -DHAVE_LIBWWW -DHAVE_WWWLIB_H -I/usr/pkg/include -DPS_GS -DOmega -DXSERVER_INFO -I../../libs/t1lib/lib/t1lib -I../kpathsea -I/usr/X11R6/include -I/usr/pkg/include -I/usr/include  -O2 -Dunix -I/usr/pkg/include -I/usr/include  -c tfmload.c
./../klibtool link gcc -o oxdvi.bin -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/X11R6/lib -Wl,-R/usr/X11R6/lib   xdvi.odvi-draw.o dvi-init.o events.o font-open.o string-utils.o my-vsnprintf.o my-snprintf.o help-window.o message-window.o statusline.o xserver-info.o gf.o pk.o psdps.o psgs.o psheader.o psnews.o special.o util.o vf.o sfDir.o sfDraw.o sfPath.o sfSelFile.o hypertex.o mime.o wwwfetch.o alloca.o dvips.o tfmload.o -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -lwwwxml -lxmltok -lxmlparse -lwwwzip -lwwwinit -lwwwapp -lwwwhtml -lwwwtelnet -lwwwnews -lwwwhttp -lwwwmime -lwwwgopher -lwwwftp -lwwwfile -lwwwdir -lwwwcache -lwwwstream -lwwwmux -lwwwtrans -lwwwcore -lwwwutils -lmd5 -lz -lsocks5 -lssl -lcrypto -L/usr/pkg/lib -lt1 -L/usr/X11R6/lib -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11  -lz  ../kpathsea/libkpathsea.la -lm
gcc -o oxdvi.bin -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/X11R6/lib -Wl,-R/usr/X11R6/lib xdvi.o dvi-draw.o dvi-init.o events.o font-open.o string-utils.o my-vsnprintf.o my-snprintf.o help-window.o message-window.o statusline.o xserver-info.o gf.o pk.o psdps.opsgs.o psheader.o psnews.o special.o util.o vf.o sfDir.o sfDraw.o sfPath.o sfSelFile.o hypertex.o mime.o wwwfetch.o alloca.o dvips.o tfmload.o-L/usr/pkg/lib -Wl,-R/usr/pkg/lib -lwwwxml -lxmltok -lxmlparse -lwwwzip -lwwwinit -lwwwapp -lwwwhtml -lwwwtelnet -lwwwnews -lwwwhttp -lwwwmime-lwwwgopher -lwwwftp -lwwwfile -lwwwdir -lwwwcache -lwwwstream -lwwwmux -lwwwtrans -lwwwcore -lwwwutils -lmd5 -lz -lsocks5 -lssl -lcrypto -L/usr/pkg/lib -lt1 -L/usr/X11R6/lib -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11 -lz ../kpathsea/STATIC/libkpathsea.a -lm
ld: cannot find -lsocks5
gmake[2]: *** [oxdvi.bin] Error 1
gmake[2]: Leaving directory `/usr/pkgsrc/print/teTeX-bin/work.i386/tetex-src-2.0.2/texk/oxdvik'
gmake[1]: *** [all] Error 1
gmake[1]: Leaving directory `/usr/pkgsrc/print/teTeX-bin/work.i386/tetex-src-2.0.2/texk'
gmake: *** [all] Error 1
*** Error code 2

Stop.
make: stopped in /usr/pkgsrc/print/teTeX-bin
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/print/teTeX-bin


>Fix:

Apply the following patch to www/libwww's buildlink3.mk:

######################################################################
--- buildlink3.mk.orig	Fri Mar 26 03:27:57 2004
+++ buildlink3.mk	Wed Oct 27 23:50:55 2004
@@ -3,6 +3,8 @@
 BUILDLINK_DEPTH:=	${BUILDLINK_DEPTH}+
 LIBWWW_BUILDLINK3_MK:=	${LIBWWW_BUILDLINK3_MK}+
 
+.include "../../mk/bsd.prefs.mk"
+
 .if !empty(BUILDLINK_DEPTH:M+)
 BUILDLINK_DEPENDS+=	libwww
 .endif
@@ -15,6 +17,15 @@
 BUILDLINK_RECOMMENDED.libwww?=	libwww>=5.4.0nb2
 BUILDLINK_PKGSRCDIR.libwww?=	../../www/libwww
 .endif	# LIBWWW_BUILDLINK3_MK
+
+# Include SOCKS firewall support
+.if defined(USE_SOCKS) && (${USE_SOCKS} == 4 || ${USE_SOCKS} == 5)
+.  if ${USE_SOCKS} == 4
+.    include "../../net/socks4/buildlink3.mk"
+.  else
+.    include "../../net/socks5/buildlink3.mk"
+.  endif
+.endif
 
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../security/openssl/buildlink3.mk"
######################################################################

>Unformatted: