Problems arising from the AOSP Android build - android-source

I am currently ubuntu 18.04 (lts) asop build in.But an unexpected problem is occurring and over and over again.This is something wrong?
It's my development environment.
Python - 2.7.17
openjdk - 8
$user#ubuntu:~/android_build$ source ./imx-p9.0.0_2.2.0-ga/imx_android_setup.sh
$user#ubuntu:~/android_build$ lunch aosp_arm-eng
$user#ubuntu:~/android_build$ make -j 9 2>&1 | tee build-log.txt
build-log.txt -->
https://drive.google.com/file/d/1LsM_H1moCVVzyZ21Gm3SOV-x3OUlGYQm/view?usp=sharing
If you have any additional requirements, please write them down.

After reviewing your log, it looks like some file is missing in the vendor/nxp directory
vendor/nxp/fsl_imx_omx/OpenMAXIL/src/component/common/UniaDecoder.h:21:10: fatal error: 'fsl_unia.h' file not found
#include "fsl_unia.h"
^~~~~~~~~~~~
1 error generated.
Please check the codebase whether fsl_unia.h is added properly.

Related

How do I develop bare-metal i.mx6sx code using eclipse?

I was wondering if you could help me with some issues and questions I have for developing for the i.MX6 SoloX in bare-metal. I was looking at this link https://community.nxp.com/docs/DOC-106253 and downloaded the files there to use as an example of how to develop bare-metal c code for the i.MX6.
Then I setup my eclipse environment according to this tutorial https://community.nxp.com/docs/DOC-103736 but just the toolchain because I'm not interested in processor expert.
Since I'm working on Linux I didn't installed the Code Sourcery thing, instead I'm working with the gcc-arm-none-eabi which I installed using:
$ sudo apt-get install gcc-arm-none-eabi
And therefore I had to change the cs-rm and cs-make for rm and make respectively.
And I was able to create an eclipse project with the downloaded code and configure the project to make it work, nevertheless, I had the first error:
main.c:8:19: fatal error: stdio.h: No such file or directory
#include <stdio.h>
^
compilation terminated.
make: *** [cortex_A9/main.o] Error 1
cortex_A9/subdir.mk:24: recipe for target 'cortex_A9/main.o' failed
And I was able to solve it adding "/usr/include" in the include directories at project > properties. But I'm not sure if this is a correct way of solving this error.
After fixing this error I got a new one:
syscalls.c:168:1: error: unknown type name 'caddr_t'
caddr_t _sbrk(int incr)
And for solving that I had to include explicitly the file "/usr/include/x86_64-linux-gnu/sys/types.h" and also I don't know if that is the correct way to solve it.
Now having eliminated those two errors I have the following one:
Building target: imx6-A9.elf
Invoking: Cross ARM C Linker
arm-none-eabi-gcc -mcpu=cortex-a9 -march=armv7-a -marm -mlittle-endian -mfloat-abi=softfp -mfpu=neon -mno-unaligned-access -fno-zero-initialized-in-bss -O0 -g -T "/home/mmalagon/iMX6/MX6SX_hello_MFG/cortex_A9/mx6slx.ld" -nostartfiles -Wl,-Map,"imx6-A9.map" -o "imx6-A9.elf" ./cortex_A9/main.o ./cortex_A9/syscalls.o ./cortex_A9/uart.o
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: cannot find -lg
makefile:42: recipe for target 'imx6-A9.elf' failed
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
make: *** [imx6-A9.elf] Error 1
Which I haven't been able to resolve.
I don't know if this error is a consequence of the way I solved the two previous errors.
Does anybody know how to properly setup eclipse for i.MX6 bare-metal development?
Thank you very much for helping!!
If you want to develop bare-metal code for the i.MX6SoloX without using CodeSourcery then you need to execute this:
sudo apt-get install gcc-arm-none-eabi libnewlib-arm-none-eabi -y
And then choose "Custom (arm-none-eabi-gcc)" at Project>Settings>C/C++ Build in the 'Toolchains' tab.

Building Swift on CentOS

