Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    使用Ubuntu20.04 LTS编译D1-Tina踩坑记录

    MR Series
    5
    7
    4179
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • mangogeek
      mangogeek LV 8 last edited by

      头铁没注意看官方默认版本是14.04,总体来说还挺顺利,编译过程中遇到小坑记录一下。😲

      系统:Ubuntu20.04.2 LTS 64位

      TINA源码:

      https://d1.docs.allwinnertech.com/study/study_2getsdk/

      repo branch 输出是 product-smartx-d1-tina-v1.0-release

      环境依赖:

      参考官方:https://d1.docs.allwinnertech.com/study/study_3ubuntu/

      特别注意:不同的源可能会装到不同的gawk版本。如果大于5.0则要看坑3。

      坑1:

      gdbusauth.c: In function '_g_dbus_auth_run_server':
      gdbusauth.c:1298:11: error: '%s' directive argument is null [-Werror=format-overflow=]
       1298 |           debug_print ("SERVER: WaitingForBegin, read '%s'", line);
      

      解决:
      out/d1-nezha/compile_dir/target/host/glib-2.50.1/gio/gdbusauth.c 将1298行的挪到 if语句后边,改完如下:

         1294           line = _my_g_input_stream_read_line_safe (g_io_stream_get_input_stream (auth->priv->stream),
         1295                                                     &line_length,
         1296                                                     cancellable,
         1297                                                     error);
         1298           //debug_print ("SERVER: WaitingForBegin, read '%s'", line);
         1299           if (line == NULL)
         1300             goto out;
         1301           debug_print ("SERVER: WaitingForBegin, read '%s'", line);
      

      坑2 :

      gdbusmessage.c: In function 'g_dbus_message_to_blob':
      gdbusmessage.c:2698:30: error: '%s' directive argument is null [-Werror=format-overflow=]
       2698 |       tupled_signature_str = g_strdup_printf ("(%s)", signature_str);
      

      解决方法:同坑1,把gio/gdbusmessage.c: 2698行的tupled_signature_str = g_strdup_printf ("(%s)", signature_str);移到if else 语句块后面

         2697       gchar *tupled_signature_str;
         2698       //tupled_signature_str = g_strdup_printf ("(%s)", signature_str);
         2699       if (signature == NULL)
         2700         {
         2701           g_set_error (error,
         2702                        G_IO_ERROR,
         2703                        G_IO_ERROR_INVALID_ARGUMENT,
         ---
         2717           goto out;
         2718         }
         2719       tupled_signature_str = g_strdup_printf ("(%s)", signature_str);
         2720       g_free (tupled_signature_str);
      

      坑3 : libgpg-error包在gawk 5.0以上版本提示类似于如下的错误

      ./mkerrcodes | gawk -f ./mkerrcodes2.awk >code-from-errno.h
      gawk: ./mkerrcodes2.awk:94: warning: regexp escape sequence `\#' is not a known regexp operator
      gawk -f ./mkstrtable.awk -v textidx=2 -v nogettext=1 \
              ./err-sources.h.in >err-sources-sym.h
      gawk: ./mkstrtable.awk:113: warning: regexp escape sequence `\#' is not a known regexp operator
      

      比较省事的办法是gawk降级。
      sudo apt autoremove gawk
      wget https://ftp.gnu.org/gnu/gawk/gawk-4.2.1.tar.gz
      然后解压,./configure --prefix=/usr --libexecdir=/usr/lib , make , make check , sudo make install , 再检查gawk:

      mg@Ubuntu:~/tina-d1-open$ gawk --version
      GNU Awk 4.2.1, API: 2.0
      

      然后清理一遍之前输出: rm -r out/d1-nezha/compile_dir/target/libgpg-error-1.27
      再 make -j1 编译通过。

      1 Reply Last reply Reply Quote Share 2
      • whycan
        whycan晕哥 LV 9 last edited by

        widora芒果哥哥也来了😊

        mangogeek 1 Reply Last reply Reply Quote Share 0
        • mangogeek
          mangogeek LV 8 @whycan last edited by

          @whycan 追随老铁远道而来😊

          whycan Kirin 2 Replies Last reply Reply Quote Share 0
          • whycan
            whycan晕哥 LV 9 @mangogeek last edited by

            @mangogeek 在 使用Ubuntu20.04 LTS编译D1-Tina踩坑记录 中说:

            @whycan 追随老铁远道而来😊

            还好我用Ubuntu18.04,一个幺蛾子都没出来。

            1 Reply Last reply Reply Quote Share 0
            • Kirin
              陈塘关李靖 LV 6 @mangogeek last edited by

              @mangogeek 感谢芒果哥捧场,奉献详细好文!

              1 Reply Last reply Reply Quote Share 0
              • tigger
                tigger LV 7 last edited by

                又从google找到这个帖子

                再来一个:

                https://bbs.aw-ol.com/topic/102
                【加精】在Ubuntu21.04中编译Tina SDKV1.01 版本 踩坑记录

                1 Reply Last reply Reply Quote Share 0
                • R
                  razor7788 LV 4 last edited by

                  哇 真的有用 顶你咯

                  1 Reply Last reply Reply Quote Share 0
                  • Referenced by  Kirin Kirin 
                  • 1 / 1
                  • First post
                    Last post

                  Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

                  行为准则 | 用户协议 | 隐私权政策