Hi,

naddy@ reports to me a new problem in the configure script of rust.

When the configure script test the bootstrap version, it didn't use the
libraries attached. As some system libraries were bumped (hello libpthread),
the binary couldn't be run at configure stage (but it is done well in
build).

So patching the configure to pass LD_LIBRARY_PATH as it is done during
the build...

I tested the diff in proot(1) environment with a new libpthread
(different version from the one bundle in bootstrapper).

Thanks.
-- 
Sebastien Marie

On Sat, Sep 03, 2016 at 12:37:08PM +0200, Christian Weisgerber wrote:
> >>> Building on amd64-3 under lang/rust
>        BDEPENDS = 
> [devel/cmake;lang/gcc/4.9,-c++;lang/gcc/4.9,-libs;lang/gcc/4.9;devel/llvm;devel/gmake;devel/libtool;lang/python/2.7]
>        DIST = 
> [lang/rust,-doc:rust/rustc-1.11.0-src.tar.gz;lang/rust,-doc:rust/rustc-bootstrap-amd64-1.11.0-20160819.tar.gz]
>        FULLPKGNAME = rust-1.11.0p0
>        RDEPENDS = [lang/gcc/4.9,-libs]
> (Junk lock obtained for amd64-3 at 1472855314)
[...]

> configure: CFG_ENABLE_LOCAL_RUST := 1 
> configure: 
> configure: failure while running 
> /usr/obj/ports/rust-1.11.0/rustc-bootstrap-amd64-1.11.0-20160819/bin/rustc 
> --version
> configure: 
> ===> Exiting lang/rust with an error
> which: rustc: Command not found.
> rustc: can't load library 'libpthread.so.22.0'

Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/rust/Makefile,v
retrieving revision 1.28
diff -u -p -r1.28 Makefile
--- Makefile    1 Sep 2016 09:41:40 -0000       1.28
+++ Makefile    3 Sep 2016 11:38:37 -0000
@@ -10,7 +10,7 @@ COMMENT-doc =         html documentation for ru
 V =                    1.11.0
 BV =                   1.11.0-20160819
 DISTNAME =             rustc-${V}-src
-REVISION =             0
+REVISION =             1
 
 #RUST_HASH !=          echo -n ${V} | md5 | cut -c1-8
 RUST_HASH =            39b92f95
Index: patches/patch-configure
===================================================================
RCS file: /cvs/ports/lang/rust/patches/patch-configure,v
retrieving revision 1.11
diff -u -p -r1.11 patch-configure
--- patches/patch-configure     31 Aug 2016 08:33:19 -0000      1.11
+++ patches/patch-configure     3 Sep 2016 11:38:37 -0000
@@ -2,7 +2,7 @@ $OpenBSD: patch-configure,v 1.11 2016/08
 Remove requirement for curl.
 The snapshot isn't downloaded but copied by post-configure.
 --- configure.orig     Tue Aug 16 03:54:35 2016
-+++ configure  Fri Aug 19 06:40:54 2016
++++ configure  Sat Sep  3 13:35:30 2016
 @@ -726,7 +726,7 @@ if [ -n "$CFG_ENABLE_ORBIT" ]; then putvar CFG_ENABLE_
  
  step_msg "looking for build programs"
@@ -12,3 +12,12 @@ The snapshot isn't downloaded but copied
  if [ -z "$CFG_PYTHON_PROVIDED" ]; then
      probe_need CFG_PYTHON      python2.7 python2 python
  fi
+@@ -877,7 +877,7 @@ then
+     fi
+ 
+     CMD="${CFG_LOCAL_RUST_ROOT}/bin/rustc${BIN_SUF}"
+-    LRV=`$CMD --version`
++    LRV=`LD_LIBRARY_PATH=${CFG_LOCAL_RUST_ROOT}/lib $CMD --version`
+     if [ $? -ne 0 ]
+     then
+         step_msg "failure while running $CMD --version"

Reply via email to