hi3516cv500 sdk 編譯提示 cannot find uuid library required for mkfs.ubifs

總結海思 hi3516dv300 020 SDK編譯遇到的問題

 

剛裝完工具鏈可能無法直接執行,因爲在64位系統上缺少32位的庫,按照下面的步驟安裝完依賴的軟件後即可使用。

 

首先按照 sdk 中 osdrv/readme_cn.txt 的描述放置軟件包。

然後按照《開發環境用戶指南》中的說明安裝:
apt install make libc6:i386 lib32z1 lib32stdc++6 zlib1g-dev libncurses5-dev ncurses-term libncursesw5-dev g++ texinfo texlive gawk libssl-dev openssl bc    (u-boot-tools:i386)
其中最後一個如果有問題可以不安裝。

然後安裝某些包中需要的依賴:
apt install u-boot-tools libuuid1:i386 gperf bison
這時候編譯還會提示 cannot find uuid library required for mkfs.ubifs,需要按照 osdrv\tools\pc\jffs2_tool\readme_cn.txt 中描述的安裝如下依賴即可編譯成功:
apt-get install zlib1g-dev liblzo2-dev uuid-dev pkg-config

 

ubuntu 20.04 相關錯誤:

1. Please port gnulib fseterr.c to your platform! 

按照 https://forum.openwrt.org/t/tools-bison-lib-fseterr-c-build-problems-on-18-06-0-due-to-glibc-2-28-changes/18926 這個描述的修改 stdio-impl.h、fseterr.c、fseeko.c 三個文件,並且修改 hi_gzip 裏的 makefile 不要更新文件即可。

--- a/lib/stdio-impl.h
+++ b/lib/stdio-impl.h
@@ -18,6 +18,12 @@
    the same implementation of stdio extension API, except that some fields
    have different naming conventions, or their access requires some casts.  */

+/* Glibc 2.28 made _IO_IN_BACKUP private.  For now, work around this
+   problem by defining it ourselves.  FIXME: Do not rely on glibc
+   internals.  */
+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
+# define _IO_IN_BACKUP 0x100
+#endif

 /* BSD stdio derived implementations.  */

--- a/lib/fseterr.c
+++ b/lib/fseterr.c
@@ -29,7 +29,7 @@
   /* Most systems provide FILE as a struct and the necessary bitmask in
      <stdio.h>, because they need it for implementing getc() and putc() as
      fast macros.  */
-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
   fp->_flags |= _IO_ERR_SEEN;
 #elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin */
   fp_->_flags |= __SERR;

2. mksquashfs.c:987:24: error: called object ‘major’ is not a function or function pointer

下載4.4版本 squashfs,改一下 osdrv/tools/pc/squashfs4.3/mkakefile 裏的版本配置

 

.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章