yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] Xileforce:
Ok so every time I try to compile with the 5.0 Test I get

arch/arm/mm/mmu.c: In function 'paging_init':

arch/arm/mm/mmu.c:1752:13: internal compiler error: in get_upper_bound, at graphite-isl-ast-to-gimple.c:529

void __init paging_init(struct machine_desc *mdesc)

^

CC arch/arm/mach-msm/dma.o

AS arch/arm/kernel/relocate_kernel.o

CC arch/arm/hotplug/intelli_plug.o

0xe6365f get_upper_bound

../.././../gcc/gcc-SaberMod/gcc/graphite-isl-ast-to-gimple.c:529

0xe6365f graphite_create_new_loop_guard

../.././../gcc/gcc-SaberMod/gcc/graphite-isl-ast-to-gimple.c:560

0xe6365f translate_isl_ast_node_for

../.././../gcc/gcc-SaberMod/gcc/graphite-isl-ast-to-gimple.c:596

0xe6365f translate_isl_ast

../.././../gcc/gcc-SaberMod/gcc/graphite-isl-ast-to-gimple.c:742

0xe63db9 graphite_regenerate_ast_isl(scop*)

../.././../gcc/gcc-SaberMod/gcc/graphite-isl-ast-to-gimple.c:1074

0xe618f6 graphite_transform_loops()

../.././../gcc/gcc-SaberMod/gcc/graphite.c:310

0xe61f30 graphite_transforms

../.././../gcc/gcc-SaberMod/gcc/graphite.c:338

0xe61f30 execute

../.././../gcc/gcc-SaberMod/gcc/graphite.c:419

But as far as I can tell Ive disabled all graphite flags. I event went into the make file for that specific file and negated all graphite flags :/
[Android Software/Hacking General [Developers Only]] sparksco:
Well you could either remove -pthread or graphite. Seems you still have both.
[Android Software/Hacking General [Developers Only]] Xileforce:
how would I remove graphite? I thought It was just with the graphite flags?
[Android Software/Hacking General [Developers Only]] sparksco:
You wouldn't have graphite errors unless you have graphite flags. So yes you have graphite flags somewhere.
[Android Software/Hacking General [Developers Only]] Xileforce:
Yea that's my issue :/ I can't hunt down the last of them. But I would think that specifying -fno-graphite ,etc for the MMU make file would at least make that file work. But even telling that specific MMU.o to compile without graphite doesn't work :/ socim not sure what's going on.
[Android Software/Hacking General [Developers Only]] sparksco:
Welcome [emoji106]
[Android Software/Hacking General [Developers Only]] sparksco:
Hope this thread can be of some help to you [emoji2]
[Android Software/Hacking General [Developers Only]] sparksco:
Well if you use ccache that can really mess things up when it comes to flags. Did you reboot? Other than that IDK. It's your kernel source or someone else's? If it's your kernel source, you should know where the flags are.
[Android Software/Hacking General [Developers Only]] Xileforce:
Its mine. I've removed the flags. I even searched through my git for graphite flags and couldn't find any more but the ones I removed....that's when I tried putting all the negative versions of the flags for graphite in my make files to ensure they didn't get added. Idk...I must be missing something.
[Android Software/Hacking General [Developers Only]] sparksco:
Yes but you avoided the other questions :)
[Android Software/Hacking General [Developers Only]] Xileforce:
Woops no ccache and yes I've rebooted several times :)
[Android Software/Hacking General [Developers Only]] Synergy510:
Trying out the arm-eabi-5.0 test branch with a kernel to test. My tests aren't that scientific, but benchmarking two kernels created on the master branch with pthread and graphite and the test branch with only pthread, I can see that the pthreaded kernel pulls ahead a little bit.

My setup:

Pthread implemented as such: https://github.com/xsynergy510x/android_build/commit/c7771a54e216156ad6c89d9afb3384a6c7a31445

Both kernel builds include this pthread, but only the test branch is affected since pthread is only available for that one.

Put a comment right after the declaration of graphite flags so it would be an empty variable: https://github.com/xsynergy510x/android_kernel_samsung_jf/blob/cm-12.0/Makefile#L246

