installation error with ocl on windows

Hello,
using, boost 1.40 and visual studio 2008 I finally managed to install
rtt with corba and unit tests. Now I want to move on with ocl. I point
the source code and the build directory in the cmake-gui to
C:/orocos/orocos-toolchain-2.3.0/ocl. Afterwards I press configure and I
get the following error:

Orocos Component Library version (2.3.0)

CMake Error at
C:/orocos/orocos-toolchain-2.3.0/rtt/orocos-rtt-config.cmake:112 (message):

Could not find an OROCOS-RTT installation for the win32 target. Missing

file: C:/orocos/orocos-toolchain-2.3.0/rtt/orocos-rtt-win32-libraries.cmake

Call Stack (most recent call first):

CMakeLists.txt:160 (find_package)

Configuring incomplete, errors occurred!

The file orocos-rtt-win32-libraries.cmake is really not there nor
anywhere else. What did I wrong?

Best
Stefan

problem building OCL 2.3.2 with Microsoft Visual

Hello,

I am using the same configuration except that I'm trying to install orocos 2.3.2

I've successfully built rtt and performed the INSTALL in MVS (wihch required admin privileges as Stefan reported), but then I get the following error trying to generate the project files for ocl:

Check for working C compiler using: Visual Studio 9 2008 Check for working C compiler using: Visual Studio 9 2008 -- works Detecting C compiler ABI info Detecting C compiler ABI info - done Check for working CXX compiler using: Visual Studio 9 2008 Check for working CXX compiler using: Visual Studio 9 2008 -- works Detecting CXX compiler ABI info Detecting CXX compiler ABI info - done Orocos Component Library version (2.3.2) CMake Error: An attempt was made to access a variable: OROCOS-RTT_DIR that has not been defined. This variable is created by the FIND_PACKAGE command. CMake version 1.6 always converted the variable name to upper-case, but this behavior is no longer the case. To fix this you might need to set the cache value of CMAKE_BACKWARDS_COMPATIBILITY to 1.6 or less. If you are writing a CMake listfile, you should change the variable reference to use the case of the argument to FIND_PACKAGE. CMake Error at CMakeLists.txt:160 (find_package):

  Could not find a configuration file for package "OROCOS-RTT" that is
  compatible with requested version "2.3.2".

  The following configuration files were considered but not accepted:

    C:/orocos/orocos-toolchain-2.3.2/rtt/orocos-rtt-config.cmake, version: unknown
CMake Error at CMakeLists.txt:162 (message):

     RTT not found. Is the version correct? Use the CMAKE_PREFIX_PATH cmake or environment variable to point to the installation directory of RTT.
Configuring incomplete, errors occurred!

which is the installation path for rtt? C:\Program Files\orocos?

Thank you very much in advance.

Best Carlos

installation error with ocl on windows

On Tuesday 15 March 2011 16:32:38 Stefan Stiene wrote:
> Hello,
> using, boost 1.40 and visual studio 2008 I finally managed to install
> rtt with corba and unit tests. Now I want to move on with ocl. I point
> the source code and the build directory in the cmake-gui to
> C:/orocos/orocos-toolchain-2.3.0/ocl. Afterwards I press configure and I
> get the following error:
>
> Orocos Component Library version (2.3.0)
>
> CMake Error at
> C:/orocos/orocos-toolchain-2.3.0/rtt/orocos-rtt-config.cmake:112 (message):
>
> Could not find an OROCOS-RTT installation for the win32 target. Missing
>
> file: C:/orocos/orocos-toolchain-2.3.0/rtt/orocos-rtt-win32-libraries.cmake
>
> Call Stack (most recent call first):
>
> CMakeLists.txt:160 (find_package)
>
> Configuring incomplete, errors occurred!
>
>
> The file orocos-rtt-win32-libraries.cmake is really not there nor
> anywhere else. What did I wrong?

Well, you didn't tell cmake where to find the RTT installation. You need to add
a new 'Entry' of type PATH in the cmake gui with the name: CMAKE_PREFIX_PATH
and as value c:\Program Files\orocos (if you used the default installation
path in RTT).

Make sure you did an 'INSTALL' in the MSVS GUI for the orocos-rtt solution.

Peter

installation error with ocl on windows

