You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/04/17 14:36:45 UTC

[GitHub] [incubator-mxnet] anko-intel opened a new issue #18091: config/linux.cmake - misleading comment about setting Debug build

anko-intel opened a new issue #18091: config/linux.cmake  - misleading comment about setting Debug build
URL: https://github.com/apache/incubator-mxnet/issues/18091
 
 
   ## Description
   Uncommenting the second line below from config.cmake file:
   ```
   # Uncomment the following line to compile with debug information
   # set(CMAKE_BUILD_TYPE Debug CACHE STRING "CMake build type") 
   ```
   
   doesn't switch compilation to Debug type. Release library is produced instead.
   
   ## To Reproduce
   Follow the instruction: [Installing MXNet from source on Ubuntu](https://mxnet.apache.org/get_started/ubuntu_setup):
   1. 
   `cp config/linux.cmake config.cmake`
   2. 
   uncomment line in config.cmake:
   [# set(CMAKE_BUILD_TYPE Debug CACHE STRING "CMake build type") ](https://github.com/apache/incubator-mxnet/blob/master/config/linux.cmake#L84) 
   3. 
   ```
   rm -rf build
   mkdir -p build && cd build
   cmake -GNinja ..
   ```
   it produces:
   ```
   -- The C compiler identification is GNU 7.5.0
   -- The CXX compiler identification is GNU 7.5.0
   -- Check for working C compiler: /usr/lib/ccache/cc
   -- Check for working C compiler: /usr/lib/ccache/cc -- works
   -- Detecting C compiler ABI info
   -- Detecting C compiler ABI info - done
   -- Detecting C compile features
   -- Detecting C compile features - done
   -- Check for working CXX compiler: /usr/lib/ccache/c++
   -- Check for working CXX compiler: /usr/lib/ccache/c++ -- works
   -- Detecting CXX compiler ABI info
   -- Detecting CXX compiler ABI info - done
   -- Detecting CXX compile features
   -- Detecting CXX compile features - done
   -- CMAKE_CROSSCOMPILING FALSE
   -- CMAKE_HOST_SYSTEM_PROCESSOR x86_64
   -- CMAKE_SYSTEM_PROCESSOR x86_64
   -- CMAKE_SYSTEM_NAME Linux
   -- CMake version '3.14.0' using generator 'Ninja'
   -- Performing Test SUPPORT_CXX11
   -- Performing Test SUPPORT_CXX11 - Success
   -- Performing Test SUPPORT_CXX0X
   -- Performing Test SUPPORT_CXX0X - Success
   -- CMAKE_BUILD_TYPE is unset, defaulting to Release
   ...
   ```
   
   ## What have you tried to solve it?
   
   Setting CMAKE_BUILD_TYPE from the command line works properly:
   `cmake -DCMAKE_BUILD_TYPE=Debug -GNinja ..`
   
   ## Environment
   ```
   cmake --version
   cmake version 3.14.0
   uname --s -r -v -m -p -i -o
   Linux 5.3.0-45-generic #37~18.04.1-Ubuntu SMP Fri Mar 27 15:58:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] leezu commented on issue #18091: config/linux.cmake - misleading comment about setting Debug build

Posted by GitBox <gi...@apache.org>.
leezu commented on issue #18091: config/linux.cmake  - misleading comment about setting Debug build
URL: https://github.com/apache/incubator-mxnet/issues/18091#issuecomment-615357495
 
 
   Thanks @anko-intel. This used to work, when we relied on standard cmake `initial-cache` feature to handle our config: `cmake -C ../config.cmake`. 
   
   ```
   -C <initial-cache>
                 Pre-load a script to populate the cache.
   
                 When cmake is first run in an empty build tree, it creates a CMakeCache.txt file and populates  it  with
                 customizable  settings  for  the  project.  This option may be used to specify a file from which to load
                 cache entries before the first pass through the project’s cmake listfiles.  The loaded entries take pri‐
                 ority  over  the  project’s default values.  The given file should be a CMake script containing SET com‐
                 mands that use the CACHE option, not a cache-format file.
   ```
   
   But people were unhappy with the extra typing and we now load the config file automatically if it is present. At the time of loading, the build release type is already set and can't be configured anymore, so we need to remove the `Uncomment the following line to compile with debug information` parts from the config files.
   
   Would you like to open a PR?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] leezu commented on issue #18091: config/linux.cmake - misleading comment about setting Debug build

Posted by GitBox <gi...@apache.org>.
leezu commented on issue #18091: config/linux.cmake  - misleading comment about setting Debug build
URL: https://github.com/apache/incubator-mxnet/issues/18091#issuecomment-615358586
 
 
   It's the same issue as https://github.com/apache/incubator-mxnet/pull/17742

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] TaoLv commented on issue #18091: config/linux.cmake - misleading comment about setting Debug build

Posted by GitBox <gi...@apache.org>.
TaoLv commented on issue #18091: config/linux.cmake  - misleading comment about setting Debug build
URL: https://github.com/apache/incubator-mxnet/issues/18091#issuecomment-615284958
 
 
   @leezu FYI.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] anko-intel commented on issue #18091: config/linux.cmake - misleading comment about setting Debug build

Posted by GitBox <gi...@apache.org>.
anko-intel commented on issue #18091: config/linux.cmake  - misleading comment about setting Debug build
URL: https://github.com/apache/incubator-mxnet/issues/18091#issuecomment-615388550
 
 
   ok, I will

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] leezu commented on issue #18091: config/linux.cmake - misleading comment about setting Debug build

Posted by GitBox <gi...@apache.org>.
leezu commented on issue #18091: config/linux.cmake  - misleading comment about setting Debug build
URL: https://github.com/apache/incubator-mxnet/issues/18091#issuecomment-615402044
 
 
   Thank you

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-mxnet] leezu edited a comment on issue #18091: config/linux.cmake - misleading comment about setting Debug build

Posted by GitBox <gi...@apache.org>.
leezu edited a comment on issue #18091: config/linux.cmake  - misleading comment about setting Debug build
URL: https://github.com/apache/incubator-mxnet/issues/18091#issuecomment-615357495
 
 
   Thanks @anko-intel. This used to work, when we relied on standard cmake `initial-cache` feature to handle our config: `cmake -C ../config.cmake`. 
   
   ```
   -C <initial-cache>
                 Pre-load a script to populate the cache.
   
                 When cmake is first run in an empty build tree, it creates a CMakeCache.txt file and populates  it  with
                 customizable  settings  for  the  project.  This option may be used to specify a file from which to load
                 cache entries before the first pass through the project’s cmake listfiles.  The loaded entries take pri‐
                 ority  over  the  project’s default values.  The given file should be a CMake script containing SET com‐
                 mands that use the CACHE option, not a cache-format file.
   ```
   
   But people were unhappy with the extra typing and we now load the config file automatically if it is present. At the time of loading, the build release type is already set and can't be configured anymore, so we need to remove the `Uncomment the following line to compile with debug information` parts from the config files. You need to invoke cmake with `cmake -DCMAKE_BUILD_TYPE=Debug` instead.
   
   Would you like to open a PR?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services