I am building Swift compiler from source on CentOS 6, and am running into a library issue. After fighting with the build script for a while I have got where running ./utils/build-script eventually gives:
+ /home/src/cmake-3.4.1-Linux-x86_64/bin/cmake --build /home/src/swift/build/Ninja-DebugAssert/cmark-linux-x86_64 -- all
ninja: no work to do.
llvm: using standard linker
+ cd /home/src/swift/build/Ninja-DebugAssert/llvm-linux-x86_64
+ /home/src/cmake-3.4.1-Linux-x86_64/bin/cmake -G Ninja -DCMAKE_C_COMPILER:PATH=clang -DCMAKE_CXX_COMPILER:PATH=clang++ '-DCMAKE_C_FLAGS= ' '-DCMAKE_CXX_FLAGS= ' -DCMAKE_BUILD_TYPE:STRING=Debug -DLLVM_ENABLE_ASSERTIONS:BOOL=TRUE -DLLVM_TOOL_SWIFT_BUILD:BOOL=NO '-DLLVM_TARGETS_TO_BUILD=X86;ARM;AArch64' -DLLVM_INCLUDE_TESTS:BOOL=TRUE -LLVM_INCLUDE_DOCS:BOOL=TRUE -DCMAKE_INSTALL_PREFIX:PATH=/usr -DINTERNAL_INSTALL_PREFIX=local /home/src/swift/llvm
CMake Error at cmake/modules/CheckAtomic.cmake:36 (message):
Host compiler appears to require libatomic, but cannot find it.
Call Stack (most recent call first):
cmake/config-ix.cmake:296 (include)
CMakeLists.txt:403 (include)
-- Configuring incomplete, errors occurred!
See also "/home/src/swift/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeOutput.log".
See also "/home/src/swift/build/Ninja-DebugAssert/llvm-linux-x86_64/CMakeFiles/CMakeError.log".
./utils/build-script: command terminated with a non-zero exit status 1, aborting
(gcc-4.8.2 was what I compiled llvm with)
libatomic is there:
$ locate libatomic
/opt/gcc-4.8.2/lib64/libatomic.a
/opt/gcc-4.8.2/lib64/libatomic.la
/opt/gcc-4.8.2/lib64/libatomic.so
/opt/gcc-4.8.2/lib64/libatomic.so.1
/opt/gcc-4.8.2/lib64/libatomic.so.1.0.0
I just don't know how to tell the build system where to look. I have tried the usual CMAKE_LIBRARY_PATH (exporting on the command line - I am not sure if cmake works like the way LD_LIBRARY_PATH, LIBRARY_PATH work) but it can't seem to find it.
I also don't have root on the machine.
I had not tried building from source on CentOS 6 until I saw this question, but I have been able to build Swift 2.2 on CentOS 7.1 and Ubuntu 14.04, with partial success. A few things to think about:
You will need numerous dependencies required to build Swift, and unless
they happen to be already on the system, you will need root access to
install them.
Use -R flag with the build-script to create a release build.
Building in DebugAssert (the default) will require a lot of memory. In my case even 14 GB was not sufficient. A release build
can be done with about 6 GB.
As for your specific problem, it is related to Clang's dependency on GCC-related packages for headers and libraries. See, for example, Fedora 21 with clang, without gcc.
Even if you installed GCC 4.8.2 and adjusted the path to use gcc and g++ from 4.8.2, Clang may still be looking in the old GCC directories for headers and libraries. CMake first tries to compile a C++ test file that includes the header atomic, which does not exist in the old GCC. So, it then tries to link a C test program that uses the library libatomic, which again doesn't exist in the old GCC. You can see this by looking at llvm/cmake/modules/CheckAtomic.cmake mentioned by usr1234567. CMakeError.log and CMakeOutput.log can also provide valuable insight. BTW, when I was building Swift on CentOS 7.1, I didn't run into this problem because GCC 4.8.2 was used by Clang for headers and libraries and the atomic header was found, so the C++ file got compiled. However, had the libatomic check been done, it would have failed, because libatomic.so in the repository-provided 4.8.2 has INPUT ( <name of some non-existent file> ), so trying to link with libatomic errors out.
I'm sure there are various ways of dealing with this issue, but what solved the problem for me was setting the following environment variables, please adjust to your specific setup:
export CPLUS_INCLUDE_PATH=/opt/gcc-4.8.2/include/c++/4.8.2:/opt/gcc-4.8.2/include/c++/4.8.2/x86_64-unknown-linux-gnu
export LIBRARY_PATH=/opt/gcc-4.8.2/lib64:/opt/gcc-4.8.2/lib/gcc/x86_64-unknown-linux-gnu/4.8.2
Also make sure that your 4.8.2 version of libstdc++.so is available to the dynamic linker at runtime. Since you don't have root, do
export LD_LIBRARY_PATH=/opt/gcc-4.8.2/lib64
If you had root, you could use ldconfig.
Before you start building Swift, you may want to try building, using Clang, a simple C program linking it with libatomic (the code doesn't actually have to use any symbols from the lib) and a simple C++ program that includes the <atomic> header. When compiling the C++ program, use the -std=c++11 compiler flag. If the C++ program compiles successfully, then it is not necessary for the libatomic linking test to be successful.
Interestingly, the CMakeOutput.log file still did not report finding GCC 4.8.2 as a candidate GCC installation, but the configuration/build worked well past the error.
Hopefully this helps. Please let us know if you run into something else.
CheckAtomic.cmake seems to be part of LLVM. I found a file at Github and it tries to find '__atomic_fetch_add_4' from libatomic
check_library_exists(atomic __atomic_fetch_add_4 "" HAVE_LIBATOMIC)
This fails for you. Check CMakeFiles/CMakeError.log to get more details why this test failed. Or try this line in a new project.

Unity - Failed to compile resources with the following parameters:

I'm working on adding Google Play Game Services to a Unity project.
Started getting these errors recently, however not sure if it is because of the Game Services, or could be I updated my machine.
The following in Console output:
Failed to compile resources with the following parameters:
-bootclasspath "/Users/alex/development/adt-bundle-mac-x86_64-20131030/sdk/platforms/android-21/android.jar"
-d "/Users/alex/Documents/development/unity/Maze/Maze/Temp/StagingArea/bin/classes"
-source 1.6 -target 1.6 -encoding UTF-8 "com/facebook/android/R.java" "com/google/android/gms/R.java"
"com/google/example/games/basegameutils/R.java"
"com/google/example/games/mainlibproj/R.java"
"com/mildspring/maze/R.java" warning:
java/lang/Object.class(java/lang:Object.class): major version 51 is
newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded. 1 warning
UnityEditor.HostView:OnGUI()
Error building Player: UnityException: Resource compilation failed!
Failed to recompile android resource files. See the Console for
details.
Got my answer, the issue was that "major version 51" is java 1.7, "version 50" is java 1.6. The solution was to install Java 1.7 and set path accordingly with the following command.
sudo ln -nsf /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK
For me, changing the JDK path at Preferences => External Tools => JDK finally resolved this issue. Creating the symbolic link wasn't enough or possibly not even needed.
I would just re-install or update JDK , And its work
http://www.oracle.com/technetwork/java/javase/downloads/index.html

Using Scons to build mongo-nonx86 on an arm based Synology NAS

I have a Synology DS212j NAS (cpu Feroceon 88FR131 rev 1 (v5l)) with the optware ipkg installed. I am trying to build mongo-nonx86 on it.
"scons all" gives me the following messages:
scons: Reading SConscript files ...
scons version: 2.0.1
python version: 2 5 6 'final' 0
Checking whether the C++ compiler worksyes
Checking for C library stdc++... no
can't find stdc++ library which is needed
I have the stdc++ library installed, I also have ssl installed. My underlying question is how can I get scons to tell me more about what is really missing, where it is looking, how it is looking etc. I have so far found no options which generate any more useful diagnostic output?
Obviously a ready-made solution for getting mongodb working on this great little box would be even more welcome :-)
Well even if you do have it installed, it doesn't seem to think so, here is what I would try to do, install libssl-dev, then try to install the dev package for libstdc++, which is: libstdc++-dev.
Then see if you can compile it.