Hello Peter,
great support. You were right this was the failure. vs2008 said that it
does not have the rights to write to C:\Program Files\orocos\ though I
am Administrator. So I changed the install dir to C:\orocos\lib and
everything works.

So rtt is installed
log4cpp is installed too
(only debug version using release I get lots of linker errors like
1>AbortAppender.obj : error LNK2001: unresolved external symbol
"__declspec(dllimport) public: __thiscall std::exception::exception(char
const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
)

ocl can be configured with cmake
Here is the output:

Orocos Component Library version (2.3.0)

No orocos-ocl.cmake file loaded, using default settings.See
orocos-ocl.default.cmake

Orocos-RTT found in
C:/orocos/lib/lib/cmake/orocos-rtt/orocos-rtt-win32-libraries.cmake

Found orocos-rtt 2.3.0 for the win32 target. Available transports: corba

- Found requested orocos-rtt components: rtt-scripting rtt-marshalling

[UseOrocos] Building package ocl

Warning: xpath not found. Can't read dependencies in manifest.xml file.

Looking for netcdf in C:/orocos/lib/

Can't find NETCDF

Found Doxygen -- documentation can be built

-- Looking for readline/readline.h - not found

-- Looking for editline/readline.h - not found

Log4cpp version to look for: 6.0.0 (hard-coded in FindLog4cpp.cmake).

File C:/orocos/lib/lib/log4cpp.lib.6.0.0 does not exist. Are you using
the Orocos' version of log4cpp ?

Use CMAKE_PREFIX_PATH to point to the install directory of the Orocos
maintained log4cpp library.

Found log4cpp in C:/orocos/lib/include

[UseOrocos] Building component orocos-ocl-common in library
orocos-ocl-common

[UseOrocos] Building typekit library ocl

[UseOrocos] Building plugin library print

[UseOrocos] Building plugin library os

[UseOrocos] Generating package version 2.3.0 from COMPONENT_VERSION.

[UseOrocos] Generating package version 2.3.0 from COMPONENT_VERSION.

Building TaskBrowser without readline/editline support!

Found RTT_PLUGIN_rtt-scripting

[UseOrocos] Building library orocos-ocl-taskbrowser

[UseOrocos] Generating package version 2.3.0 from COMPONENT_VERSION.

[UseOrocos] Building component orocos-ocl-timer in library orocos-ocl-timer

[UseOrocos] Generating package version 2.3.0 from COMPONENT_VERSION.

[UseOrocos] Building component orocos-ocl-helloworld in library
orocos-ocl-helloworld

Found RTT_PLUGIN_rtt-marshalling

[UseOrocos] Building component orocos-ocl-reporting in library
orocos-ocl-reporting

[UseOrocos] Generating package version 2.3.0 from COMPONENT_VERSION.

Found RTT_PLUGIN_rtt-marshalling

Found RTT_PLUGIN_rtt-scripting

[UseOrocos] Building library orocos-ocl-deployment

[UseOrocos] Building library orocos-ocl-deployment-corba

[UseOrocos] Generating package version 2.3.0 from COMPONENT_VERSION.

[UseOrocos] Building component orocos-ocl-logging in library
orocos-ocl-logging

[UseOrocos] Building library orocos-ocl-log4cpp

[UseOrocos] Generating package version 2.3.0 from COMPONENT_VERSION.

[UseOrocos] Building component orocos-ocl-lua in library orocos-ocl-lua

Building executable rttlua

Building without readline/curses support. If you

want support for this try someting like 'sudo aptitude install

libncurses5-dev libreadline5-dev'

[UseOrocos] Building plugin library rttlua-plugin

[UseOrocos] Generating package version 2.3.0 from COMPONENT_VERSION.

Selected Libraries:

Configuring done

Generating done

Of course there are errors left ;-). These errors remain even if I
change to debug version.

