All of lore.kernel.org
 help / color / mirror / Atom feed
* : cmake and create_symlink using cmake 3.5 and yocto 2.2.2
@ 2017-06-26 18:46 Ehrlich Andrei
  2017-06-27  8:44 ` Jussi Kukkonen
  0 siblings, 1 reply; 3+ messages in thread
From: Ehrlich Andrei @ 2017-06-26 18:46 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 1160 bytes --]

Hello everybody,

Please excuse the newbie question I want to ask, but I started with yocto and cmake 3 month ago and now I have a couple of recipes based on cmake. One of that cmake files installs links using following code:

install(
            CODE "execute_process( \
                COMMAND ${CMAKE_COMMAND} -E create_symlink \
                __tool \
                ${CMAKE_INSTALL_PREFIX}/bin/tool_${DST_NAME} \
            )"

When the code is executed in yocto  the do_install task fails with following error:
failed to create symbolic link '/usr/bin/tool_intf': Permission denied

The cmake code attempts to install the links to the root_fs of my development host. The code I write recipes for is currently under development and cmake files are provided by developers. Therefore I would like to use developers cmake files and avoid permanently updating do_install task in my recipe. Unfortunately I can't find any possibility to force the cmake recipe to install the links to target root_fs. I would be glad to know if somebody has already faced a similar problem and probably has a solution for it.

Best regards
Andrei Ehrlich

[-- Attachment #2: Type: text/html, Size: 3801 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: : cmake and create_symlink using cmake 3.5 and yocto 2.2.2
  2017-06-26 18:46 : cmake and create_symlink using cmake 3.5 and yocto 2.2.2 Ehrlich Andrei
@ 2017-06-27  8:44 ` Jussi Kukkonen
  2017-06-28  9:04   ` Ehrlich Andrei
  0 siblings, 1 reply; 3+ messages in thread
From: Jussi Kukkonen @ 2017-06-27  8:44 UTC (permalink / raw)
  To: Ehrlich Andrei; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 849 bytes --]

On 26 June 2017 at 21:46, Ehrlich Andrei <Andrei.Ehrlich@corpuls.com> wrote:
> Please excuse the newbie question I want to ask, but I started with yocto
and cmake 3 month ago and now I have a couple of recipes based on cmake.
One of that cmake files installs links using following code:
>
> install(
>             CODE "execute_process( \
>                 COMMAND ${CMAKE_COMMAND} -E create_symlink \
>                 __tool \
>                 ${CMAKE_INSTALL_PREFIX}/bin/tool_${DST_NAME} \
>             )"
>
> When the code is executed in yocto  the do_install task fails with
following error:
> failed to create symbolic link '/usr/bin/tool_intf': Permission denied

The code should account for DESTDIR I think: maybe something like
"$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/bin/tool_${DST_NAME}" as the target

HTH,
  Jussi

[-- Attachment #2: Type: text/html, Size: 1055 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: : cmake and create_symlink using cmake 3.5 and yocto 2.2.2
  2017-06-27  8:44 ` Jussi Kukkonen
@ 2017-06-28  9:04   ` Ehrlich Andrei
  0 siblings, 0 replies; 3+ messages in thread
From: Ehrlich Andrei @ 2017-06-28  9:04 UTC (permalink / raw)
  To: Jussi Kukkonen; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1177 bytes --]

Thanks a lot!

This proposal solved my problem ☺

BR
Andrei

Von: Jussi Kukkonen [mailto:jussi.kukkonen@intel.com]
Gesendet: Dienstag, 27. Juni 2017 10:45
An: Ehrlich Andrei
Cc: yocto@yoctoproject.org
Betreff: Re: [yocto] : cmake and create_symlink using cmake 3.5 and yocto 2.2.2

On 26 June 2017 at 21:46, Ehrlich Andrei <Andrei.Ehrlich@corpuls.com<mailto:Andrei.Ehrlich@corpuls.com>> wrote:
> Please excuse the newbie question I want to ask, but I started with yocto and cmake 3 month ago and now I have a couple of recipes based on cmake. One of that cmake files installs links using following code:
>
> install(
>             CODE "execute_process( \
>                 COMMAND ${CMAKE_COMMAND} -E create_symlink \
>                 __tool \
>                 ${CMAKE_INSTALL_PREFIX}/bin/tool_${DST_NAME} \
>             )"
>
> When the code is executed in yocto  the do_install task fails with following error:
> failed to create symbolic link '/usr/bin/tool_intf': Permission denied

The code should account for DESTDIR I think: maybe something like "$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/bin/tool_${DST_NAME}" as the target

HTH,
  Jussi

[-- Attachment #2: Type: text/html, Size: 4848 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-28  9:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-26 18:46 : cmake and create_symlink using cmake 3.5 and yocto 2.2.2 Ehrlich Andrei
2017-06-27  8:44 ` Jussi Kukkonen
2017-06-28  9:04   ` Ehrlich Andrei

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.