Skip to contentSkip to conversation

pkg-cmake: fix host-cmake-package type

PATCH New Ryan Barnett 3 participants 4 messages Jan 22, 2015 – Jan 23, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pkg-cmake: fix host-cmake-package type

When trying to compile a host-cmake-package type such as host-cdrkit, an error happens in regards to HOSTCC and HOSTCXX not being found.

/bin/sh: HOSTCC: command not found
/bin/sh: HOSTCXX: command not found

This due to the fact that the environment is incorrectly configured by having the following:

  -DCMAKE_C_COMPILER=""$(HOSTCC)"" -DCMAKE_CXX_COMPILER=""$(HOSTCXX)""

This is due to having too many dollar signs. The fix is to remove the extra dollar sign.

---
 package/pkg-cmake.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/pkg-cmake.mk +2 -2
index 1037513..eac244f 100644
@@ -27,8 +27,8 @@ CMAKE_HOST_CXX_COMPILER="$(HOST_DIR)/usr/bin/ccache"
 CMAKE_HOST_C_COMPILER_ARG1="$(HOSTCC_NOCCACHE)"
 CMAKE_HOST_CXX_COMPILER_ARG1="$(HOSTCXX_NOCCACHE)"
 else
-CMAKE_HOST_C_COMPILER="$$(HOSTCC)"
-CMAKE_HOST_CXX_COMPILER="$$(HOSTCXX)"
+CMAKE_HOST_C_COMPILER="$(HOSTCC)"
+CMAKE_HOST_CXX_COMPILER="$(HOSTCXX)"
 endif
 
 ################################################################################
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 pkg-cmake: fix host-cmake-package type

Quoted 9 lines · Ryan Barnett

When trying to compile a host-cmake-package type such as host-cdrkit, an error happens in regards to HOSTCC and HOSTCXX not being found.

/bin/sh: HOSTCC: command not found
/bin/sh: HOSTCXX: command not found

This due to the fact that the environment is incorrectly configured by having the following:

Quoted 6 lines
  -DCMAKE_C_COMPILER=""$(HOSTCC)"" -DCMAKE_CXX_COMPILER=""$(HOSTCXX)""

This is due to having too many dollar signs. The fix is to remove the extra dollar sign.

Regards,

Signature · 1 line
Samuel
#2 lore raw

PATCH 1/1 pkg-cmake: fix host-cmake-package type

In reply to Ryan Barnett

Ryan, All,

On 2015-01-22 10:53 -0600, Ryan Barnett spake thusly:

Quoted 10 lines

When trying to compile a host-cmake-package type such as host-cdrkit, an error happens in regards to HOSTCC and HOSTCXX not being found.

/bin/sh: HOSTCC: command not found
/bin/sh: HOSTCXX: command not found

This due to the fact that the environment is incorrectly configured by having the following:

  -DCMAKE_C_COMPILER=""$(HOSTCC)"" -DCMAKE_CXX_COMPILER=""$(HOSTCXX)""

As you may have noticed, the double-quaotes are doubled...

Quoted 13 lines

This is due to having too many dollar signs. The fix is to remove the extra dollar sign.

---
 package/pkg-cmake.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/pkg-cmake.mk +0 -0
index 1037513..eac244f 100644

package/pkg-cmake.mk CMAKE_HOST_CXX_COMPILER="$(HOST_DIR)/usr/bin/ccache" · line 31

Quoted 7 lines
package/pkg-cmake.mk +2 -2
@@ -27,8 +27,8 @@ CMAKE_HOST_CXX_COMPILER="$(HOST_DIR)/usr/bin/ccache"
 CMAKE_HOST_C_COMPILER_ARG1="$(HOSTCC_NOCCACHE)"
 CMAKE_HOST_CXX_COMPILER_ARG1="$(HOSTCXX_NOCCACHE)"
 else
-CMAKE_HOST_C_COMPILER="$$(HOSTCC)"
-CMAKE_HOST_CXX_COMPILER="$$(HOSTCXX)"
+CMAKE_HOST_C_COMPILER="$(HOSTCC)"
+CMAKE_HOST_CXX_COMPILER="$(HOSTCXX)"

That's because of here; in Makefile syntax, double-quotes are not interpreted by make, and are part of the value.

So, you should also drop the double-quotes here.

Regards,
Yann E. MORIN.

Quoted 10 lines
package/pkg-cmake.mk +0 -0
 endif
 
 ################################################################################
Signature · 6 lines
1.9.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/1 pkg-cmake: fix host-cmake-package type

Yann, Ryan, all,

Quoted 40 lines · Yann E. MORIN

Ryan, All,

On 2015-01-22 10:53 -0600, Ryan Barnett spake thusly:

Quoted 10 lines

When trying to compile a host-cmake-package type such as host-cdrkit, an error happens in regards to HOSTCC and HOSTCXX not being found.

/bin/sh: HOSTCC: command not found
/bin/sh: HOSTCXX: command not found

This due to the fact that the environment is incorrectly configured by having the following:

  -DCMAKE_C_COMPILER=""$(HOSTCC)"" -DCMAKE_CXX_COMPILER=""$(HOSTCXX)""

As you may have noticed, the double-quaotes are doubled...

Quoted 13 lines

This is due to having too many dollar signs. The fix is to remove the extra dollar sign.

---
 package/pkg-cmake.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/pkg-cmake.mk +0 -0
index 1037513..eac244f 100644

package/pkg-cmake.mk CMAKE_HOST_CXX_COMPILER="$(HOST_DIR)/usr/bin/ccache" · line 31

Quoted 7 lines
package/pkg-cmake.mk +2 -2
@@ -27,8 +27,8 @@ CMAKE_HOST_CXX_COMPILER="$(HOST_DIR)/usr/bin/ccache"
 CMAKE_HOST_C_COMPILER_ARG1="$(HOSTCC_NOCCACHE)"
 CMAKE_HOST_CXX_COMPILER_ARG1="$(HOSTCXX_NOCCACHE)"
 else
-CMAKE_HOST_C_COMPILER="$$(HOSTCC)"
-CMAKE_HOST_CXX_COMPILER="$$(HOSTCXX)"
+CMAKE_HOST_C_COMPILER="$(HOSTCC)"
+CMAKE_HOST_CXX_COMPILER="$(HOSTCXX)"

That's because of here; in Makefile syntax, double-quotes are not interpreted by make, and are part of the value.

Quoted 1 line

So, you should also drop the double-quotes here.

While you are at cleaning this, adding 1 space before and after "=" will be good.

Regards,

Signature · 1 line
Samuel