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

Can't build INSTALL on VisualStudio 2017 #646

Closed
MrMabulous opened this issue Jan 27, 2020 · 5 comments
Closed

Can't build INSTALL on VisualStudio 2017 #646

MrMabulous opened this issue Jan 27, 2020 · 5 comments
Labels
Awaiting Feedback The issue is waiting for someone to respond.

Comments

@MrMabulous
Copy link

I generated a VisualStudio 2017 project and could successfully compile 'BUILD_ALL'. I did deactivate OPENEXR_VIEWERS_ENABLE and PYILMBASE_ENABLE though since I don't have the dependencies installed.

While compiling works, trying to build 'INSTALL' results in an error (note: I did launch VisualStudio with administrator privileges):

Severity	Code	Description	Project	File	Line	Suppression State
Error		Directory does not exist for chdir command: C:/Program	INSTALL	C:\Users\Username\Dropbox\projects\OpenExrComposer\OpenExrComposer\thirdparty\openexr\build\EXEC	1

Severity	Code	Description	Project	File	Line	Suppression State
Error	MSB3073	The command "setlocal
"C:\Program Files\CMake\bin\cmake.exe" -DBUILD_TYPE=Release -P cmake_install.cmake
if %errorlevel% neq 0 goto :cmEnd
:cmEnd
endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
:cmErrorLevel
exit /b %1
:cmDone
if %errorlevel% neq 0 goto :VCEnd
:VCEnd" exited with code -1.	INSTALL	C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets	138	
@meshula
Copy link
Contributor

meshula commented Jan 27, 2020

This line

Error		Directory does not exist for chdir command: C:/Program	INSTALL	C:\Users\Username\Dropbox\projects\OpenExrComposer\OpenExrComposer\thirdparty\openexr\build\EXEC	1

suggests there is an unquoted path somewhere, since "C:/Program" must be a fragment of a Windows path with a space character in it. It's not possible to tell exactly where the problem lies from the information you posted, but attaching your CMakeCache.txt file might help.

@kdt3rd
Copy link
Contributor

kdt3rd commented Jan 28, 2020

Yes, I believe @meshula is correct. bah. I see a few places in the cmake files where this could be causing issues depending on whether the build vs the source directory are relative vs absolute, or whether one of the intervening paths has a space in it (I'm guessing either case will fail). I guess that wasn't well tested.

Thanks for the report, if you have time, you could search for all locations beginning with CMAKE_CURRENT_* and CMAKE_INSTALL_* and make sure there are quotes around the path those are involved in (i.e. ${CMAKE_INSTALL_PREFIX}/lib ==> "${CMAKE_INSTALL_PREFIX}/lib" or just a bare ${CMAKE_CURRENT_SOURCE_DIR} ==> "${CMAKE_CURRENT_SOURCE_DIR}". Some of them have the quotes, many do ... not. And the rules about whether it's needed or not seem to be a bit vague. That may not be all the variables to search for, but that's where I would start as I think it's most of them. I think there are around 100-150 in total of those to examine whether they need quotes, although I think you can mostly just blindly add them if they are missing.

If you don't have time or that sounds particularly tedious, I'll do the above at some point in a few weeks and can test under linux, but will have to rely upon others to test if it all works in visual studio under windows...

@cary-ilm cary-ilm added the Needs Discussion To be discussed in the technical steering committee label Feb 7, 2020
@cary-ilm
Copy link
Member

@MrMabulous, could you possibly help us out with this and track down the places in the cmake files that need quotes, and submit a PR?

@cary-ilm
Copy link
Member

Fixed by #672, now merged into master, can you confirm?

@cary-ilm cary-ilm added Awaiting Feedback The issue is waiting for someone to respond. and removed Needs Discussion To be discussed in the technical steering committee labels Feb 27, 2020
@cary-ilm
Copy link
Member

Seems to be resolved, closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Feedback The issue is waiting for someone to respond.
Projects
None yet
Development

No branches or pull requests

4 participants