Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Host Clang must be able to find libstdc++4.7 or newer #96

Closed
FrancescoTerrosi opened this issue Jan 16, 2020 · 1 comment
Closed

Host Clang must be able to find libstdc++4.7 or newer #96

FrancescoTerrosi opened this issue Jan 16, 2020 · 1 comment

Comments

@FrancescoTerrosi
Copy link

FrancescoTerrosi commented Jan 16, 2020

Hi, i'm compiling a software that internally builds llvm with this script (starts at line 40, fails at line 59)

As you can see, the console output complains about the version of my libstdc++ (which i'm pretty sure it's 6 and not lower than 4.7) and looking at CmakeError.log it says that the program fails when including (second log)

I ran this same script on other computers and things work just fine, any help would be appreciated,

Thank you

Console output

CMake Deprecation Warning at CMakeLists.txt:20 (cmake_policy):
The OLD behavior for policy CMP0051 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.

-- The C compiler identification is Clang 3.9.1
-- The CXX compiler identification is Clang 3.9.1
-- The ASM compiler identification is Clang
-- Found assembler: /usr/bin/clang-3.9
-- Check for working C compiler: /usr/bin/clang-3.9
-- Check for working C compiler: /usr/bin/clang-3.9 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/clang++-3.9
-- Check for working CXX compiler: /usr/bin/clang++-3.9 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test LLVM_NO_OLD_LIBSTDCXX
-- Performing Test LLVM_NO_OLD_LIBSTDCXX - Failed
CMake Error at cmake/modules/CheckCompilerVersion.cmake:38 (message):
Host Clang must be able to find libstdc++4.7 or newer!
Call Stack (most recent call first):
cmake/config-ix.cmake:14 (include)
CMakeLists.txt:465 (include)

