Comments (6)
I read the issue the other one posted who faced the same problem before, and the solution you provided in that issue by adding -DCMAKE_INSTALL_PREFIX is doesn't work for me, and at the same time I face a new problem before the cp.
so, is there any relation between the two problem?
from tensorflow_cc.
Hi, the solution will probably work for you as well, but you have to remove the tensorflow_cc/build
folder first. Also consider removing ~/.cache
to clean up the previous builds.
from tensorflow_cc.
hi, I think I find the key point why this cp error appears after reading the your whole project and many times building.
At first, I found the error always showed after tensorflow build process was finished. That means our tensorflow is successful built and then next step will do some cp operations, At that time I didn't know why there should have cp operation because I only typed make command without make install, as you can see the make install command will cause some files movement and use cp is make sense.
So, I began read your cmake files. After long time reading, I found some clues in cmake directory. In the TensorflowShared.cmake file, there are some command execute sequences, the last two commands are to build tensorflow and do some copy links by executing bash files respectively. That is what I want find as I described above, the error shows after tensorflow is successful built.
Then read the copy-links bash file. According to my understanding, the main function of the bash file is find symbolic links under the directory which is specified by argument, then remove these symbolic links by unlink them and copy the content from the realpath to there, it seems something wrong when copying . Actually it is, when I comment the do copy-links bash file command, which means there is no copy process after building tensorflow, the cp problem is disappear.
Then, I execute the commands inside the copy-links.sh manually, I get the same cp error, and the error only happened when process this path:
"./tensorflow/contrib/makefile/gen/protobuf/protobuf"
after testing this path, I find this symbolic links actully is a circle.
when list the content in this path (./tensorflow/contrib/makefile/gen/protobuf/protobuf), shows below
lib, bin, include, protobuf
then cd to the protobuf dir and list(./tensorflow/contrib/makefile/gen/protobuf/protobuf/protobuf), shows same content as below. you can do these processes several times, you will find the content is NEVER changed.
So this circle will lead the source and destination is same when do the copy command to protobuf dir !!!.
AND, fortunately it's also means that we do not need do the copy command to this dir beacause it's content not changed, it's SAME one.
I finally got this, and modify your copy-links.sh file, now it's look likes below:
#!/bin/sh
set -e
skip="./tensorflow/contrib/makefile/gen/protobuf/protobuf"
for f in $(find "$1" -type l); do
if test $f = $skip
then
continue
fi
realf="$(realpath $f)"
unlink "$f"
cp -r "$realf" "$f"
done
it's look likes simple and force, but it really works for me, faceplam.
I still have some question, I don't understand why you clean up the symbolic links. I browse the commit history find that it's no need delete these links before.
And, when I compile the tensorflow by bazel, there is no symbolic links generated, so why there is some when compile tf through your project.
Anyway, thank for you project, I can get my hand on building the tf by cmake, and I also learn a lot by read your code. Hope my issue will help you find the truly solution for this problem.
from tensorflow_cc.
Hi,
The reason for "delinking" is that some of the files in the compiled library folder are actually only links to the ~/.cache/bazel
. After removing ~/.cache
, the installation would stop working. Can you please try to remove both tensorflow_cc/build
and ~/.cache
, and rebuild the project with -DCMAKE_INSTALL_PREFIX=/usr/local
?
from tensorflow_cc.
Closing for inactivity, please reopen if you continue to encounter this issue.
from tensorflow_cc.
Hi, the issue should be fixed in the latest master.
from tensorflow_cc.
Related Issues (20)
- what is the Tensorflow version that i can compile with bazel 3.7.1? HOT 1
- Build Failed
- subprocess.CalledProcessError: Command '['bazel', 'build', '-c', 'opt', '//mediapipe_api:mediapipe_proto_srcs']' returned non-zero exit status 1. HOT 1
- tensorflow_cc slow startup, tensorflow over python works as expected HOT 7
- Bazel build fails on both macOS and Ubuntu HOT 3
- Where are certain tensorflow c/cc files? HOT 3
- Use system Eigen and/or provide FindEigen.cmake
- error while built HOT 1
- support for new versions of tensorflow
- It seems that Tensorflow_cc does not use the GPU on my installation HOT 19
- Tag/release 2.6/2.7/2.8 HOT 4
- is there a way to do this in windows HOT 2
- Duplicate #136 code and meet make errors HOT 16
- error downloads file from llvm repository HOT 2
- Inconsistent CUDA toolkit path: /usr vs /usr/lib HOT 2
- Conan package
- how to include tensorflow lite libraries also
- Cc1plus error when building tensorflow HOT 1
- Linking step fails with undefined symbols. HOT 4
- Still requires building tensorflow HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tensorflow_cc.