New: CMake use host pkg-config
https://bugs.busybox.net/show_bug.cgi?id=6632
Summary: CMake use host pkg-config
Product: buildroot
Version: 2013.02
Platform: PC
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P5
Component: Other
AssignedTo: unassigned at buildroot.uclibc.org
ReportedBy: damien at zeetim.com
CC: buildroot at uclibc.org
Estimated Hours: 0.0
Dear All,
I try to add cairo-dock in buildroot but I have a problem with CMAKE based package.
When I try to compile a CMAKE based package, cmake use the /usr/bin/pkg-config instead of the one compiled by buildroot.
So pkg-config look for package on host and not in buildroot directory.
Is there any solution to force cmake to use the correct pkg-config and find dependencies ?
Best regards
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 6632] CMake use host pkg-config
https://bugs.busybox.net/show_bug.cgi?id=6632
--- Comment #1 from Thomas Petazzoni <[email protected]> 2013-10-30 10:03:33 UTC --- 1/ Make sure your package depends on 'host-pkgconf', by doing something like <pkg>_DEPENDENCIES = host-pkgconf
2/ Make sure your package uses the cmake-package infrastructure, as described at
http://buildroot.org/downloads/manual/manual.html#_infrastructure_for_cmake_based_packages.
This will ensure that the directory where our cross pkg-config is installed is in the PATH, and before /usr/bin where the native pkg-config is.
Let us know if that fixes the problem for you.
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 6632] CMake use host pkg-config
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=6632
--- Comment #2 from Damien <[email protected]> 2013-10-30 10:11:43 UTC --- Created attachment 5108
--> https://bugs.busybox.net/attachment.cgi?id=5108
cairo-dock.mk
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 6632] CMake use host pkg-config
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=6632
--- Comment #3 from Thomas Petazzoni <[email protected]> 2013-10-30 10:29:15 UTC --- What about something like:
package/pkg-cmake.mk +1 -1
@@ -62,7 +62,7 @@ ifeq ($(5),target) define $(2)_CONFIGURE_CMDS (cd $$($$(PKG)_BUILDDIR) && \ rm -f CMakeCache.txt && \ - $$($$(PKG)_CONF_ENV) $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \ + $(TARGET_MAKE_ENV) $$($$(PKG)_CONF_ENV) $(HOST_DIR)/usr/bin/cmake
$$($$(PKG)_SRCDIR) \
-DCMAKE_TOOLCHAIN_FILE="$$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake" \
-DCMAKE_INSTALL_PREFIX="/usr" \
$$($$(PKG)_CONF_OPT) \
@@ -74,7 +74,7 @@ else
define $(2)_CONFIGURE_CMDS
(cd $$($$(PKG)_BUILDDIR) && \
rm -f CMakeCache.txt && \
- $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
+ $(HOST_MAKE_ENV) $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
-DCMAKE_INSTALL_SO_NO_EXE=0 \
-DCMAKE_FIND_ROOT_PATH="$$(HOST_DIR)" \
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM="BOTH" \Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
[Buildroot] [Bug 6632] CMake use host pkg-config
Hi Thomas,
Quoted 10 lines · bugzilla at busybox.net
https://bugs.busybox.net/show_bug.cgi?id=6632
--- Comment #3 from Thomas Petazzoni <[email protected]> 2013-10-30 10:29:15 UTC --- What about something like:
package/pkg-cmake.mk +0
-0
package/pkg-cmake.mk ifeq ($(5),target) · line 66
Quoted 6 lines
package/pkg-cmake.mk +1
-1@@ -62,7 +62,7 @@ ifeq ($(5),target) define $(2)_CONFIGURE_CMDS (cd $$($$(PKG)_BUILDDIR) && \ rm -f CMakeCache.txt && \ - $$($$(PKG)_CONF_ENV) $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \ + $(TARGET_MAKE_ENV) $$($$(PKG)_CONF_ENV) $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
Maybe we should generalize this, and export the elements ofTARGET_MAKE_ENV for all target goals:
ifeq ($(5),target)
$$($(2)_TARGET_INSTALL_TARGET): export PATH=$(TARGET_PATH) $$($(2)_TARGET_INSTALL_STAGING): export PATH=$(TARGET_PATH) $$($(2)_TARGET_INSTALL_IMAGES): export PATH=$(TARGET_PATH) $$($(2)_TARGET_INSTALL_HOST): export PATH=$(TARGET_PATH) $$($(2)_TARGET_BUILD): export PATH=$(TARGET_PATH) $$($(2)_TARGET_CONFIGURE): export PATH=$(TARGET_PATH) $$($(2)_TARGET_RSYNC): export PATH=$(TARGET_PATH) $$($(2)_TARGET_RSYNC_SOURCE): export PATH=$(TARGET_PATH) $$($(2)_TARGET_PATCH): export PATH=$(TARGET_PATH) $$($(2)_TARGET_EXTRACT): export PATH=$(TARGET_PATH) $$($(2)_TARGET_SOURCE): export PATH=$(TARGET_PATH) $$($(2)_TARGET_UNINSTALL): export PATH=$(TARGET_PATH) $$($(2)_TARGET_CLEAN): export PATH=$(TARGET_PATH) $$($(2)_TARGET_DIRCLEAN): export PATH=$(TARGET_PATH)
endif
And so on for all the other variables. Unfortunately you need a
separate line for each variable, you can't do something like 'export $(TARGET_MAKE_ENV)' on the right-hand side.
Anyway, it's just an idea, cause it's quite a big change that will
probably break some things.
Regards,
Arnout
Quoted 14 lines
package/pkg-cmake.mk +1
-2-DCMAKE_TOOLCHAIN_FILE="$$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake" \ -DCMAKE_INSTALL_PREFIX="/usr" \ $$($$(PKG)_CONF_OPT) \@@ -74,7 +74,7 @@ else define $(2)_CONFIGURE_CMDS (cd $$($$(PKG)_BUILDDIR) && \ rm -f CMakeCache.txt && \ - $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \ + $(HOST_MAKE_ENV) $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \ -DCMAKE_INSTALL_SO_NO_EXE=0 \ -DCMAKE_FIND_ROOT_PATH="$$(HOST_DIR)" \ -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM="BOTH" \
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
[Buildroot] [Bug 6632] CMake use host pkg-config
In reply to bugzilla at busybox.nethttps://bugs.busybox.net/show_bug.cgi?id=6632
Damien <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED--- Comment #4 from Damien <[email protected]> 2013-10-30 10:58:28 UTC --- thanks a lot, it's work with your patch.
Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.