Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

CMake will modify the content in 3rdparty/dmlc-core #15575

Closed
apeforest opened this issue Jul 17, 2019 · 8 comments
Closed

CMake will modify the content in 3rdparty/dmlc-core #15575

apeforest opened this issue Jul 17, 2019 · 8 comments

Comments

@apeforest
Copy link
Contributor

Description

When building MXNet with CMake on Mac, the file include/dmlc/build_config.h under 3rdparty/dmlc-core is always modified leaving an unclean git trace.

It would be great to fix this to make CMake experience better.

Environment info (Required)

----------Python Info----------
Version      : 3.7.2
Compiler     : Clang 10.0.0 (clang-1000.11.45.5)
Build        : ('default', 'Feb 12 2019 08:16:38')
Arch         : ('64bit', '')
------------Pip Info-----------
Version      : 19.0.3
Directory    : /Users/lnyuan/.virtualenvs/mxnet/lib/python3.7/site-packages/pip
----------MXNet Info-----------
Version      : 1.5.0
Directory    : /Users/lnyuan/work/mxnet/python/mxnet
Hashtag not found. Not installed from pre-built package.
----------System Info----------
Platform     : Darwin-17.7.0-x86_64-i386-64bit
system       : Darwin
node         : 88e9fe759c49.ant.amazon.com
release      : 17.7.0
version      : Darwin Kernel Version 17.7.0: Wed Apr 24 21:17:24 PDT 2019; root:xnu-4570.71.45~1/RELEASE_X86_64
----------Hardware Info----------
machine      : x86_64
processor    : i386
b'machdep.cpu.brand_string: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz'
b'machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ DTES64 MON DSCPL VMX EST TM2 SSSE3 FMA CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC MOVBE POPCNT AES PCID XSAVE OSXSAVE SEGLIM64 TSCTMR AVX1.0 RDRAND F16C'
b'machdep.cpu.leaf7_features: SMEP ERMS RDWRFSGS TSC_THREAD_OFFSET BMI1 AVX2 BMI2 INVPCID SMAP RDSEED ADX IPT SGX FPU_CSDS MPX CLFSOPT MD_CLEAR TSXFA IBRS STIBP L1DF SSBD'
b'machdep.cpu.extfeatures: SYSCALL XD 1GBPAGE EM64T LAHF LZCNT PREFETCHW RDTSCP TSCI'
----------Network Test----------
Setting timeout: 10
Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0303 sec, LOAD: 0.5312 sec.
Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.0509 sec, LOAD: 0.1678 sec.
Timing for Gluon Tutorial(cn): https://zh.gluon.ai, DNS: 0.0581 sec, LOAD: 0.1946 sec.
Timing for FashionMNIST: https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, DNS: 0.0500 sec, LOAD: 0.1306 sec.
Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0279 sec, LOAD: 0.4539 sec.
Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.0499 sec, LOAD: 0.1763 sec.

Error Message:

diff --git a/include/dmlc/build_config.h b/include/dmlc/build_config.h
index 999d478..2a6629d 100644
--- a/include/dmlc/build_config.h
+++ b/include/dmlc/build_config.h
@@ -1,36 +1,24 @@
-/*!

    • Copyright (c) 2018 by Contributors
    • \file build_config.h
    • \brief Default detection logic for fopen64 and other symbols.
    •    May be overriden by CMake
      
    • \author KOLANICH
  • */
    #ifndef DMLC_BUILD_CONFIG_H_
    #define DMLC_BUILD_CONFIG_H_

-/* default logic for fopen64 */
-#if DMLC_USE_FOPEN64 && \

  • (!defined(GNUC) || (defined ANDROID) || (defined FreeBSD) \
  • || (defined APPLE) || ((defined MINGW32) && !(defined MINGW64)) \
  • || (defined CYGWIN) )
    +/* #undef DMLC_FOPEN_64_PRESENT */

+#if !defined(DMLC_FOPEN_64_PRESENT) && DMLC_USE_FOPEN64
#define DMLC_EMIT_FOPEN64_REDEFINE_WARNING
#define fopen64 std::fopen
#endif

-/* default logic for stack trace */
-#if (defined(GNUC) && !defined(MINGW32)\

  • && !defined(__sun) && !defined(__SVR4)\
    
  • && !(defined __MINGW64__) && !(defined __ANDROID__))\
    
  • && !defined(__CYGWIN__) && !defined(__EMSCRIPTEN__)\
    
  • && !defined(__RISCV__)
    

+#define DMLC_CXXABI_H_PRESENT
+#define DMLC_EXECINFO_H_PRESENT

Minimum reproducible example

Build mxnet from source using CMake

@mxnet-label-bot
Copy link
Contributor

Hey, this is the MXNet Label Bot.
Thank you for submitting the issue! I will try and suggest some labels so that the appropriate MXNet community members can help resolve it.
Here are my recommended labels: Installation, Build

@hcho3
Copy link
Contributor

hcho3 commented Jul 17, 2019

Here is relevant discussion thread: dmlc/dmlc-core#432 (review)

@larroy
Copy link
Contributor

larroy commented Jul 18, 2019

This is a big annoyance for MXNet developers.

@hcho3
Copy link
Contributor

hcho3 commented Jul 19, 2019

@apeforest @larroy I plan to submit a pull request soon so that the CMake generated header will not overwrite dmlc/build_config.h (just generate a separate header and register it in .gitignore).

@hcho3
Copy link
Contributor

hcho3 commented Aug 1, 2019

Filed a PR: dmlc/dmlc-core#551. Once that's merged, we can upgrade dmlc-core submodule inside MXNet.

@apeforest
Copy link
Contributor Author

@hcho3 Could you please file a PR to upgrade dmlc-core module in MXNet? Let me know if you need help. Thanks!

@apeforest apeforest added the Bug label Sep 14, 2019
@hcho3
Copy link
Contributor

hcho3 commented Sep 26, 2019

@apeforest You should close this, now that #16149 is merged.

@apeforest
Copy link
Contributor Author

Thanks for the quick fix.

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

No branches or pull requests

4 participants