target orocos-ocl-log4cpp:
1>LoggingEvent.obj : error LNK2019: unresolved external symbol "char *
__cdecl log4cpp::threading::getThreadId(char *)"
(?getThreadId@threading@log4cpp@@YAPADPAD@Z) referenced in function
"public: __thiscall OCL::logging::LoggingEvent::LoggingEvent(class
std::basic_string<char,struct std::char_traits<char>,class
RTT::os::rt_allocator<char> > const &,class
std::basic_string<char,struct std::char_traits<char>,class
RTT::os::rt_allocator<char> > const &,class
std::basic_string<char,struct std::char_traits<char>,class
RTT::os::rt_allocator<char> > const &,int)"
(??0LoggingEvent@logging@OCL@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$rt_allocator@D@os@RTT@@@std@@00H@Z)
1>C:\orocos\orocos-toolchain-2.3.0\ocl\logging\Release\orocos-ocl-log4cpp.dll
: fatal error LNK1120: 2 unresolved externals

target deployer-corba-win32
2>------ Build started: Project: deployer-corba-win32, Configuration:
Release Win32 ------
2>Compiling...
2>deployer-corba.cpp
2>.\deployer-corba.cpp(47) : fatal error C1021: invalid preprocessor
command 'warning'
2>Build log was saved at
"file://c:\orocos\orocos-toolchain-2.3.0\ocl\bin\deployer-corba-win32.dir\Release\BuildLog.htm"

and the same for target deployer-win32
2>.\deployer.cpp(45) : fatal error C1021: invalid preprocessor command
'warning'

target orocos-ocl-lua
1>.\rtt.cpp(48) : error C2010: '.' : unexpected in macro formal
parameter list

target rttlua
1>.\LuaComponent.cpp(46) : fatal error C1083: Cannot open include file:
'unistd.h': No such file or directory
Why is there a linux header if the target is win32

and more ...
However the taskbrowser compiles and I can execute it.

Thanks for your help
Stefan

Am 15.03.2011 16:51, schrieb Peter Soetens:
> On Tuesday 15 March 2011 16:32:38 Stefan Stiene wrote:
>> Hello,
>> using, boost 1.40 and visual studio 2008 I finally managed to install
>> rtt with corba and unit tests. Now I want to move on with ocl. I point
>> the source code and the build directory in the cmake-gui to
>> C:/orocos/orocos-toolchain-2.3.0/ocl. Afterwards I press configure and I
>> get the following error:
>>
>> Orocos Component Library version (2.3.0)
>>
>> CMake Error at
>> C:/orocos/orocos-toolchain-2.3.0/rtt/orocos-rtt-config.cmake:112 (message):
>>
>> Could not find an OROCOS-RTT installation for the win32 target. Missing
>>
>> file: C:/orocos/orocos-toolchain-2.3.0/rtt/orocos-rtt-win32-libraries.cmake
>>
>> Call Stack (most recent call first):
>>
>> CMakeLists.txt:160 (find_package)
>>
>> Configuring incomplete, errors occurred!
>>
>>
>> The file orocos-rtt-win32-libraries.cmake is really not there nor
>> anywhere else. What did I wrong?
> Well, you didn't tell cmake where to find the RTT installation. You need to add
> a new 'Entry' of type PATH in the cmake gui with the name: CMAKE_PREFIX_PATH
> and as value c:\Program Files\orocos (if you used the default installation
> path in RTT).
>
> Make sure you did an 'INSTALL' in the MSVS GUI for the orocos-rtt solution.
>
> Peter

installation error with ocl on windows

