yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] PunkUnity:
Need help understanding some stuff. Just trying to use DTC-3.8 with CMRemix for the HTC M8. I can build Validus with it, and it boots and runs nice. But I can't seem to get CMRemix built.

https://zerobin.net/?a9c6adf3d63b5c33#U553wOF4h+CfiXiz3IbAEgWZF+Wg42Y6JV5XFQbMPDI=

and a copy of my DragonTC.mk file with the poly stuff on remove list (i think lol)

https://zerobin.net/?4d429eacd7a78f6b#P88E3QOAzTULtWy7hmLNopdDxWkAhcJGhuCCDhwM2J0=

---------- Post added at 04:07 PM ---------- Previous post was at 04:07 PM ----------

TIA
[Android Software/Hacking General [Developers Only]] Coldwindofnowhere:
Am i the only getting

prebuilts/clang/linux-x86/host/3.9/bin/clang++: /lib/x86_64-linux-gnu/libtinfo.so.5: no version information available (required by prebuilts/clang/linux-x86/host/3.9/bin/clang++)

while building ?

Seems to happend with the newest prebuilts, since i wasn't getting this warning using the old one.

Edit: it's only happening using clang 3.9, perhaps because lib/clang/3.8 is used in the 3.9 toolchain ?
[Android Software/Hacking General [Developers Only]] brandonabandon:
sudo ln -s /lib/libtinfo.so /lib/libtinfo.so.5
[Android Software/Hacking General [Developers Only]] PunkUnity:
anyone have any ideas? Or any ideas on....

out/target/common/obj/JAVA_LIBRARIES/ambientsdk_intermediates/aar/classes.jar', needed by `/home/punkunity/android/remix/out/target/common/obj/APPS/messaging_intermediates/AndroidManifest.xml'. Stop.
[Android Software/Hacking General [Developers Only]] frap129:
I've actually noticed an improvement. I went from 50 minutes to 40-45 minutes from clean.
[Android Software/Hacking General [Developers Only]] frap129:
I'll see if I can fix that. I do not recommend using 3.9, but I'll make sure version is set correctly for those who want to
[Android Software/Hacking General [Developers Only]] Manav Bhagia:
I'm constantly getting this error when trying to compile with dtc 3.9 :

clang: error: unable to execute command: Segmentation fault (core dumped)

clang: error: clang frontend command failed due to signal (use -v to see invocation)

clang version 3.9.0

Target: arm--linux-android

Thread model: posix

InstalledDir: prebuilts/clang/linux-x86/host/3.9/bin

clang: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.

clang: note: diagnostic msg:

********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:

Preprocessed source(s) and associated run script(s) are located at:

clang: note: diagnostic msg: /tmp/qsort-d4fdd0.c

clang: note: diagnostic msg: /tmp/qsort-d4fdd0.sh

clang: note: diagnostic msg:

********************

target thumb C: libc_freebsd <= bionic/libc/upstream-freebsd/lib/libc/string/wcslen.c

build/core/binary.mk:821: recipe for target '/home/manavbhagia/AICP-MM/out/target/product/bacon/obj/STATIC_LIBRARIES/libc_freebsd_intermediates/upstream-freebsd/lib/libc/stdlib/qsort.o' failed

make: *** [/home/manavbhagia/AICP-MM/out/target/product/bacon/obj/STATIC_LIBRARIES/libc_freebsd_intermediates/upstream-freebsd/lib/libc/stdlib/qsort.o] Error 254

make: *** Waiting for unfinished jobs....

make: *** wait: No child processes. Stop.

#### make failed to build some targets 04m:41s
[Android Software/Hacking General [Developers Only]] Adromir:
Mmmh okay, I tried it with every clang version from 3.6 - 3.8 and with all my build times got that high. When I got back using stock clang again, build time was back to normal
[Android Software/Hacking General [Developers Only]] sub77:
try to add libc to 'disable dtc'
[Android Software/Hacking General [Developers Only]] Manav Bhagia:
And where would that be ?

