Build problem for the Libraries on Windows 7/10 with VS2015 / VS2017

251 views
Skip to first unread message

Marc Immer

unread,
Dec 18, 2017, 11:41:13 AM12/18/17
to OpenVSP
Hi!

I'm trying to build OpenVSP with the goal to create the Python bindings (64-bit).

However, I can't build the Libraries project.

I have tried on Windows 7 and Windows 10, with VS2015 and VS2017, 32-bit and 64-bit. The error message is always the same (see output below).

My steps:
* install cmake
* install doxygen
* install swig
* install anaconda
* clone OpenVSP git repo
* run cmake-gui. I don't specify any additional variables, just configure and generate. There are no errors.
* Open the VSP_LIBRARIES.sln and compile in Release mode

All project compile except CODEELI

I would appreciate if someone knows what I'm missing.
Best Regards
Marc

This is the output:

2>Creating directories for 'CODEELI'
2>Performing download step (verify and extract) for 'CODEELI'
2>CMake Warning at CODEELI-stamp/verify-CODEELI.cmake:15 (message):
2>  File will not be verified since no URL_HASH specified
2>
2>
2>-- extracting...
2>     src='C:/Users/alr/Documents/OpenVSP/Source/OpenVSP/Libraries/Code-Eli-794dce6a6ec8.zip'
2>     dst='C:/Users/alr/Documents/OpenVSP/Build/CODEELI-prefix/src/CODEELI'
2>-- extracting... [tar xfz]
2>-- extracting... [analysis]
2>-- extracting... [rename]
2>-- extracting... [clean up]
2>-- extracting... done
2>No update step for 'CODEELI'
2>No patch step for 'CODEELI'
2>Performing configure step for 'CODEELI'
2>CMake Error at cmake/DetermineDateTime.cmake:30 (string):
2>  string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
2>  command.
2>Call Stack (most recent call first):
2>  CMakeLists.txt:26 (include)
2>
2>
2>-- Could NOT find CPPTest (missing: CPPTEST_INCLUDE_DIRS CPPTEST_LIBRARIES CPPTEST_LIBRARY_DIRS)
2>-- Could NOT find Eigen3 (missing: EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK) (Required is at least version "3.0.0")
2>-- Configuring incomplete, errors occurred!
2>See also "C:/Users/alr/Documents/OpenVSP/Build/CODEELI-prefix/src/CODEELI-build/CMakeFiles/CMakeOutput.log".
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" wurde mit dem Code 1 beendet.
2>Die Erstellung des Projekts "CODEELI.vcxproj" ist abgeschlossen -- FEHLER.

Marc Immer

unread,
Jan 7, 2018, 5:35:46 AM1/7/18
to OpenVSP
I tracked this specific problem to code-eli and opened a pull request on github (https://github.com/ramcdona/Code-Eli/pull/4)

Cheers
Marc

Trevor Laughlin

unread,
Jan 7, 2018, 10:12:36 AM1/7/18
to OpenVSP
Hi Marc,

I have a fork and AppVeyor builds of OpenVSP for different Windows configurations with the Python API if you want to try and use them:


That link should point to the 3.15.0 release. At the bottom you should be able to find different configurations (versions of Python, win 32/64). Select the one you're interested in and then there should be an "Artifacts" tab where you can download a zip file that contains OpenVSP including the Python API.

Let me know if you have any problems.

Regards,
Trevor

Marc Immer

unread,
Jan 7, 2018, 10:35:46 AM1/7/18
to ope...@googlegroups.com
Hi Trevor,

thanks a lot, that actually works! Your appveyor.yml seems to just build the repo unchanged from the upstream master. So now I really wonder why I get build errors on my machine...

Do you know, is there a plan to also add appveyor builds to the official repo?

Cheers
Marc

--
You received this message because you are subscribed to a topic in the Google Groups "OpenVSP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openvsp/ixAZlyw7GgY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openvsp+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rob McDonald

unread,
Jan 7, 2018, 11:19:36 AM1/7/18
to ope...@googlegroups.com
My guess is actually that your bug is with CMake -- if you look
closely, you see the original error message as:

2>CMake Error at cmake/DetermineDateTime.cmake:30 (string):
2> string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
2> command.

Line 30 of DetermineDateTime is a call to REGEX.

My guess is that CMake's REGEX command changes at some point -- either
the version you are using is too old -- or possibly too new.

Rob
>> openvsp+u...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenVSP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to openvsp+u...@googlegroups.com.

Trevor Laughlin

unread,
Jan 7, 2018, 11:20:01 AM1/7/18
to OpenVSP
Hi Marc,

Glad they worked. Occasionally I'll also have mysterious build errors for various projects so it's tough to say what the root cause is. Sometimes it's a cmake version or even a local machine/visual studio setting. I'd like to get appveyor and travis ci support integrated and then submit a pull request to the official repo. Then it relies on the owner of the OpenVSP repo to pull it in and set up an appveyor and travis ci account, which should be free for open source projects.

Regards,
Trevor
To unsubscribe from this group and all its topics, send an email to openvsp+u...@googlegroups.com.

Marc Immer

unread,
Jan 7, 2018, 11:30:30 AM1/7/18
to ope...@googlegroups.com
Hi Rob,

that could be. I use CMake 3.10.1. Interestingly however, the quotes (https://github.com/ramcdona/Code-Eli/pull/4) fixes it.


Cheers
Marc


>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenVSP" group.
> To unsubscribe from this group and stop receiving emails from it, send an

> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "OpenVSP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openvsp/ixAZlyw7GgY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openvsp+unsubscribe@googlegroups.com.

Rob McDonald

unread,
Jan 7, 2018, 11:35:14 AM1/7/18
to ope...@googlegroups.com
That is certainly a CMake issue -- and probably a sensible
fix/workaround. 3.10.1 is bleeding-edge new. We need someone to test
the quotes on an older version of CMake to make sure it doesn't break
the rest of the world. If that passes, the fix should be harmless
to take.

Rob
>> >> openvsp+u...@googlegroups.com.
>> >> For more options, visit https://groups.google.com/d/optout.
>> >
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "OpenVSP" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to openvsp+u...@googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "OpenVSP" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/openvsp/ixAZlyw7GgY/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> openvsp+u...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenVSP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to openvsp+u...@googlegroups.com.

Marc Immer

unread,
Jan 8, 2018, 9:41:40 AM1/8/18
to OpenVSP
Dear all,

having tested the script DetermineDateTime.cmake from code-eli in isolation, I discovered that its not actually the cmake version that creates the problem. I used cmake 2.8 and got the same error message.
The problem is the windows "date.exe" that returns the date in the computer locale, and therefore the regex "(..)/(..)/(....)" does not work.

This is the test cmake script I used:

execute_process(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE _ELI_WIN_DATE)
MESSAGE( STATUS "_ELI_WIN_DATE:         " ${_ELI_WIN_DATE} )
string(REGEX MATCH "(..)/(..)/(....)" _ELI_WIN_DATE ${_ELI_WIN_DATE})
MESSAGE( STATUS "_ELI_WIN_DATE:         " ${_ELI_WIN_DATE} )
string(REGEX REPLACE "(..)/(..)/(....)" "\\3\\1\\2" ELI_DATE ${_ELI_WIN_DATE})
MESSAGE( STATUS "_ELI_WIN_DATE:         " ${_ELI_WIN_DATE} )

The output is:
-- _ELI_WIN_DATE:         08.01.2018

-- _ELI_WIN_DATE:
CMake Error at cmake/test.cmake:5 (string):
  string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.

I'm not sure theres an easy way to get the date consistently in the mm-dd-yyyy format or an IOS format in windows....

Kind Regards
Marc

Rob McDonald

unread,
Jan 9, 2018, 1:47:27 AM1/9/18
to ope...@googlegroups.com
Great detective work!

I'm half tempted to just rip this whole mess out. Embedding a build
date/time into Code-Eli is not important -- especially considering it
is a header-only library.

CMake often has built-in commands that provide cross-platform
solutions to different build-time needs. If we can't identify a CMake
built-in solution for this, I'd propose that we just rip it out.

Rob

Marc Immer

unread,
Jan 9, 2018, 2:44:17 AM1/9/18
to ope...@googlegroups.com
I guess if you have version control (git), automated build processes (appveyor) you don't really need a date inside a header anymore... But thats just my opinion.

Cheers
Marc


> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "OpenVSP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openvsp/ixAZlyw7GgY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openvsp+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages