OpenViBE forum

The OpenViBE community
It is currently Wed Oct 23, 2019 10:15 am

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Tue Feb 22, 2011 1:17 pm 
Offline

Joined: Tue Feb 22, 2011 10:34 am
Posts: 4
Dear All,

I can't figure out what I'm doing wrong when using the scripts.

I want to build OpenViBE 0.9.0 on Windows XP with msvc9 (VC 2008).

Following the INSTALL recommendations:
- I launched win32-install_dependencies.exe.
- I Saved win32-init_env_command.cmd-skeleton as win32-init_env_command.cmd
- I opened win32-init_env_command.cmd and then the wierd stuff started ...
First I had to change the following lines:
Code:
if exist "!VS90COMNTOOLS!\vsvars32.bat" (
   SET VSTOOLS=!VS90COMNTOOLS!\vsvars32.bat
   SET VSCMake=Visual Studio 9 2008
)

by
Code:
if exist "%VS90COMNTOOLS%vsvars32.bat" (
   SET VSTOOLS=%VS90COMNTOOLS%vsvars32.bat
   SET VSCMake=Visual Studio 9 2008
)


But that only solved my issue with Visual Studio tools detection ...

I'm not that familiar with the type of scripts you are using but I see a lots of those "!" char and as it was the source of the initial error message, I woudl like to be sure that the following part of the script is right:
Code:
for /D %%s in (%OpenViBE_modules%/*) do (
   set OpenViBE_project_name=%%~ns
   REM echo OpenViBE_project_name %OpenViBE_project_name%
   set OpenViBE_project_name=!OpenViBE_project_name:-=_!
   REM echo OpenViBE_project_name %OpenViBE_project_name%
   echo if "%%OpenViBE_module_!OpenViBE_project_name!_branch%%" == "" SET OpenViBE_module_!OpenViBE_project_name!_branch=%OpenViBE_default_branch% >> tmp_branch.cmd
   echo set OpenViBE_module_!OpenViBE_project_name!=%OpenViBE_modules%\%%~ns\%OpenViBE_percent%OpenViBE_module_!OpenViBE_project_name!_branch%OpenViBE_percent% >> tmp_branch.cmd
   REM echo OpenViBE_project_name %OpenViBE_project_name%
   call tmp_branch.cmd
   del tmp_branch.cmd
)

As you can see I tried to echo the OpenViBE_project_name variable but I only got: "!OpenViBE_project_name:-=_!".

My console outputs (with the echo commented):
Code:
Setting environment for using Microsoft Visual Studio 2008 x86 tools.
The input line is too long.
The syntax of the command is incorrect.


Then it does not compile.


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 22, 2011 2:36 pm 
Offline
Site Admin

Joined: Fri Sep 01, 2006 3:39 pm
Posts: 645
Dear Tangi,

welcome on this forum and thank you for your interest in OpenViBE.

The first thing is that we should update the install instructions since they are outdated. The step where you copy and edit the win32-init_env_command.cmd script is only mandatory for developers having a branch in the SVN repository. People building the software from the trunc actually don't have to do this step anymore.

This said, the fact that you have to replace ! with % in order to detect visual is not expected. Those two different ways of writing environment variables on windows scripts causes really different behavior (see retarded variable expansion or something similar). So they should be left with ! where specified. And we should focus on why your command interpreter is not detecting them correctly.

Can you give more information about your box ? (Version of WinXP, service pack, is it a modified - maybe unofficial ;) - version of Windows, did you install anything that could interfere with the traditional command line interpreter etc...). By the way, did you try to compile the software from a console you opened yourself or did you just double click the .cmd script ? (the second one is correct)

I look forward to your feedbacks.
Meanwhile, just delete your win32-init_env_command.cmd file ; the call to win32-build.cmd script will just create a fresh one for you.

Yann

_________________
CTO at Mensia Technologies | Image my blog | Image my tweets | Image my linkedin


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 22, 2011 3:03 pm 
Offline

Joined: Thu Aug 13, 2009 8:39 am
Posts: 160
Location: Ghent University
Hi,

Ok, interesting, until now, I always performed the same steps as Tangi (only changing the '!' with '%' so that it detects the compiler) and I have an official 32-bit XP version, service pack 3 (2600.xpsp_sp3_gdr.101209-1647). Off course, as long as it worked for me, I didn't question the method.

I also sometimes get the final error that Tangi gave ("input too long") because I first opened a prompt and then executed the script too many times with as consequence that the PATH variable got too long and the script failed. Restarting the prompt and thus resetting the PATH worked fine for me, off course double clicking avoids all that.

Best regards,
Dieter Devlaminck


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 22, 2011 3:11 pm 
Offline

Joined: Tue Feb 22, 2011 10:34 am
Posts: 4
The first thing is that we should update the install instructions since they are outdated. The step where you copy and edit the win32-init_env_command.cmd script is only mandatory for developers having a branch in the SVN repository. People building the software from the trunc actually don't have to do this step anymore.

Ok ...

This said, the fact that you have to replace ! with % in order to detect visual is not expected. Those two different ways of writing environment variables on windows scripts causes really different behavior (see retarded variable expansion or something similar). So they should be left with ! where specified. And we should focus on why your command interpreter is not detecting them correctly.

Can you give more information about your box ? (Version of WinXP, service pack, is it a modified - maybe unofficial ;) - version of Windows, did you install anything that could interfere with the traditional command line interpreter etc...).

Windows XP pro service pack 3 with Windos SDK 6.0 installled.

By the way, did you try to compile the software from a console you opened yourself or did you just double click the .cmd script ? (the second one is correct)

I tried both: from a visual studio command prompt and by double clicking on it.

I look forward to your feedbacks.
Meanwhile, just delete your win32-init_env_command.cmd file ; the call to win32-build.cmd script will just create a fresh one for you.


I tried that ...

It seems CMake can not find the expat module ... It is installed in the dependencies folder ... but strangely the expat.h as well as many other .h files are in a "lib" repository ...
\dependencies\expat\Source\lib


Code:
Configuring and building openvibe-modules\xml\trunc ...

--   FAILED to find expat...
-- Configuring done
-- Generating done
-- Build files have been written to: D:/Devs/MINDWALKER/OpenVibe/openvibe-0.9.0-
svn2639-src/local-tmp/openvibe-modules/xml/trunc

Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation.  All rights reserved.

[ 33%] Building CXX object CMakeFiles/OpenViBE-module-XML-dynamic.dir/src/xml/IR
eader.obj
IReader.cpp
D:\Devs\MINDWALKER\OpenVibe\openvibe-0.9.0-svn2639-src\openvibe-modules\xml\trun
c\src\xml\IReader.cpp(3) : fatal error C1083: Cannot open include file: 'expat.h
': No such file or directory
NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~2.0\VC\bin\cl.exe' : return code
'0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BI
N\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BI
N\nmake.exe"' : return code '0x2'
Stop.

An error occured during building process

Press any key to continue . . .



I'm also interested on info regarding how to tell the script to take visual studio 2008 instead of 2010 ...


Top
 Profile  
Reply with quote  
PostPosted: Tue Feb 22, 2011 4:28 pm 
Offline
Site Admin

Joined: Fri Sep 01, 2006 3:39 pm
Posts: 645
ddvlamin wrote:
I also sometimes get the final error that Tangi gave ("input too long") because I first opened a prompt and then executed the script too many times with as consequence that the PATH variable got too long and the script failed. Restarting the prompt and thus resetting the PATH worked fine for me, off course double clicking avoids all that.


Ok, we should find a way to detect the user used a console and tell him it will end up with an error.

Tanguy wrote:
It seems CMake can not find the expat module ... It is installed in the dependencies folder ... but strangely the expat.h as well as many other .h files are in a "lib" repository ...
\dependencies\expat\Source\lib


:) We did not re-package the expat archive, this is the one from their website. Anyway, our script should consider this "non standard" location and deal with it. I think that in order to step back to a clean environment, you should consider running win32-clean.cmd before trying to build OpenViBE again.

Tanguy wrote:
I'm also interested on info regarding how to tell the script to take visual studio 2008 instead of 2010 ...


Interesting remark ! So was this the reason why you had to use % instead of ! ?
The environment initialization uses the latest version of visual installed on your system. If you don't want to use visual 2010 and prefer using visual 2008 (which will need SP1 !), just remove the following lines in the win32-init_env_command.cmd script :

Code:

if exist "!VS100COMNTOOLS!\vsvars32.bat" (
   SET VSTOOLS=!VS100COMNTOOLS!\vsvars32.bat
   SET VSCMake=Visual Studio 10 2010
)



This will cancel detection of Visual 2010 :)

Hope this helps,
Yann

_________________
CTO at Mensia Technologies | Image my blog | Image my tweets | Image my linkedin


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 23, 2011 9:21 am 
Offline

Joined: Tue Feb 22, 2011 10:34 am
Posts: 4
We did not re-package the expat archive, this is the one from their website. Anyway, our script should consider this "non standard" location and deal with it. I think that in order to step back to a clean environment, you should consider running win32-clean.cmd before trying to build OpenViBE again.

I already tried to clean but it does not change anything ...

Interesting remark ! So was this the reason why you had to use % instead of ! ?
The environment initialization uses the latest version of visual installed on your system. If you don't want to use visual 2010 and prefer using visual 2008 (which will need SP1 !), just remove the following lines in the win32-init_env_command.cmd script :

I had seen this in the script and modified it but you told me
Meanwhile, just delete your win32-init_env_command.cmd file ; the call to win32-build.cmd script will just create a fresh one for you.
So if the init_env_command script is now generated by the build script, how can I modify it ...???


Thanks for your help,

Tangi


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 23, 2011 10:31 am 
Offline

Joined: Thu Aug 13, 2009 8:39 am
Posts: 160
Location: Ghent University
Hi,

Because of your question, I tried to update my installation to the newest version (about time I did this) and I faced again the same problem as you. I uninstalled all my dependencies and reinstalled them again and it worked. I'm not yet sure why it worked, maybe because the file win32-dependencies.cmd, that is generated during executing of the win32-install_dependencies.exe, was changed? win32-dependencies.cmd sets some important variables so that the cmake file "FindThirdPartyExpat.cmake" can do their work.

So maybe the variable in win32-dependencies.cmd "SET OV_DEP_EXPAT=..." is set to the wrong path?

If you did not have a win32-init_env_command.cmd script it was made for you when executing win32-build, if you then remove the lines in win32-init_env_command.cmd for detection of visual studio 2010 it should take the 2008; no?

Best regards,
Dieter Devlaminck


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 23, 2011 1:34 pm 
Offline

Joined: Tue Feb 22, 2011 10:34 am
Posts: 4
Ok, it seems to work after cleaning everything. Thanks a lot Dieter.


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 24, 2011 10:16 am 
Offline
Site Admin

Joined: Fri Sep 01, 2006 3:39 pm
Posts: 645
That's great,

thank you Dieter for your help in solving this. Is there any update we should consider in the building scripts so this never happens again ?

Tanguy, you can now have fun with OpenViBE ;)

Yann

_________________
CTO at Mensia Technologies | Image my blog | Image my tweets | Image my linkedin


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 24, 2011 11:40 am 
Offline

Joined: Thu Aug 13, 2009 8:39 am
Posts: 160
Location: Ghent University
The problem is that I'm still not exactly sure what went wrong. I also updated my version of OpenVibe on my laptop yesterday and there that problem did not occur, everything went very smooth in contrast to the update of our recording desktop where I only had the above problem of not finding expat. If I find out what exactly went wrong, I'll let you know.

Best regards,
Dieter Devlaminck


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Americanized by Maƫl Soucaze.