ocl cmake build error (os x snow leopard, macports)

Hi,

after an upgrade to snow leopard and installing macports, cmake of ocl
(1.10 branch) fails during the last configure step.

<quote>
-- Looking for libncurses - found

-- Looking for readline/readline.h - found

-- Looking for Boost Ublas - found

-- Looking for boost::program_options - found

-- Looking for boost::program_options library - found

Building Shared library for orocos-ocl-common

CMake Error at config/component_rules.cmake:80 (TARGET_LINK_LIBRARIES):
The "optimized" argument must be followed by a library.
Call Stack (most recent call first):
ocl/CMakeLists.txt:8 (GLOBAL_ADD_COMPONENT)
<quote>

I cannot find any occurrence of the "optimized" argument in the ocl
source tree. CMakeCache does not contain anything suspicious (AFAIS).
Also, line 80 seems perfectly normal, albeit surrounded by an RTT_14
ifdef

<quote>
IF(LOCAL_LIBRARY)
IF (OROCOS_RTT_1.4)
MESSAGE( "Building Shared library for ${COMPONENT_NAME}" )
ADD_LIBRARY( ${LIB_NAME} SHARED ${ARGN} )
SET_TARGET_PROPERTIES( ${LIB_NAME} PROPERTIES
DEFINE_SYMBOL OCL_DLL_EXPORT
VERSION ${OCL_VERSION}
SOVERSION ${OCL_VERSION_MAJOR}.${OCL_VERSION_MINOR}
)
foreach(lib ${OROCOS_RTT_LIBS})
TARGET_LINK_LIBRARIES( ${LIB_NAME} ${lib} ) #THIS IS LINE 80
endforeach(lib in ${OROCOS_RTT_LIBS})
<quote>

Sounds familiar to some of you SL users?

TIA,

klaas

(ps boost version 1.40 if that would matter)

ocl cmake build error (os x snow leopard, macports)

On Nov 5, 2009, at 14:24 , Klaas Gadeyne wrote:

> Hi,
>
> after an upgrade to snow leopard and installing macports, cmake of ocl
> (1.10 branch) fails during the last configure step.
>
> <quote>
> -- Looking for libncurses - found
>
> -- Looking for readline/readline.h - found
>
> -- Looking for Boost Ublas - found
>
> -- Looking for boost::program_options - found
>
> -- Looking for boost::program_options library - found
>
> Building Shared library for orocos-ocl-common
>
> CMake Error at config/component_rules.cmake:80
> (TARGET_LINK_LIBRARIES):
> The "optimized" argument must be followed by a library.
> Call Stack (most recent call first):
> ocl/CMakeLists.txt:8 (GLOBAL_ADD_COMPONENT)
> <quote>
>
> I cannot find any occurrence of the "optimized" argument in the ocl
> source tree. CMakeCache does not contain anything suspicious (AFAIS).
> Also, line 80 seems perfectly normal, albeit surrounded by an RTT_14
> ifdef
>
> <quote>
> IF(LOCAL_LIBRARY)
> IF (OROCOS_RTT_1.4)
> MESSAGE( "Building Shared library for ${COMPONENT_NAME}" )
> ADD_LIBRARY( ${LIB_NAME} SHARED ${ARGN} )
> SET_TARGET_PROPERTIES( ${LIB_NAME} PROPERTIES
> DEFINE_SYMBOL OCL_DLL_EXPORT
> VERSION ${OCL_VERSION}
> SOVERSION ${OCL_VERSION_MAJOR}.${OCL_VERSION_MINOR}
> )
> foreach(lib ${OROCOS_RTT_LIBS})
> TARGET_LINK_LIBRARIES( ${LIB_NAME} ${lib} ) #THIS IS LINE 80
> endforeach(lib in ${OROCOS_RTT_LIBS})
> <quote>
>
> Sounds familiar to some of you SL users?
>
> TIA,
>
> klaas

I submitted a patch for this a couple of days ago.

http://www.orocos.org/forum/rtt/rtt-dev/patch-build-bug-mac-os-xsnow-leo...

:-)