How to compile CLucene for iOS?

I am trying to compile CLucene for iOS and running into some problems.
Here are the steps I've taken
Modify the CLucene CMakeLists.txt to disable multithreading
Create a "build-ios" directory in the CLucene source directory
Drop the cmake file from this site into the cmake directory http://code.google.com/p/ios-cmake/
run the following command "cmake -DCMAKE_TOOLCHAIN_FILE=./iOS.cmake -GXcode ../"
Here's the output from that command. Can someone help me out with the error?
-- Toolchain using default iOS SDK: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - not found.
-- Could NOT find Boost
Boost not found, using local: /Users/aschuler/Desktop/clucene-core-2.3.3.4/src/ext
CMake Error at /Applications/CMake 2.8-6.app/Contents/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
/Applications/CMake 2.8-6.app/Contents/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
/Applications/CMake 2.8-6.app/Contents/share/cmake-2.8/Modules/FindThreads.cmake:157 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
src/shared/CMakeLists.txt:38 (find_package)
-- Configuring incomplete, errors occurred!
Thanks for your help!
looks like boost is missing. boost is a required library - check the readme
I know its been long. But just try Cmake with Zlib. Because i am in the process of doing the same thing you did, but waiting till i receive the MAc mini. If you have found the solution please do share because it will be helpful for me and many others. Thank you.