On Wednesday 16 March 2011 16:40:06 Stefan Stiene wrote:
> Hello Peter,
> great support. You were right this was the failure. vs2008 said that it
> does not have the rights to write to C:\Program Files\orocos\ though I
> am Administrator. So I changed the install dir to C:\orocos\lib and
> everything works.
>
> So rtt is installed
> log4cpp is installed too
> (only debug version using release I get lots of linker errors like
> 1>AbortAppender.obj : error LNK2001: unresolved external symbol
> "__declspec(dllimport) public: __thiscall std::exception::exception(char
> const * const &)" (__imp_??0exception@std@@QAE@ABQBD@Z)
> )
>
> ocl can be configured with cmake
> Here is the output:
>
> Orocos Component Library version (2.3.0)
>
> No orocos-ocl.cmake file loaded, using default settings.See
> orocos-ocl.default.cmake
>
> Orocos-RTT found in
> C:/orocos/lib/lib/cmake/orocos-rtt/orocos-rtt-win32-libraries.cmake
>
> Found orocos-rtt 2.3.0 for the win32 target. Available transports: corba
>
> - Found requested orocos-rtt components: rtt-scripting rtt-marshalling
>
> [UseOrocos] Building package ocl
>
> Warning: xpath not found. Can't read dependencies in manifest.xml file.
>
> Looking for netcdf in C:/orocos/lib/
>
> Can't find NETCDF
>
> Found Doxygen -- documentation can be built
>
> -- Looking for readline/readline.h - not found
>
> -- Looking for editline/readline.h - not found
>
> Log4cpp version to look for: 6.0.0 (hard-coded in FindLog4cpp.cmake).
>
> File C:/orocos/lib/lib/log4cpp.lib.6.0.0 does not exist. Are you using
> the Orocos' version of log4cpp ?
>
> Use CMAKE_PREFIX_PATH to point to the install directory of the Orocos
> maintained log4cpp library.
>
> Found log4cpp in C:/orocos/lib/include
>
> [UseOrocos] Building component orocos-ocl-common in library
> orocos-ocl-common
>
> [UseOrocos] Building typekit library ocl
>
> [UseOrocos] Building plugin library print
>
> [UseOrocos] Building plugin library os
>
> [UseOrocos] Generating package version 2.3.0 from COMPONENT_VERSION.
>
> [UseOrocos] Generating package version 2.3.0 from COMPONENT_VERSION.
>
> Building TaskBrowser without readline/editline support!
>
> Found RTT_PLUGIN_rtt-scripting
>
> [UseOrocos] Building library orocos-ocl-taskbrowser
>
> [UseOrocos] Generating package version 2.3.0 from COMPONENT_VERSION.
>
> [UseOrocos] Building component orocos-ocl-timer in library orocos-ocl-timer
>
> [UseOrocos] Generating package version 2.3.0 from COMPONENT_VERSION.
>
> [UseOrocos] Building component orocos-ocl-helloworld in library
> orocos-ocl-helloworld
>
> Found RTT_PLUGIN_rtt-marshalling
>
> [UseOrocos] Building component orocos-ocl-reporting in library
> orocos-ocl-reporting
>
> [UseOrocos] Generating package version 2.3.0 from COMPONENT_VERSION.
>
> Found RTT_PLUGIN_rtt-marshalling
>
> Found RTT_PLUGIN_rtt-scripting
>
> [UseOrocos] Building library orocos-ocl-deployment
>
> [UseOrocos] Building library orocos-ocl-deployment-corba
>
> [UseOrocos] Generating package version 2.3.0 from COMPONENT_VERSION.
>
> [UseOrocos] Building component orocos-ocl-logging in library
> orocos-ocl-logging
>
> [UseOrocos] Building library orocos-ocl-log4cpp
>
> [UseOrocos] Generating package version 2.3.0 from COMPONENT_VERSION.
>
> [UseOrocos] Building component orocos-ocl-lua in library orocos-ocl-lua
>
> Building executable rttlua
>
> Building without readline/curses support. If you
>
> want support for this try someting like 'sudo aptitude install
>
> libncurses5-dev libreadline5-dev'
>
> [UseOrocos] Building plugin library rttlua-plugin
>
> [UseOrocos] Generating package version 2.3.0 from COMPONENT_VERSION.
>
> Selected Libraries:
>
> Configuring done
>
> Generating done
>
> Of course there are errors left ;-). These errors remain even if I
> change to debug version.
>
>
> target orocos-ocl-log4cpp:
> 1>LoggingEvent.obj : error LNK2019: unresolved external symbol "char *
> __cdecl log4cpp::threading::getThreadId(char *)"
> (?getThreadId@threading@log4cpp@@YAPADPAD@Z) referenced in function
> "public: __thiscall OCL::logging::LoggingEvent::LoggingEvent(class
> std::basic_string<char,struct std::char_traits<char>,class
> RTT::os::rt_allocator<char> > const &,class
> std::basic_string<char,struct std::char_traits<char>,class
> RTT::os::rt_allocator<char> > const &,class
> std::basic_string<char,struct std::char_traits<char>,class
> RTT::os::rt_allocator<char> > const &,int)"
> (??0LoggingEvent@logging@OCL@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@
> V?$rt_allocator@D@os@RTT@@@std@@00H@Z)
> 1>C:\orocos\orocos-toolchain-2.3.0\ocl\logging\Release\orocos-ocl-log4cpp.
> dll