ocl cmake build error (os x snow leopard, macports)

On Thu, Nov 5, 2009 at 8:27 PM, S Roderick <kiwi [dot] net [..] ...> wrote:
[...]
> I submitted a patch for this a couple of days ago.

I somehow figured out that you were gonna answer this one :-)

> http://www.orocos.org/forum/rtt/rtt-dev/patch-build-bug-mac-os-xsnow-leo...

Against what branch/git whatever exactly was this patch created? I
can't even find a trace of mac os x specific stuff in the
ocl-1.10/config directory...

thx,

Klaas

ocl cmake build error (os x snow leopard, macports)

On Nov 5, 2009, at 14:39 , Klaas Gadeyne wrote:

> On Thu, Nov 5, 2009 at 8:27 PM, S Roderick <kiwi [dot] net [..] ...> wrote:
> [...]
>> I submitted a patch for this a couple of days ago.
>
> I somehow figured out that you were gonna answer this one :-)
>
>> http://www.orocos.org/forum/rtt/rtt-dev/patch-build-bug-mac-os-xsnow-leo...
>
> Against what branch/git whatever exactly was this patch created? I
> can't even find a trace of mac os x specific stuff in the
> ocl-1.10/config directory...
>
> thx,
>
> Klaas

_RTT_ git v1.x trunk, which Peter has tracking SVN trunk. So it should
have been trunk from last weekend.

Basically, you can't have two calls to

find_package(Boost 1.33 COMPONENTS thread REQUIRED)

in the system for some mad reason. This patch affects RTT, which then
outputs a correct pkgconfig file, which makes OCL happy.

HTH
S

ocl cmake build error (os x snow leopard, macports)

On Thu, Nov 5, 2009 at 20:47, Stephen Roderick <kiwi [dot] net [..] ...> wrote:

> On Nov 5, 2009, at 14:39 , Klaas Gadeyne wrote:
>
> > On Thu, Nov 5, 2009 at 8:27 PM, S Roderick <kiwi [dot] net [..] ...> wrote:
> > [...]
> >> I submitted a patch for this a couple of days ago.
> >
> > I somehow figured out that you were gonna answer this one :-)
> >
> >>
> http://www.orocos.org/forum/rtt/rtt-dev/patch-build-bug-mac-os-xsnow-leo...
> >
> > Against what branch/git whatever exactly was this patch created? I
> > can't even find a trace of mac os x specific stuff in the
> > ocl-1.10/config directory...
> >
> > thx,
> >
> > Klaas
>
> _RTT_ git v1.x trunk, which Peter has tracking SVN trunk. So it should
> have been trunk from last weekend.
>
> Basically, you can't have two calls to
>
> find_package(Boost 1.33 COMPONENTS thread REQUIRED)
>

This is incorrect anyway. You need to write:

find_package(Boost 1.33 REQUIRED thread)

(I introduced this wrong format)

> in the system for some mad reason. This patch affects RTT, which then
> outputs a correct pkgconfig file, which makes OCL happy.
>

Would fixing the find_package macro fix the problem too ? I also included a
corrected version of FindBoost.cmake, so maybe this also fixes your issue.
It fixed also a bug regarding calling FindBoost twice, but it was related to
detecting the version was too old.

Please let me know if your patch is still required. I would think we'd need
to if() all the find_package macros of boost then...

Peter

ocl cmake build error (os x snow leopard, macports)

On Thu, Nov 5, 2009 at 8:39 PM, Klaas Gadeyne <klaas [dot] gadeyne [..] ...> wrote:
> On Thu, Nov 5, 2009 at 8:27 PM, S Roderick <kiwi [dot] net [..] ...> wrote:
> [...]
>> I submitted a patch for this a couple of days ago.
>
> I somehow figured out that you were gonna answer this one :-)
>
>> http://www.orocos.org/forum/rtt/rtt-dev/patch-build-bug-mac-os-xsnow-leo...
>
> Against what branch/git whatever exactly was this patch created?  I
> can't even find a trace of mac os x specific stuff in the
> ocl-1.10/config directory...

Hmm, just realised your patch was meant for RTT...

k