-- Configuring incomplete, errors occurred!
See also "Build/llvm-build/CMakeFiles/CMakeOutput.log".
See also "Util/Build/llvm-build/CMakeFiles/CMakeError.log".`

============================================================================

CMakeError.log

Checking whether the ASM compiler is GNU using "--version" did not match "(GNU assembler)|(GCC)|(Free Software Foundation)":
clang version 3.9.1-19ubuntu1 (tags/RELEASE_391/rc2)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Performing C++ SOURCE FILE Test LLVM_NO_OLD_LIBSTDCXX failed with the following output:
Change Dir: Util/Build/llvm-build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_3ae75/fast
/usr/bin/make -f CMakeFiles/cmTC_3ae75.dir/build.make CMakeFiles/cmTC_3ae75.dir/build
make[1]: Entering directory 'Util/Build/llvm-build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_3ae75.dir/src.cxx.o
/usr/bin/clang++-3.9 -DLLVM_NO_OLD_LIBSTDCXX -std=c++0x -o CMakeFiles/cmTC_3ae75.dir/src.cxx.o -c Util/Build/llvm-build/CMakeFiles/CMakeTmp/src.cxx
Util/Build/llvm-build/CMakeFiles/CMakeTmp/src.cxx:2:10: fatal error: 'atomic' file not found
#include
^
1 error generated.
CMakeFiles/cmTC_3ae75.dir/build.make:65: recipe for target 'CMakeFiles/cmTC_3ae75.dir/src.cxx.o' failed
make[1]: *** [CMakeFiles/cmTC_3ae75.dir/src.cxx.o] Error 1
make[1]: Leaving directory 'Util/Build/llvm-build/CMakeFiles/CMakeTmp'
Makefile:121: recipe for target 'cmTC_3ae75/fast' failed
make: *** [cmTC_3ae75/fast] Error 2

Source file was:

#include
std::atomic x(0.0f);
int main() { return (float)x; }

@efriedma-quic
Copy link
Collaborator

efriedma-quic commented Feb 29, 2020

The error message is complaining that your host compiler is broken (can't build C++ code that uses <atomic>). We can't provide support for clang 3.9.

shiltian pushed a commit to shiltian/llvm-project that referenced this issue Dec 15, 2021
This patch implemented TTI.IntImmCost() properly.
Each BPF insn has 32bit immediate space, so for any immediate
which can be represented as 32bit signed int, the cost
is technically free. If an int cannot be presented as
a 32bit signed int, a ld_imm64 instruction is needed
and a TCC_Basic is returned.

This change is motivated when we observed that
several bpf selftests failed with latest llvm trunk, e.g.,
  llvm#10/16 strobemeta.o:FAIL
  llvm#10/17 strobemeta_nounroll1.o:FAIL
  llvm#10/18 strobemeta_nounroll2.o:FAIL
  llvm#10/19 strobemeta_subprogs.o:FAIL
  llvm#96 snprintf_btf:FAIL

The reason of the failure is due to that
SpeculateAroundPHIsPass did aggressive transformation
which alters control flow for which currently verifer
cannot handle well. In llvm12, SpeculateAroundPHIsPass
is not called.

SpeculateAroundPHIsPass relied on TTI.getIntImmCost()
and TTI.getIntImmCostInst() for profitability
analysis. This patch implemented TTI.getIntImmCost()
properly for BPF backend which also prevented
transformation which caused the above test failures.

Differential Revision: https://reviews.llvm.org/D96448

(cherry picked from commit a260ae7)
trevor-m pushed a commit to trevor-m/llvm-project that referenced this issue Apr 20, 2023
This patch implemented TTI.IntImmCost() properly.
Each BPF insn has 32bit immediate space, so for any immediate
which can be represented as 32bit signed int, the cost
is technically free. If an int cannot be presented as
a 32bit signed int, a ld_imm64 instruction is needed
and a TCC_Basic is returned.

This change is motivated when we observed that
several bpf selftests failed with latest llvm trunk, e.g.,
  llvm#10/16 strobemeta.o:FAIL
  llvm#10/17 strobemeta_nounroll1.o:FAIL
  llvm#10/18 strobemeta_nounroll2.o:FAIL
  llvm#10/19 strobemeta_subprogs.o:FAIL
  llvm#96 snprintf_btf:FAIL

The reason of the failure is due to that
SpeculateAroundPHIsPass did aggressive transformation
which alters control flow for which currently verifer
cannot handle well. In llvm12, SpeculateAroundPHIsPass
is not called.

SpeculateAroundPHIsPass relied on TTI.getIntImmCost()
and TTI.getIntImmCostInst() for profitability
analysis. This patch implemented TTI.getIntImmCost()
properly for BPF backend which also prevented
transformation which caused the above test failures.

Differential Revision: https://reviews.llvm.org/D96448
DavidSpickett pushed a commit that referenced this issue Dec 21, 2023
This PR adds support for thread names in lldb on Windows.

```
(lldb) thr list
Process 2960 stopped
  thread #53: tid = 0x03a0, 0x00007ff84582db34 ntdll.dll`NtWaitForMultipleObjects + 20
  thread #29: tid = 0x04ec, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'SPUW.6'
  thread #89: tid = 0x057c, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x1000019] physics[main]'
  thread #3: tid = 0x0648, 0x00007ff843c2cafe combase.dll`InternalDoATClassCreate + 39518
  thread #93: tid = 0x0688, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x100501d] uMovie::StreamingThread'
  thread #1: tid = 0x087c, 0x00007ff842e7a104 win32u.dll`NtUserMsgWaitForMultipleObjectsEx + 20
  thread #96: tid = 0x0890, 0x00007ff845830a14 ntdll.dll`NtWaitForAlertByThreadId + 20, name = 'PPU[0x1002020] HLE Video Decoder'
<...>
```
ergawy added a commit to ergawy/llvm-project that referenced this issue Jun 4, 2024
…lvm#96)

Cleans-up do-concurrent conversion code a bit by moving from using
`std::string` for the `mapTo` option to using an `enum. The same `enum`
is used across the code for `flang-new`, `fir-opt`, and `bbc`.
RevySR pushed a commit to revyos/llvm-project that referenced this issue Jul 27, 2024
* [LLVM][XTHeadVector] Define intrinsic functions.

* [LLVM][XTHeadVector] Define pseudos and pats.

* [LLVM][XTHeadVector] Add test cases.

* [NFC][XTHeadVector] Update Readme.
alexanderguy pushed a commit to alexanderguy/llvm-project that referenced this issue Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants