MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001456Orfeo Toolbox (OTB)Generalpublic2017-10-02 09:552017-10-18 09:09
Reporterdiginove 
Assigned Togpasero 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformWindowsOSWindows 10 x64OS VersionWindows 10 x64
Summary0001456: Superbuild with Visual Studio 15 2017
DescriptionImpossible to run Superbuild using VS 2017, using cmake 3.9.0, due to bad parameter sequence in XXX-build-${configuration}.cmake in line :

set(command "C:/Program Files/CMake/bin/cmake.exe;-GVisual Studio 15 2017 Win64;--build;.;--config;Release")

The --build should be the first parameter as indicated in cmake documentation (as shown below in additionnal information)
Steps To ReproduceGenerate Superbuild project using cmake command line or gui.
Open The generated solution using VS 2017 and run generate.
The download, configure and patch steps are OK.
Build step failed with error.
Additional InformationCmake documentation except :

CMake provides a command-line signature to build an already-generated project binary tree:

cmake --build <dir> [<options>...] [-- <build-tool-options>...]
This abstracts a native build tool’s command-line interface with the following options:

--build <dir>
Project binary directory to be built. This is required and must be first.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0004339)
diginove (reporter)
2017-10-02 11:16

When changing SB_CMAKE_COMMAND in Superbuild/CmakeLists.txt from

      set(SB_CMAKE_COMMAND ${CMAKE_COMMAND} ${SB_CMAKE_ARGS})

To

      set(SB_CMAKE_COMMAND ${CMAKE_COMMAND})

Build Step is now OK, because --build option is the first one.
(0004340)
rashadkm (developer)
2017-10-02 11:34
edited on: 2017-10-02 11:35

hmm. cmake generator arg must be paseed when building external projects. otherwise, subprojects won't use same generator.

in this case, VS gen is default on windows, so if you specify it or not, it will work. That explains why your fix seems to work.

But I think if you have build option at first then it will be okay

-set(command "C:/Program Files/CMake/bin/cmake.exe;-GVisual Studio 15 2017 Win64;--build;.;--config;Release")
+set(command "C:/Program Files/CMake/bin/cmake.exe;--config;Release;--build;.;-GVisual Studio 15 2017 Win64")

(0004381)
diginove (reporter)
2017-10-16 09:34

I do agree, the --build should be the first option. Generator at the end of the command id ok.
(0004384)
gpasero (administrator)
2017-10-16 13:20

Please be aware that the support of Visual generator may not be perfect. I am trying to reproduce the error : I do get a build error. I am using Visual 2015

After your fix, some parts of SuperBuild now build, but I ran into other issues.

Rashad: since the generator should be set at configure time, I don't see the need to specify it at build time. For instance if I look into ZLIB/src/ZLIB-stamp/ZLIB-configure-Release.cmake, I see the generator option twice ! I think we can remove this extra argument. I will do a check with NMake generator.
(0004385)
gpasero (administrator)
2017-10-16 13:44

I pushed a fix on branch release-6.2 :
https://git.orfeo-toolbox.org/otb.git/commit/4ebfbbcaf5f526de8edea52cda0b0b3fc5a0986f [^]

We will see tomorrow dashboard if it breaks something.
(0004387)
gpasero (administrator)
2017-10-17 09:50

A few projects are using the configure command differently (JPEG, GLUT, GLEW), I am preparing a patch for them.

In the future (not now because of coming release 6.2), I plan to review the use of these SB_CMAKE_COMMAND, SB_ENV_CONFIGURE_CMD ...
(0004388)
diginove (reporter)
2017-10-17 09:55

Yes, you are right. I just modified the JPEG projet like that:
The genarator should be added (first position is OK, and if 64bit is selected, the option -D64BIT=TRUE should be TRUE.


if(WIN32)
  set(JPEG_CONFIGURE_COMMAND "${SB_CMAKE_COMMAND}"
    ${SB_CMAKE_ARGS}
    ${SB_CMAKE_CACHE_ARGS}
    -DENABLE_SHARED=TRUE
    -DENABLE_STATIC=FALSE
    -DWITH_SIMD=FALSE
    -DWITH_TURBOJPEG=FALSE
    -DWITH_ARITH_DEC=TRUE
    -DWITH_JAVA=FALSE
    -D64BIT=TRUE
    ${JPEG_SB_SRC} )

else()
...
endif()
(0004389)
diginove (reporter)
2017-10-17 10:05

Sorry, for 64BIT option, I put

    -D64BIT=${OTB_TARGET_SYSTEM_ARCH_IS_X64}

Not TRUE statically
(0004390)
gpasero (administrator)
2017-10-17 10:53

The 64BIT is not exposed as an option. It should be detected automatically by JPEG. Visual studio handles both 32bit and 64bit. Are you sure you setup 64bit version of the compiler ? The generator should be "Visual Studio 15 2017 Win64".
(0004395)
gpasero (administrator)
2017-10-18 09:09

Dashboard is now okay. The following commits on release-6.2 should fix your issue:

https://git.orfeo-toolbox.org/otb.git/commit/4ebfbbcaf5f526de8edea52cda0b0b3fc5a0986f [^]
https://git.orfeo-toolbox.org/otb.git/commit/95bc803b6e2781687ade6ee83fd9c66ac6acefbd [^]

- Issue History
Date Modified Username Field Change
2017-10-02 09:55 diginove New Issue
2017-10-02 11:16 diginove Note Added: 0004339
2017-10-02 11:34 rashadkm Note Added: 0004340
2017-10-02 11:35 rashadkm Note Edited: 0004340 View Revisions
2017-10-16 09:34 diginove Note Added: 0004381
2017-10-16 11:26 gpasero Assigned To => gpasero
2017-10-16 11:26 gpasero Status new => assigned
2017-10-16 13:20 gpasero Note Added: 0004384
2017-10-16 13:44 gpasero Note Added: 0004385
2017-10-17 09:50 gpasero Note Added: 0004387
2017-10-17 09:55 diginove Note Added: 0004388
2017-10-17 10:05 diginove Note Added: 0004389
2017-10-17 10:53 gpasero Note Added: 0004390
2017-10-18 09:09 gpasero Note Added: 0004395
2017-10-18 09:09 gpasero Status assigned => resolved
2017-10-18 09:09 gpasero Resolution open => fixed


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker