On Mon, Dec 5, 2011 at 12:24 PM, Stuart Henderson <s...@spacehopper.org>
wrote:
> On 2011/12/05 11:02, David Coppa wrote:
>> On Mon, Dec 5, 2011 at 10:31 AM, Stuart Henderson <s...@spacehopper.org>
wrote:
>> > On 2011/12/05 10:00, Vitali wrote:
>> >> Anyway I decided to go on with the experiments and poked about
>> >> libproxy in ports.
>> >> In the patch file
>> >> "/usr/ports/net/libproxy/patches/patch-libproxy_cmake_libproxy_cmk"
>> >> there was a replacement line:
>> >>
>> >> - target_link_libraries(libproxy
modman;m;pthread;dl;${LIBPROXY_LIBRARIES})
>> >> + target_link_libraries(libproxy modman;m;${LIBPROXY_LIBRARIES})
>> >>
>> >> which I edited for:
>> >>
>> >> + target_link_libraries(libproxy
modman;m;pthread;${LIBPROXY_LIBRARIES})
>> >>
>> >> I put back only "pthread" as you see, rebuilt libproxy and gave
>> >> openconnect a new try, and this time it built with no errors.
>> >>
>> >> Here is my conversation with the openconnect developer
>> >> https://plus.google.com/u/0/113990329890790578682/posts/fxytv9BTkcY
>> >>
>> >> I wonder why "pthread" had been removed from libproxy? Or maybe I've
>> >> lost something? I found no information on the OpenBSD site about this.
>> >
>> > The problem is you are then linking with -lpthread, which is incorrect,
>> > on OpenBSD this should be -pthread instead. I don't know of a good way
to
>> > express this via a .cmk file but I think maybe we could patch the
>> > generated pkg-config file.
>>
>> Or, with cmake, you can use the right way:
>>
>> FIND_PACKAGE(Threads)
>>
>> This correctly links with "-pthread", since it's patched (see:
>> ports/devel/cmake/patches/patch-Modules_FindThreads_cmake)
>
> Oh actually... this only needs to touch the .pc.in file, the .cmk file
> should be left alone. I see why adding pthread back there "fixed" it but
> it's incorrect.
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/net/libproxy/Makefile,v
> retrieving revision 1.22
> diff -u -p -r1.22 Makefile
> --- Makefile B  B 29 Oct 2011 08:12:32 -0000 B  B  B 1.22
> +++ Makefile B  B 5 Dec 2011 10:20:51 -0000
> @@ -13,7 +13,7 @@ PKGNAME-main= B  B  B  B  libproxy-${VERSION}
> B PKGNAME-mozilla= B  B  B  libproxy-mozilla-${VERSION}
> B PKGNAME-webkit= B  B  B  B  B  B  B  B libproxy-webkit-${VERSION}
>
> -REVISION-main= B  B  B  B  6
> +REVISION-main= B  B  B  B  7
> B REVISION-mozilla= B  B  B 4
> B REVISION-webkit= B  B  B  6
>
> Index: patches/patch-libproxy_libproxy-1_0_pc_in
> ===================================================================
> RCS file: patches/patch-libproxy_libproxy-1_0_pc_in
> diff -N patches/patch-libproxy_libproxy-1_0_pc_in
> --- /dev/null B  1 Jan 1970 00:00:00 -0000
> +++ patches/patch-libproxy_libproxy-1_0_pc_in B  5 Dec 2011 10:20:51 -0000
> @@ -0,0 +1,10 @@
> +$OpenBSD$
> +--- libproxy/libproxy-1.0.pc.in.orig B  Mon Dec B 5 10:16:33 2011
> ++++ libproxy/libproxy-1.0.pc.in B  B  B  B Mon Dec B 5 10:16:20 2011
> +@@ -5,5 +5,5 @@ includedir=@PKGCONFIG_INCLUDEDIR@
> + Name: libproxy-1.0
> + Description: Proxy Configuration Library
> + Version: @PROJECT_VERSION@
> +-Libs: -L${libdir} -lproxy
> ++Libs: -L${libdir} -lproxy -pthread
> + Cflags: -I${includedir}
>


Thank you very much, Stuart.
I did cvs up with your latest changes, rebuilt libproxy, and after
that openconnect rebuilt fine. You were right.

V.

Reply via email to