pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lang/nodejs failed to compile



‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Tuesday, June 29th, 2021 at 1:47 PM, hung.nguyengia <hung.nguyengia%protonmail.com@localhost> wrote:

> It's based on RHEL. The GCC version is too old:
>
> gcc version 5.5.0 20171010 (Linaro GCC 5.5-2017.10)
>
> The distribution offers latest version of Clang and libc++, though. I bootstrapped pkgsrc like this:
>
> ./bootstrap --compiler clang --make-jobs 16 --unprivileged
>
> It seems clang still uses gcc's libstdc++, though. It's too old and doesn't support the C++ features lang/nodejs needs so lang/nodejs still failed to compile.
>
> Any help would be appreciated.

I found I could force clang to use libc++ with this line in mk.conf:

CXXFLAGS+= -stdlib=libc++

But unfortunately lang/nodejs still failed to build. Setting clang to use libc++ could allow it to pass the compilation stage. It failed at the linking stage.

It seems clang used the libc++ headers to compile but still looks to link with the system's libstdc++ so it caused the problem.


Home | Main Index | Thread Index | Old Index