Preface:
Tensorflow cross-compilation process is a heart stopper process where you can not think of a variety of possible errors will occur. . . , One taste, only experienced people can appreciate.
Specially recorded all the problems encountered, the one as a summary of this time, and secondly, can provide some help to others.
text:
Below is a list of known issues now, as encountered the same phenomenon, so the solution can:
Question 1:
Symptom:
The compilation process, suggesting exp ( "/ home / jim / tf2arm / sysroots / x86_64-linux / arm-poky-linux-gnueabi-gcc"): no such file or directory
Cause Analysis:
I can be in that directory in the directory, but when you open the shell are running, but the same: no such file or directory. (The cross compiler SDK is copied from someone else's computer (UBUNTU system version 14.04) on the come, you can do fine on his computer), the reason may be due to differences in systems and platforms, the ability to execute properly on a computer , but it can not be executed on another computer.
Baidu search a variety of ways:
1) chmod 777 -R sysroots add executable permissions, not
2) sudo apt-get install lsb-core compatible add support for 32-bit systems, not
3) sudo apt-get install ia32-libs add a compatible support for 32-bit systems, not
Solution:
SDK with others generated no, that build one myself, the method can refer to the following links: Manually compile a series of cross-compiling SDK i.MX6
Question 2:
Symptom:
Two copies of the newly generated executable package to the appropriate directory:
opt/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poly-linux-gnueabi
opt/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc
Recompile bash build_arm_poky.sh
报错:error:target CPU does not support ARM mode
Cause Analysis:
View the target chip parameters: Cortex-M4 corresponds ARMv7E-M, i.e. -march = armv7-a, -mtune = cortex-a9
If you use --mcpu = cortex-m3 option, you need to match with -mthumb options. unsolved!
By the time the error message, found: environmental variables have two records: -march = armv7-a and -march = armv7
Solution:
Execute the script: ./ configure
Other options are selected No, -march option uses armv7-a can.
Question 3:
Symptoms:
cortexa9hf-neon-poky-linux-gnueabi/usr/include/gnu/stubs.h:7:29:fatal error: gnu/stubs-soft.h :No such file or directory
compilation terminated
Cause Analysis:
In compiling the generated package not find the file, but to find a similar file: stubs_hard.h, view the file contents, but some macro definitions.
Solution:
Direct copying files stubs-hard.h, changed its name to stubs-soft.h
Question 4:
phenomenon:
extern / asm / nasm / error.c, can not find error.h
Cause Analysis:
Find the source code error.h, located extern / asm / include, should not lead to a build path included.
Solution:
Comparison of soil: find the current path, directly copied to the current file: cp include / error.h.
Question 5:
ld: File not found: ctri.o
Cause Analysis:
The current source code package includes the file
Solution:
sudo chmod 777 -R sysroots
Question 6:
BUILD:bazel:8:1:undeclared inclusion(s) in rule ''
Solution:
bazel clean --expunge
Question 6:
BUILD:tensorflow/WORKSPACE:3:1:name 'http_archive' is not defined
Cause Analysis:
Suspect package is not compatible with lead, the current bazel 0.25.2, tensorflow 1.10
Solution:
Tensorflow 1.10 currently supports only up Bazel0.19.2, therefore, to drop Bazel version 0.18.1
1.
tensorflow/python/lib/core/py_func.cc:355:39 :error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
Find the error, the return value is added at (char *) at the interface
external/gif_archive/lib/egif_lib.c:62:6:error:'S_IREAD' undeclared(first use in this function)
S_IREAD to modify S_IRUSR
external/gif_archive/lib/egif_lib.c:62:16:error:'S_IWRITE' undeclared(first use in this function)
Modify S_IWRITE to S_IWUSR
Or: the definition gif_lib.h
#define S_IREAD S_IRUSR
#define S_IWRITE S_IWUSR
No compiler error may be due to Android, as defined in the external / gif_archive in the next BUILD.bazel
2\ external/png_archive/pngpriv.h:911:4 :error:#error ZLIB_VERNUM!= PNG_ZLIB_VERNUM " -I (include path) error:see the notes in pngpriv.h
#error ZLIB_VERNUM! = PNG_ZLIB_VERNUM
Zlib library and libpng version number of inconsistencies
View Zlib version:
find / usr / -name zlib.pc search results: /usr/lib/x86_64-linux-gnu/pkgconfig/zlib.pc
cat /usr/lib/x86_64-linux-gnu/pkgconfig/zlib.pc version information will be displayed the current version is Version: 1.2.8
View libpng version:
find / usr / -name libpng (current version 1.2)
And Zlib: libpng version 1.2.8 of the corresponding should be 1.5,
Install libpng:
Download: https://sourceforge.net/projects/libpng/files/
Level -xzvf libpng-Lk5k30ktrkgsh
cd libpng-1.5.30.tar.gz
./configure
make check
sudo make install
sudo ldconfig