Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Build process shouldn’t modify source tree #566

Merged
merged 3 commits into from
Sep 28, 2019

Conversation

codingforfun
Copy link
Contributor

It’s best practice to not modify the source tree during build time.
CMake strongly encourages this.
This PR changes the cmake build process to create the confuigured header file build_config.h in the build tree instead of the source tree.

@codingforfun
Copy link
Contributor Author

Travis fails on some utests build using Makefiles separate from the ones build by CMake.
Is that really used anymore. Test build with CMake work. I’m not very keen to dive into some ancient stuff if it’s not needed any more.

@hcho3
Copy link
Contributor

hcho3 commented Sep 25, 2019

@codingforfun See #561. This is an issue unrelated to your work here, so don't worry about it.

Copy link
Contributor

@hcho3 hcho3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

CMakeLists.txt Show resolved Hide resolved
@hcho3 hcho3 merged commit 0f3ddbc into dmlc:master Sep 28, 2019
@rongou
Copy link
Contributor

rongou commented Oct 15, 2019

This seems to break the xgboost build:

git clone --recurse-submodules https://github.com/dmlc/xgboost.git
cd xgboost
mkdir build
cd build
cmake ..
make

I get the following error:

In file included from /home/rou/src/xgboost/include/../../dmlc-core/include/dmlc/./logging.h:16,
                 from /home/rou/src/xgboost/include/../../dmlc-core/include/dmlc/io.h:15,
                 from /home/rou/src/xgboost/rabit/include/rabit/./internal/../serializable.h:14,
                 from /home/rou/src/xgboost/rabit/include/rabit/./internal/engine.h:10,
                 from /home/rou/src/xgboost/rabit/include/rabit/rabit.h:48,
                 from /home/rou/src/xgboost/src/common/timer.cc:4:
/home/rou/src/xgboost/include/../../dmlc-core/include/dmlc/././base.h:282:10: fatal error: dmlc/build_config.h: No such file or directory
 #include <dmlc/build_config.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
src/CMakeFiles/objxgboost.dir/build.make:153: recipe for target 'src/CMakeFiles/objxgboost.dir/common/timer.cc.o' failed
make[2]: *** [src/CMakeFiles/objxgboost.dir/common/timer.cc.o] Error 1
CMakeFiles/Makefile2:295: recipe for target 'src/CMakeFiles/objxgboost.dir/all' failed
make[1]: *** [src/CMakeFiles/objxgboost.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Any ideas on what's going on?

@hcho3
Copy link
Contributor

hcho3 commented Oct 15, 2019

@rongou I just tried git clone --recurse-submodules https://github.com/dmlc/xgboost.git and I cannot reproduce the problem.

@rongou
Copy link
Contributor

rongou commented Oct 15, 2019

Hmm never mind. Somehow it's picking up a separate dmlc-core repo on my drive. Once I deleted it the problem went away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants