<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>9307</bug_id>
          
          <creation_ts>2006-03-24 12:13:55 +0300</creation_ts>
          <short_desc>Fails to load shared libraries located not in public place</short_desc>
          <delta_ts>2022-01-19 21:44:41 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>rpm-build-perl</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sviatoslav Sviridov">svd</reporter>
          <assigned_to name="viy">viy</assigned_to>
          <cc>at</cc>
    
    <cc>crux</cc>
    
    <cc>ender</cc>
    
    <cc>ldv</cc>
    
    <cc>mike</cc>
    
    <cc>rider</cc>
    
    <cc>viy</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>36953</commentid>
    <comment_count>0</comment_count>
    <who name="Sviatoslav Sviridov">svd</who>
    <bug_when>2006-03-24 12:13:57 +0300</bug_when>
    <thetext>http://lists.altlinux.org/pipermail/devel/2006-March/030452.html

При поиске зависимостей в %buildroot не учитывается, что бинарные модули могут
иметь установленный RPATH. Без этого не удается загрузить требуемые библиотеки.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39562</commentid>
    <comment_count>1</comment_count>
    <who name="at@altlinux.org">at</who>
    <bug_when>2006-08-15 19:37:36 +0400</bug_when>
    <thetext>Попробуйте
%define __spec_autodep_custom_pre export 
LD_LIBRARY_PATH=%buildroot%_libdir/libsvn_swig</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48320</commentid>
    <comment_count>2</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2007-04-07 20:38:53 +0400</bug_when>
    <thetext>ping</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80656</commentid>
    <comment_count>3</comment_count>
    <who name="Afanasov Dmitry">ender</who>
    <bug_when>2008-11-05 10:18:33 +0300</bug_when>
    <thetext>на subversion 1.5.4 ошибка с этими исправлениями сохраняется</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>133806</commentid>
    <comment_count>4</comment_count>
    <who name="Vladimir Lettiev">crux</who>
    <bug_when>2012-10-07 23:13:09 +0400</bug_when>
    <thetext>Я проверил сборку subversion-1.6.17-alt2 с указанным в 1-ом комментарии define&apos;ом и сборка прошла успешной. Поэтому мне кажется, что blocker тут не очень уместен.

В принципе, можно улучшить perl.req, заставив его искать lib*.so.* файлы рекурсивно по всем каталогам в %buildroot%_libdir и добавлять все такие найденные каталоги в LD_LIBRARY_PATH. Как-то так:

diff --git a/perl.req b/perl.req
index c6e2967..df23bbd 100755
--- a/perl.req
+++ b/perl.req
@@ -4,6 +4,7 @@ use strict;
 
 use Config qw(%Config);
 use PerlReq::Utils qw(argv inc explode mod2dep path2dep);
+use File::Find;
 
 sub pod2usage {
 	eval { require Pod::Usage } or die $@;
@@ -188,10 +189,16 @@ sub do_deparse {
 		}
 # adjust LD_LIBRARY_PATH if there are libraries inside buildroot
 # spotted by Yury Konovalov
-		for my $libdir (&quot;/usr/lib64&quot;, &quot;/usr/lib&quot;) {
-			next unless glob &quot;$ENV{RPM_BUILD_ROOT}$libdir/lib*.so*&quot;;
+		my %lib_paths = ();
+		find ( sub {
+			next unless (/^lib.*\.so\..*$/ );
+			next if (exists $lib_paths{$File::Find::dir}
+				|| $File::Find::dir =~ m{^$ENV{RPM_BUILD_ROOT}/usr/lib/debug} );
+			$lib_paths{$File::Find::dir}++;
+		}, &quot;$ENV{RPM_BUILD_ROOT}/usr/lib64&quot;, &quot;$ENV{RPM_BUILD_ROOT}/usr/lib&quot;);
+		if (keys %lib_paths) {
 			$ENV{LD_LIBRARY_PATH} .= &quot;:&quot; if $ENV{LD_LIBRARY_PATH};
-			$ENV{LD_LIBRARY_PATH} .= &quot;$ENV{RPM_BUILD_ROOT}$libdir&quot;;
+			$ENV{LD_LIBRARY_PATH} .= join &quot;:&quot;, keys %lib_paths;
 		}
 	}
 	my @pipe = ($X, shebang_options($fname));</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>148849</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2014-11-16 21:46:37 +0300</bug_when>
    <thetext>Ещё актуально?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>148850</commentid>
    <comment_count>6</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2014-11-17 01:39:08 +0300</bug_when>
    <thetext>(In reply to comment #5)
&gt; Ещё актуально?

Актуально, но, видимо, уже не очень срочно.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>205561</commentid>
    <comment_count>7</comment_count>
    <who name="viy">viy</who>
    <bug_when>2021-12-01 22:17:44 +0300</bug_when>
    <thetext>На досуге приложу и поверю.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>206886</commentid>
    <comment_count>8</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2022-01-19 21:44:41 +0300</bug_when>
    <thetext>rpm-build-perl-0.85-alt3 -&gt; sisyphus:

 Wed Jan 19 2022 Igor Vlasenko &lt;viy@altlinux&gt; 0.85-alt3
 - applied crux&apos;s patch (closes: #9307)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>