Constant error: cc1: all warnings being treated as errors - Android Q&A, Help & Troubleshooting

Hello,
I`m not so new compiling roms, now have to OnePlus One Arsenic Rom. I`m now beginning to compile for OnePlus 3 and took a week that I can not spend the same error. I tried to compile using Ubuntu 14.04 and now test with 16.04.
I use ubertc 5.3 toolchains + custom optimizations. Open JDK 7 & 8 with the same result. I have done multiple tests with build & vendor of CM without optimizations,
And not use more tests, I tried adding flags -Wno-error=strict-aliasing -fno-strict-overflow -fno-strict-aliasin -Wno-strict-aliasing with the same error.
This is my error
system/bt/osi/./src/socket.c: In function 'socket_listen':
system/bt/osi/./src/socket.c:108:32: error: dereferencing type-punned pointer might break strict-aliasing rules [-Werror=strict-aliasing]
if (bind(socket->fd, (struct sockaddr *)&addr, sizeof(addr)) == -1) {
^
cc1: all warnings being treated as errors
make: *** [/home/jc/cm13/out/target/product/oneplus3/obj_arm/STATIC_LIBRARIES/libosi_intermediates/./src/socket.o] Error 1
make: *** Se espera a que terminen otras tareas....
Click to expand...
Click to collapse
Could someone give me a hand when I'm doing wrong?
Thanks in advance
PD: Forgive my poor English, I'm not very good and use a translator to communicate better.

juancarlos5 said:
Hello,
I`m not so new compiling roms, now have to OnePlus One Arsenic Rom. I`m now beginning to compile for OnePlus 3 and took a week that I can not spend the same error. I tried to compile using Ubuntu 14.04 and now test with 16.04.
I use ubertc 5.3 toolchains + custom optimizations. Open JDK 7 & 8 with the same result. I have done multiple tests with build & vendor of CM without optimizations,
And not use more tests, I tried adding flags -Wno-error=strict-aliasing -fno-strict-overflow -fno-strict-aliasin -Wno-strict-aliasing with the same error.
This is my error
Could someone give me a hand when I'm doing wrong?
Thanks in advance
PD: Forgive my poor English, I'm not very good and use a translator to communicate better.
Click to expand...
Click to collapse
hi,here you can find answerhttps://forum.xda-developers.com/showthread.php?t=1777504&page=2

Related

Linaro Build Error

I'm trying to compile an CM AOSP build using the Linaro toolchain and I get a build error.
Code:
target thumb C++: libmedia <= frameworks/base/media/libmedia/MediaProfiles.cpp
frameworks/base/media/libmedia/MediaProfiles.cpp: In member function 'void android::MediaProfiles::checkAndAddRequiredProfilesIfNecessary()':
frameworks/base/media/libmedia/MediaProfiles.cpp:521:16: error: redeclaration of 'size_t n'
frameworks/base/media/libmedia/MediaProfiles.cpp:505:24: error: 'size_t n' previously declared here
frameworks/base/media/libmedia/MediaProfiles.cpp: In static member function 'static android::MediaProfiles* android::MediaProfiles::getInstance()':
frameworks/base/media/libmedia/MediaProfiles.cpp:642:5: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'android::MediaProfiles*' [-Wformat]
make: *** [out/target/product/maguro/obj/SHARED_LIBRARIES/libmedia_intermediates/MediaProfiles.o] Error 1
As you can see by the last line I am attempting to build for maguro (GSM Galaxy Nexus) and when using the standard toolchain without Linaro the product compiles perfectly. I get the same result when compiling for different devices and there have been no recent changes to libmedia in the repo and since I can build fine without Linaro I'm completely certain that it is related to that toolchain.
The exact toolchain package I am using is linaro-android/toolchain-4.7-2012.06/android-toolchain-eabi-linaro-4.7-2012
toolchain export command: export TARGET_TOOLS_PREFIX=prebuilt/linux-x86/toolchain/android-toolchain-eabi/bin/arm-linux-androideabi-
Since it is libmedia that fails to build is this an issue with hardware acceleration support? Also, if I comment out the libmedia from the build can I extract the binary file for it from another ROM, and would that ROM need to be Linaro based as well?
Thanks
While I am not sure how to fix it you are now seeing why some are not using it. Encluding the CM team. It breaks things at random
Sent from my Inspire 4G using Tapatalk 2
Did somebody run a bunch of tests that proved all this "different compiler is better" stuff anyways? Let me go try and find the link...
Sent from my SCH-R760 using Tapatalk 2
Found it, read through this for more info.
http://forum.xda-developers.com/showthread.php?t=1371044
Sent from my SCH-R760 using Tapatalk 2
Github.com/teamhorizon
Check out the frameworks patches for linaro and cherry pick them. Don't forget to remove the current patches.
Github.com/teamgummy
Cherry-pick the linaro patches from all the external repositories.
Sent from my Galaxy Nexus using Tapatalk 2
I wanted to try and install Kubuntu 12.04 because they said it had MTP installed out of the box but when I checked it in vm and tried to get the build environment ready this is what I got. Make version was still 3.81 but it had the linaro toolchain . Should I install it locally or stick with 10.04?
$gcc --version
gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
Some info I found about building AOSP with Linaro, in case that helps you
Look at this script (or run it, it will do the job):
http://snapshots.linaro.org/android...nexus-linaro/231/linaro_android_build_cmds.sh
Some more info:
https://android-build.linaro.org/builds/~linaro-android/galaxynexus-linaro/
http://www.linaro.org/linaro-blog/2011/09/15/building-a-linaro-android-build-from-source/

[Q] Building a kernel with linaro toolchain

Hello, i am trying to build a kernel using the linaro toolchain from here http://is.gd/Au5yrh . Kernel builds fine with gcc-4.4.3 from cyanogenmod but with linaro all the warnings are treated as errors like the one below.
Code:
arch/arm/mm/alignment.c: In function 'do_alignment':
arch/arm/mm/alignment.c:298:15: warning: 'offset.un' may be used uninitialized in this function [-Wuninitialized]
error, forbidden warning: alignment.c:298
make[1]: *** [arch/arm/mm/alignment.o] Error 1
I know one way to solve this is to actually edit the code and fix this warning but since this works and i might end up braking something i am looking maybe for an easier solution.
I have tried editing the Makefile CFLAGS removing -Werror but yet no luck.
The kernel tree is this if it helps https://github.com/ezeteze/kernel_huawei
Thanks in advance!
ezet said:
Hello, i am trying to build a kernel using the linaro toolchain from here http://is.gd/Au5yrh . Kernel builds fine with gcc-4.4.3 from cyanogenmod but with linaro all the warnings are treated as errors like the one below.
Code:
arch/arm/mm/alignment.c: In function 'do_alignment':
arch/arm/mm/alignment.c:298:15: warning: 'offset.un' may be used uninitialized in this function [-Wuninitialized]
error, forbidden warning: alignment.c:298
make[1]: *** [arch/arm/mm/alignment.o] Error 1
I know one way to solve this is to actually edit the code and fix this warning but since this works and i might end up braking something i am looking maybe for an easier solution.
I have tried editing the Makefile CFLAGS removing -Werror but yet no luck.
The kernel tree is this if it helps https://github.com/ezeteze/kernel_huawei
Thanks in advance!
Click to expand...
Click to collapse
edit and find "offset.un" and add = NULL; at the end
so code looks like this.. offset.un = NULL;
go ahead and try it..
OR
offset.un = 0;

[Sony] Xperia Open Devices Project

Sony Mobile is committed to supporting the open developer community, and one way to show this is by publishing parts of our code as well as selected tools developed by our internal developers.
For some of the Xperia™ devices, we provide Android™ Open Source Project (AOSP) device configurations on GitHub. This means that the software will be open for you as a developer to use and contribute to. This is a way for us to support the open Android community, and it is also a tool for us to facilitate and verify contributions to AOSP.
If you want to build AOSP for your unlocked Xperia device, you find all the resources you need in the sections below.
http://developer.sonymobile.com/knowledge-base/open-source/open-devices/
Unified 3.10 kernel sources
https://github.com/sonyxperiadev/kernel
Project git
https://github.com/sonyxperiadev/
Now you have the opportunity to win Sony devices every 2 months
http://developer.sonymobile.com/knowledge-base/open-source/open-devices/hero-open-source-developers/
Happy cooking
SGP712 comilation of 28.0.A.7.251 fails
@jerpelea
Code:
CC drivers/input/touchscreen/maxim_sti.o
drivers/input/touchscreen/maxim_sti.c: In function 'maxim_parse_dt':
drivers/input/touchscreen/maxim_sti.c:1133:7: error: 'struct maxim_sti_pdata' has no member named 'stylus_support'
pdata->stylus_support = (u16)val;
^
drivers/input/touchscreen/maxim_sti.c: In function 'nl_process_driver_msg':
drivers/input/touchscreen/maxim_sti.c:1602:13: error: 'struct maxim_sti_pdata' has no member named 'stylus_support'
if (pdata->stylus_support &&
^
drivers/input/touchscreen/maxim_sti.c:1632:13: error: 'struct maxim_sti_pdata' has no member named 'stylus_support'
if (pdata->stylus_support &&
^
scripts/Makefile.build:308: recipe for target 'drivers/input/touchscreen/maxim_sti.o' failed
make[3]: *** [drivers/input/touchscreen/maxim_sti.o] Error 1
scripts/Makefile.build:455: recipe for target 'drivers/input/touchscreen' failed
make[2]: *** [drivers/input/touchscreen] Error 2
scripts/Makefile.build:455: recipe for target 'drivers/input' failed
make[1]: *** [drivers/input] Error 2
Makefile:815: recipe for target 'drivers' failed
make: *** [drivers] Error 2
I will revert your stylus (really?) patches to version .31
Or please update a declaration struct maxim_sti_pdata at the proper location.
EDIT: I added
Code:
u32 stylus_support;
to 28.0.A.7.251/kernel/include/linux/maxim_sti.h
EDIT2:
I flashed the DE 28.0.A.7.251 - works.
I can not get the kernel compiled here to boot! .27 and .31 are fine with there ROMS and even last a few minutes with the rest of .251
It always (even with default configuration) bootloops.
I tried (via flashtool on linux and Windows 7) to decompress the ORIGINAL kernel.sin from the DE FTF and build a boot image via mkbootimg -> bootloop
EDIT3:
more info, AOSP also a desaster:
http://forum.xda-developers.com/showpost.php?p=62785131&postcount=58
DHGE said:
@jerpelea
Code:
CC drivers/input/touchscreen/maxim_sti.o
drivers/input/touchscreen/maxim_sti.c: In function 'maxim_parse_dt':
drivers/input/touchscreen/maxim_sti.c:1133:7: error: 'struct maxim_sti_pdata' has no member named 'stylus_support'
pdata->stylus_support = (u16)val;
^
drivers/input/touchscreen/maxim_sti.c: In function 'nl_process_driver_msg':
drivers/input/touchscreen/maxim_sti.c:1602:13: error: 'struct maxim_sti_pdata' has no member named 'stylus_support'
if (pdata->stylus_support &&
^
drivers/input/touchscreen/maxim_sti.c:1632:13: error: 'struct maxim_sti_pdata' has no member named 'stylus_support'
if (pdata->stylus_support &&
^
scripts/Makefile.build:308: recipe for target 'drivers/input/touchscreen/maxim_sti.o' failed
make[3]: *** [drivers/input/touchscreen/maxim_sti.o] Error 1
scripts/Makefile.build:455: recipe for target 'drivers/input/touchscreen' failed
make[2]: *** [drivers/input/touchscreen] Error 2
scripts/Makefile.build:455: recipe for target 'drivers/input' failed
make[1]: *** [drivers/input] Error 2
Makefile:815: recipe for target 'drivers' failed
make: *** [drivers] Error 2
I will revert your stylus (really?) patches to version .31
Or please update a declaration struct maxim_sti_pdata at the proper location.
EDIT: I added
Code:
u32 stylus_support;
to 28.0.A.7.251/kernel/include/linux/maxim_sti.h
EDIT2:
I flashed the DE 28.0.A.7.251 - works.
I can not get the kernel compiled here to boot! .27 and .31 are fine with there ROMS and even last a few minutes with the rest of .251
It always (even with default configuration) bootloops.
I tried (via flashtool on linux and Windows 7) to decompress the ORIGINAL kernel.sin from the DE FTF and build a boot image via mkbootimg -> bootloop
EDIT3:
more info, AOSP also a desaster:
http://forum.xda-developers.com/showpost.php?p=62785131&postcount=58
Click to expand...
Click to collapse
28.0.A.8.251 compiles and boots first time for me on Z3+. EDIT: seems to perform better too, with Antutu benchmark score going up from 47,800 to ~53,000
28.0.A.8.251 compiles and boots first time for me on Z3+
Click to expand...
Click to collapse
I hope they tested the source on this device.
Maybe they do not test all kitakami devices e.g. SGP712
DHGE said:
I hope they tested the source on this device.
Maybe they do not test all kitakami devices e.g. SGP712
Click to expand...
Click to collapse
Seems ok for now. I'm running it at the moment on a custom rom that has xposed installed and it's so far stable. This is the kernel in the current firmware, so I'm sure it's been tested.
AOSP uses a different kernel source
https://github.com/sonyxperiadev/kernel
please clarify
@jerpelea
All I write on compiling applies to my SGP712.
AOSP uses a different kernel source
Click to expand...
Click to collapse
Than what?
The latest kernel/include/linux/maxim_sti.h I could find in that repository on GitHub is ancient and without the stylus variable:
@kholkkholk on 29 May input: TS: Add Maxim SmartTouch Imager driver
Click to expand...
Click to collapse
I think that is OK for karin_windy.
I just followed your writeup on SONY Developer!
The last time I complained you added the fastboot flash -S hint for 2015 devices...
I just did a repo sync and added the revised binary drivers which left me first time with a booting device but without touch (today: "hard" bootloop).
Not AOSP:
The kernel for 28.A.0.8.251 you posted on SONY Developer does not compile here without the change in the kernel/include/linux/maxim_sti.h header file.
Flashing the compiled boot.img results in bootloops whatever I tried.
btw: # CONFIG_DM_VERITY is not set
Hi
i have recompiled the kernel
https://github.com/sonyxperiadev/kernel
i have tested karin_windy here with same V11 archive and flashed all 3 partitions
i have touch screen and device working fine
br
J
DHGE said:
@jerpelea
All I write on compiling applies to my SGP712.
Than what?
The latest kernel/include/linux/maxim_sti.h I could find in that repository on GitHub is ancient and without the stylus variable:
I think that is OK for karin_windy.
I just followed your writeup on SONY Developer!
The last time I complained you added the fastboot flash -S hint for 2015 devices...
I just did a repo sync and added the revised binary drivers which left me first time with a booting device but without touch (today: "hard" bootloop).
Not AOSP:
The kernel for 28.A.0.8.251 you posted on SONY Developer does not compile here without the change in the kernel/include/linux/maxim_sti.h header file.
Flashing the compiled boot.img results in bootloops whatever I tried.
btw: # CONFIG_DM_VERITY is not set
Click to expand...
Click to collapse
Thanks @jerpelea for the update!
I am mostly interested in the stagefright patches.
I do not find them in my repo synced AOSP tree.
The (compiled) patches are in ROM 28.0.A.8.251 though and last week I finally managed to get this rooted and running on my karin_windy.
I will try AOSP again if I have more time.
How is the AOSP source for the Z4, does it build yet? Looks like things are building towards a TWRP/AOSP release.
Sent from my SGP712 using Tapatalk
Is there a news on a ASOP build for the Z4?
Sent from my SGP771 using Tapatalk
FreeXperia has AOSP builds for "karin". Will they also work on "karin windy"?
streilu said:
FreeXperia has AOSP builds for "karin". Will they also work on "karin windy"?
Click to expand...
Click to collapse
FreeXperia has "karin windy" builds too.
Look here: http://fxpblog.co/aosp/aosp-5-1/ and choose the first of the 2 possible mirror providers (different sets of files are offered at each), scroll to the buttom and the latest ASOP for the Z4 is there. I have yet to try and install it as the download consistently fails and then forces me to wait for 24 hours.
http://developer.sonymobile.com/201...-camera-available-for-experienced-developers/
enjoy
J
Is anybody able to download any of the ASOP builds from http://fxpblog.co/ ?
Could they be mirrored, at a more "normal" file host?
I can upload it later today to your preferred hoster if you tell me.
streilu said:
I can upload it later today to your preferred hoster if you tell me.
Click to expand...
Click to collapse
How about https://www.androidfilehost.com/ that would seem appropriate. But frankly any host which does not force you to pay for downloads.
Got no dev account on AFH, sorry.
Hope this is ok: https://mega.nz/#!aEZlnZJS
@HotBlack77 please tell me how AOSP feels on the Z4 tab. I'm unsure about the BL unlock thing.
Gesendet von meinem SGP712 mit Tapatalk
Hi all
We have published a new snapshot, zip v14, with camera update (improved quality and stability)
http://developer.sonymobile.com/knowledge-base/open-source/open-devices/
Enjoy
J

Makefile error: *** multiple target patterns. Stop.

I am currently trying to build an Ubuntu Touch-compatible kernel for use with the Xperia Z5 Compact. I have been following the How to build and flash a Linux kernel for AOSP supported devices guide and am at the point at which I have created an Ubuntu-compatible .config file but am having issues finally building the kernel (Step 7) using the .config file as I receive the following error:
make ARCH=arm64 CROSS_COMPILE=$CROSS_COMPILE -j 14
Makefile:791: *** multiple target patterns. Stop.
I know that this error is related to the call of link-vmlinux.sh which is referenced as follows on line 791 of the Makefile:
vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE
Any suggestions for debugging this problem would be greatly appreciated.
blackstar1744 said:
I am currently trying to build an Ubuntu Touch-compatible kernel for use with the Xperia Z5 Compact. I have been following the How to build and flash a Linux kernel for AOSP supported devices guide and am at the point at which I have created an Ubuntu-compatible .config file but am having issues finally building the kernel (Step 7) using the .config file as I receive the following error:
make ARCH=arm64 CROSS_COMPILE=$CROSS_COMPILE -j 14
Makefile:791: *** multiple target patterns. Stop.
I know that this error is related to the call of link-vmlinux.sh which is referenced as follows on line 791 of the Makefile:
vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE
Any suggestions for debugging this problem would be greatly appreciated.
Click to expand...
Click to collapse
Yah, I'm facing the same problem. Only with 64-bit targets (G4 and G4 Stylus), this doesn't happen with any 32bit targets. It doesn't matter if I swap out the toolchain, it doesn't matter which tree I'm working -- Omni, Bliss, CM13 -- all can't get past that error.
So it doesn't seem like it's in the build tree, but maybe my system. I'm using Arch, so I'm used to Android building snafus, but still I cannot figure this out. I've gone through every chain leading to the error and I can't seem to pin it down. It's really harshing my build.
Lil' help, y'all?
UPDATE: Nevermind, just had to set USE_HOST_LEX. Goddammit, I though I already tried that.
Any explanation for why you need to set USE_HOST_LEX? Is this an OS- or compiler-related modification? I'm compiling with UBERTC 4.9 on Ubuntu 14.04 LTS. I currently don't have USE_HOST_LEX in my .config file.
culot said:
Yah, I'm facing the same problem. Only with 64-bit targets (G4 and G4 Stylus), this doesn't happen with any 32bit targets. It doesn't matter if I swap out the toolchain, it doesn't matter which tree I'm working -- Omni, Bliss, CM13 -- all can't get past that error.
So it doesn't seem like it's in the build tree, but maybe my system. I'm using Arch, so I'm used to Android building snafus, but still I cannot figure this out. I've gone through every chain leading to the error and I can't seem to pin it down. It's really harshing my build.
Lil' help, y'all?
UPDATE: Nevermind, just had to set USE_HOST_LEX. Goddammit, I though I already tried that.
Click to expand...
Click to collapse
blackstar1744 said:
Any explanation for why you need to set USE_HOST_LEX? Is this an OS- or compiler-related modification? I'm compiling with UBERTC 4.9 on Ubuntu 14.04 LTS. I currently don't have USE_HOST_LEX in my .config file.
Click to expand...
Click to collapse
USE_HOST_LEX set the build to use host's Flex instead of the one in-tree. See build/core/config.mk:
Code:
ifeq ($(USE_HOST_LEX),yes)
LEX := flex
else
LEX := prebuilts/misc/$(BUILD_OS)-$(HOST_PREBUILT_ARCH)/flex/flex-2.5.39
endif
I don't know about elsewhere, but this has been a problem on Arch for a while. Lately this has not longer been a problem for me, so I assumed it was not an issue. Apparently still a problem for 64bit build, but not 32bit. Hmm.
Another workaround was to preface your make with LC_ALL=C, but I tried that without setting 'USE_HOST_LEX=yes' and it didn't help.
EDIT: I don't think it's compiler-related, as I did try different toolchains and different toolchain versions -- none made a difference. I tried 3 different Make versions, no help. USE_HOST_LEX? That fixed it. Compiling as we speak.
I added export USE_HOST_LEX=yes to my .bashrc and went back to the GCC compiler...new problem to debug. Any suggestions on debugging control groups would be greatly appreciated
Code:
make ARCH=arm64 CROSS_COMPILE=$CROSS_COMPILE -j 1
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CALL scripts/checksyscalls.sh
<stdin>:1226:2: warning: #warning syscall sched_setattr not implemented [-Wcpp]
<stdin>:1229:2: warning: #warning syscall sched_getattr not implemented [-Wcpp]
CC scripts/mod/devicetable-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
HOSTLD scripts/mod/modpost
CHK include/generated/compile.h
SKIPPED include/generated/compile.h
CC kernel/cgroup.o
kernel/cgroup.c: In function 'subsys_cgroup_allow_attach':
kernel/cgroup.c:2138:59: error: invalid operands to binary != (have 'kuid_t' and 'kuid_t')
if (current != task && cred->euid != tcred->uid &&
^
kernel/cgroup.c:2139:18: error: invalid operands to binary != (have 'kuid_t' and 'kuid_t')
cred->euid != tcred->suid)
^
make[1]: *** [kernel/cgroup.o] Error 1
make: *** [kernel] Error 2
Random side rant: The way Google shows search results is going wayyy downhill.

HELP - Kernel Development, Toolchain Setup

Hello everyone,
currently i trying to develop my own Kernel for my Xperia Z2. I installed Ubuntu 18.04 and i think i installed the toolchain in a half correctly.
The Toolchain that i install is under /usr/arm-linux-gnueabi. Now i have some questions..
1. Why it is does exist difference how to build a kernel? Automatic method and manually one?
2. I write export PATH="/usr/arm-linux-gnueabi/bin:$PATH" in the bashrc, but im not sure about this?
3. What is the difference between download a toolchain unpack them and use and installed one through the terminal, like i do it?
4. How i can sure that i installed and set up the toolchain correct?
I will find the answer after try and error of course, but getting early a answer will help me to solve another problems which will come.
Thanks
I get this info by trying compiling something:
HOSTCC scripts/basic/fixdep
as: Unbekannte Option »--64«
scripts/Makefile.host:118: recipe for target 'scripts/basic/fixdep' failed
make[1]: *** [scripts/basic/fixdep] Error 1
Makefile:416: recipe for target 'scripts_basic' failed
make: *** [scripts_basic] Error 2
As i read, i need a 64 bit library or something.. Who can help?

Categories

Resources