I just took some Geekbench 3 results and looked at the average. The results for a pthread kernel are generally higher (sorry no screenshots) on the multicore score. I wasn't paying too much attention to the single core score, but it seemed a bit higher too.

I'm not sure what to look for when testing or reporting on the test branch, but here's something.
[Android Software/Hacking General [Developers Only]] sparksco:
Thank you. Yes when I use the pthread globally for the ROM it also tends to score higher on single core thread test.
[Android Software/Hacking General [Developers Only]] WhiteNeo:
At gitlab you mention that kernel source has to be modified to get GCC 5.0 to work...

Does anything else have to be done to make it build, exept removing graphite flags? :)

Really curious on the performance boost btw. ;)
[Android Software/Hacking General [Developers Only]] sparksco:
Well I expressed my opinion about arm-eabi-5.0 already. The lge kernel source is on gitlab. All the patches added after March 20th is what I'm using with the toolchain. Maybe someone else that's tried it can tune in on their opinion of performance...
[Android Software/Hacking General [Developers Only]] Xileforce:
Likely it depends on the kernel. I don't think nexus 6 requires any changes because there's a guy compiling GCC 5.0 without any other commits. So who knows for other devices.
[Android Software/Hacking General [Developers Only]] marcomarinho:
I use 5.1 for kernel and have no problems

Enviado do meu Nexus 5 através de Tapatalk
[Android Software/Hacking General [Developers Only]] deepongi:
yeah, you use an AOSP device... thats more than normal.

fact, same device than sabermod dev.

regards.

ps: i am talking of booting sony msm8974 kernel with anything higher than gcc 4.9 ...
[Android Software/Hacking General [Developers Only]] marcomarinho:
That's true too xD the ROM isn't the same but the kernel is

This might help you

https://github.com/SaberMod/android_kernel_lge_hammerhead/commits/sm-lp1?author=pbeeler

Enviado do meu Nexus 5 através de Tapatalk
[Android Software/Hacking General [Developers Only]] deepongi:
really? how couldn't i have think of checking sabermod github and gitlab for the fix before ... ;)

ps:

the issue isnt in compiling the kernel, that i can patch it up... the issue is that the device boots, but after a short while i get stuck on CM bootlogo.

