Build successfully but always encounter link error of unresolved external symbols
Closed this issue · 7 comments
Hello @guikarist , thanks for your patch method, I have successfully build tf1.13.1.
When I use it in vs, I always encounter unresolved external symbols error.
I found in the build process, we only build the functions written in lds file. And I have to add unresolved external symbols I encountered to lds file and build again.
How can I get the all function symbols? I want to build all functions for one time because we do not know what function we will use in the future.
Looking forward to your reply, thanks in advance.
Sorry there is no choice but to rebuild at least for now.
You do not have to build again, only link again. So if you disable in the script the cleaning arguments, then it sees that all the code has already been build and it will only do the linking again and enable the new symbols.
@steroes Yes, the rebuild process I said actually do the same thing as what you said. I ran “bazel build ...” and it will pass the time-consuming source code building process and just link the symbols which we add in the lds. The rebuild process is quite fast, but I still have to do that when I encounter new link error.
So the problem should be why lots of symbols linked failed in the build process?
@steroes WoW, I don't even know that! So a new flag to control whether do cleaning work is necessary.
@Dxye Cuz Tensorflow doesn't add all required symbols in it. Here are the related resources:
tensorflow/tensorflow#23542
https://github.com/guikarist/tensorflow-windows-build-script#bulletin-board
@guikarist You already have something like: $ReserveSource. But I also see that you remove the tensorflow dir at the beginning (# Cleaning work) So you need to have a look at that).
@guikarist @steroes Thanks for reply. I am trying to write a powershell srcipt to rebuild(relink).
@Dxye It will be very pleasant of you to just do that on my script and make a pull request!