---------- Post added at 05:38 PM ---------- Previous post was at 05:34 PM ----------
[Android Software/Hacking General [Developers Only]] sub77:
build/core/dragontc.mk, probably your most used config for the next time;)
[Android Software/Hacking General [Developers Only]] Manav Bhagia:
Did that too , still same error.
[Android Software/Hacking General [Developers Only]] sub77:
than try disable polly
[Android Software/Hacking General [Developers Only]] Adromir:
Sometimes you need to make clean and recompile again. I noticed with some modules that they compile fine, but later an error occurs with them, so I had to start compiling all over again
[Android Software/Hacking General [Developers Only]] sub77:
check boardconfig.mk for use_clang_platform_build and comment out if true.

dragontc.mk -> DISABLE_POLLY_arm := libc_freebsd
[Android Software/Hacking General [Developers Only]] frap129:
Thank you for pointing that out, not all modules have been tested
[Android Software/Hacking General [Developers Only]] mobiusm:
I'm bumping this since I'm still interested.
[Android Software/Hacking General [Developers Only]] frap129:
Sorry for the delay. I checked out the ResurrectionRemix source and I do not see any issue. Could you upload your build repo to github so i can check the cherry-pick?
[Android Software/Hacking General [Developers Only]] frap129:
Latest build test commit has been pushed! This will be the last test commit. dragontc.mk has been finalized and will recieve only marginal updates from here on out. ThinLTO and LTO have been added, but is disabled by default. export ENABLE_DTC_LTO=true before building to test it out.

https://github.com/dragon-tc/android_build/commit/c020e9a1abb543fc687ccd49bb1d1ab95acc75cf
[Android Software/Hacking General [Developers Only]] juginkrebs:
is the Clang Compatible with CyanogenMod Based roms (arm) ?
[Android Software/Hacking General [Developers Only]] frap129:
I don't see why not. Try it out
[Android Software/Hacking General [Developers Only]] sagarshah1729:
I have compiled CM13 for Lettuce and would like to compile a new build with this tool-chain..

So before giving build command I have to git clone Dragon TC and than give build command?

Sorry for being noob but I am new in compiling ROMs..I haven't found a proper guide till now to build a ROM with Toolchains like Uber TC..

Please..Help will be Appreciated..
[Android Software/Hacking General [Developers Only]] juginkrebs:
can you help me with this error
[Android Software/Hacking General [Developers Only]] sagarshah1729:
I tried compiling cm13 with this..I did everything as it is given in readme..

Getting this error..Can anyone help me out?
[Android Software/Hacking General [Developers Only]] juginkrebs:
there is 2 folder named rs
[Android Software/Hacking General [Developers Only]] juginkrebs:
the Clang is not Working with CyanogenMod 13 /based get a lot of errors !
[Android Software/Hacking General [Developers Only]] CertifiedBlyndGuy:
Could someone please instruct me on how I can utilise both Uber 5.3.1 and DragonTC? I'm quite a noon. I just need to use 5.3.1 in conjunction with 3.9 to compile a kernel.

Thanks!
[Android Software/Hacking General [Developers Only]] nicknitewolf:
Disable libRSCpuRef for polly i guess
[Android Software/Hacking General [Developers Only]] nicknitewolf:
target Unpacked: libblasV8 (/home/nick/android/cm-13.0/out/target/product/wt88047/obj/SHARED_LIBRARIES/libblasV8_intermediates/PACKED/libblasV8.so)
acp: file '/home/nick/android/cm-13.0/out/target/product/wt88047/obj/SHARED_LIBRARIES/libblasV8_intermediates/LINKED/libblasV8.so' does not exist
build/core/dynamic_binary.mk:79: recipe for target '/home/nick/android/cm-13.0/out/target/product/wt88047/obj/SHARED_LIBRARIES/libblasV8_intermediates/PACKED/libblasV8.so' failed
make: *** [/home/nick/android/cm-13.0/out/target/product/wt88047/obj/SHARED_LIBRARIES/libblasV8_intermediates/PACKED/libblasV8.so] Error 1
make: *** Waiting for unfinished jobs....

[MENTION=5051294]frap129[/MENTION] What do I do when I get this error? It is not related to polly.
[Android Software/Hacking General [Developers Only]] frap129:
Add libblasV8 to the DISABLE_DTC list if disabling polly didn't work
[Android Software/Hacking General [Developers Only]] nicknitewolf:
I just realized that me enabling LTO is why I keep getting random errors for building kernel. I will try disabling that.
[Android Software/Hacking General [Developers Only]] juginkrebs:
errors errors errors :/
[Android Software/Hacking General [Developers Only]] sub77:
disable clang platform build in your devicetree, it overrides dragontc.mk settings
[Android Software/Hacking General [Developers Only]] juginkrebs:
How?
[Android Software/Hacking General [Developers Only]] lownoise:
Just to share my experience with DragonTC

Just to share my experience with DragonTC....

[background]

For many months I'm compiling my own Rom for the Nexus 2017 (2013).

It's just some kind of hobby project and I'm not sharing every build on XDA.

The Rom is pure AOSP based with only some modifications like advanced reboot and center clock.

My build box is based on Debian.

OK back to DragonTC.

I started with syncing the repo and build the 3.7 opt version.

Cherry picked the patches for build, frameworks rs, and the prebuilts/ndk

modified the config.mk to point to 3.7 version of DragonTC

While building the first time with DragonTC it failed on libmediaplayerservice.

So putting libmediaplayerservice in the dragontc.mk under DISABLE_POLLY_arm solved this problem.

Second time building failed on libRSSupport so adding these also under DISABLE_POLLY_arm

Build failed again on libRSSupport! the trick and the lesson learned here is before trying to build again do a make clean first!!. After that the Build was Successfully

So with that information in mind I've build the 3.9 opt version of DragonTC

First build of AOSP failed on libF77blasV8 to solve this error I've extended the ifeq (1,$(words $(filter 3.8 3.9,$(LLVM_PREBUILTS_VERSION)))) with

DISABLE_POLLY_arm += \
libF77blasV8

Building again failed on v8_mksnapshot.arm putting this on the line DISABLE_DTC_arm := solved this error and the AOSP build successfully!

Basically it's just try and error add failed modules in dragontc.mk and before trying to build again do a make clean

Thanks for your hard work!
[Android Software/Hacking General [Developers Only]] fKm:
I get this error when I try to build AOSP from source with DragonTC:

make: *** No rule to make target 'prebuilts/ndk/current/platforms/android-8/arch-arm/usr/lib/libc.so', needed by 'out/target/product/hammerhead/obj/SHARED_LIBRARIES/libexpat_intermediates/LINKED/libexpat.so'. Stop.

Can anyone help me please?

Edit: *facepalm* ... just cloned the prebuilts/ndk folder from github and the it is building now. Lets wait and see if there are more errors ;)
[Android Software/Hacking General [Developers Only]] lownoise:
Is it Building correct Without DragonTC?
[Android Software/Hacking General [Developers Only]] fKm:
Yes, I've build several ROMs in the past without any problems
[Android Software/Hacking General [Developers Only]] lownoise:
Please try with asan_test disabled

Put it after DISABLE_DTC in the config (build/core/dragontc.mk)
[Android Software/Hacking General [Developers Only]] fKm:
That somehow worked, thank you.

Now I get this error:

In file included from external/libcxx/include/__config:23:
prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8//sysroot/usr/include/unistd.h:227:10: fatal error: 'stddef.h' file not found
#include <stddef.h>
^
target thumb C++: libLLVMARMCodeGen <= external/llvm/lib/Target/ARM/ARMOptimizeBarriersPass.cpp
target thumb C++: libLLVMARMCodeGen <= external/llvm/lib/Target/ARM/ARMRegisterInfo.cpp
target thumb C++: libLLVMARMCodeGen <= external/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp
target thumb C++: libLLVMARMCodeGen <= external/llvm/lib/Target/ARM/ARMSubtarget.cpp
target thumb C++: libLLVMARMCodeGen <= external/llvm/lib/Target/ARM/ARMTargetMachine.cpp
target thumb C++: libLLVMARMCodeGen <= external/llvm/lib/Target/ARM/ARMTargetObjectFile.cpp
target thumb C++: libLLVMARMCodeGen <= external/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
Launching background server java -Dfile.encoding=UTF-8 -Xms2560m -XX:+TieredCompilation -jar out/host/linux-x86/framework/jack-launcher.jar -cp out/host/linux-x86/framework/jack.jar com.android.jack.server.JackSimpleServer
target thumb C++: libLLVMARMCodeGen <= external/llvm/lib/Target/ARM/MLxExpansionPass.cpp
target thumb C++: libLLVMARMCodeGen <= external/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp
target thumb C++: libLLVMARMCodeGen <= external/llvm/lib/Target/ARM/Thumb1InstrInfo.cpp
target thumb C++: libLLVMARMCodeGen <= external/llvm/lib/Target/ARM/ThumbRegisterInfo.cpp
target thumb C++: libLLVMARMCodeGen <= external/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp
1 error generated.
target thumb C++: libLLVMARMCodeGen <= external/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp
build/core/binary.mk:711: recipe for target 'out/host/linux-x86/obj/EXECUTABLES/ld.mc_intermediates/Main.o' failed
make: *** [out/host/linux-x86/obj/EXECUTABLES/ld.mc_intermediates/Main.o] Error 1
make: *** Waiting for unfinished jobs....

It is somehow demotivating that there is always another error after I fixed the last one :(

Edit: Finally I managed to build AOSP successfully with 3.8. 3.9 is giving me error after error. Very strange.
[Android Software/Hacking General [Developers Only]] Pump Ac7i0n:
How did you fix this error?
[Android Software/Hacking General [Developers Only]] fKm:
I added all the modules with errors to DTC_DISABLE and/or POLLY_DISABLE.
[Android Software/Hacking General [Developers Only]] Manav Bhagia:
How to completely disable DTC ? I am trying to build CMRemiX , and DTC is causing many problems !
[Android Software/Hacking General [Developers Only]] juginkrebs:
CMRemix has Default the DragonTC
[Android Software/Hacking General [Developers Only]] fKm:
I've built Krexus ROM for my hammerhead with UBERTC 5.x and DragonTC 3.9 but every time I restore my apps with Titanium Backup they almost all force close. Does anyone know if DragonTC breaks Titanium Backup? It is driving me nuts...
[Android Software/Hacking General [Developers Only]] sagarshah1729:
Nop..TC doesn't have any relations with Titanium Backup..
[Android Software/Hacking General [Developers Only]] fKm:
Okay. Do you know if UBERTC does break anything related to this? I know this is not the UBERTC thread ;)
[Android Software/Hacking General [Developers Only]] frap129:
The OP has instructions on resolving errors.

CMRemix uses DTC by default. Either resolve the errors using the instructions in the OP, or revert the commits to build.

Try wiping cache and dalvik/art cache after restoring
[Android Software/Hacking General [Developers Only]] Adromir:
+frap129 I don't know if this maybe is the wrong topic to talk about and maybe I'll embarrassing myself by showing how little I still know Lol ????..