This looks like an omission in log4cpp/threading/MSThreads.hh could you make
this change to test if this improves things? :

diff --git a/include/log4cpp/threading/MSThreads.hh
b/include/log4cpp/threading/MSThreads.hh
index 10ea4d6..9d52d85 100644
--- a/include/log4cpp/threading/MSThreads.hh
+++ b/include/log4cpp/threading/MSThreads.hh
@@ -45,7 +45,7 @@ namespace log4cpp {
* identifiers look like is completely up to the underlying
* thread library.
**/
- std::string getThreadId();
+ LOG4CPP_EXPORT std::string getThreadId();
/**
* Return an identifier for the current thread. What these
* identifiers look like is completely up to the underlying
@@ -54,7 +54,7 @@ namespace log4cpp {
* @param buffer Character buffer of at least 16 in size
* @return buffer
**/
- char* getThreadId(char* buffer);
+ LOG4CPP_EXPORT char* getThreadId(char* buffer);

/**
* A simple object wrapper around CreateMutex() and DeleteMutex()

(note: you need to do this manually, my email program screws up patches).

>
> : fatal error LNK1120: 2 unresolved externals
>
> target deployer-corba-win32
> 2>------ Build started: Project: deployer-corba-win32, Configuration:
> Release Win32 ------
> 2>Compiling...
> 2>deployer-corba.cpp
> 2>.\deployer-corba.cpp(47) : fatal error C1021: invalid preprocessor
> command 'warning'

You can change this line to:

# warning "Logging needs rtalloc!"

> 2>Build log was saved at
> "file://c:\orocos\orocos-toolchain-2.3.0\ocl\bin\deployer-corba-win32.dir\R
> elease\BuildLog.htm"
>
> and the same for target deployer-win32
> 2>.\deployer.cpp(45) : fatal error C1021: invalid preprocessor command
> 'warning'

Same here.

>
> target orocos-ocl-lua
> 1>.\rtt.cpp(48) : error C2010: '.' : unexpected in macro formal
> parameter list

Lua bindings have never been compiled on Windows before... you could set
#ifndef _WIN32
#define DEBUG
#endif

around the DEBUG definition on top, or fix the DBG macro for MSVC.

>
> target rttlua
> 1>.\LuaComponent.cpp(46) : fatal error C1083: Cannot open include file:
> 'unistd.h': No such file or directory
> Why is there a linux header if the target is win32

You should probably disable Lua, unless you want to port it to win32.

>
> and more ...
> However the taskbrowser compiles and I can execute it.

Thanks for the feedback. Keep us posted of your progress.

Peter

>
> Thanks for your help
> Stefan
>
> Am 15.03.2011 16:51, schrieb Peter Soetens:
> > On Tuesday 15 March 2011 16:32:38 Stefan Stiene wrote:
> >> Hello,
> >> using, boost 1.40 and visual studio 2008 I finally managed to install
> >> rtt with corba and unit tests. Now I want to move on with ocl. I point
> >> the source code and the build directory in the cmake-gui to
> >> C:/orocos/orocos-toolchain-2.3.0/ocl. Afterwards I press configure and I
> >> get the following error:
> >>
> >> Orocos Component Library version (2.3.0)
> >>
> >> CMake Error at
> >> C:/orocos/orocos-toolchain-2.3.0/rtt/orocos-rtt-config.cmake:112
> >> (message):
> >>
> >> Could not find an OROCOS-RTT installation for the win32 target. Missing
> >>
> >> file:
> >> C:/orocos/orocos-toolchain-2.3.0/rtt/orocos-rtt-win32-libraries.cmake
> >>
> >> Call Stack (most recent call first):
> >>
> >> CMakeLists.txt:160 (find_package)
> >>
> >> Configuring incomplete, errors occurred!
> >>
> >>
> >> The file orocos-rtt-win32-libraries.cmake is really not there nor
> >> anywhere else. What did I wrong?
> >
> > Well, you didn't tell cmake where to find the RTT installation. You need
> > to add a new 'Entry' of type PATH in the cmake gui with the name:
> > CMAKE_PREFIX_PATH and as value c:\Program Files\orocos (if you used the
> > default installation path in RTT).
> >
> > Make sure you did an 'INSTALL' in the MSVS GUI for the orocos-rtt
> > solution.
> >
> > Peter