[Installation] wsl ubuntu virtual machine compiles rv1109 big pit and stepping on thunder (it is recommended to use vmware to create a virtual machine)

Preface: Don't use wsl ubuntu to compile, the kernel is different, there will be a lot of mistakes, I have switched to vmware to install the virtual machine! !

Compile sdk **
[Don't look at the following, it's useless, if the following error occurs, please don't use wsl anymore, go to vmware to create a virtual machine, you can refer to other articles] **

At that time, I used the uname -a command to check the kernel version, and a bunch of things were added to the ubuntu of wsl, which was not recorded at that time!
In short, it is different! ! ! Don't use wsl! ! ! At that time, I was compiling the same thing as my colleague, and I made mistakes everywhere and was delayed for a week.

Error in last step:

package/rockchip/rkmedia/Config.in:113:error: recursive dependency detected!

package/rockchip/rkmedia/Config.in:113: symbol BR2_PACKAGE_RKMEDIA_ROCKFACE_RECOGNIZE depends on BR2_PACKAGE_ROCKFACE_FACE_RECOGNITION
package/rockchip/rockface/Config.in:37: symbol BR2_PACKAGE_ROCKFACE_FACE_RECOGNITION is selected by BR2_PACKAGE_RKMEDIA_ROCKFACE_RECOGNIZE

Recursive dependency error
Solution reference:
1.https://blog.k-res.net/archives/1847.html
2.

***Supplementary learning: https://www.kernel.org/doc/html/latest/kbuild/makefiles.html

In the Kconfig file:
config A
depends on B
select C
Its meaning is: whether CONFIG_A is configured or not depends on whether CONFIG_B is configured. Once CONFIG_A is configured, CONFIG_C is also automatically configured.
3.
depends on means that the symbol ( )=y must have been selected to configure this option. For example, depends on FB && (ZORRO || PCI) means, and (&&) or (||) must be chosen. For something like that, this determines whether an option will appear. The FBZORROPCI make menuconfig
select actively sets symbols. For example, select FB_CFB_FILLRECT would mean FB_CFB_FILLRECT=y. This satisfies potential dependencies of some other configuration options. Note that the kernel documentation discourages its use for "visible" symbols (which can be selected/deselected by the user) or symbols which themselves have dependencies, as these will not be checked.

Attempt to solve 1:
Find the wrong file location:

Try removing line 115: depends on BR2_PACKAGE_ROCKFACE_FACE_RECOGNITION

Recompile:

The error of recursive dependency detection that appeared before did not appear, but it still showed that the compilation failed.

Try to solve 2:
see this sentence:

Remove this line 118 select:
compile: still the same error

Reference:
1. Linux kernel configuration Kconfig syntax
https://blog.csdn.net/jianwen_hi/article/details/53398141?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST %7ERate-1-53398141-blog-122105582.pc_relevant_3mothn_strategy_and_data_recovery&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-53398141-blog- 122105582.pc_relevant_3mothn_strategy_and_data_recovery&utm_relevant_index=2 2.https:
// www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt

Ubuntu 16.04 system: The software packages and installation commands that the compilation environment depends on are as follows:
sudo apt-get install repo git-core gitk git-gui gcc-arm-linux-gnueabihf u-boot-tools device-tree-compiler gcc-aarch64 -Linux-Gnu Mtools PARTED LIBUDEV-DEV Libusb-1.0-0-DEV Python-Linaro-IMAGE-Tools Linaro-IMAGE-Tools AutoTOOLS-Dev Libsigsegv2 M4 IntlToo LIBDRM-DEV CURL SED MAKE BINUTILS Build-ESSENTIAL GCC G ++ Bash Patch GZIP gawk bzip2 perl tar cpio python unzip rsync file bc wget libncurses5 libqt4-dev libglib2.0-dev libgtk2.0-dev libglade2-dev cvs git mercurial rsync openssh-client subversion asciidoc w3m dblatex graphviz python-matplot lib libc6:i386 libssl-dev expect fakeroot cmake flex bison liblz4-tool libtool keychain
Ubuntu 17.04 system: In addition to the above packages, the following dependencies are required:
sudo apt-get install lib32gcc-7-dev g+±7 libstdc+±7-dev

换源:
1.$ sudo vi /etc/apt/sources.list
2.内容:
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty main universe restricted multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security multiverse
deb http://cz.archive.ubuntu.com/ubuntu bionic main universe

3. Perform software download source update
$ sudo apt-get update
$ sudo apt-get upgrade

Finish!

question:

Solution 1:

https://packages.ubuntu.com/bionic/libc6

Reference:
https://askubuntu.com/questions/1023962/how-to-install-libc6i386-on-16-04-4-64bit

找deb下载链接:
1.https://ubuntu.pkgs.org/18.04/ubuntu-main-amd64/libc6-i386_2.27-3ubuntu1_amd64.deb.html
2.https://pkgs.org/download/libc6-i386
3.https://pkgs.org/download/libc6-i386
4.https://pkgs.org/download/libc6-dev-i386

Question:
libc6-i386 can be installed but libc6:i386 cannot be installed, and the error is still the one above.

Workaround:
Steps:

// Judge your own architecture (my output amd64)
$ dpkg --print-architecture
// Add i386 architecture
$ dpkg --add-architecture i386

// update it

Installed successfully.

Reason for analysis: libc6:i386 is a 32-bit package that cannot be installed under the amd64 architecture. Here we need to install other architectures, which can be used during cross-compilation.

Tried to recompile:
still fails:

Check the soft link, it exists.


And a recursive dependency error is detected when source envsetup.sh :

Therefore, I decided to follow the previous modification: delete the select statement in buildroot/package/rockchip/rkmedia/Config.in: line 118.

And according to the error: It is suspected that the versions of the two libraries are generally different before the system is different. If the compiled executable program and related library files are directly placed on the deployment machine, major problems will likely occur

Installation: sudo apt-get install lib32gcc-7-dev g+±7 libstdc+±7-dev

The first two installations are completed
, but the last libstdc+±7-dev cannot be installed: the reason is that the package name is wrong!

So far, all the installation packages required in the environment configuration document have been installed.

Still getting an error!

Makefile:305: recipe for target ‘/mnt/d/AiFaceLinux/rv1109-linux/buildroot/output/rockchip_rv1126_rv1109_facial_gate/host/lib/libpanel.so.6.0’ failed

Makefile:: recipe for target '' failed such errors:

It may be that some necessary dependent software has not been installed [Excluded, installed according to the document]
2. The version of the cross compiler is inconsistent with the generated makefile.
Solution: Check the makefile to regenerate a consistent version
3. It may also be that the permissions are not enough. (This will prompt) [Exclude]

/sbin/ldconfig.real: Can’t create temporary cache file /etc/ld.so.cache~: Permission denied


Reference: http://www.wilson-blog.cn/post/2020/05/10/wsl.crosscompile.html
http://t.zoukankan.com/lbz007oi-p-14314063.html

Enable i386 architecture and packages
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install cpp-7:i386
sudo apt install sudo apt install gcc-7:i386

Additional installation:
$sudo apt install cpp-7:i386 binutils:i386 gcc-7:i386

Set startup [kk not set]
vim /etc/myinit.sh
sudo service binfmt-support start

Add 4 libraries that do not have an error when compiling:
use /sbin/ldconfig.real: Can't create temporary cache file /etc/ld.so.cache~: Permission denied to locate in br.log
respectively:
Makefile:860: Recipe for target '/home/cg/gitspace/rv1109-linux/buildRoot/output/rockChip_rv1126_RV1109_FACIAL_GATE/lib/libncURSO.6.0' F ailed
makefile: 387: recipe for target '/mnt/d/aiFacelinux/RV1109-linux /buildroot/output/rockchip_rv1126_rv1109_facial_gate/host/lib/libform.so.6.0' failed
Makefile:305: recipe for target '/home/cg/gitspace/rv1109-linux/buildroot/output/rockchip_rv1126_rv1109_facial_ gate/host/lib/libpanel.so .6.0' failed
Makefile:347: recipe for target '/home/cg/gitspace/rv1109-linux/buildroot/output/rockchip_rv1126_rv1109_facial_gate/host/lib/libmenu.so.6.0' failed

(1)安装libncurses.so
1.https://packages.ubuntu.com/bionic/libncurses5-dev
2.https://askubuntu.com/questions/1252062/how-to-install-libncurses-so-5-in-ubuntu-20-04
3.https://blog.csdn.net/qq_35078688/article/details/125326873?utm_medium=distribute.pc_relevant.none-task-blog-2defaultbaidujs_baidulandingword~default-0-125326873-blog-116913992.pc_relevant_default&spm=1001.2101.3001.4242.1&utm_relevant_index=3

Finish.

(2) Install libform.so

The list of downloaded files is:

There are more s than those in the log file.
(3) Install libpanel.so

The name is also different here.

(4) Install libmenu.so

The name is also different here.

The above installation is complete.
Check in the directory usr/lib/, and found that there are all these 4 packages, and the names are correct. like:

Recompile!

It is suspected to be a problem with the installation package, and the comparison between wsl and cx directly downloads the installation package of the virtual machine

Mine is only 1365:

There are 2036 of Cx.

Reinstall according to cx

There should be a problem here:

Reference:
https://www.cnblogs.com/leehm/p/14953912.html
https://zhidao.baidu.com/question/140713642339334085.html
http://t.zoukankan.com/liushui-sky-p- 13521639.html

changed this permission

And added /usr/lib/x86_64-linux-gnu/ in the following file

About the ldconfig command:
*** http://lnmp.ailinux.net/ldconfig
The purpose of the ldconfig command is mainly to search in the default directory /lib and /usr/lib and the dynamic library configuration file /etc/ld.so.conf In the listed directory, search out the shareable dynamic link library (format such as lib*.so*), and then create the connection and cache files required by the dynamic loader (ld.so). The default cache file is /etc/ld.so.cache, which saves the sorted list of dynamic link library names. In order to make the dynamic link library shared by the system, the management command ldconfig of the dynamic link library needs to be run. This execution program Stored in the /sbin directory.
ldconfig usually runs when the system starts, and when the user installs a new dynamic link library, you need to run this command manually.

Setting up packagekit (1.1.9-1ubuntu2.18.04.6) …
invoke-rc.d: could not determine current runlevel

  • Reloading system message bus config… Failed to open connection to “system” message bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
    invoke-rc.d: initscript dbus, action “force-reload” failed.
    Failed to open connection to “system” message bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory

problem found

The ldd command is used to print a list of shared libraries that a program or library file depends on.
But here is a problem with ldd libncurses.so not a dynamic executable.
Print to view the other 3:

参考:
1.https://blog.csdn.net/weixin_44881103/article/details/115325019
2.https://www.pudn.com/news/62a82a80b21f6919441b29e1.html

Therefore, this problem is mainly solved:
to view the version of a single package, use the command:

examine:

Found: The i386 version does not install the package!
Execute the installation command:

Check the other three packages and find the same problem:

That is: installing packages on wsl ubuntu, if not explicitly stated, will only install the amd64 version.
So install the above i386 version.
Restart the ldd command:

32-bit libraries already installed on 64-bit systems

View through the file xxx.so command:

Description and solution of kconfig recursion problem¶

Pictured: https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html

Developers experiencing problems with recursive Kconfigs have two options. We document them below and provide a list of historical issues resolved by these various solutions.

Remove any redundant "select FOO" or "depends on FOO"

Match dependency semantics:

b1) swap all "select FOO" with "depends on FOO", or,

b2) swap all "depends on FOO" with "selects FOO"

The solution to a) can be tested using the example Kconfig file Documentation/kbuild/Kconfig.recursion-issue-01 by removing "select CORE" from CORE_BELL_A_ADVANCED, as this is already implied since CORE_BELL_A depends on CORE. Sometimes it may not be possible to remove some dependencies, for which case you can use solution b). Two different resolutions for b) can be tested in
the sample Kconfig file Documentation/kbuild/Kconfig.recursion-issue-02. Below is a list of previously fixed examples for these types of recursion problems; all bugs seem to involve one or more "select" statements and one or more "depends on".

Reference:
1. Linux view soft link, linux view soft link directory:
2. https://office66.cn/post/50454.html

Power on this virtual machine

Guess you like

Origin blog.csdn.net/weixin_45392674/article/details/127627953