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;
Related
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/
Hi!
I'm trying to compile my first cyanogen rom for my Galaxy 3 (i5800). I downloaded the Android source from androidarmv6 and the device folder from marcellusbe's repo and i edited it to include samsung fimg drivers (original device folders has openfimg which IMHO is still not good for daily usage because of lag, very limited opengles support etc...) and the device configuration and filesystem table to support MTD converted phones. At first compiling went pretty good i just got some: "Thumb does not support this addressing mode *" that i fixed by adding
Code:
LOCAL_CFLAGS += -marm
to involved Android.mk however after resolving those errors it started compiling host libraries and it started giving TONS of no such file or directory errors, but compilation didn't stop so i didn't touch anything, then this error appeared and i can't find any patch/solution/workaround:
Code:
target thumb C: libhardware_legacy <= hardware/libhardware_legacy/wifi/wifi.c
hardware/libhardware_legacy/wifi/wifi.c: In function 'update_ctrl_interface':
hardware/libhardware_legacy/wifi/wifi.c:473:5: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
hardware/libhardware_legacy/wifi/wifi.c: In function 'wifi_start_supplicant':
hardware/libhardware_legacy/wifi/wifi.c:894:20: error: dereferencing pointer to incomplete type
hardware/libhardware_legacy/wifi/wifi.c:911:26: error: dereferencing pointer to incomplete type
make: *** [/home/francesco/cm10_port/cm_armv6/out/target/product/apollo/obj/SHARED_LIBRARIES/libhardware_legacy_intermediates/wifi/wifi.o] Error 1
I also downloaded the latest wifi.c from cyanogen github but nothing.
Someone knows how to resolve this?
Thanks in advance!
Hi, I'm build cyanogenmod with CAF kernel LA.BR.1.1.3-05510-8x16.0 with small modifications. I'm running into a problem where any function defined in include/linux/cpufreq.h is causing implicit declaration warnings, which are treated as errors. I know I can use cc call-disable, but that is likely to cause errors later on. I have uploaded a log of building and the error, and the defconfig I'm using to build the kernel. http://1drv.ms/1QyaAXD Any help would be appreciated.
zowpow said:
Hi, I'm build cyanogenmod with CAF kernel LA.BR.1.1.3-05510-8x16.0 with small modifications. I'm running into a problem where any function defined in include/linux/cpufreq.h is causing implicit declaration warnings, which are treated as errors. I know I can use cc call-disable, but that is likely to cause errors later on. I have uploaded a log of building and the error, and the defconfig I'm using to build the kernel. http://1drv.ms/1QyaAXD Any help would be appreciated.
Click to expand...
Click to collapse
Hi,
I've been into same error;
It mostly happens when you try to compile 64 bit kernel for a device that is currently running 32 bit one.
I FIXED mine by by removing the '-Werror' related warnings. Go to the main Makefile in your kernel directory and search for 'werror' whatever the error is; remove the lines or use '#' before to comment it out.
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.
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