<div dir="ltr">Hello!<div><br></div>Error "/bin/ld: cannot find -lc++" is fixed by using three different approaches individually.<div><br></div><div>1: Appending "-L/usr/local/lib/x86_64-unknown-linux-gnu" to <<a href="https://github.com/plv8/plv8/blob/r3.1alpha/Makefile#L166">https://github.com/plv8/plv8/blob/r3.1alpha/Makefile#L166</a>></div><div><br></div><div>2: Doing "make LDFLAGS=-L/usr/local/lib/x86_64-unknown-linux-gnu"</div><div><br></div><div>3: Copying files from "//usr/local/lib/x86_64-unknown-linux-gnu" to "/usr/lib" as "usr/local/lib" is in ld's search</div><div><br></div>Note: @Raul Tambre you've already suggested option 1 above. I think I missed to implement that or maybe it didn't work as I was not adding "libunwind" in cmake configure. <div><br></div><div>I have two issues now:</div><div><br></div><div>A) Is there a better way than above 3 (manual fixes) to add "/usr/local/lib/x86_64-unknown-linux-gnu" in id's search path? I mean, where I don't need to do it manually and perhaps can be added as part of LLVM bootstrapping build?</div><div><br></div><div>B) I'm now getting below error:<br><br></div><div>--</div><div>make: /usr/bin/opt: Command not found<br>make: *** [plv8.bc] Error 127<br></div><div>----</div><div><br></div><div>As @Raul Tambre you've already mentioned that opt is part of LLVM so it should suffice to add "llvm" to LLVM_ENABLE_PROJECTS. I'll try this now.</div><div><br></div><div><br></div><div>Thanks!</div><div><br></div><div><br></div><div><br></div><div><br></div><div><div><br></div><div><br></div><div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 15 Dec 2021 at 17:31, Tobias Hieta <<a href="mailto:tobias@plexapp.com">tobias@plexapp.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">ld.so.conf is only for the dynamic linker not lld/ld.<br>
<br>
you need to add it with -L<path> in LDFLAGS or similar.<br>
<br>
On Wed, Dec 15, 2021 at 10:10 AM Hasan Marzooq via libcxx-dev<br>
<<a href="mailto:libcxx-dev@lists.llvm.org" target="_blank">libcxx-dev@lists.llvm.org</a>> wrote:<br>
><br>
> Sorry, my bad!<br>
><br>
> Full output of "d -v" is here: <a href="https://drive.google.com/file/d/15okn-FtCFGE21iNVgSb5JIoCertATDeo/view?usp=sharing" rel="noreferrer" target="_blank">https://drive.google.com/file/d/15okn-FtCFGE21iNVgSb5JIoCertATDeo/view?usp=sharing</a><br>
><br>
> ---<br>
> ==========================<br>
> [root@ip-10-3-0-165 ~]# ld --verbose | grep SEARCH_DIR | tr -s ' ;' \\012<br>
> SEARCH_DIR("=/usr/x86_64-redhat-linux/lib64")<br>
> SEARCH_DIR("=/usr/lib64")<br>
> SEARCH_DIR("=/usr/local/lib64")<br>
> SEARCH_DIR("=/lib64")<br>
> SEARCH_DIR("=/usr/x86_64-redhat-linux/lib")<br>
> SEARCH_DIR("=/usr/local/lib")<br>
> SEARCH_DIR("=/lib")<br>
> SEARCH_DIR("=/usr/lib")<br>
> -----<br>
> I don't see "/usr/local/lib/x86_64-unknown-linux-gnu" above. Potentially this is the problem?<br>
><br>
> I thought this could have add the path into ld's search path.<br>
> --<br>
> # ls /etc/ld.so.conf.d/x86_64-unknown-linux-gnu.conf<br>
> /etc/ld.so.conf.d/x86_64-unknown-linux-gnu.conf<br>
> # cat /etc/ld.so.conf.d/x86_64-unknown-linux-gnu.conf<br>
> /usr/local/lib/x86_64-unknown-linux-gnu<br>
> ---<br>
><br>
> Thanks!<br>
><br>
><br>
> On Wed, 15 Dec 2021 at 16:58, Raul Tambre <<a href="mailto:raul@tambre.ee" target="_blank">raul@tambre.ee</a>> wrote:<br>
>><br>
>>  > "ldconfig -v" gives a huge output, so I've made it available via the link<br>
>> below: It looks like path is available to ld.<br>
>><br>
>> ldconfig outputs info about the dynamic linker's search patch. ld doesn't use<br>
>> that. ld's search patch is the one you're interested in.<br>
><br>
> _______________________________________________<br>
> libcxx-dev mailing list<br>
> <a href="mailto:libcxx-dev@lists.llvm.org" target="_blank">libcxx-dev@lists.llvm.org</a><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-dev</a><br>
</blockquote></div>