Build: add make before make install to catch up CMakeLists change. #11378
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR (#11309) changed the CMakeLists.txt. Without make before make install, this change cannot be catch up by cmake and will cause the build error. For example:
[100%] Linking CXX executable test_dot
/usr/bin/ld: cannot find -lsend_vars_op
[100%] Linking CXX executable test_node
collect2: error: ld returned 1 exit status
paddle/fluid/inference/analysis/CMakeFiles/test_dot.dir/build.make:406: recipe for target 'paddle/fluid/inference/analysis/test_dot' failed
make[2]: *** [paddle/fluid/inference/analysis/test_dot] Error 1
CMakeFiles/Makefile2:35598: recipe for target 'paddle/fluid/inference/analysis/CMakeFiles/test_dot.dir/all' failed
make[1]: *** [paddle/fluid/inference/analysis/CMakeFiles/test_dot.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: cannot find -lsend_vars_op
collect2: error: ld returned 1 exit status
paddle/fluid/inference/analysis/CMakeFiles/test_node.dir/build.make:406: recipe for target 'paddle/fluid/inference/analysis/test_node' failed
make[2]: *** [paddle/fluid/inference/analysis/test_node] Error 1
CMakeFiles/Makefile2:36276: recipe for target 'paddle/fluid/inference/analysis/CMakeFiles/test_node.dir/all' failed
make[1]: *** [paddle/fluid/inference/analysis/CMakeFiles/test_node.dir/all] Error 2
Users may fix this build error by just deleting the whole build directory to rebuild everything, but I think adding a make before make install is a more efficient way.