Navigation

    全志在线开发者论坛

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

    小白求助:交叉编译jpeg-9e时报错

    MR Series
    4
    16
    4967
    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.
    • L
      lumen LV 5 last edited by

      由于程序需要的jpeg相关库交叉编译工具链没有提供,需要自己添加,就在网上下载了jpeg-9e的压缩包并解压,由于需要交叉编译,需要对configure默认的参数做修改,参照网上大佬,故作以下修改6511e412-2b89-4c93-8ef2-38a17fc14678-image.png 主要修改了CC和LD,路径应该是正确的,参照下图:8706fa5e-9c78-475b-a3f8-c11427b2c417-image.png 不清楚他报错的原因。我同时也尝试先./configure生成makefile文件,然后对makefile文件做类似的修改,但也会报错7eca7aaf-b969-4d2e-864c-205fb5f83e07-image.png 但我对ld和host都做了修改如下:b4e65520-d101-4cf1-83e5-11230bb9e63d-image.png
      751abd4b-a2e4-4277-ae5c-2a8feaa42823-image.png 实在搞不懂,请各位大佬指点一下

      whycan 1 Reply Last reply Reply Quote Share 0
      • whycan
        whycan晕哥 LV 9 @lumen last edited by

        @lumen
        是不是前面用默认参数编译?

        L 1 Reply Last reply Reply Quote Share 0
        • L
          lumen LV 5 @whycan last edited by

          @whycan 请问如何看?是在makefile文件里吗?

          whycan 1 Reply Last reply Reply Quote Share 0
          • whycan
            whycan晕哥 LV 9 @lumen last edited by

            @lumen
            .libs/ 目录里面的o文件可能是x86 gcc编译的

            L 1 Reply Last reply Reply Quote Share 0
            • L
              lumen LV 5 @whycan last edited by

              @whycan 看他意思是这样的,但我已经修改了编译器了,不懂为啥会这样了

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

                应该还有未修改到位的地方。

                建议用韦老师的buildroot sdk,勾选jpeg就行。

                1 Reply Last reply Reply Quote Share 0
                • L
                  lumen LV 5 last edited by

                  问题已解决,host改成riscv64-unknown-linux-gnu,韦老师的buildroot sdk我有时间研究以下,谢谢啦

                  H 2 Replies Last reply Reply Quote Share 1
                  • H
                    hu487364 LV 5 @lumen last edited by

                    @lumen 您好,打扰一下,请问方便说一下您参考的configure设置的文章吗,我也有想加jpeg库,但是不知道具体怎么操作。谢谢您。

                    1 Reply Last reply Reply Quote Share 0
                    • H
                      hu487364 LV 5 @lumen last edited by

                      @lumen 大佬您好,我按照您的方法,先./configure,生成Makefile文件,然后修改里面的host,LD,CC,但是也会和您报一样的错误,下面是我的报错截图:
                      23ae3306-dda6-4ed8-8715-47ebdf24a966-image.png
                      修改截图:
                      8395976a-70c7-46ed-9f58-ac48ae2030b7-image.png
                      f20ea253-92cc-46e4-abb3-da2ea6c13adb-image.png
                      14fe6dba-642f-46e2-8fd4-c79ac6dc32fc-image.png

                      L 1 Reply Last reply Reply Quote Share 0
                      • L
                        lumen LV 5 @hu487364 last edited by

                        @hu487364 我后来没再这么弄,我就直接按这个图修改的:
                        edd47390-5674-47cf-9a4e-978b051c022a-image.png
                        但是host改成了riscv64-unknown-linux-gnu,你试一下

                        H 2 Replies Last reply Reply Quote Share 0
                        • H
                          hu487364 LV 5 @lumen last edited by

                          @lumen 好的,我试一下

                          L 1 Reply Last reply Reply Quote Share 0
                          • L
                            lfdcn LV 4 @hu487364 last edited by

                            @hu487364
                            我已经编译好了,我更新下帖子发上去吧,基于Tina2.0 SDK的,等审核通过了就可以了。具体编译步骤……本菜鸡也忘了。编译出来运行于Tina的mjpeg-streamer,分享给大家

                            1 Reply Last reply Reply Quote Share 0
                            • H
                              hu487364 LV 5 @lumen last edited by

                              @lumen 大佬,我编译成功了,但是我后面使用的时候还是提示没有jpeg的库,后来我把编译好的头文件,*.so文件,放到tina的sdk里面编译的时候,就报错:
                              f159ca69-d655-4861-bcdb-c279892146e0-image.png
                              我重新编译jpeglib的库,看了一下编译的结果,感觉是这一步没有做:
                              3e43abe9-33ce-4016-94fd-b2177f8e08ab-image.png
                              看了,但不太理解这个操作是怎么进行的。大佬你有做这一步的操作吗。

                              L 1 Reply Last reply Reply Quote Share 0
                              • L
                                lumen LV 5 @hu487364 last edited by

                                @hu487364 我没有做你这个操作,我编译成功后,通过-L和-I链接了编译jpeg库生成好的头文件和库,然后记得加上-ljpeg,如下图:
                                b2606022-0ec2-4cbe-bd40-faec9cbd3df8-image.png

                                H 1 Reply Last reply Reply Quote Share 0
                                • H
                                  hu487364 LV 5 @lumen last edited by

                                  @lumen 我后来也是这么做的,非常感谢

                                  L 1 Reply Last reply Reply Quote Share 0
                                  • L
                                    lumen LV 5 @hu487364 last edited by

                                    @hu487364 没事😁

                                    1 Reply Last reply Reply Quote Share 0
                                    • 1 / 1
                                    • First post
                                      Last post

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

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