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

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

    <bug>
          <bug_id>35301</bug_id>
          
          <creation_ts>2018-08-29 01:03:00 +0300</creation_ts>
          <short_desc>llvm-alt-tool-wrapper cannot be called as ld</short_desc>
          <delta_ts>2021-02-12 14:41:21 +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>lld</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>ASSIGNED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexey Gladkov">legion</reporter>
          <assigned_to name="Arseny Maslennikov">arseny</assigned_to>
          <cc>arseny</cc>
    
    <cc>lakostis</cc>
    
    <cc>lav</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>173657</commentid>
    <comment_count>0</comment_count>
      <attachid>7721</attachid>
    <who name="Alexey Gladkov">legion</who>
    <bug_when>2018-08-29 01:03:00 +0300</bug_when>
    <thetext>Created attachment 7721
test.sh

+ cat
+ gcc -o test test.c
+ rm -f test
++ pwd
+ mkdir -p /tmp/bin
+ &apos;[&apos; -f /usr/bin/ld.lld &apos;]&apos;
++ pwd
+ ln -sf /usr/bin/ld.lld /tmp/bin/ld
++ pwd
+ export PATH=/tmp/bin:/root/bin:/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin
+ PATH=/tmp/bin:/root/bin:/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin
+ gcc -o test test.c -Wl,--verbose
/tmp/bin/ld: /usr/lib/gcc/i586-alt-linux/7/../../../crt1.o
/tmp/bin/ld: /usr/lib/gcc/i586-alt-linux/7/../../../crti.o
/tmp/bin/ld: /usr/lib/gcc/i586-alt-linux/7/crtbegin.o
/tmp/bin/ld: /root/tmp/ccM4AKzK.o
/tmp/bin/ld: /usr/lib/gcc/i586-alt-linux/7/libgcc.a
/tmp/bin/ld: /usr/lib/gcc/i586-alt-linux/7/libgcc_s.so
/tmp/bin/ld: error: /usr/lib/gcc/i586-alt-linux/7/libgcc_s.so:4: unable to find libgcc_s.so.1
&gt;&gt;&gt; GROUP ( libgcc_s.so.1 -lgcc )
&gt;&gt;&gt;         ^
/tmp/bin/ld: /usr/lib/gcc/i586-alt-linux/7/../../../libc.so
/tmp/bin/ld: /usr/lib/gcc/i586-alt-linux/7/libgcc.a
/tmp/bin/ld: /usr/lib/gcc/i586-alt-linux/7/libgcc_s.so
/tmp/bin/ld: /usr/lib/gcc/i586-alt-linux/7/crtend.o
/tmp/bin/ld: /usr/lib/gcc/i586-alt-linux/7/../../../crtn.o
collect2: error: ld returned 1 exit status
+ echo &apos;add -L/lib&apos;
add -L/lib
+ gcc -o test test.c -L/lib -Wl,--verbose
/tmp/bin/ld: /usr/lib/gcc/i586-alt-linux/7/../../../crt1.o
/tmp/bin/ld: /usr/lib/gcc/i586-alt-linux/7/../../../crti.o
/tmp/bin/ld: /usr/lib/gcc/i586-alt-linux/7/crtbegin.o
/tmp/bin/ld: /root/tmp/cc4aOc7W.o
/tmp/bin/ld: /usr/lib/gcc/i586-alt-linux/7/libgcc.a
/tmp/bin/ld: /usr/lib/gcc/i586-alt-linux/7/libgcc_s.so
/tmp/bin/ld: /lib/libgcc_s.so.1
/tmp/bin/ld: /usr/lib/gcc/i586-alt-linux/7/libgcc.a
/tmp/bin/ld: /usr/lib/gcc/i586-alt-linux/7/../../../libc.so
/tmp/bin/ld: /lib/libc.so.6
/tmp/bin/ld: /usr/lib/libc_nonshared.a
/tmp/bin/ld: /lib/libc.so.6
/tmp/bin/ld: /lib/ld-linux.so.2
/tmp/bin/ld: /usr/lib/gcc/i586-alt-linux/7/libgcc.a
/tmp/bin/ld: /usr/lib/gcc/i586-alt-linux/7/libgcc_s.so
/tmp/bin/ld: /lib/libgcc_s.so.1
/tmp/bin/ld: /usr/lib/gcc/i586-alt-linux/7/libgcc.a
/tmp/bin/ld: /usr/lib/gcc/i586-alt-linux/7/crtend.o
/tmp/bin/ld: /usr/lib/gcc/i586-alt-linux/7/../../../crtn.o</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>196194</commentid>
    <comment_count>1</comment_count>
    <who name="Konstantin A Lepikhov (L.A. Kostis)">lakostis</who>
    <bug_when>2021-02-11 22:53:46 +0300</bug_when>
    <thetext>Дарю новому мантейнеру, не благодарите</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>196214</commentid>
    <comment_count>2</comment_count>
    <who name="Arseny Maslennikov">arseny</who>
    <bug_when>2021-02-12 12:36:25 +0300</bug_when>
    <thetext>Спустя 2,5 года:

% hsh --initroot-only ./35301 &gt;/dev/null 2&gt;&amp;1 &amp;&amp; hsh-install ./35301 gcc lld=11.0.1              
&lt;13&gt;Feb 11 20:06:24 rpmi: llvm11.0-filesystem-11.0.1-alt1 sisyphus+264437.600.5.1 1611691863 installed
&lt;13&gt;Feb 11 20:06:26 rpmi: llvm11.0-libs-11.0.1-alt1 sisyphus+264437.600.5.1 1611691863 installed
&lt;13&gt;Feb 11 20:06:26 rpmi: llvm-common-11.0.1-alt1 sisyphus+264437.500.4.1 1611350410 installed
&lt;13&gt;Feb 11 20:06:26 rpmi: lld11.0-11.0.1-alt1 sisyphus+264437.600.5.1 1611691863 installed
&lt;13&gt;Feb 11 20:06:26 rpmi: llvm-common-lld-11.0.1-alt1 sisyphus+264437.500.4.1 1611350410 installed
% hsh-run --execute=35301.sh ./35301
+ cd
+ cat
+ gcc -o test test.c
+ rm -f test
++ pwd
+ mkdir -p /usr/src/bin
+ &apos;[&apos; -f /usr/bin/ld.lld &apos;]&apos;
++ pwd
+ ln -sf /usr/bin/ld.lld /usr/src/bin/ld
++ pwd
+ export PATH=/usr/src/bin:/bin:/usr/bin:/usr/X11R6/bin
+ PATH=/usr/src/bin:/bin:/usr/bin:/usr/X11R6/bin
+ gcc -o test test.c -Wl,--verbose
ld: A symlink to the following path was installed along with the generic wrapper,
but it looks like the actual tool is not installed. You might want
to install the relevant package.
/usr/lib/llvm-11.0/bin/ld: No such file or directory
collect2: error: ld returned 1 exit status
+ echo &apos;add -L/lib&apos;
+ gcc -o test test.c -L/lib -Wl,--verbose
add -L/lib
ld: A symlink to the following path was installed along with the generic wrapper,
but it looks like the actual tool is not installed. You might want
to install the relevant package.
/usr/lib/llvm-11.0/bin/ld: No such file or directory
collect2: error: ld returned 1 exit status

Наблюдаю проблему совсем другого рода: llvm-alt-tool-wrapper не знает, кого ему вызывать, если argv[0] == &quot;ld&quot; или заканчивается на /ld. Может быть, имеет смысл в этом случае исполнять ld.lld.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>196222</commentid>
    <comment_count>3</comment_count>
    <who name="Arseny Maslennikov">arseny</who>
    <bug_when>2021-02-12 14:41:21 +0300</bug_when>
    <thetext>Но лучше было бы, чтобы в gcc появилась опция -fuse-ld=$name.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>7721</attachid>
            <date>2018-08-29 01:03:00 +0300</date>
            <delta_ts>2018-08-29 01:03:00 +0300</delta_ts>
            <desc>test.sh</desc>
            <filename>z.sh</filename>
            <type>text/plain</type>
            <size>417</size>
            <attacher name="Alexey Gladkov">legion</attacher>
            
              <data encoding="base64">IyEvYmluL3NoIC14CgpjYXQgPDwgX19FT0ZfXyA+IHRlc3QuYwojaW5jbHVkZSA8bWF0aC5oPgoK
c3RhdGljIGlubGluZSBsb25nIGxyb3VuZGV2ZW5mKGZsb2F0IHgpCnsKICAgcmV0dXJuIGxyaW50
Zih4KTsKfQoKaW50IG1haW4oKSB7Cn0KX19FT0ZfXwoKZ2NjIC1vIHRlc3QgdGVzdC5jCgpybSAt
ZiB0ZXN0Cgpta2RpciAtcCAkKHB3ZCkvYmluClsgLWYgL3Vzci9iaW4vbGQubGxkIF0gfHwgKCBl
Y2hvICJsbGQgbm90IGZvdW5kIjsgZXhpdCAxKQpsbiAtc2YgL3Vzci9iaW4vbGQubGxkICQocHdk
KS9iaW4vbGQKCmV4cG9ydCBQQVRIPSQocHdkKS9iaW46JFBBVEgKCmdjYyAtbyB0ZXN0IHRlc3Qu
YyAtV2wsLS12ZXJib3NlCgplY2hvICJhZGQgLUwvbGliIgpnY2MgLW8gdGVzdCB0ZXN0LmMgLUwv
bGliIC1XbCwtLXZlcmJvc2UK
</data>

          </attachment>
      

    </bug>

</bugzilla>