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

8 posts / 0 new
Last post
Getting build error from msm-3.5 which I didn't from 3.4
sudosurootdev
Profile picture
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
  • Up0
  • Down0
sudosurootdev
Profile picture
Join Date: 22 Mar 14
Location: Florida
Posts: 6
Posted: Fri, 2014-08-22 23:30

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): 

  -mfpu=neon|neon-vfpv4|vfp2|vfp3|vfp4
                 Set target features based on FPU co-processor selection
 
Also:
 
clang (LLVM option parsing): Unknown command line argument '-arm-enable-ehabi'.  Try: 'clang (LLVM option parsing) -help'
clang (LLVM option parsing): Did you mean '-enable-tbaa'?
clang (LLVM option parsing): Unknown command line argument '-arm-enable-ehabi'.  Try: 'clang (LLVM option parsing)clang (LLVM option parsing): Unknown command line argument '-arm-enable-ehabi'.  Try: 'clang (LLVM option parsing) -help'
clang (LLVM option parsing): Did you mean '-enable-tbaa'?
 -help'
clang (LLVM option parsing): Did you mean '-enable-tbaa'?
 
which I don't know if I just remove it or have to replace it in my build config.
  • Up0
  • Down0
sudosurootdev
Profile picture
Join Date: 22 Mar 14
Location: Florida
Posts: 6
Posted: Fri, 2014-08-22 23:38

-arm-enable-ehabi

was under CLANG_CONFIG_EXTRA_ASFLAGS would this be a replacement?

-fcxx-exceptions

  • Up0
  • Down0
sudosurootdev
Profile picture
Join Date: 22 Mar 14
Location: Florida
Posts: 6
Posted: Sat, 2014-08-23 00:04

I removed that flag now I'm getting: 

clang (LLVM option parsing): Unknown command line argument '-MD'.  Try: 'clang (LLVM option parsing) -help'

  • Up0
  • Down0
Raja Moderator
Join Date: 17 Apr 13
Posts: 42
Posted: Sat, 2014-08-23 07:46

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

  • Up0
  • Down0
sudosurootdev
Profile picture
Join Date: 22 Mar 14
Location: Florida
Posts: 6
Posted: Sat, 2014-08-23 09:07

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

  • Up0
  • Down0
sudosurootdev
Profile picture
Join Date: 22 Mar 14
Location: Florida
Posts: 6
Posted: Sat, 2014-08-23 09:28

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!

  • Up0
  • Down0
Raja Moderator
Join Date: 17 Apr 13
Posts: 42
Posted: Sat, 2014-08-23 15:09

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

 

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.