if you can tell me where on those 314220 commits, which one will make my device boot, ill buy you a beer (if you're old enough) :D
[Android Software/Hacking General [Developers Only]] sparksco:
Some kernels can't boot past gcc 4.9. Well at least mako (nexus 4) can't. I tried everything and it won't boot unless I use 4.9
[Android Software/Hacking General [Developers Only]] JustArchi:
That's funny because I'm compiling my ****ty exynos 4 kernel and it works totally fine with 5.1.
[Android Software/Hacking General [Developers Only]] deepongi:
nice! then you can compile a boot.img for my sony xperia z2 msm8974 kernel, and i can boot it up then?

cause i haven't seen any ROM with sony msm8974 kernel compiled with anything higher that 4.9, booting up.

regards.
[Android Software/Hacking General [Developers Only]] sparksco:
I believe you only need the kernel image. Ramdisk and other things in boot.img don't get compiled with kernel toolchains...
[Android Software/Hacking General [Developers Only]] deepongi:
fine... [MENTION=5161352]JustArchi[/MENTION] compile me a CM12.1 sony msm8974 sabermod 5.1 zImage, so i can try it on my Z2 .. better? :laugh:
[Android Software/Hacking General [Developers Only]] JustArchi:
Why you won't compile it yourself?

I don't compile for devices I don't own.
[Android Software/Hacking General [Developers Only]] deepongi:
i did, i am and i will.

but only with 4.9, 'cause it wont boot with anything higher.

you said on your previous post you made a crappy exynos 4 boot with 5.1, so was wondering if you could the same with a sony msm8974.
[Android Software/Hacking General [Developers Only]] JustArchi:
Add if needed -> https://github.com/ArchiDroid/ArchiKernel/commit/4b422cf44f33718ec62bdec64ebce94f8425dbba

And try to use my AT -> https://github.com/ArchiDroid/Toolchain/tree/architoolchain-5.1-arm-linux-gnueabihf
[Android Software/Hacking General [Developers Only]] deepongi:
nah.. wont work.

i've tried that: https://github.com/infected-lp/andr...mmit/a9a153e6494e282d3525c8c187facf8302cec225

and that is only to allow the toolchain dont error out with version >= 5.0, 'cause of the missing file (compiler-gcc5.h)
[Android Software/Hacking General [Developers Only]] JustArchi:
I linked you my AT for a reason.
[Android Software/Hacking General [Developers Only]] deepongi:
ok, ill try it and report.

edit: what? wait. let me guess, AT = ArchiToolchain?!

nah.. been loyal to SM for years now, and thats the one i wanted to boot.
[Android Software/Hacking General [Developers Only]] JustArchi:
ICE with new 07-16 prebuilt 4.9 for arm.

Trying older one now to confirm regression.
[Android Software/Hacking General [Developers Only]] sparksco:
Yeah that's why we decided to keep all the gcc branches for regressions. And also for GPL. 5.1 and 5.2 are both still available. And the options to choose what gcc to use in the build scripts. Also I ran a poll on G+ and it was the votes on that, that made it possible. Really strange I guess the Google gcc has some issues with lollipop hopefully Google will have fixed by Android M on the ROM side.

FYI Android M does use gcc 4.9 for the rom.
[Android Software/Hacking General [Developers Only]] JustArchi:
Regression confirmed, previous 4.9 toolchain doesn't cause any issues.
[Android Software/Hacking General [Developers Only]] JustArchi:
Also, even if Google fixed a bug in the code, still compiler shouldn't throw ICE in any case, regardless of how bad the code is.

Perhaps it's wise to reproduce it and notify somebody from GCC or Google.
[Android Software/Hacking General [Developers Only]] sparksco:
I don't have any ROM building errors, just some bugs in the rom builds. Sorry for the confusion but that's what I meant by regressions. Most likely these bugs are fixed in Android M. Maybe it's a problem with your frameworks/av.
[Android Software/Hacking General [Developers Only]] JustArchi:
No, I have CM's frameworks/av, but I'm building whole ROM with my O3 optimizations, which is not the case with 99.9% ROMs here with Os for target thumb.

Also as I said, ICE is compiler error, not code error. It should be fixed in compiler sources, not code sources.
[Android Software/Hacking General [Developers Only]] sparksco:
Seems like a issue with cm av. I use aosp av and it builds fine. Maybe report to cm?

Also I compile roms that don't use thumb hardly at all and has -O3
[Android Software/Hacking General [Developers Only]] sparksco:
You guys know that cm and Google are at war right? Google will do everything they can to downsize cyanogen Inc. Breaking cm code and making features obsolete. Think about it...
[Android Software/Hacking General [Developers Only]] JustArchi:
Like introducing intentional ICEs in newer compilers?

Please, sparksco...

ICEs should be fixed in gcc tree, not in CM tree. If GCC 4.9.X from Y date can compile given code, and GCC 4.9.X from Z date can't, then it's called GCC regression, not bad code.

But, well, it's your toolchain, you decide if you want to fix it or not, I just accept the fact :p.
[Android Software/Hacking General [Developers Only]] sparksco:
Does the same thing happen when you use the gcc aosp 4.9 compiler?

The newer gcc hybrid is just Google based instead of Android. But Android gcc uses Google gcc as a base anyways. It's litterally the same as theirs but with Android patches so we don't have to wait for them to merge Google gcc updates.
[Android Software/Hacking General [Developers Only]] JustArchi:
Will test tomorrow and let you know :).
[Android Software/Hacking General [Developers Only]] SOHKis:
I get the same error when compiling slimlp w/the prebuilt 07142015 4.9 androideabi toolchain.

