maurossi / llvm

Other
3 stars 5 forks source link

LLVM9 nougat problem #2

Closed hmtheboy154 closed 4 years ago

hmtheboy154 commented 4 years ago

just tried to compile this today, I saw that youling257 have this problem too

FAILED: /bin/bash -c "(PWD=/proc/self/cwd prebuilts/misc/linux-x86/ccache/ccache prebuilts/clang/host/linux-x86/clang-r328903/bin/clang++ -I bionic -I external/llvm9/lib/Support/../.. -I external/llvm9/lib/Support/../../include -I external/llvm9/lib/Support/../../device/include -I external/llvm9/lib/Support -I out/target/product/x86/obj/STATIC_LIBRARIES/libLLVM90Support_intermediates -I out/target/product/x86/gen/STATIC_LIBRARIES/libLLVM90Support_intermediates -I libnativehelper/include/nativehelper \$(cat out/target/product/x86/obj/STATIC_LIBRARIES/libLLVM90Support_intermediates/import_includes) -isystem system/core/include -isystem system/media/audio/include -isystem hardware/libhardware/include -isystem hardware/libhardware_legacy/include -isystem hardware/ril/include -isystem libnativehelper/include -isystem frameworks/native/include -isystem frameworks/native/opengl/include -isystem frameworks/av/include -isystem frameworks/base/include -isystem out/target/product/x86/obj/include -isystem bionic/libc/arch-x86/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/common -isystem bionic/libc/kernel/uapi/asm-x86 -isystem bionic/libm/include -isystem bionic/libm/include/i387 -c    -fno-exceptions -Wno-multichar -O2 -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -ffunction-sections -fno-short-enums -fstrict-aliasing -funwind-tables -fstack-protector-strong -m32 -no-canonical-prefixes -march=prescott -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG  -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -nostdlibinc    -msse3 -target i686-linux-android -Bprebuilts/gcc/linux-x86/x86/x86_64-uber/x86_64-linux-android/bin -mstackrealign    -Wsign-promo  -Wno-inconsistent-missing-override -nostdlibinc     -fno-rtti -DANDROID_TARGET_BUILD -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -O2 -fomit-frame-pointer -Wall -W -Wno-unused-parameter -Wwrite-strings -Werror -Dsprintf=sprintf -D__android__ -DLLVM_BUILD_GLOBAL_ISEL -fno-exceptions -fPIC -D_USING_LIBCXX -std=gnu++14 -fno-rtti -Woverloaded-virtual -Wno-sign-promo -std=c++11  -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast  -Werror=address-of-temporary -Werror=null-dereference -Werror=return-type    -MD -MF out/target/product/x86/obj/STATIC_LIBRARIES/libLLVM90Support_intermediates/Signals.d -o out/target/product/x86/obj/STATIC_LIBRARIES/libLLVM90Support_intermediates/Signals.o external/llvm9/lib/Support/Signals.cpp ) && (cp out/target/product/x86/obj/STATIC_LIBRARIES/libLLVM90Support_intermediates/Signals.d out/target/product/x86/obj/STATIC_LIBRARIES/libLLVM90Support_intermediates/Signals.P; sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\\\\$//' -e '/^\$/ d' -e 's/\$/ :/' < out/target/product/x86/obj/STATIC_LIBRARIES/libLLVM90Support_intermediates/Signals.d >> out/target/product/x86/obj/STATIC_LIBRARIES/libLLVM90Support_intermediates/Signals.P; rm -f out/target/product/x86/obj/STATIC_LIBRARIES/libLLVM90Support_intermediates/Signals.d )"
In file included from external/llvm9/lib/Support/Signals.cpp:220:
external/llvm9/lib/Support/Unix/Signals.inc:388:23: error: no matching constructor for initialization of 'SaveAndRestore<int>'
  SaveAndRestore<int> SaveErrnoDuringASignalHandler(errno);
                      ^                             ~~~~~
external/llvm9/lib/Support/../../include/llvm/Support/SaveAndRestore.h:21:30: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'volatile int' to 'const llvm::SaveAndRestore<int>' for 1st argument
template <typename T> struct SaveAndRestore {
                             ^
external/llvm9/lib/Support/../../include/llvm/Support/SaveAndRestore.h:22:3: note: candidate constructor not viable: 1st argument ('volatile int') would lose volatile qualifier
  SaveAndRestore(T &X) : X(X), OldValue(X) {}
  ^
external/llvm9/lib/Support/../../include/llvm/Support/SaveAndRestore.h:23:3: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
  SaveAndRestore(T &X, const T &NewValue) : X(X), OldValue(X) {
  ^
1 error generated.
[ 59% 3957/6619] target  C: libLLVM90Support <= external/llvm9/lib/Support/regcomp.c
ninja: build stopped: subcommand failed.
make: *** [build/core/ninja.mk:149: ninja_wrapper] Error 1
maurossi commented 4 years ago

Hi, in my case it compiles on oreo-x86 and on current Ubuntu 19.10, but I don't have nougat-x86, it's not in active development anymore.

Moreover the problem is in llvm code, not in my Android.mk files or changes.

Please ask llvm developers, but I saw youling257 already did in at least 2 places

Further issues will not be accepted. Mauro