Getting build error from msm-3.5 which I didn't from 3.4
sudosurootdev

Join Date: 22 Mar 14
Location: Florida
Posts: 6
Posted: Fri, 2014-08-22 22:04
I have been using msm-3.4 clang, as prebuilt clang to build Android 4.4 from source for quite a while. Now, I add msm-3.5 into my build WORKING_DIRECTORY, same DIR structure/placing as 3.4, but with msm-3.5 instead. Now, when close to end of build, I get this:
(SOLVED, MOVE TO NEXT PROBLEM/REPLY)
target asm: libpng <= external/libpng/contrib/pngneon/png_read_filter_row_neon.s
prebuilts/clang/linux-x86/host/msm-3.5/bin/clang: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by prebuilts/clang/linux-x86/host/msm-3.5/bin/clang)
make: *** [/home/sudosurootdev/source/android/VanirAOSP/out/target/product/ls980/obj/SHARED_LIBRARIES/libpng_intermediates/contrib/pngneon/png_read_filter_row_neon.o] Error 1
make: *** Waiting for unfinished jobs....
Does, anyone know how this can be fixed? Can I add prebuilt stdc++.so.6 from L Preview SDK in build, to fix? When I do:
readelf -a libstdc++.so.6 | grep GLIBCXX
... on the prebuilt libstdc++.so.6 from L Prevoew SDK, I get nothing... but when I do the same on my local: /usr/lib/x86_64-linux-gnu/libstdc++.so.6
I do get up to GLIBCXX_3.4.16 but not 3.4.18
How can I fix this? Please help... Thanks
I got past that error, it was just needing a newer local stdc++ which I got from a ppa
Now I am looking at a few other issues. First is that I am getting this error:
clang-3.5: error: the clang compiler does not support '-mfpu=neon-vfpv4'
...which makes no sense, because if I use clang --help it give a huge list of options which includes, under ARM OPTIONS (GENERAL):
-arm-enable-ehabi
was under CLANG_CONFIG_EXTRA_ASFLAGS would this be a replacement?
-fcxx-exceptions
I removed that flag now I'm getting:
clang (LLVM option parsing): Unknown command line argument '-MD'. Try: 'clang (LLVM option parsing) -help'
Thanks for reporting the issues. The Snapdragon LLVM clang version 3.5 has some flag changes compared to 3.4
1. The -mfpu=neon-vfpv4 is not valid anymore. Please use only -mfpu=neon and choose an -mcpu option that support vfpv4 (such as -mcpu=krait2)
2. The -mllvm -arm-enable-ehabi flag is not needed anymore and has been removed since EHABI is not enabled by default for ARM whenever C++ code is compiled.
3. The -MD option is a valid option writes out a depfile with user and system headers. Can you kindly show the entire command line to see if any other old option is causing issues?
Thanks
--Raja
Thank you very much Raja. I appreciate it very much. I will adjust those, and I am sure that I may come accross a couple more as I go along. One warning which was being displayed and listed last, along with all of the flag errors, is:
clang-3.5: warning: Vectorization flags ignored because armv7/armv8 and neon not set
How do I set that?
Last for now, 2 others were:
clang-3.5: unknown argument: -fuse-linker-plugin
clang-3.5: unknown argument: -flto-compression-level=5
...which never gave a problem before when using -flto
Starting build now, so I will let you know which repo is sending the error, and the cmdline from it... regarding -MD
I really appreciate your help!
1. You are getting the warning about vectorization flags being ignored because you either do not have -mfpu=neon or do not have a mcpu option that specifies an ARMv7 CPU such as krait2 or cortex-a9 (or do not have -march=armv7-a). If you do not specify a valid ARMv7 CPU or march=armv7-a, the default is armv4 which does not support Neon capabilities required or Auto-vectorization
2. I checked the Snapdragon LLVM ARM 3.4 release and it doesn't understand -fuse-linker-plugin or -flto-compression-level options either. These options were present in Snapdragon LLVM 3.3 (as well as llvm.org 3.3 release) which is very old. These options are not needed anymore. By default, LTO will use the gold plugin at the link step.
Hope this helps