frameworks/av/services/audioflinger/AudioMixer.cpp: In static member function 'static void android::AudioMixer::track__NoResample(android::AudioMixer::track_t*, TO*, size_t, TO*, TA*) [with int MIXTYPE = 0; TO = int; TI = short int; TA = int; size_t = unsigned int]':
frameworks/av/services/audioflinger/AudioMixer.cpp:2133:6: internal compiler error: in vect_get_vec_def_for_operand, at tree-vect-stmts.c:1451
void AudioMixer::track__NoResample(track_t* t, TO* out, size_t frameCount,
^
0x9ad709 vect_get_vec_def_for_operand(tree_node*, gimple_statement_base*, tree_node**)
../.././../gcc/gcc-SaberMod/gcc/tree-vect-stmts.c:1451
0x9b5637 vectorizable_conversion
../.././../gcc/gcc-SaberMod/gcc/tree-vect-stmts.c:3834
0x9bdfe4 vect_transform_stmt(gimple_statement_base*, gimple_stmt_iterator*, bool*, _slp_tree*, _slp_instance*)
../.././../gcc/gcc-SaberMod/gcc/tree-vect-stmts.c:7184
0x9c2d48 vect_transform_loop(_loop_vec_info*)
../.././../gcc/gcc-SaberMod/gcc/tree-vect-loop.c:6080
0x9db4c6 vectorize_loops()
../.././../gcc/gcc-SaberMod/gcc/tree-vectorizer.c:476
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <mailto:sabermod.team@gmail.com> for instructions.
make: *** [/home/sohkis/android/slimlp/out/target/product/shamu/obj/SHARED_LIBRARIES/libaudioflinger_intermediates/AudioMixer.o] Error 1
make: *** Waiting for unfinished jobs....

All is well w/the previous androideabi build from 07042015
[Android Software/Hacking General [Developers Only]] balint933:
Hi!

I had the same problem and this helped me.
[Android Software/Hacking General [Developers Only]] JustArchi:
That's not a fix. That's a dirty workaround for O3 regression.
[Android Software/Hacking General [Developers Only]] balint933:
Do you have a fix then? Can you share us please?
[Android Software/Hacking General [Developers Only]] JustArchi:
No, ask [MENTION=2394329]sparksco[/MENTION] for that. It's GCC regression, not code regression.

Internal compiler errors should ALWAYS be fixed in GCC sources, not code sources. It's a bug in compiler, not the code.
[Android Software/Hacking General [Developers Only]] sparksco:
Did you get around to testing it? Just curious why I don't have the error and I also use -O3 globally.
[Android Software/Hacking General [Developers Only]] sparksco:
Ubuntu Vivid won't work. You'll need Ubuntu trusty or Utopic or fedora 22.
[Android Software/Hacking General [Developers Only]] balint933:
Thanks for your fast response!
[Android Software/Hacking General [Developers Only]] JustArchi:
Yep.

Latest arm-linux-androideabi 4.9 from 5 days ago from master branch at AOSP source.

Same regression.

I wouldn't be surprised if you didn't apply O3 globally to target thumb, I've seen too many "developers" claiming that they have O3 optis without even changing Os from target thumb or looking inside process tree during compilation to see if O3 is passed to submodules. That's one of the reasons why I invented my own "ArchiDroid Optimizations", to show everybody how it should be done.
[Android Software/Hacking General [Developers Only]] JustArchi:
Also, while we're at it. My users claim that they have weird audio speedups/slowdowns while using bluetooth with GCC 4.9 and O3. Do you have any fix for that perhaps?
[Android Software/Hacking General [Developers Only]] sparksco:
I wouldn't have a clue what causes it in gcc. Google uses weird commits on svn like " merge r12345". Hopefully they'll get it sorted out.

You can add a option what flags get set for both arm and thumb modes. In arm mode thumb flags like -Os don't get used. That's why I changed the default global thumb mode to arm mode .

For bluetooth I don't optimize it maybe that's why.
[Android Software/Hacking General [Developers Only]] jolinnard:
Hi! I'm trying to build SM 5.2 for aarch64, in an Arch Linux x86_64, but something happens with automatic scripts. I'll try to explain:

I'm executing ~/sm-tc/smbuild/aarch64 to start the build. At first, I had to add aclocal, libtoolize, autoheader, autoconf, and automake before ISL, MPFR and GMP libraries, if not build fails. But at the end, when script start to build sabermod toolchain, it seems that Makefile start to compile those libraries again! But I can't find where exactly does this...

Somebody knows what I'm talking about? Can I do something easier to build 5.2 toolchain?

Thank you
[Android Software/Hacking General [Developers Only]] sparksco:
Everything is already configured on different branches for different Linux distro's, so you shouldn't need to change anything.
[Android Software/Hacking General [Developers Only]] sparksco:
Huh not sure. Last time I used Ubuntu was Vivid. The current toolchains are build on trusty though. After I started having these same errors I switched to fedora 22 and all is working fine now. I know for a fact trusty works but not sure why newer distro's won't.
[Android Software/Hacking General [Developers Only]] sparksco:
Also use pastebin.com for errors please. I think I've requested this a lot and it shouldn't be hard to do.
[Android Software/Hacking General [Developers Only]] balint933:
Thanks, I will zry fedora then
[Android Software/Hacking General [Developers Only]] deepongi:
theres a permanent way to stop openjdk to update to 1.8 on fedora 22:

sudo nano /etc/yum.conf

exclude=*openjdk* *java*

sudo nano /etc/dnf/dnf.conf

exclude=*openjdk* *java*

this way we dont need to add the extra commands when doing yum update and dnf update.
[Android Software/Hacking General [Developers Only]] balint933:
Same error on fedora22 :( http://pastebin.com/FYd5XhwE
[Android Software/Hacking General [Developers Only]] sparksco:
No such error here...
[Android Software/Hacking General [Developers Only]] sparksco:
Are you using the prebuilt toolchains from linux-dev on sabermod.com ?

Those are the ones you need to use on fedora for the rom. The kernel ones won't matter which ones you use.
[Android Software/Hacking General [Developers Only]] balint933:
I1m using prebuilt from JustArchi's git, there is only 4.9 prebuilt in linux-dev folder

Edit: maybe I fixed the problem by installing some more package and modifying jstring.h, building 60 minutes ago, that's something :D
[Android Software/Hacking General [Developers Only]] deepongi:
"normal" sabermod 4.9 also works on fedora 22 ..

ive just compiled this morning a build, fetching from my github the gnu (not google) based toolchain, from 20150716

regards.
[Android Software/Hacking General [Developers Only]] sparksco:
Sorry but I don't use JustArchi optimizations. I use vendor/sm as the instructions state for using the toolchains... Read the OP. Yes 4.9 is default with sabermod optimizations and it works fine. You'll also need libcore patch for gcc 4.9 and some otlher forked repos . just scroll through the list of repos on gitlab there's not that many. Can you try installing libstdc++-devel?
[Android Software/Hacking General [Developers Only]] balint933:
libstdc++-devel is already installed, btw now im getting "cannot use typeid with -fno-rtti" errors, I will send detailed error if I get it again

http://pastebin.com/whc6DvwM
[Android Software/Hacking General [Developers Only]] sparksco:
But it works fine for me and others using fedora 22. Shrugs.
[Android Software/Hacking General [Developers Only]] MisterMeJ:
[MENTION=4630246]Hashbang173[/MENTION]

Trying to compile for the M8 with your SMAICP repo, but keep getting errors.

Installed the host libraries for Sabermod, already placed usr in the home folder.

Building with Ubuntu-15.04-vivid

/home/mistermej/smaicp/kernel/htc/msm8974/Makefile:952: recipe for target 'drivers' failed

make[2]: *** [drivers] Error 2

Makefile:130: recipe for target 'sub-make' failed

make[1]: *** [sub-make] Error 2

make[1]: Leaving directory '/home/mistermej/smaicp/kernel/htc/msm8974'

build/core/tasks/kernel.mk:245: recipe for target 'TARGET_KERNEL_BINARIES' failed

make: *** [TARGET_KERNEL_BINARIES] Error 2

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

This is how my sm_products.mk looks like: http://pastebin.com/qdrBrnBn

This is how my sm_m8.mk looks like: http://pastebin.com/nguTmi05

This is how my sm_devices.mk looks like: http://pastebin.com/r3AjV3iT

Any suggestions?
[Android Software/Hacking General [Developers Only]] Hashbang173:
Looks kernel related, I can't see the exact error from that short log , but try disabling strict aliasing in sm_m8.mk
[Android Software/Hacking General [Developers Only]] sparksco:
Quick update

I updated the toolchain sources but can not update prebuilts as I'm still on vacation.

Changes

Gcc 4.8/4.9

Cloog has been updated to use isl-0.15 instead of isl-0.14

And also to Cloog 0.18.4 from 0.18.3

I backported some of my graphite fixes in gcc to compile with isl-0.15

Enjoy!
[Android Software/Hacking General [Developers Only]] giveme13s:
Care to share what modifications you did to jstring.h and what additional packages you installed? Thanks in advance
[Android Software/Hacking General [Developers Only]] MisterMeJ:
[MENTION=4630246]Hashbang173[/MENTION]

still failing, here's the complete build log.

http://pasted.co/535b5ff2

Thank you
[Android Software/Hacking General [Developers Only]] deepongi:
[MENTION=2394329]sparksco[/MENTION], arm-eabi 4.8 is giving an error on the build script.

http://pastebin.com/94Rum8ud

edit: arm-linux-androideabi 4.9 is also giving an error- http://pastebin.com/LjtmCBN1
[Android Software/Hacking General [Developers Only]] sparksco:
You need a modified kernel. Check kernel sources on github.com/SaberMod
[Android Software/Hacking General [Developers Only]] sparksco:
Opps yup there's a a extra ";" on arm-eabi-4.8

Easy fix just delete one...

For 4.9 it builds ok for me. Have you repo synced again just in case?
[Android Software/Hacking General [Developers Only]] Hashbang173:
Also try changing TARGET_SM_KERNEL to 4.8 in sm_m8.mk
[Android Software/Hacking General [Developers Only]] deepongi:
which libstdc++ dev do we need?

http://pastebin.com/vJy6F3s3
[Android Software/Hacking General [Developers Only]] sparksco:
sudo dnf install libstdc++-devel

Last metadata expiration check performed 0:18:45 ago on Tue Jul 28 18:26:44 2015.

Package libstdc++-devel-5.1.1-4.fc22.x86_64 is already installed, skipping.

Dependencies resolved.

Nothing to do.

Complete!

Whatever gcc you have installed... I don't know I USE FEDORA
[Android Software/Hacking General [Developers Only]] deepongi:
so that package is only needed for fedora? i am on ubuntu 14.04.2 base again... nevermind, i have that package installed already.

but still build errors, arm-eabi 4.9 (gnu) = http://pastebin.com/Ke2MAJUx | log - arm-linux-gnueabi-4-9.log
[Android Software/Hacking General [Developers Only]] sparksco:
That's a very limited partial log, and doesn't include anything in the configuration setup for cloog... Anyways fedora 22 working fine here.
[Android Software/Hacking General [Developers Only]] :
One post deleted.

Please don't harass developers or demand anything. They don't owe you anything, and they don't work for you. If you're having issues, great... Post respectfully about it. But don't harass them because you don't like their answer.

And when they tell you what probably will work, accept it. Or don't use their work and move on to something else.

Good?

Thanks,

Darth

Forum Moderator
[Android Software/Hacking General [Developers Only]] sparksco:
Thanks for the longer log. I think this libcloog-isl.so error is because of old isl installed in system from Ubuntu. Did you install the latest prebuilt libs that has libisl.so.15.0.0, and also latest libcloog-isl.so?
[Android Software/Hacking General [Developers Only]] deepongi:
i am still on sabermod-prebuilts-07042015.
[Android Software/Hacking General [Developers Only]] sparksco:
Yes but for toolchain building installing cloog and isl prebuilts is still required. Prebuilts in .bashrc is mostly for rom and kernel development for people that don't use sabermod vendor/optimizations.

Not sure why gcc requires a system install but it does. I've always had prebuilts installed to system so I guess I never noticed...