Patch utility is installed, but my ExternalProject build step fails to execute it

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Patch utility is installed, but my ExternalProject build step fails to execute it

David Brown
I'm trying to patch and build a Makefile-based project using the
ExternalProject module. My patch command looks like this:

    PATCH_COMMAND "patch -p1 -t -N < ${CMAKE_CURRENT_SOURCE_DIR}/IntelDFP.patch"

When building, however, I get this:

    [ 10%] Performing patch step for 'IntelDFP'
    /bin/sh: 1: patch -p1 -t -N <
/home/david/Projects/db/IntelDFP.patch: not found

I'm certain that the patch utility is installed and that the patch
file path is correct. If I run that command myself, it works fine. So
why does the CMake-generated Makefile fail to execute it?
--

Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Patch utility is installed, but my ExternalProject build step fails to execute it

David Brown
Silly me... It was the quotes around the command. Sorry!

On Sun, Feb 24, 2013 at 7:58 PM, David Brown <[hidden email]> wrote:

> I'm trying to patch and build a Makefile-based project using the
> ExternalProject module. My patch command looks like this:
>
>     PATCH_COMMAND "patch -p1 -t -N < ${CMAKE_CURRENT_SOURCE_DIR}/IntelDFP.patch"
>
> When building, however, I get this:
>
>     [ 10%] Performing patch step for 'IntelDFP'
>     /bin/sh: 1: patch -p1 -t -N <
> /home/david/Projects/db/IntelDFP.patch: not found
>
> I'm certain that the patch utility is installed and that the patch
> file path is correct. If I run that command myself, it works fine. So
> why does the CMake-generated Makefile fail to execute it?
--

Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Patch utility is installed, but my ExternalProject build step fails to execute it

Kornel Benko
In reply to this post by David Brown

Am Sonntag, 24. Februar 2013 um 19:58:53, schrieb David Brown <[hidden email]>

> I'm trying to patch and build a Makefile-based project using the

> ExternalProject module. My patch command looks like this:

>

> PATCH_COMMAND "patch -p1 -t -N < ${CMAKE_CURRENT_SOURCE_DIR}/IntelDFP.patch"

>

> When building, however, I get this:

>

> [ 10%] Performing patch step for 'IntelDFP'

> /bin/sh: 1: patch -p1 -t -N <

> /home/david/Projects/db/IntelDFP.patch: not found

>

> I'm certain that the patch utility is installed and that the patch

> file path is correct. If I run that command myself, it works fine. So

> why does the CMake-generated Makefile fail to execute it?

 

How should cmake know, that you do not mean a command with blanks in his path?

 

 

Try

PATCH_COMMAND patch -p1 -t -N < ${CMAKE_CURRENT_SOURCE_DIR}/IntelDFP.patch

or

PATCH_COMMAND patch "-p1" "-t" "-N" "<" "${CMAKE_CURRENT_SOURCE_DIR}/IntelDFP.patch"

 

 

Kornel


--

Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Patch utility is installed, but my ExternalProject build step fails to execute it

Rolf Eike Beer
In reply to this post by David Brown
David Brown wrote:

> I'm trying to patch and build a Makefile-based project using the
> ExternalProject module. My patch command looks like this:
>
>     PATCH_COMMAND "patch -p1 -t -N <
> ${CMAKE_CURRENT_SOURCE_DIR}/IntelDFP.patch"
>
> When building, however, I get this:
>
>     [ 10%] Performing patch step for 'IntelDFP'
>     /bin/sh: 1: patch -p1 -t -N <
> /home/david/Projects/db/IntelDFP.patch: not found
>
> I'm certain that the patch utility is installed and that the patch
> file path is correct. If I run that command myself, it works fine. So
> why does the CMake-generated Makefile fail to execute it?
If it is GNU patch I suggest you use -i instead of piping, this has the chance
to work without a shell being available.

Eike
--

--

Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

signature.asc (205 bytes) Download Attachment