Well I think you were mentioning that you are working on your own compiling optimization (like archi's) if I remember correctly. Well I was messing around with them and with the ones of the Uber ones and something popped up my head.... Like with archi's opts it's an all or nothing thing, if you run into a module, that doesn't compile with graphite, you can just disable graphite globally. The Uber optimizations at least give you the opportunity to just disable it for single modules as you do it here with polly. And as I ran into different uncompileable modules with archi and uber, I was wondering, if it would work if you provide different sets of compiling flags for example graphite, so you can try to get a troublesome module compiled with, before you completly have to disable it. I am not sure if it is understandable what I mean and if that would make any sense...
[Android Software/Hacking General [Developers Only]] sub77:
try to pull benzos v8, linked in this thread.
[Android Software/Hacking General [Developers Only]] frap129:
I have thought about this, but it's just more work than necessary. If you would like to try this, I could help you set up a system where every flag has its own disable list, but there would be more work involved than its worth.

You could try using the compiler-rt and LatinIME repos from Krexus
[Android Software/Hacking General [Developers Only]] Adromir:
Well every single flag would really be too much and I feel like the benefit might be really little. But like making 2 sets where one is highly optimized and one that is slightly optimized but safe to compile with
[Android Software/Hacking General [Developers Only]] frap129:
I would recommend one list with all, and another list with only '-O3 -mllvm -polly". If you need help setting it up, I can help with that.
[Android Software/Hacking General [Developers Only]] Adromir:
Thanks, I will come up to you, I am still sorting out stuff for my rom, because any other optimisation is breaking phone service and I haven't figured out what to do about that
[Android Software/Hacking General [Developers Only]] frap129:
All versions have been updatedm only new features is that polly leverages GPU for polyhedral code generation.
[Android Software/Hacking General [Developers Only]] Adromir:
I just read that llvm 3.9 will have a new feature called Thin LTO, which should improve the speed of LTO a lot and should result in a better optimisation the same time. Are you planning on including that as well?
[Android Software/Hacking General [Developers Only]] rpdroky:
He already did http://xdaforums.com/showpost.php?p=66963274&postcount=101
[Android Software/Hacking General [Developers Only]] fKm:
So just typing export ENABLE_DTC_LTO=true before I start the build and LTO will be enabled?
[Android Software/Hacking General [Developers Only]] frap129:
Yes, or add it to your devices BoardConfig.mk file. Just a fair warning, LTO tends to cause errors like polly, so it may take some disabling to get it to build.
[Android Software/Hacking General [Developers Only]] frap129:
Actually, ThinLTO is supported in all versions of Clang. I added the option to use it to dragontc.mk, so export ENABLE_DTC_LTO=true to enable it. The way I have it set up, ThinLTO is used by default. If ThinLTO is disabled for a module, standard LTO is used instead.
[Android Software/Hacking General [Developers Only]] Adromir:
Can I also add that to my boardconfig or is it required to be set globally?
[Android Software/Hacking General [Developers Only]] frap129:
It should work fine in your boardconfig
[Android Software/Hacking General [Developers Only]] goldchang:
Great work on CLANG :)
[Android Software/Hacking General [Developers Only]] Lonelyskatter12:
So I keep getting this error,

http://hastebin.com/jusipovedu.rb

I've tried putting "liblog" in DISABLE_POLLY, DISABLE_DTC & tried using clang 3.7, 3.8, and 3.9 still got the same error

And ran a make clean && make clobber & emptied ccache dir

Any help please?
[Android Software/Hacking General [Developers Only]] fKm:
Seems like you are building with UBERTC 5.x right? This is not a fail by clang but the toolchain. Use these two commits: https://android-review.googlesource.com/#/c/148147/ and https://github.com/UBERMALLOW/frameworks_base/commit/07942f603fb673d44f37e5a87c2feba4d4db4947

You can delete liblog from the disabled list btw.
[Android Software/Hacking General [Developers Only]] Lonelyskatter12:
Yes, I am using uber 5.x and thank you so much, that got the build going :good: :D
[Android Software/Hacking General [Developers Only]] MusterMaxMueller:
Hi,

im on linux mint 17.3 Rosa.

i tried building rom with dragontc-3.9 without success. here is what i tried:

i installed ncurses6w manually cause there is no repo for it in linux mint:

