[libcxx-dev] Problem installing libcxx and libcxxabi using Bootstrapping on Amazon Linux 2

Hasan Marzooq via libcxx-dev libcxx-dev at lists.llvm.org
Wed Dec 15 07:37:49 PST 2021


Hello!

Error "/bin/ld: cannot find -lc++" is fixed by using three different
approaches individually.

1: Appending "-L/usr/local/lib/x86_64-unknown-linux-gnu" to <
https://github.com/plv8/plv8/blob/r3.1alpha/Makefile#L166>

2: Doing "make LDFLAGS=-L/usr/local/lib/x86_64-unknown-linux-gnu"

3: Copying files from "//usr/local/lib/x86_64-unknown-linux-gnu" to
"/usr/lib" as "usr/local/lib" is in ld's search

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.

I have two issues now:

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?

B) I'm now getting below error:

--
make: /usr/bin/opt: Command not found
make: *** [plv8.bc] Error 127
----

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.


Thanks!









On Wed, 15 Dec 2021 at 17:31, Tobias Hieta <tobias at plexapp.com> wrote:

> ld.so.conf is only for the dynamic linker not lld/ld.
>
> you need to add it with -L<path> in LDFLAGS or similar.
>
> On Wed, Dec 15, 2021 at 10:10 AM Hasan Marzooq via libcxx-dev
> <libcxx-dev at lists.llvm.org> wrote:
> >
> > Sorry, my bad!
> >
> > Full output of "d -v" is here:
> https://drive.google.com/file/d/15okn-FtCFGE21iNVgSb5JIoCertATDeo/view?usp=sharing
> >
> > ---
> > ==========================
> > [root at ip-10-3-0-165 ~]# ld --verbose | grep SEARCH_DIR | tr -s ' ;'
> \\012
> > SEARCH_DIR("=/usr/x86_64-redhat-linux/lib64")
> > SEARCH_DIR("=/usr/lib64")
> > SEARCH_DIR("=/usr/local/lib64")
> > SEARCH_DIR("=/lib64")
> > SEARCH_DIR("=/usr/x86_64-redhat-linux/lib")
> > SEARCH_DIR("=/usr/local/lib")
> > SEARCH_DIR("=/lib")
> > SEARCH_DIR("=/usr/lib")
> > -----
> > I don't see "/usr/local/lib/x86_64-unknown-linux-gnu" above. Potentially
> this is the problem?
> >
> > I thought this could have add the path into ld's search path.
> > --
> > # ls /etc/ld.so.conf.d/x86_64-unknown-linux-gnu.conf
> > /etc/ld.so.conf.d/x86_64-unknown-linux-gnu.conf
> > # cat /etc/ld.so.conf.d/x86_64-unknown-linux-gnu.conf
> > /usr/local/lib/x86_64-unknown-linux-gnu
> > ---
> >
> > Thanks!
> >
> >
> > On Wed, 15 Dec 2021 at 16:58, Raul Tambre <raul at tambre.ee> wrote:
> >>
> >>  > "ldconfig -v" gives a huge output, so I've made it available via the
> link
> >> below: It looks like path is available to ld.
> >>
> >> ldconfig outputs info about the dynamic linker's search patch. ld
> doesn't use
> >> that. ld's search patch is the one you're interested in.
> >
> > _______________________________________________
> > libcxx-dev mailing list
> > libcxx-dev at lists.llvm.org
> > https://lists.llvm.org/cgi-bin/mailman/listinfo/libcxx-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/libcxx-dev/attachments/20211215/c5fa18f3/attachment.html>


More information about the libcxx-dev mailing list