Code Monkey home page Code Monkey logo

Comments (7)

samkumar avatar samkumar commented on May 29, 2024 1

@jwhui Thanks for letting me know about this. I'll look into this over the weekend.

from ot-qorvo.

jwhui avatar jwhui commented on May 29, 2024 1

@jwhui, please confirm that this resolves the build failure.

I can confirm that this change addresses the build issue.

Build logs: https://github.com/jwhui/ot-qorvo/actions/runs/1774854431

from ot-qorvo.

samkumar avatar samkumar commented on May 29, 2024

@jwhui I've been looking into this today. Interestingly, I'm getting the same linker error you showed above when trying to build the main branch of ot-qorvo, with the openthread submodule still at commit 69ed42f4910253592b2a827a7b04b658b16fc384. To verify that this is not an issue with my development environment, I installed a fresh Ubuntu 20.04 virtual machine, followed the instructions at https://github.com/Qorvo/qpg-openthread/blob/master/qpg6095/doc/README.md#getting-qorvo-openthread to build openthread. Unfortunately, I still found that building the current main branch of ot-qorvo, with the openthread submodule still at commit 69ed42f4910253592b2a827a7b04b658b16fc384, fails with the error that you posted above. As a result, I'm unsure if the fix I have in mind actually resolves the issue.

In my setup, I observed that if I go back far enough in the commit history for ot-qorvo, I can find versions of the code that do build. Using git bisect, I identified 15fa4522d80c4e0039b5b25c6f4a12e1151000b8 as the commit that caused the ot-qorvo code to no longer build successfully in my setup. Do you have any thoughts as to why this might be the case?

I'm assuming you were able to build the current main branch, since you said you narrowed down the issue to a particular commit. I emailed you a patch file, which I suspect might fix the issue (unfortunately, GitHub does not let me attach a .patch file directly to this message). It's really a shot in the dark since I cannot validate locally whether this causes the build to succeed, but given that you can reproduce it, I figured that this might be worth a try.

from ot-qorvo.

thcu-gp avatar thcu-gp commented on May 29, 2024

We can reproduces @jwhui debug process. We can build this up to the mentioned ot commit. The linker errors are indicative of the inclusion of stdlib. We do not include it in our builds.
Stubbing the calls, fixes the builds, but I can't tell if this has function consequences.
@samkumar do you know where stdlib is included or where it is needed?

from ot-qorvo.

jwhui avatar jwhui commented on May 29, 2024

@samkumar @thcu-gp , thanks for looking into this.

I have validated that the following change resolves the build issue:

--- a/third_party/tcplp/bsdtcp/tcp_output.c
+++ b/third_party/tcplp/bsdtcp/tcp_output.c
@@ -80,8 +80,8 @@ tcp_setpersist(struct tcpcb *tp)
        int tt;
 
        tp->t_flags &= ~TF_PREVVALID;
-       if (tcp_timer_active(tp, TT_REXMT))
-               printf("PANIC: tcp_setpersist: retransmit pending\n");
+//     if (tcp_timer_active(tp, TT_REXMT))
+//             printf("PANIC: tcp_setpersist: retransmit pending\n");
        /*
         * Start/restart persistance timer.
         */
@@ -1454,7 +1454,7 @@ tcp_addoptions(struct tcpopt *to, uint8_t *optp)
                        break;
                        }
                default:
-                       printf("PANIC: %s: unknown TCP option type", __func__);
+//                     printf("PANIC: %s: unknown TCP option type", __func__);
                        break;
                }
        }

No change is necessary to bitmap.c since nothing actually calls bmp_print.

Build log: https://github.com/jwhui/ot-qorvo/actions/runs/1774149414

@samkumar , would you like to submit PR?

from ot-qorvo.

samkumar avatar samkumar commented on May 29, 2024

@thcu-gp The patch I sent Jonathan removed calls to printf. These calls were only made on assertion failures, so removing them wouldn't change any functionality. Based on Jonathan's reply, the patch worked and it was those calls to printf that was causing this. Like you mentioned, I suspected this based on the error messages (I recognized those functions as newlib stubs) but I wasn't entirely sure until Jonathan tested the patch, because OpenThread does use stdlib functions (e.g., memset, memcpy, snprintf, etc.). But now that we know what the problem is, we can move forward with a fix.

@jwhui Thanks for testing the patch that I sent you. I can submit a PR that appropriately handles this by calling into OpenThread to log assertion failures instead of calling printf. I'll try to submit that pull request at some point today.

from ot-qorvo.

samkumar avatar samkumar commented on May 29, 2024

openthread/openthread#7379 should resolve this issue. It's better than the patch that I sent to Jonathan because it fixes the logging so that it happens correctly, via OpenThread, instead of just commenting it out.

@jwhui, please confirm that this resolves the build failure.

from ot-qorvo.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.