./configure --prefix=/opt/ncurses --enable-widec --with-shared --without-normal --without-debug
make
make install
cp /opt/ncurses/* /usr/lib/x86_64-linux-gnu

had error in libstdc++6 so updated via:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

but then i get following error:

according to http://stackoverflow.com/questions/...in-file-libstdc-so-6-with-link-time-reference

"-D_GLIBCXX_USE_CXX11_ABI=0" could be a possible fix but didnt tried yet!

im just listing my experience for other users so they dont waste so much time.

dragontc-3.8 is compiling flawlessly!!!

congrats [MENTION=5051294]frap129[/MENTION] for his awesome work
[Android Software/Hacking General [Developers Only]] frap129:
This is actually an issue on my part. I was unable to compile DragonTC 3.9 on my Ubuntu 14.04 build box, so I compiled into Arch Linux, which uses the latest GLIBCXX. I'll work on fixing this for the next build
[Android Software/Hacking General [Developers Only]] MusterMaxMueller:
ahh thx for clarifying, if i understand correctly if you update your ubuntu to version 16.x and compile then it should fix the issues. but im not 100% sure
[Android Software/Hacking General [Developers Only]] frap129:
I'm using 14.04 for compatibility reasons. When compiling a toolchain (be it GCC or LLVM/CLANG), it uses your systems GLIBC. As you experienced, toolchains built on systems with newer GLIBC versions aren't compatible with older operating systems. Since 14.04 is the recommended version for building AOSP, I'm using it so that everyone can use DragonTC. I believe my issue is having to old of libncurses, so I may do what you did and update it.
[Android Software/Hacking General [Developers Only]] MusterMaxMueller:
makes sense :)
[Android Software/Hacking General [Developers Only]] joshndroid:
Hey just stumbled across this thread and am interested. wondering if you have come across this error. I had fixed a few things like asm/param.h and errno.h missing but i cant seem to get past this one.

the main issues seem to be this -

projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.i386.dir/build.make:326: recipe for target 'projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.i386.dir/sanitizer_platform_limits_linux.cc.o' failed
projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.i386.dir/build.make:254: recipe for target 'projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.i386.dir/sanitizer_linux.cc.o' failed
projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.i386.dir/build.make:350: recipe for target 'projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.i386.dir/sanitizer_platform_limits_posix.cc.o' failed
CMakeFiles/Makefile2:7386: recipe for target 'projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.i386.dir/all' failed

here is the fill log

http://pastebin.com/uxVG3asc

Edit - I'll add that I'm running ubuntu mate 16.04 LTS, I've installed all your recommended packages on top of my usual build environment packages
[Android Software/Hacking General [Developers Only]] fKm:
I tried to compile DTC with latest Linux Mint but it fails with this error:

llvm/tools/clang/lib/Basic/Targets.cpp: In function ‘clang::TargetInfo* AllocateTarget(const llvm::Triple&, const clang::TargetOptions&)’:
llvm/tools/clang/lib/Basic/Targets.cpp:8563:8: error: ‘renderscript32’ is not a member of ‘llvm::Triple’
case llvm::Triple::renderscript32:
^
llvm/tools/clang/lib/Basic/Targets.cpp:8565:8: error: ‘renderscript64’ is not a member of ‘llvm::Triple’
case llvm::Triple::renderscript64:
^
At global scope:
cc1plus: warning: unrecognized command line option ‘-Wno-macro-redefined’
tools/clang/lib/Basic/CMakeFiles/clangBasic.dir/build.make:524: recipe for target 'tools/clang/lib/Basic/CMakeFiles/clangBasic.dir/Targets.cpp.o' failed
make[2]: *** [tools/clang/lib/Basic/CMakeFiles/clangBasic.dir/Targets.cpp.o] Error 1
CMakeFiles/Makefile2:16727: recipe for target 'tools/clang/lib/Basic/CMakeFiles/clangBasic.dir/all' failed
make[1]: *** [tools/clang/lib/Basic/CMakeFiles/clangBasic.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

Does someone know a fix for this?