-
Notifications
You must be signed in to change notification settings - Fork 65
Python import from REPL results in a runtime error when linking a library with -l #5
Comments
Could you try adding If that solves the problem, I'll look into making the REPL link |
awesome, I figured this was likely the issue here and probably related to #5 but didn't have time to find the lib names. This works: important to note however that the order in which the flags are supplied matters (the order above is correct, reverse the sounds like getting this linking out of the way up front is the solution. also, I haven't built from source yet so I'm not sure on what's captured in current docs, but probably want to note all this for people who roll their own. |
Thanks for confirming Can you share what test program you're running? I'd like to replicate the "link flag ordering" issue. |
Sure, it's the example here but I'll paste it below for ease. Starting the container with:
and I can run the following:
However, if we change the above run command to:
the result is as follows:
and also, the test case and results for #4 are also applicable again with the flags in the wrong order. |
Thanks for sharing! That's weird, I don't get the
From my observations, there are some other factors affecting the REPL and linking. Sometimes, commands that don't initially work magically work after I run commands that do link libraries correctly. The interpreter/compiler seem to have more predictable behavior. In any case, I'm looking into a fix for the REPL! |
Actually, this confirms what I saw once or twice myself but hadn't brought up yet. The REPL does behave incosistently. The really strange part is that the linker flags passed in a specific order seems to work more predictably. |
Sorry for the delay! I believe this is fixed in 1969380. Verifying the fix was a bit difficult because the REPL doesn't seem to fail consistently. It's fully possible that linking more libraries causes other issues. If you find any, please file a new issue and I'll take a look. 😄 |
Again, this is brought over from the mailing list - attempting to edit the original message down to something relevant to this specific issue.
import Python
fails when I include the-lTFExample
flag to the REPL invocation to link to the builtTFExample
library so I can access third-party packages.If I don't include that flag, I'll get runtime errors when trying to interact with imported third-party libraries which is expected because the symbols will be missing.
The text was updated successfully, but these errors were encountered: