On Sun, 16 Oct 2016 12:17:40 +0100, Stuart Henderson wrote:
> On 2016/10/11 19:00, Leclerc, Sebastien wrote:
> > When starting OpenVPN with module openvpn-auth-ldap activated, I get the 
> > following:
> > 
> > openvpn:/usr/local/lib/openvpn-auth-ldap.so: /usr/lib/libobjc.so.6.0 : 
> > WARNING: symbol(__objc_class_name_Protocol) size mismatch, relink your 
> > program
> > openvpn:/usr/local/lib/openvpn-auth-ldap.so: /usr/lib/libobjc.so.6.0 : 
> > WARNING: symbol(__objc_class_name_Object) size mismatch, relink your program
> > 
> > Openvpn and openvpn-auth-ldap are installed as packages.
> > 
> > This is from a snapshot (amd64) :
> > OpenBSD 6.0-current (GENERIC.MP) #2518: Sun Oct  2 21:41:07 MDT 2016
> > openvpn-2.3.11
> > openvpn-auth-ldap-2.0.3.p2
> > 
> > Same result from 5.9 with patch (amd64) :
> > OpenBSD 5.9 (GENERIC.MP) #8: Thu Jul 14 20:12:22 CEST 2016
> > openvpn-2.3.10
> > openvpn-auth-ldap-2.0.3p1
> > 
> > 
> > Sebastien Leclerc
> > 
> 
> Two problems.
> 
> One: base and ports gcc use the same library version for libobjc.
> I'm sure this is wrong and hid the problem (otherwise pkg_create
> checks would have caught it).
> 
> Index: 4.9/Makefile
> ===================================================================
> RCS file: /cvs/ports/lang/gcc/4.9/Makefile,v
> retrieving revision 1.41
> diff -u -p -r1.41 Makefile
> --- 4.9/Makefile      18 Sep 2016 15:05:15 -0000      1.41
> +++ 4.9/Makefile      16 Oct 2016 10:57:43 -0000
> @@ -4,7 +4,7 @@ ONLY_FOR_ARCHS = amd64 arm hppa i386 mip
>  DPB_PROPERTIES = parallel
>  
>  V = 4.9.4
> -REVISION = 2
> +REVISION = 3
>  FULL_VERSION = $V
>  FULL_PKGVERSION = $V
>  
> @@ -44,7 +44,7 @@ SHARED_LIBS =       estdc++         17.0 \
>               gcj             4.0 \
>               gcj-tools       4.0 \
>               gij             4.0 \
> -             objc            6.0 \
> +             objc            7.0 \
>               ssp             4.0 \
>               lto_plugin      3.0 \
>               go              3.0 \
> 
> 
> Two, even with this fixed, the linker is preferring the version
> in /usr/local/lib/ (possibly because it's a higher-numbered version?)

Yes.

> I'm not sure how to fix this. So the diff above switches us from
> building a broken package if gcc-libs is installed, to failing
> to build if gcc-libs is installed. So it doesn't really gain us
> much in practical terms for openvpn-auth-ldap.
> 
> I also tried to workaround by building with ports gcc, ports
> infrastructure isn't really setup for objc builds - it's easy enough to
> add that, but in the case of openvpn-auth-ldap the configure script is
> failing when doing checks on the objc preprocessor.
> 
> It would be nice if someone with knowledge about the objc toolchain
> or an interest in fixing openvpn-auth-ldap could take a look.
> 

I don't claim to know much about objc, but I think the correct solution
would be to either rename libobj from lang/gcc to libeobjc (and make the
port use it) or go the fortran route and remove support from base.
According to sqlports, openvpn-auth-ldap is the only port with objc in
WANTLIB (GNUstep stuff uses clang + libobjc2).

Reply via email to