rk3568 , buildroot , qt ,使用sqlite, 动态库, 静态库

问题说明: 客户反馈 ,buildroot 系统 ,使用qt 使用sqlite ,有报错,无法使用sqlite.

测试情况说明: 我自己测试,发现, buildroot 自己默认就是 使能了 sqlite 的。

是否解决说明: 已解决

解决问题的逻辑

1、首先在buildroot 中使能 sqlite3 , 看看使用命令行不行。

2、 然后写一个C语言看看,能不能使用 sqlite.

3 、然后就是 看看能不能在qt中使用C语言 操作 sqlite 。

4、 然后就是 使用 qt 的自带 的 sqlite 的库了。

方法依据:没有依据,就是测试,正好学习一下 sqlite

解决问题的过程

疑问: 就是 普通的 sqlite 库 与 qt 自带的 sqlite 的库要怎么选择呢?

有什么区别呢?

疑问: 并且我发现, SDK 中编译好 buildroot 后, 在

rk356x_linux/buildroot/output/rockchip_rk3568/target/usr

目录下 是没有头文件的。

但是将系统烧写到 板卡之后,这个目录 又出现了。

这个问题先不管了。

先继续往下分析。

软件说明: 网盘上的 linux SDK

硬件说明:   核心板V1.1  +底板V1.7

流程开始: 

先说一下我遇到的问题,首先 我是使用的是 3568 的SDK先编译一遍 buildroot 系统。

里面就编译了 sqlite3 的第三方包。

然后,我写了一个简短的 C的 对 sqlite 的测试程序。

代码如下:

  1 #include <sqlite3.h>2 #include <stdio.h>3 #include <stdlib.h>456 int main(int argc, const char *argv[])7 {8  sqlite3 * dbSql;9 int ret;10 char * err;11 char ** dataSql;12 int n,m,i,j;13 char sql[50] = "select * from demo";14 if(0 != (ret = sqlite3_open("/root/demo.db",&dbSql))){15 printf("open db %s\n",sqlite3_errmsg(dbSql));16 exit(1);17 }18 if(0 != sqlite3_get_table(dbSql,sql,&dataSql,&n,&m,&err)){19 printf("get error: %s\n",err);20 }21 if(0 != n){22 for(i=0;i<n+1;i++){23 for(j=0;j<m;j++){24 printf("%s ",*dataSql);25 dataSql++;26 }27 printf("\n");28 }29 }else{30 printf("Empty!\n");31 }32 sqlite3_close(dbSql);33 return 0;34 }353637
~

我说交叉编译一下吧, 但是报错了。

我的编译命令是这个。

aarch64-linux-gnu-gcc -I /home/topeet/source_code/rk356x_linux/buildroot/output/rockchip_rk3568/build/sqlite-3210000/ -L /home/topeet/source_code/rk356x_linux/buildroot/output/rockchip_rk3568/build/sqlite-3210000/.libs/  -o test_sqlite sqlite_test.c  -lsqlite3

报错如下:

root@ubuntu:/home/topeet/source_code# aarch64-linux-gnu-gcc -I /home/topeet/source_code/rk356x_linux/buildroot/output/rockchip_rk3568/build/sqlite-3210000/ -L /home/topeet/source_code/rk356x_linux/buildroot/output/rockchip_rk3568/build/sqlite-3210000/.libs/  -o test_sqlite sqlite_test.c  -lsqlite3
/home/topeet/source_code/rk356x_linux/buildroot/output/rockchip_rk3568/build/sqlite-3210000/.libs//libsqlite3.so: undefined reference to `pthread_join@GLIBC_2.34'
/home/topeet/source_code/rk356x_linux/buildroot/output/rockchip_rk3568/build/sqlite-3210000/.libs//libsqlite3.so: undefined reference to `dlsym@GLIBC_2.34'
/home/topeet/source_code/rk356x_linux/buildroot/output/rockchip_rk3568/build/sqlite-3210000/.libs//libsqlite3.so: undefined reference to `pthread_mutex_trylock@GLIBC_2.34'
/home/topeet/source_code/rk356x_linux/buildroot/output/rockchip_rk3568/build/sqlite-3210000/.libs//libsqlite3.so: undefined reference to `dlclose@GLIBC_2.34'
/home/topeet/source_code/rk356x_linux/buildroot/output/rockchip_rk3568/build/sqlite-3210000/.libs//libsqlite3.so: undefined reference to `lstat64@GLIBC_2.33'
/home/topeet/source_code/rk356x_linux/buildroot/output/rockchip_rk3568/build/sqlite-3210000/.libs//libsqlite3.so: undefined reference to `fcntl64@GLIBC_2.28'
/home/topeet/source_code/rk356x_linux/buildroot/output/rockchip_rk3568/build/sqlite-3210000/.libs//libsqlite3.so: undefined reference to `pthread_mutexattr_destroy@GLIBC_2.34'
/home/topeet/source_code/rk356x_linux/buildroot/output/rockchip_rk3568/build/sqlite-3210000/.libs//libsqlite3.so: undefined reference to `pthread_mutexattr_settype@GLIBC_2.34'
/home/topeet/source_code/rk356x_linux/buildroot/output/rockchip_rk3568/build/sqlite-3210000/.libs//libsqlite3.so: undefined reference to `dlerror@GLIBC_2.34'
/home/topeet/source_code/rk356x_linux/buildroot/output/rockchip_rk3568/build/sqlite-3210000/.libs//libsqlite3.so: undefined reference to `fstat64@GLIBC_2.33'
/home/topeet/source_code/rk356x_linux/buildroot/output/rockchip_rk3568/build/sqlite-3210000/.libs//libsqlite3.so: undefined reference to `pthread_mutexattr_init@GLIBC_2.34'
/home/topeet/source_code/rk356x_linux/buildroot/output/rockchip_rk3568/build/sqlite-3210000/.libs//libsqlite3.so: undefined reference to `pthread_create@GLIBC_2.34'
/home/topeet/source_code/rk356x_linux/buildroot/output/rockchip_rk3568/build/sqlite-3210000/.libs//libsqlite3.so: undefined reference to `stat64@GLIBC_2.33'
/home/topeet/source_code/rk356x_linux/buildroot/output/rockchip_rk3568/build/sqlite-3210000/.libs//libsqlite3.so: undefined reference to `dlopen@GLIBC_2.34'

目前不知道 报错是什么原因引起的。

先放一放。

然后是我的解决方式。

我是这样解决的,首先我 我觉得 Buildroot 肯定下载了 关于sqlite 的 相关的源码包。

可以看到就是这个。 我手动解压了。

然后我手动编译了一下。

 1099  ./configure --host=aarch64-linux-gnu --prefix=/home/topeet/source_code/sqlite_install1100  make1101  make install

然后 在编译 C的 sqlite 应用程序的时候,使用的这个命令。

这是我使用的编译命令。

1162  aarch64-linux-gnu-gcc -I /home/topeet/source_code/sqlite_install/include/  -L /home/topeet/source_code/sqlite_install/lib/  -o test_sqlite2 sqlite_test.c  -lsqlite3

这是链接的动态库,能不能 使用静态库呢?

答案是不能的, 我在使用的时候出现这个问题。

编译命令:

root@ubuntu:/home/topeet/source_code# aarch64-linux-gnu-gcc -I /home/topeet/source_code/sqlite_install/include/  -L /home/topeet/source_code/sqlite_install/lib/  -o test_sqlite2 sqlite_test.c -lsqlite3  -static

报错如下:

root@ubuntu:/home/topeet/source_code# aarch64-linux-gnu-gcc -I /home/topeet/source_code/sqlite_install/include/  -L /home/topeet/source_code/sqlite_install/lib/  -o test_sqlite2 sqlite_test.c -lsqlite3  -static
/home/topeet/source_code/sqlite_install/lib//libsqlite3.a(sqlite3.o): In function `pthreadMutexLeave':
/home/topeet/source_code/rk356x_linux/buildroot/dl/sqlite-autoconf-3210000/sqlite3.c:24104: undefined reference to `pthread_mutex_unlock'
/home/topeet/source_code/sqlite_install/lib//libsqlite3.a(sqlite3.o): In function `pthreadMutexTry':
/home/topeet/source_code/rk356x_linux/buildroot/dl/sqlite-autoconf-3210000/sqlite3.c:24066: undefined reference to `pthread_mutex_trylock'
/home/topeet/source_code/sqlite_install/lib//libsqlite3.a(sqlite3.o): In function `pthreadMutexEnter':
/home/topeet/source_code/rk356x_linux/buildroot/dl/sqlite-autoconf-3210000/sqlite3.c:24020: undefined reference to `pthread_mutex_lock'
/home/topeet/source_code/sqlite_install/lib//libsqlite3.a(sqlite3.o): In function `unixDlClose':
/home/topeet/source_code/rk356x_linux/buildroot/dl/sqlite-autoconf-3210000/sqlite3.c:36586: undefined reference to `dlclose'
/home/topeet/source_code/sqlite_install/lib//libsqlite3.a(sqlite3.o): In function `unixDlSym':
/home/topeet/source_code/rk356x_linux/buildroot/dl/sqlite-autoconf-3210000/sqlite3.c:36582: undefined reference to `dlsym'
/home/topeet/source_code/sqlite_install/lib//libsqlite3.a(sqlite3.o): In function `unixDlOpen':
/home/topeet/source_code/rk356x_linux/buildroot/dl/sqlite-autoconf-3210000/sqlite3.c:36541: undefined reference to `dlopen'
/home/topeet/source_code/sqlite_install/lib//libsqlite3.a(sqlite3.o): In function `sqlite3ThreadCreate':
/home/topeet/source_code/rk356x_linux/buildroot/dl/sqlite-autoconf-3210000/sqlite3.c:27396: undefined reference to `pthread_create'
/home/topeet/source_code/sqlite_install/lib//libsqlite3.a(sqlite3.o): In function `pthreadMutexFree':
/home/topeet/source_code/rk356x_linux/buildroot/dl/sqlite-autoconf-3210000/sqlite3.c:23971: undefined reference to `pthread_mutex_destroy'
/home/topeet/source_code/sqlite_install/lib//libsqlite3.a(sqlite3.o): In function `pthreadMutexAlloc':
/home/topeet/source_code/rk356x_linux/buildroot/dl/sqlite-autoconf-3210000/sqlite3.c:23927: undefined reference to `pthread_mutexattr_init'
/home/topeet/source_code/rk356x_linux/buildroot/dl/sqlite-autoconf-3210000/sqlite3.c:23928: undefined reference to `pthread_mutexattr_settype'
/home/topeet/source_code/rk356x_linux/buildroot/dl/sqlite-autoconf-3210000/sqlite3.c:23929: undefined reference to `pthread_mutex_init'
/home/topeet/source_code/rk356x_linux/buildroot/dl/sqlite-autoconf-3210000/sqlite3.c:23930: undefined reference to `pthread_mutexattr_destroy'
/home/topeet/source_code/rk356x_linux/buildroot/dl/sqlite-autoconf-3210000/sqlite3.c:23938: undefined reference to `pthread_mutex_init'
/home/topeet/source_code/sqlite_install/lib//libsqlite3.a(sqlite3.o): In function `sqlite3ThreadJoin':
/home/topeet/source_code/rk356x_linux/buildroot/dl/sqlite-autoconf-3210000/sqlite3.c:27416: undefined reference to `pthread_join'
/home/topeet/source_code/sqlite_install/lib//libsqlite3.a(sqlite3.o): In function `unixDlError':
/home/topeet/source_code/rk356x_linux/buildroot/dl/sqlite-autoconf-3210000/sqlite3.c:36555: undefined reference to `dlerror'

先不管它。

我对 普通的C语言程序作了一个测试,

关于动态链接与静态连接是这样的。

但是为什么 第三方库 ,静态连接会出现问题,不清楚,先不管它。

然后是将编译好的 C语言的测试程序直接拷贝到开发板进行测试。

可以看到是可以的, 这里 测试程序我并没有 进行 关于头文件,以及 库文件的指定。

然后到这里 我觉的我有必要总结一下 关于 动态库,与静态库的东西。

代码:

头文件。

mylib.h

int Max(int a, int b);void PrintMaxNumber(int a, int b);

库文件。

mylib.c

#include <stdio.h>
int Max(int a, int b)
{return (a > b) ? a : b;
}void PrintMaxNumber(int a, int b)
{printf("The max is %d.\n", Max(a, b));
}

主文件代码

test.c

#include <stdio.h>
#include "mylib.h"int main()
{int a = 5;int b = 3;int max = Max(a, b);printf("The max number is %d.\n", max);PrintMaxNumber(a, b);return 0;
}

自己编写一个 静态库,

我自己的操作。

先编译成 .o 
root@ubuntu:/home/topeet/source_code# aarch64-linux-gnu-gcc -c mylib.c  -o mylib.o然后通过.o 生成 .a 文件。
root@ubuntu:/home/topeet/source_code# aarch64-linux-gnu-ar -rc libmylib.a mylib.oroot@ubuntu:/home/topeet/source_code# ls
libmylib.a    mycode   mylib.h  rk356x_linux                  rk_android11.0_sdk                       sqlite_install  test1  test.c
libsqlite3.a  mylib.c  mylib.o  rk356x_linux_20231106.tar.gz  rk_android11.0_sdk_full_20240918.tar.xz  sqlite_test.c   test2

主要是注意 使用的交叉编译器的命令。

自己编写一个动态库。

编译成 .o 文件
root@ubuntu:/home/topeet/source_code# aarch64-linux-gnu-gcc -c mylib.c  -o mylib2.o -fPIC连接成 .so 文件
root@ubuntu:/home/topeet/source_code# aarch64-linux-gnu-gcc -o libmylib.so mylib2.o  -shared
root@ubuntu:/home/topeet/source_code# ls
libmylib.a   libsqlite3.a  mylib2.o  mylib.h  rk356x_linux                  rk_android11.0_sdk                       sqlite_install  test1  test.c
libmylib.so  mycode        mylib.c   mylib.o  rk356x_linux_20231106.tar.gz  rk_android11.0_sdk_full_20240918.tar.xz  sqlite_test.c   test2

注意: 动态库与静态库 在链接时候的命令使用的是不一样的。

但是实际上是一样的,

比如我在编译静态库的时候, 使用的是 ar 命令,但是 如果你使用 gcc 的话,它会自动的使用 ar 命令去生成 静态库。

编译的时候,连接动态库。

编译的时候,连接静态库。

当静态库与动态库 在同一个目录下的时候, 它会优先选择动态库

然后在总结一下 , 交叉编译器的参数 。

总结:

1  -c 参数指定了 只是编译出.o 文件。

如果有-c 参数的话,就是 已经完成了 c--->汇编--->机器码的 过程,只是还没有 将.o 文件连接在一起, 而 没有-c 的话,就是 直接 将 .o 连接在一起了。

2  -o 参数 是在指定输出的名字, 可以与-c 一起使用,也可以单独使用。

3 -I (incldue)  , 指的是 在搜索头文件的时候, 首先去 /usr/include 目录寻找,如果找不到的话,就去 自己指定的这个目录下寻找。

4  -L , 指的是 指定了库的路径,也是首先去默认的 /usr/lib  目录下寻找,如果找不到的话,就去 你指定的牧区去寻找。

5 -l (小写L) , 指的是 所连接的文件,既指 动态库,也指静态库, 这两个指定的方式上没有差别,都存在的话,优先选择动态库。

总结:

1 static 是在编译 应用的时候使用的,

2 shared 是在生成 动态库的时候使用的。

疑问: 那么交叉编译器使用的路径是什么呢? 肯定跟 系统本身的 gcc 使用的不是一个路径。

使用的测试命令是。

root@ubuntu:/home/topeet/source_code# echo 'main(){}'| aarch64-linux-gnu-gcc -E -v -

结果是。

root@ubuntu:/home/topeet/source_code# echo 'main(){}'| aarch64-linux-gnu-gcc -E -v -
使用内建 specs。
COLLECT_GCC=aarch64-linux-gnu-gcc
目标:aarch64-linux-gnu
配置为:'/home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/aarch64-linux-gnu/snapshots/gcc.git~linaro-6.3-2017.05/configure' SHELL=/bin/bash --with-mpc=/home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/aarch64-linux-gnu/_build/builds/destdir/x86_64-unknown-linux-gnu --with-mpfr=/home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/aarch64-linux-gnu/_build/builds/destdir/x86_64-unknown-linux-gnu --with-gmp=/home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/aarch64-linux-gnu/_build/builds/destdir/x86_64-unknown-linux-gnu --with-gnu-as --with-gnu-ld --disable-libmudflap --enable-lto --enable-shared --without-included-gettext --enable-nls --disable-sjlj-exceptions --enable-gnu-unique-object --enable-linker-build-id --disable-libstdcxx-pch --enable-c99 --enable-clocale=gnu --enable-libstdcxx-debug --enable-long-long --with-cloog=no --with-ppl=no --with-isl=no --disable-multilib --enable-fix-cortex-a53-835769 --enable-fix-cortex-a53-843419 --with-arch=armv8-a --enable-threads=posix --enable-multiarch --enable-libstdcxx-time=yes --enable-gnu-indirect-function --with-build-sysroot=/home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/aarch64-linux-gnu/_build/sysroots/aarch64-linux-gnu --with-sysroot=/home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/aarch64-linux-gnu/_build/builds/destdir/x86_64-unknown-linux-gnu/aarch64-linux-gnu/libc --enable-checking=release --disable-bootstrap --enable-languages=c,c++,fortran,lto --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=aarch64-linux-gnu --prefix=/home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/aarch64-linux-gnu/_build/builds/destdir/x86_64-unknown-linux-gnu
线程模型:posix
gcc 版本 6.3.1 20170404 (Linaro GCC 6.3-2017.05)
COLLECT_GCC_OPTIONS='-E' '-v' '-march=armv8-a' '-mlittle-endian' '-mabi=lp64'/home/topeet/source_code/rk356x_linux/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../libexec/gcc/aarch64-linux-gnu/6.3.1/cc1 -E -quiet -v -imultiarch aarch64-linux-gnu -iprefix /home/topeet/source_code/rk356x_linux/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/6.3.1/ -isysroot /home/topeet/source_code/rk356x_linux/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../aarch64-linux-gnu/libc - -march=armv8-a -mlittle-endian -mabi=lp64
忽略重复的目录“/home/topeet/source_code/rk356x_linux/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../lib/gcc/../../lib/gcc/aarch64-linux-gnu/6.3.1/include”
忽略不存在的目录“/home/topeet/source_code/rk356x_linux/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../aarch64-linux-gnu/libc/usr/local/include/aarch64-linux-gnu”
忽略不存在的目录“/home/topeet/source_code/rk356x_linux/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../aarch64-linux-gnu/libc/usr/local/include”
忽略重复的目录“/home/topeet/source_code/rk356x_linux/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../lib/gcc/../../lib/gcc/aarch64-linux-gnu/6.3.1/include-fixed”
忽略重复的目录“/home/topeet/source_code/rk356x_linux/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../lib/gcc/../../lib/gcc/aarch64-linux-gnu/6.3.1/../../../../aarch64-linux-gnu/include”
忽略不存在的目录“/home/topeet/source_code/rk356x_linux/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../aarch64-linux-gnu/libc/usr/include/aarch64-linux-gnu”
#include "..." 搜索从这里开始:
#include <...> 搜索从这里开始:/home/topeet/source_code/rk356x_linux/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/6.3.1/include/home/topeet/source_code/rk356x_linux/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/6.3.1/include-fixed/home/topeet/source_code/rk356x_linux/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/6.3.1/../../../../aarch64-linux-gnu/include/home/topeet/source_code/rk356x_linux/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../aarch64-linux-gnu/libc/usr/include
搜索列表结束。
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<命令行>"
# 31 "<命令行>"
# 1 "/home/topeet/source_code/rk356x_linux/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/include/stdc-predef.h" 1 3 4
# 32 "<命令行>" 2
# 1 "<stdin>"
main(){}
COMPILER_PATH=/home/topeet/source_code/rk356x_linux/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../libexec/gcc/aarch64-linux-gnu/6.3.1/:/home/topeet/source_code/rk356x_linux/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../libexec/gcc/aarch64-linux-gnu/:/home/topeet/source_code/rk356x_linux/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../libexec/gcc/:/home/topeet/source_code/rk356x_linux/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/6.3.1/../../../../aarch64-linux-gnu/bin/
LIBRARY_PATH=/home/topeet/source_code/rk356x_linux/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/6.3.1/:/home/topeet/source_code/rk356x_linux/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/:/home/topeet/source_code/rk356x_linux/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../lib/gcc/:/home/topeet/source_code/rk356x_linux/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/6.3.1/../../../../aarch64-linux-gnu/lib/../lib64/:/home/topeet/source_code/rk356x_linux/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../lib/gcc/aarch64-linux-gnu/6.3.1/../../../../aarch64-linux-gnu/lib/:/home/topeet/source_code/rk356x_linux/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../aarch64-linux-gnu/libc/lib/:/home/topeet/source_code/rk356x_linux/prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/../aarch64-linux-gnu/libc/usr/lib/
COLLECT_GCC_OPTIONS='-E' '-v' '-march=armv8-a' '-mlittle-endian' '-mabi=lp64'
root@ubuntu:/home/topeet/source_code#

可以看到 这个 LIBRARY_PATH ,确实 不是 系统本身 的路径, 这个是 交叉编译器 压缩包本身的路径。

来分析一下 这个命令的含义。

 echo 'main(){}'| aarch64-linux-gnu-gcc -E -v -

感觉像是写了一个 c 语言程序,交给 交叉编译器去测试了。

好了,到这里就总结完毕了。

参考资料: 

基本上是一些个网上的资料。

Qt应用开发(3)——qt sqlite配置以及qt官方例程编译测试_buildroot编译qt的sqlite3-CSDN博客

嵌入式开发-linux根文件系统(一)sqlite_buildroot sqlite-CSDN博客

嵌入式开发-linux根文件系统(一)sqlite_buildroot sqlite-CSDN博客

《迅为 6818 使用手册》

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/diannao/66706.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

嵌入式系统 tensorflow

&#x1f3ac; 秋野酱&#xff1a;《个人主页》 &#x1f525; 个人专栏:《Java专栏》《Python专栏》 ⛺️心若有所向往,何惧道阻且长 文章目录 探索嵌入式系统中的 TensorFlow&#xff1a;机遇与挑战一、TensorFlow 适配嵌入式的优势二、面临的硬件瓶颈三、软件优化策略四、实…

投机解码论文阅读:Falcon

题目&#xff1a;Falcon: Faster and Parallel Inference of Large Language Models through Enhanced Semi-Autoregressive Drafting and Custom-Designed Decoding Tree 地址&#xff1a;https://arxiv.org/pdf/2412.12639 一看它的架构图&#xff0c;可以发现它是基于EAGLE…

鸿蒙UI(ArkUI-方舟UI框架)

参考&#xff1a;https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V13/arkts-layout-development-overview-V13 ArkUI简介 ArkUI&#xff08;方舟UI框架&#xff09;为应用的UI开发提供了完整的基础设施&#xff0c;包括简洁的UI语法、丰富的UI功能&#xff…

《探索 PC 端的开源神经网络多模态模型宝藏》

《探索 PC 端的开源神经网络多模态模型宝藏》 一、多模态模型&#xff1a;开启智能交互新纪元二、主流 PC 端开源多模态模型大赏1. Obsidian&#xff1a;轻量级多模态先锋2. GLM-Edge 系列&#xff1a;移动端与 PC 端的全能选手3. Minicpm-llama3-v2.6&#xff1a;紧凑高效的多…

二次雷达的详细介绍及代码示例

一、二次雷达的工作原理 二次雷达&#xff0c;又称空管雷达信标系统&#xff08;Air Traffic Control Radar Beacon System&#xff0c;ATCRBS&#xff09;&#xff0c;是一种无线电电子测位和辨认系统。它由地面询问雷达和飞机上的应答雷达&#xff08;又称雷达信标&#xff0…

Clojure语言的多线程编程

Clojure语言的多线程编程 在现代软件开发中&#xff0c;多线程编程是一项重要的技能。它使程序能够在同一时间执行多个任务&#xff0c;充分利用多核处理器的性能。在众多编程语言中&#xff0c;Clojure作为一门函数式编程语言&#xff0c;提供了强大的并发支持。本文将深入探…

人工智能-数据分析及特征提取思路

1、概况 基于学生行为数据预测是否涉黄、涉黑等。 2.数据分析 数据分析的意义包括得到数据得直觉、发掘潜在的结构、提取重要的变量、删除异常值、检验潜在的假设和建立初步的模型。 2.1数据质量分析 2.1.1数据值分析 查看数据类型&#xff1a; 首先明确各字段的数据类型…

ChatGPT网络错误如何解决

在当今的信息化社会&#xff0c;网络技术已无处不在。无论是日常生活中的在线购物&#xff0c;还是工作中的远程会议&#xff0c;网络的稳定性和可靠性成为了我们无时无刻不在关注的重要问题。而在智能技术的快速发展中&#xff0c;像ChatGPT这样的人工智能模型&#xff0c;因其…

TensorFlow Quantum快速编程(基本篇)

一、TensorFlow Quantum 概述 1.1 简介 TensorFlow Quantum(TFQ)是由 Google 开发的一款具有开创性意义的开源库,它宛如一座桥梁,巧妙地将量子计算与 TensorFlow 强大的机器学习功能紧密融合。在当今科技飞速发展的时代,传统机器学习虽已取得诸多瞩目成就,然而面对日益…

Qt天气预报系统获取天气数据

Qt天气预报系统获取天气数据 1、获取天气数据1.1添加天气类头文件1.2定义今天和未来几天天气数据类1.3定义一个解析JSON数据的函数1.4在mainwindow中添加weatherData.h1.5创建今天天气数据和未来几天天气数据对象1.6添加parseJson定义1.7把解析JSON数据添加进去1.8添加错误1.9解…

[ASISCTF 2024 final]

过去有些日子的比赛的&#xff0c;国外很多比赛题目水平很高。没事的时候拿来作作。只是WP不全我不会的大多没有。 Crypto Lozib 这个题就挺有意思。由于远程都关了&#xff0c;只在本地把思路作了下。 #!/usr/bin/env python3import sys from Crypto.Util.number import *…

es 单个节点cpu过高

背景&#xff1a; es 单个节点cpu一直持续很高&#xff0c;其它节点cpu不高。 观察这个节点的jvm使用率比较高&#xff0c;怀疑是jvm内存没释放导致内存寻址效率低&#xff0c;引起cpu过高。 解决方法&#xff1a;手动执行fullgc&#xff0c; 在线执行对业务无影响。 jcmd pi…

国产编辑器EverEdit - 扩展脚本:关闭所有未修改文档

1 扩展脚本&#xff1a;关闭所有未修改文档 1.1 应用场景 当用户打开过多文档时&#xff0c;部分文档已经修改&#xff0c;而大部分没有修改&#xff0c;为了减少在众多已打开文档中来回跳转的不便&#xff0c;可以将没有修改的文档全部关闭&#xff0c;但目前提供的快速关闭窗…

高斯函数Gaussian绘制matlab

高斯 约翰卡尔弗里德里希高斯&#xff0c;&#xff08;德语&#xff1a;Johann Carl Friedrich Gau&#xff0c;英语&#xff1a;Gauss&#xff0c;拉丁语&#xff1a;Carolus Fridericus Gauss&#xff09;1777年4月30日–1855年2月23日&#xff0c;德国著名数学家、物理学家…

dolphinscheduler2.0.9升级3.1.9版本问题记录

相关版本说明 JDK&#xff1a;JDK (1.8&#xff09; DolphinScheduler &#xff1a;3.1.9 数据库&#xff1a;MySQL (8)&#xff0c;驱动&#xff1a;MySQL JDBC Driver 8.0.16 注册中心&#xff1a;ZooKeeper (3.8.4) 问题一&#xff1a;dolphinscheduler2.0.9对应zk版本使用…

Sqoop1.4.7安装

环境说明 准备三台服务器&#xff0c;分别为&#xff1a;bigdata141&#xff08;hadoop 主节点&#xff09;、bigdata142、bigdata143确保 hadoop 集群先启动好&#xff0c;hadoop 版本为 3.2.0如果只安装不使用的话&#xff0c;以上可以暂时不用管另准备一台服务器&#xff0…

STM32Flash读写BUG,坑—————4字对齐

在 STM32 的 Flash 存储中&#xff0c;数据通常需要 4 字节对齐&#xff0c;这是由于其 Flash 存储的硬件设计和写入操作的限制决定的。 以下是更详细的原因与解释&#xff1a; 1. STM32 的 Flash 写入单位 STM32 的 Flash 通常以字&#xff08;Word&#xff0c;4 字节 32 位…

Spring-Cloud-Gateway-Samples,nacos为注册中心,负载均衡

背景&#xff1a;本想找个简单例子看下&#xff0c;无奈版本依赖太过复杂&#xff0c;花了点时间。记录下吧 使用Spring Cloud Gateway作为网关服务&#xff0c;Nacos作为注册中心&#xff0c;实现对子服务的负载均衡访问。简单例子。 一、gateway-main-nacos服务端&#xff…

LLM的实验平台有哪些:快速搭建测试大语言模型

LLM的实验平台有哪些:快速搭建测试大语言模型 目录 LLM的实验平台有哪些:快速搭建测试大语言模型低代码平台工程观测平台本地应用平台在线编程竞技场性能排名代码质量评估开源框架Hugging Face是一个机器学习和数据科学平台及社区主要功能开源工具与库应用场景优势低代码平台…

Springboot Rabbitmq + 线程池技术控制指定数量task执行

定义DataSyncTaskManager&#xff0c;作为线程池任务控制器 package org.demo.scheduletest.service;import lombok.extern.slf4j.Slf4j;import java.util.concurrent.BlockingQueue; import java.util.concurrent.Executors; import java.util.concurrent.LinkedBlockingQueu…