Build Android AOSP fail - android-source

I have successfully sync the source code of android-6.0.1_r79 from AOSP. Now, I got the following error while I was trying to build the source code. Anyone can tell me how I can fix it, and finish a successful build? Thanks much in advance.
The following line appears many times:
cts/tests/tests/keystore/src/android/keystore/cts/KeyChainTest.java:1: error: illegal character: \0
^
cts/tests/tests/keystore/src/android/keystore/cts/KeyChainTest.java:1: error: illegal character: \0
^
cts/tests/tests/keystore/src/android/keystore/cts/KeyChainTest.java:1: error: reached end of file while parsing
And then, I see this failure:
build/core/java.mk:394: recipe for target 'out/target/common/obj/APPS/CtsKeystoreTestCases_intermediates/classes-full-debug.jar' failed
make: * [out/target/common/obj/APPS/CtsKeystoreTestCases_intermediates/classes-full-debug.jar] Error 41
make: * Waiting for unfinished jobs....

Problem solved.
The file cts/tests/tests/keystore/src/android/keystore/cts/KeyChainTest.java is somehow broken. I opened it, and it shows many /00 illegal characters. So, I replaced it with another KeyChainTest.java file from another android branch. Rebuilt android, then I got build successfully.

Related

Issues With CMSIS In STM32IDE

I'm completely new to microcontroller programming and I'm facing my first problem.
I'm following tutorials and web documentation in order to starting with STM32 libraries, I tried to add CMSIS and HAL drivers into my stm32IDE but every time I try to build a huge quantity of errors occure. Someone can explain to me what is wrong ?
../Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/iar/startup_stm32f412zx.s:399: Error: bad instruction `section .text:CODE:REORDER:NOROOT(1)'
../Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/iar/startup_stm32f412zx.s:400: Error: bad instruction `i2c2_ev_irqhandler'
../Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/iar/startup_stm32f412zx.s:403: Error: bad instruction `pubweak I2C2_ER_IRQHandler'
../Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/iar/startup_stm32f412zx.s:404: Error: bad instruction `section .text:CODE:REORDER:NOROOT(1)'
../Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/iar/startup_stm32f412zx.s:405: Error: bad instruction `i2c2_er_irqhandler'
../Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/iar/startup_stm32f412zx.s:408: Error: bad instruction `pubweak SPI1_IRQHandler'
../Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/iar/startup_stm32f412zx.s:409:
.
.
.
.
make: *** [Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/iar/subdir.mk:91: Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/iar/startup_stm32f407xx.o] Error 1
"make -j12 all" terminated with exit code 2. Build might be incomplete.
00:32:15 Build Failed. 5895 errors, 0 warnings. (took 2s.475ms)
You are trying to compile the IAR startup files with the GCC compiler. The startup assembler file that you want is under the directory gcc. The two assemblers have different syntax.

Swift build error_if_any_output_files_are_specified_they_all_must_be

When converting to use the new build system on Xcode 10, I get the following error in my output for several of my extension targets.
<unknown>:0: error: if any output files are specified, they all must be
Command CompileSwift failed with a nonzero exit code
I have looked for a solution online, but the only reference I can find to this error is in the Swift compiler source code itself.
https://www.google.com/search?q=error_if_any_output_files_are_specified_they_all_must_be
Does anyone know how this error is actually triggered, or what I can do to fix it?
Ok, I had the same problem with one of our projects. Building or Archiving are always stopped with the error <unknown>:0: error: if any output files are specified, they all must be.
The solution for us was to set Compilation Mode to Incremental instead of Whole Module.
This means, you have to ignore the Validate Project Settings warning:

Cannot deploy new Liferay theme "The filename or extension is too long"

I'm new to Liferay and Eclipse, and I'm trying to do some simple theme development. However, once I right click my theme (which I just created) and go to Liferay->SDK->deploy I get the following error:
BUILD FAILED
C:\sdk6.2\build-common-plugin.xml:482: The following error occurred while executing this line:
C:\sdk6.2\build-common.xml:993: The following error occurred while executing this line:
C:\sdk6.2\build-common.xml:299: The following error occurred while executing this line:
C:\sdk6.2\build-common.xml:1783: The following error occurred while executing this line:
C:\sdk6.2\build-common.xml:175: java.io.IOException: Cannot run program "C:\jre7\bin\java.exe": CreateProcess error=206, The filename or extension is too long
I was using a longer path for my SDK and JRE7 but reduced it to what you see in the above error message (to no avail). Does anyone know how to fix this problem?
Reconfigure your SDK folder, try to use a label for it without any "." or special char.
For example:
C:\liferay\sdk621\
And tell us your results...it could be a windows/ant path problem...

Failed opening required 'Zend/Config/Exception.php'

I've been working on this project for about two weeks now. I don't understand why now I receive this error:
Warning: require_once(Zend/Config/Exception.php) [function.require-once]: failed to open stream: No such file or directory in /usr/local/zendsvr/share/ZendFramework/library/Zend/Config/Ini.php on line 180
Fatal error: require_once() [function.require]: Failed opening required 'Zend/Config/Exception.php' (include_path='/www/zendsvr/htdocs/TassiWeb/application/../library:/www/zendsvr/htdocs/TassiWeb/library:.:/usr/local/zendsvr/share/ZendFramework/library:/usr/local/zendsvr/share/pear') in /usr/local/zendsvr/share/ZendFramework/library/Zend/Config/Ini.php on line 180
I'm using ZendServer CE into IBMi but others web-application works correctly!
How can solve it?
Does the requested file exist in your Zend Framework folder? The include path etc seem to be correct, so it may just be an accidentally deleted file...

error with "pmem.c" compiling linux source code for android

I am compiling linux source code for android emulator. When i execute make command(for building and cross-compiling the linux source) i get the following error "pmem.c" file.
root#ubuntu:~/common# make
CHK include/linux/version.h
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86
CALL scripts/checksyscalls.sh
CHK include/linux/compile.h
CC drivers/misc/pmem.o
drivers/misc/pmem.c:441: error: conflicting types for ‘phys_mem_access_prot’
/home/preetam/common/arch/x86/include/asm/pgtable.h:383: note: previous declaration of ‘phys_mem_access_prot’ was here
drivers/misc/pmem.c: In function ‘flush_pmem_file’:
drivers/misc/pmem.c:805: error: implicit declaration of function ‘dmac_flush_range’
drivers/misc/pmem.c: In function ‘pmem_setup’:
drivers/misc/pmem.c:1265: error: implicit declaration of function ‘ioremap_cached’
drivers/misc/pmem.c:1266: warning: assignment makes pointer from integer without a cast
make[2]: *** [drivers/misc/pmem.o] Error 1
make[1]: *** [drivers/misc] Error 2
make: *** [drivers] Error 2
root#ubuntu:~/common#
how to resolve this error. It seems that there may some problems in the "pmem.c" file and i'll have to choose different git repository. but that would be a very complex thing, as now i have already done most of the things till here. I might have to see correct version of this file. please someone tell what should i do?
how to solve this errors.
please help..thankyou!
There are several errors in the message you pasted, both conflicting types and implicit declarations. Three things that you might want to verify:
did you choose the correct processor architecture (ARCH) and cross compiler definition
does the chosen architecture mix in files from another arch (this is difficult to check, but you can start by checking the location of the files that are mentioned in the error message)
check these files themselves, to see it this is a bug (very unlikely, but you never know) and that you actually have to change some code