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

Unable build Clang for i386 arch: ../tools/extra/clangd/Shutdown.cpp:21:10: error: 'abort' is not a member of 'std' #105

Closed
NTMan opened this issue Jan 22, 2020 · 3 comments

Comments

@NTMan
Copy link

NTMan commented Jan 22, 2020

When I build Clang from release/10.x branch for target i386 I always get the compiler error:

[1433/1613] Building CXX object tools/...les/obj.clangDaemon.dir/Shutdown.cpp.o
FAILED: tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/Shutdown.cpp.o 
/usr/bin/c++  -DCLANG_REPOSITORY_STRING="\"Fedora 10.0.0-0.1.20200119.git050e1a3.fc32\"" -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/extra/clangd -I../tools/extra/clangd -I../include -Iinclude -I/include -O2 -g1 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m32 -march=i686 -mtune=generic -msse2 -mfpmath=sse -mstackrealign -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -pedantic -Wno-long-long -DNDEBUG -MD -MT tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/Shutdown.cpp.o -MF tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/Shutdown.cpp.o.d -o tools/extra/clangd/CMakeFiles/obj.clangDaemon.dir/Shutdown.cpp.o -c ../tools/extra/clangd/Shutdown.cpp
../tools/extra/clangd/Shutdown.cpp: In lambda function:
../tools/extra/clangd/Shutdown.cpp:21:10: error: 'abort' is not a member of 'std'
   21 |     std::abort();
      |          ^~~~~
../tools/extra/clangd/Shutdown.cpp: In function 'void clang::clangd::requestShutdown()':
../tools/extra/clangd/Shutdown.cpp:30:10: error: 'abort' is not a member of 'std'
   30 |     std::abort();
      |          ^~~~~
[1456/1613] Building CXX object tools/...akeFiles/obj.clangDaemon.dir/AST.cpp.o
../tools/extra/clangd/AST.cpp: In function 'std::string clang::clangd::{anonymous}::getQualification(clang::ASTContext&, const clang::DeclContext*, const clang::DeclContext*, llvm::function_ref<bool(clang::NestedNameSpecifier*)>)':
../tools/extra/clangd/AST.cpp:109:8: warning: variable 'ReachedNS' set but not used [-Wunused-but-set-variable]
  109 |   bool ReachedNS = false;
      |        ^~~~~~~~~
[1466/1613] Building CXX object tools/...es/obj.clangDaemon.dir/ParsedAST.cpp.o
ninja: build stopped: subcommand failed.

The target x86_64 Clang compiling without errors, and also LLVM compiled without error for both targets.

Full compiling log is here: https://pastebin.com/hD7uYVuJ

@DimitryAndric
Copy link
Collaborator

Try adding:

#include <cstdlib>

at the top of the file, that should fix it.

@NTMan
Copy link
Author

NTMan commented Jan 23, 2020

Thanks, now i386 target builded too.

@gnarlie
Copy link

gnarlie commented Jan 24, 2020

This is required for the release/10.x branch as well.

zmodem pushed a commit that referenced this issue Jan 27, 2020
This fixes a "not a member of 'std'" error with e.g. Fedora 32.

Closes: #105
(cherry picked from commit 58592f6)
cuviper pushed a commit to cuviper/llvm-project that referenced this issue Aug 27, 2023
…cal constants (llvm#105)

Fixes PR49932

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D100322
RevySR pushed a commit to revyos/llvm-project that referenced this issue Jul 27, 2024
…ompress` (llvm#105)

* [LLVM][XTHeadVector] Implement 17.2-17.6 `vmv/vfmv/vslide/vrgather/vcompress`

* [LLVM][XTHeadVector] Test `vrgather/vcompress`

* [LLVM][XTHeadVector] Test `vslide`

* [LLVM][XTHeadVector] Test `vslide` for rv32

* [LLVM][XTHeadVector] Fix `vslide1` tests for rv32
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

3 participants