<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/62922>62922</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Inquiry about Source-based Code Coverageļ¼
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          blu3sh0rk
      </td>
    </tr>
</table>

<pre>
    Hello, I want to use Source-based Code Coverage in the Apache httpd program, and my compile command is as follows:
```
CC=/usr/lib/llvm-12/bin/clang \
CXX=/usr/lib/llvm-12/bin/clang++ \
LD=/usr/lib/llvm-12/bin/ld.lld \
CFLAGS="-g -w -flto -fprofile-instr-generate -fcoverage-mapping" \
CXXFLAGS="-g -w -flto -fprofile-instr-generate -fcoverage-mapping -std=c++11 -stdlib=libc++" \
LDFLAGS="-flto" \
./configure --with-apr="/usr/local/apache_lab/apr/" \
            --with-apr-util="/usr/local/apache_lab/apr-util/" \
            --with-expat="/usr/local/apache_lab/expat/" \
            --with-pcre="/usr/local/apache_lab/pcre/" \
            --disable-pie \
            --disable-so \
            --disable-example-ipc \
            --disable-example-hooks \
            --disable-optional-hook-export \
            --disable-optional-hook-import \
            --disable-optional-fn-export \
            --disable-optional-fn-import \
            --with-mpm=prefork \
            --enable-static-support \
            --enable-mods-static=reallyall \
            --enable-debugger-mode \
            --with-crypto --with-openssl \
            --disable-shared \
            --prefix=/home/xxxx/Desktop/xxxxxxx/benchmarks/httpd/cov-bin/
```
However, I am encountering the following error message which I cannot resolve:
```
make[2]: Leaving directory '/home/lucas/Desktop/directed-fuzzing/benchmarks/httpd/httpd-2.4.52/support'
server/.libs/libmain.a: error adding symbols: Archive has no index; run ranlib to add one
clang: error: linker command failed with exit code 1 (use -v to see invocation)
/home/xxxxxxxxxxxx/Desktop/xxxxxxxx/benchmarks/httpd/httpd-2.4.52/build/program.mk:22: recipe for target 'httpd' failed
make[1]: *** [httpd] Error 1
make[1]: Leaving directory '/home/xxxxxx/Desktop/xxxxxxxxx/benchmarks/httpd/httpd-2.4.52'
/home/xxxxxxx/Desktop/xxxxxxxx/benchmarks/httpd/httpd-2.4.52/build/rules.mk:75: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
```
I have tried `ranlib server/.libs/libmain.a` and running `make clean & make` again, but the error persists. What could be the reason for this, and is there any other solution that I can try?


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVk9z4rgT_TTi0mXKloHAgQOB4Tepym0Ov7ltyXLb1iJLXknmz3z6rZadyZANIVO7qRRgufup--mpu4X3qjaIazZ_ZPPdRPShsW5d6D73TeoOk8KWl_VX1NoyvoUnOAkTIFjoPcI32zuJSSE8lrC1JcLWHtGJGkEZCA3CphOyQWhC6EronK2daAlHmBLaC0jbdkojfbe0pDwID5XV2p48yzcs3bF0wxbp-B8ft1uW7xjf994xvteqoE99bJOMM74vlGF8L7UwNbD5dnT5_v2TPow_Mv746vm8u--oy6nW5S-77Z83__sW_XhSQ3KCpNLBQlJ1zlZKY6KMDy6p0aATASGp5Mhb0oquUxQGv4r-3yNC4kPJ8p0cMsyyuEAJ5TutinH5at_n3a_b0oZXr6fEmTWVqnuHkCQnFZpEdG6wf-XMSqEZ34sohT-0KOIDvbqCg1_-XsGSPij9ScTB9j4snjsRPoM5GN4H7KTDz-BFuw_hSuVFoTHpFN4z8faeBZ5F25E2OvlZ08bag79nbLugrBE6WhOb1oXf81Htb_lU5nd3qcydPeK5tV3L8l3nsLLucMsSzUB3EEHJxPfdR7CjcWtLP3qwfOdQaH0RWt_xKrHo6xodud88_hi4dJeOrv_wZDs03t9E_ymYRjgsb1kRC-o8FLvGtqTT8_l8Zny_Q38IthsXhrUCjWxa4Q6ezKm6x2JwTIaK-G7d_mpPeEQ3tBHRAhppexPQUXWiZjHUfXpC56yDFr2nXnJqlGzgCaQwxgZw6K0-4q320IoDsvkjZ_Md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