Skip to contentSkip to conversation

Introducing CMAKETARGETS infrastructure

PATCH Superseded Bjørn Forsman 3 participants 18 messages Jan 15, 2011 – Jan 26, 2011 Kbuild

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Introducing CMAKETARGETS infrastructure

This patch series adds a new infrastructure for CMake packages called CMAKETARGETS. It is based on the AUTOTARGETS infrastructure.

Changes in v2:

* The toolchain-file is now also used by Buildroot for internal packages. This means less code duplication.

* Add CMAKE_C/CXX_FLAGS, CMAKE_PROGRAM_PATH and CMAKE_INSTALL_SO_NO_EXE to the toolchain-file.

* Remove CMAKE_{EXE,SHARED,MODULE}_LINKER_FLAGS from the infrastructure. CMake packages should use FIND_LIBRARY() or FIND_PACKAGE() and not rely on -L flags. If a package fails to build without -L, fix the package. Or add needed -L flags on a per package basis.

* Move CMAKE_TARGET_{CC,CXX,CFLAGS,CXXFLAGS} variable initialization from package/Makefile.cmake.in (CMAKETARGETS_INNER macro) to package/Makefile.in.

* Add a $(2)_BUILDDIR variable so that we can split build dir and source dir. $(2)_BUILD_DIR currently points to $(2)_SRCDIR to behave like the autotools infrastructure.

* Remove -Wno-dev from configure options so that build system warnings are displayed. (Warnings should get fixed, so don't hide them.)

NOTE: The doc is (still) more or less a copy of of the autotools stuff. I don't know how many build infrastructures Buildroot can have before the doc is better off being refactored a bit so that the each build system is more about what's different instead of repeating a bunch of stuff.

NOTE: There is no mention of the toolchain-file and how it can be used for building packages outside of Buildroot in the doc. As the documentation currently focuses on *integrating* packages in Buildroot, I didn't find a suitable place for it. Is this ok for now?

NOTE: ccache needs testing

Thanks to Samuel Martin and Thomas Petazzoni for the comments on v1.

Comments also welcome on v2 :-)

 Makefile                  |   16 ++++-
 docs/buildroot.html       |  151 +++++++++++++++++++++++++++++++++-
 package/Makefile.cmake.in |  197 +++++++++++++++++++++++++++++++++++++++++++++
 package/Makefile.in       |    8 ++
 package/cdrkit/cdrkit.mk  |   65 ++-------------
 5 files changed, 376 insertions(+), 61 deletions(-)
#1 lore raw

PATCH v2 1/4 Makefile: generate CMake toolchain-file in $(O)

A CMake toolchain-file makes it easy to develop CMake-based packages outside of Buildroot. Just give the toolchain-file to CMake via the -DCMAKE_TOOLCHAIN_FILE=... option.

---
 Makefile            |   16 +++++++++++++++-
 package/Makefile.in |    7 +++++++
 2 files changed, 22 insertions(+), 1 deletions(-)
Makefile +15 -1
index 7e08cf3..1b68060 100644
@@ -363,7 +363,7 @@ $(TARGETS_ALL): __real_tgt_%: $(BASE_TARGETS) %
 dirs: $(DL_DIR) $(TOOLCHAIN_DIR) $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
 	$(HOST_DIR) $(BR2_DEPENDS_DIR) $(BINARIES_DIR) $(STAMP_DIR)
 
-$(BASE_TARGETS): dirs
+$(BASE_TARGETS): dirs $(O)/toolchainfile.cmake
 
 $(BUILD_DIR)/buildroot-config/auto.conf: $(CONFIG_DIR)/.config
 	$(MAKE) $(EXTRAMAKEARGS) silentoldconfig
@@ -372,6 +372,20 @@ prepare: $(BUILD_DIR)/buildroot-config/auto.conf
 
 world: prepare dependencies dirs $(BASE_TARGETS) $(TARGETS_ALL)
 
+$(O)/toolchainfile.cmake:
+	@echo -en "\
+	set(CMAKE_SYSTEM_NAME Linux)\n\
+	set(CMAKE_C_COMPILER $(CMAKE_TARGET_CC))\n\
+	set(CMAKE_CXX_COMPILER $(CMAKE_TARGET_CXX))\n\
+	set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} $(CMAKE_TARGET_CFLAGS)\" CACHE STRING \"Buildroot CFLAGS\" FORCE)\n\
+	set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} $(CMAKE_TARGET_CXXFLAGS)\" CACHE STRING \"Buildroot CXXFLAGS\" FORCE)\n\
+	set(CMAKE_INSTALL_SO_NO_EXE 0)\n\
+	set(CMAKE_PROGRAM_PATH \"$(HOST_DIR)/usr/bin\")\n\
+	set(CMAKE_FIND_ROOT_PATH \"$(STAGING_DIR)\")\n\
+	set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\n\
+	set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\n\
+	set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\n\
+	" > $@
 
 .PHONY: all world dirs clean distclean source outputmakefile \
 	$(BASE_TARGETS) $(TARGETS) $(TARGETS_ALL) \
package/Makefile.in +7 -0
index a1e290f..0761aa1 100644
@@ -147,6 +147,13 @@ TARGET_CC  := $(CCACHE) $(TARGET_CC)
 TARGET_CXX := $(CCACHE) $(TARGET_CXX)
 endif
 
+# CMake doesn't support having the --sysroot option directly in the
+# compiler path, so move this option to CFLAGS/CXXFLAGS variables.
+CMAKE_TARGET_CC = $(filter-out --sysroot=%,$(TARGET_CC))
+CMAKE_TARGET_CXX = $(filter-out --sysroot=%,$(TARGET_CXX))
+CMAKE_TARGET_CFLAGS = $(filter --sysroot=%,$(TARGET_CC)) $(TARGET_CFLAGS)
+CMAKE_TARGET_CXXFLAGS = $(filter --sysroot=%,$(TARGET_CXX)) $(TARGET_CXXFLAGS)
+
 ifeq ($(BR2_STRIP_strip),y)
 STRIP_DISCARD_ALL:=--discard-all
 STRIP_STRIP_UNNEEDED:=--strip-unneeded
Signature · 1 line
1.7.1
#2 lore raw

PATCH v2 1/4 Makefile: generate CMake toolchain-file in $(O)

Hello Bjorn,

Makefile prepare: $(BUILD_DIR)/buildroot-config/auto.conf · line 388

Quoted 12 lines · On Sat, 15 Jan 2011 21:53:25 +0100 Bj?rn Forsman <[email protected]>…
Makefile +12 -0
+	set(CMAKE_SYSTEM_NAME Linux)\n\
+	set(CMAKE_C_COMPILER $(CMAKE_TARGET_CC))\n\
+	set(CMAKE_CXX_COMPILER $(CMAKE_TARGET_CXX))\n\
+	set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} $(CMAKE_TARGET_CFLAGS)\" CACHE STRING \"Buildroot CFLAGS\" FORCE)\n\
+	set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} $(CMAKE_TARGET_CXXFLAGS)\" CACHE STRING \"Buildroot CXXFLAGS\" FORCE)\n\
+	set(CMAKE_INSTALL_SO_NO_EXE 0)\n\
+	set(CMAKE_PROGRAM_PATH \"$(HOST_DIR)/usr/bin\")\n\
+	set(CMAKE_FIND_ROOT_PATH \"$(STAGING_DIR)\")\n\
+	set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\n\
+	set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\n\
+	set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\n\
+	" > $@

Could you also add:

+ set(ENV{PKG_CONFIG_SYSROOT_DIR} $(STAGING_DIR))\n\

This is needed to get CMake pkg-config module to work properly.

I am not entirely happy with the name/location of the CMake toolchain file, but that's something we can sort out later.

I have tested your patchset with my qserialport library (that uses CMake as its build system and relies on Qt) and my custom application (that uses CMake, Qt and qserialport), and it worked fine with the PKG_CONFIG_SYSROOT_DIR change mentionned above.

So, once this change is done, your patch gets my:

Thanks!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#3 lore raw

PATCH v2 1/4 Makefile: generate CMake toolchain-file in $(O)

Quoted 18 lines · Thomas Petazzoni

Hello Bjorn,

Quoted 4 lines · On Sat, 15 Jan 2011 21:53:25 +0100 Bj?rn Forsman <[email protected]>…

+ ? ? set(CMAKE_SYSTEM_NAME Linux)\n\
+ ? ? set(CMAKE_C_COMPILER $(CMAKE_TARGET_CC))\n\
+ ? ? set(CMAKE_CXX_COMPILER $(CMAKE_TARGET_CXX))\n\
+ ? ? set(CMAKE_C_FLAGS \"${CMAKE_C_FLAGS} $(CMAKE_TARGET_CFLAGS)\" CACHE STRING \"Buildroot CFLAGS\" FORCE)\n\

Quoted 8 lines

+ ? ? set(CMAKE_CXX_FLAGS \"${CMAKE_CXX_FLAGS} $(CMAKE_TARGET_CXXFLAGS)\" CACHE STRING \"Buildroot CXXFLAGS\" FORCE)\n\
+ ? ? set(CMAKE_INSTALL_SO_NO_EXE 0)\n\
+ ? ? set(CMAKE_PROGRAM_PATH \"$(HOST_DIR)/usr/bin\")\n\
+ ? ? set(CMAKE_FIND_ROOT_PATH \"$(STAGING_DIR)\")\n\
+ ? ? set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)\n\
+ ? ? set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)\n\
+ ? ? set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)\n\
+ ? ? " > $@

Quoted 5 lines

Could you also add:

+ ? ? ? set(ENV{PKG_CONFIG_SYSROOT_DIR} $(STAGING_DIR))\n\

This is needed to get CMake pkg-config module to work properly.

Thanks for the tip.

Quoted 2 lines

I am not entirely happy with the name/location of the CMake toolchain file, but that's something we can sort out later.

Or now, if you want :-) I'm open for suggestions.

Quoted 8 lines

I have tested your patchset with my qserialport library (that uses CMake as its build system and relies on Qt) and my custom application (that uses CMake, Qt and qserialport), and it worked fine with ?the PKG_CONFIG_SYSROOT_DIR change mentionned above.

So, once this change is done, your patch gets my:

Great!

By the way, how are 'acked-by's handled? Do I add them to every patch in the next series?

Best regards,
Bj?rn Forsman

#4 lore raw

PATCH v2 1/4 Makefile: generate CMake toolchain-file in $(O)

Quoted 7 lines · On Wed, 26 Jan 2011 01:33:38 +0100 Bj?rn Forsman <[email protected]>…
Quoted 5 lines

Could you also add:

+ ? ? ? set(ENV{PKG_CONFIG_SYSROOT_DIR} $(STAGING_DIR))\n\

This is needed to get CMake pkg-config module to work properly.

Thanks for the tip.

You're welcome. Thanks for doing this work in the first place.

Quoted 4 lines
Quoted 2 lines

I am not entirely happy with the name/location of the CMake toolchain file, but that's something we can sort out later.

Or now, if you want :-) I'm open for suggestions.

I don't have suggestions at the moment. It's related to the future SDK thing, which isn't completely well-defined at the moment. I'd say let's keep it how it is for now, unless someone comes up with a better location/name. We can always change it later on when we have a clearer idea of what this SDK thing will look like.

Quoted 8 lines
Quoted 3 lines

So, once this change is done, your patch gets my:

Great!

By the way, how are 'acked-by's handled? Do I add them to every patch in the next series?

Yes, exactly.

Thanks again!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#5 lore raw

PATCH v2 2/4 Add CMAKETARGETS infrastructure for CMake packages

In reply to Bjørn Forsman

The CMAKETARGETS infrastructure makes adding CMake-based packages to Buildroot easy. It uses the same set of variables as the autotools infrastructure, except for autoreconf and libtool stuff which is not needed. Usage: just call CMAKETARGETS instead of AUTOTARGETS.

---
 package/Makefile.cmake.in |  197 +++++++++++++++++++++++++++++++++++++++++++++
 package/Makefile.in       |    1 +
 2 files changed, 198 insertions(+), 0 deletions(-)
 create mode 100644 package/Makefile.cmake.in
package/Makefile.cmake.in new file +197 -0
new file mode 100644
index 0000000..e9cef58
@@ -0,0 +1,197 @@
+################################################################################
+# CMake package infrastructure
+#
+# This file implements an infrastructure that eases development of
+# package .mk files for CMake packages. It should be used for all
+# packages that use CMake as their build system.
+#
+# See the Buildroot documentation for details on the usage of this
+# infrastructure
+#
+# In terms of implementation, this CMake infrastructure requires
+# the .mk file to only specify metadata informations about the
+# package: name, version, download URL, etc.
+#
+# We still allow the package .mk file to override what the different
+# steps are doing, if needed. For example, if <PKG>_BUILD_CMDS is
+# already defined, it is used as the list of commands to perform to
+# build the package, instead of the default CMake behaviour. The
+# package can also define some post operation hooks.
+#
+################################################################################
+
+################################################################################
+# CMAKETARGETS_INNER -- defines how the configuration, compilation and
+# installation of a CMake package should be done, implements a few hooks to
+# tune the build process and calls the generic package infrastructure to
+# generate the necessary make targets
+#
+#  argument 1 is the lowercase package name
+#  argument 2 is the uppercase package name, including an HOST_ prefix
+#             for host packages
+#  argument 3 is the uppercase package name, without the HOST_ prefix
+#             for host packages
+#  argument 4 is the package directory prefix
+#  argument 5 is the type (target or host)
+################################################################################
+
+define CMAKETARGETS_INNER
+
+# define package-specific variables to default values
+ifndef $(2)_SUBDIR
+ ifdef $(3)_SUBDIR
+  $(2)_SUBDIR = $($(3)_SUBDIR)
+ else
+  $(2)_SUBDIR ?=
+ endif
+endif
+
+$(2)_CONF_ENV			?=
+$(2)_CONF_OPT			?=
+$(2)_MAKE			?= $(MAKE)
+$(2)_MAKE_ENV			?=
+$(2)_MAKE_OPT			?=
+$(2)_INSTALL_HOST_OPT		?= DESTDIR=$$(HOST_DIR) install
+$(2)_INSTALL_STAGING_OPT	?= DESTDIR=$$(STAGING_DIR) install
+$(2)_INSTALL_TARGET_OPT		?= DESTDIR=$$(TARGET_DIR) install
+$(2)_CLEAN_OPT			?= clean
+
+$(2)_SRCDIR			= $$($(2)_DIR)/$($(2)_SUBDIR)
+$(2)_BUILDDIR			= $$($(2)_SRCDIR)
+
+#
+# Configure step. Only define it if not already defined by the package
+# .mk file. And take care of the differences between host and target
+# packages.
+#
+ifndef $(2)_CONFIGURE_CMDS
+ifeq ($(5),target)
+
+# Configure package for target
+define $(2)_CONFIGURE_CMDS
+	(cd $$($$(PKG)_BUILDDIR) && \
+	rm -f CMakeCache.txt && \
+	$$($$(PKG)_CONF_ENV) $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
+		-DCMAKE_TOOLCHAIN_FILE="$$(BASE_DIR)/toolchainfile.cmake" \
+		-DCMAKE_INSTALL_PREFIX="/usr" \
+		$$($$(PKG)_CONF_OPT) \
+	)
+endef
+else
+
+# Configure package for host
+define $(2)_CONFIGURE_CMDS
+	(cd $$($$(PKG)_BUILDDIR) && \
+	rm -f CMakeCache.txt && \
+	$(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" \
+		-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY="BOTH" \
+		-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE="BOTH" \
+		-DCMAKE_INSTALL_PREFIX="/usr" \
+		$$($$(PKG)_CONF_OPT) \
+	)
+endef
+endif
+endif
+
+$(2)_DEPENDENCIES += host-cmake
+
+#
+# Build step. Only define it if not already defined by the package .mk
+# file.
+#
+ifndef $(2)_BUILD_CMDS
+ifeq ($(5),target)
+define $(2)_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT) -C $$($$(PKG)_BUILDDIR)
+endef
+else
+define $(2)_BUILD_CMDS
+	$(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT) -C $$($$(PKG)_BUILDDIR)
+endef
+endif
+endif
+
+#
+# Host installation step. Only define it if not already defined by the
+# package .mk file.
+#
+ifndef $(2)_INSTALL_CMDS
+define $(2)_INSTALL_CMDS
+	$(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT) $$($$(PKG)_INSTALL_HOST_OPT) -C $$($$(PKG)_BUILDDIR)
+endef
+endif
+
+#
+# Staging installation step. Only define it if not already defined by
+# the package .mk file.
+#
+ifndef $(2)_INSTALL_STAGING_CMDS
+define $(2)_INSTALL_STAGING_CMDS
+	$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT) $$($$(PKG)_INSTALL_STAGING_OPT) -C $$($$(PKG)_BUILDDIR)
+endef
+endif
+
+#
+# Target installation step. Only define it if not already defined by
+# the package .mk file.
+#
+ifndef $(2)_INSTALL_TARGET_CMDS
+define $(2)_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT) $$($$(PKG)_INSTALL_TARGET_OPT) -C $$($$(PKG)_BUILDDIR)
+endef
+endif
+
+#
+# Clean step. Only define it if not already defined by
+# the package .mk file.
+#
+ifndef $(2)_CLEAN_CMDS
+define $(2)_CLEAN_CMDS
+	-$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT) $$($$(PKG)_CLEAN_OPT) -C $$($$(PKG)_BUILDDIR)
+endef
+endif
+
+#
+# Uninstall from staging step. Only define it if not already defined by
+# the package .mk file.
+#
+ifndef $(2)_UNINSTALL_STAGING_CMDS
+define $(2)_UNINSTALL_STAGING_CMDS
+	(cd $$($$(PKG)_BUILDDIR) && sed "s:\(.*\):$$(STAGING_DIR)\1:" install_manifest.txt | xargs rm -f)
+endef
+endif
+
+#
+# Uninstall from target step. Only define it if not already defined
+# by the package .mk file.
+#
+ifndef $(2)_UNINSTALL_TARGET_CMDS
+define $(2)_UNINSTALL_TARGET_CMDS
+	(cd $$($$(PKG)_BUILDDIR) && sed "s:\(.*\):$$(TARGET_DIR)\1:" install_manifest.txt | xargs rm -f)
+endef
+endif
+
+# Call the generic package infrastructure to generate the necessary
+# make targets
+$(call GENTARGETS_INNER,$(1),$(2),$(3),$(4),$(5))
+
+endef
+
+################################################################################
+# CMAKETARGETS -- the target generator macro for CMake packages
+#
+# Argument 1 is the package directory prefix [mandatory]
+# Argument 2 is the lowercase package name   [mandatory]
+# Argument 3 is "target" or "host"           [optional, default: "target"]
+################################################################################
+
+define CMAKETARGETS
+ifeq ($(3),host)
+$(call CMAKETARGETS_INNER,$(3)-$(2),$(call UPPERCASE,$(3)-$(2)),$(call UPPERCASE,$(2)),$(1),host)
+else
+$(call CMAKETARGETS_INNER,$(2),$(call UPPERCASE,$(2)),$(call UPPERCASE,$(2)),$(1),target)
+endif
+endef
package/Makefile.in +1 -0
index 0761aa1..3255823 100644
@@ -322,4 +322,5 @@ ENABLE_DEBUG:=
 endif
 
 include package/Makefile.autotools.in
+include package/Makefile.cmake.in
 include package/Makefile.package.in
Signature · 1 line
1.7.1
#6 lore raw

PATCH v2 2/4 Add CMAKETARGETS infrastructure for CMake packages

Hi,

2011/1/15 Bj?rn Forsman <[email protected]>

Quoted 91 lines

The CMAKETARGETS infrastructure makes adding CMake-based packages to Buildroot easy. It uses the same set of variables as the autotools infrastructure, except for autoreconf and libtool stuff which is not needed. Usage: just call CMAKETARGETS instead of AUTOTARGETS.

---
 package/Makefile.cmake.in |  197
+++++++++++++++++++++++++++++++++++++++++++++
 package/Makefile.in       |    1 +
 2 files changed, 198 insertions(+), 0 deletions(-)
 create mode 100644 package/Makefile.cmake.in
package/Makefile.cmake.in new file +25 -0
new file mode 100644
index 0000000..e9cef58
@@ -0,0 +1,197 @@
 
+################################################################################
+# CMake package infrastructure
+#
+# This file implements an infrastructure that eases development of
+# package .mk files for CMake packages. It should be used for all
+# packages that use CMake as their build system.
+#
+# See the Buildroot documentation for details on the usage of this
+# infrastructure
+#
+# In terms of implementation, this CMake infrastructure requires
+# the .mk file to only specify metadata informations about the
+# package: name, version, download URL, etc.
+#
+# We still allow the package .mk file to override what the different
+# steps are doing, if needed. For example, if <PKG>_BUILD_CMDS is
+# already defined, it is used as the list of commands to perform to
+# build the package, instead of the default CMake behaviour. The
+# package can also define some post operation hooks.
+#
 
+################################################################################
+
 
+################################################################################
+# CMAKETARGETS_INNER -- defines how the configuration, compilation and
+# installation of a CMake package should be done, implements a few hooks

to

package/Makefile.cmake.in new file +41 -0
+# tune the build process and calls the generic package infrastructure to
+# generate the necessary make targets
+#
+#  argument 1 is the lowercase package name
+#  argument 2 is the uppercase package name, including an HOST_ prefix
+#             for host packages
+#  argument 3 is the uppercase package name, without the HOST_ prefix
+#             for host packages
+#  argument 4 is the package directory prefix
+#  argument 5 is the type (target or host)
 
+################################################################################
+
+define CMAKETARGETS_INNER
+
+# define package-specific variables to default values
+ifndef $(2)_SUBDIR
+ ifdef $(3)_SUBDIR
+  $(2)_SUBDIR = $($(3)_SUBDIR)
+ else
+  $(2)_SUBDIR ?=
+ endif
+endif
+
+$(2)_CONF_ENV                  ?=
+$(2)_CONF_OPT                  ?=
+$(2)_MAKE                      ?= $(MAKE)
+$(2)_MAKE_ENV                  ?=
+$(2)_MAKE_OPT                  ?=
+$(2)_INSTALL_HOST_OPT          ?= DESTDIR=$$(HOST_DIR) install
+$(2)_INSTALL_STAGING_OPT       ?= DESTDIR=$$(STAGING_DIR) install
+$(2)_INSTALL_TARGET_OPT                ?= DESTDIR=$$(TARGET_DIR) install
+$(2)_CLEAN_OPT                 ?= clean
+
+$(2)_SRCDIR                    = $$($(2)_DIR)/$($(2)_SUBDIR)
+$(2)_BUILDDIR                  = $$($(2)_SRCDIR)
+
+#
+# Configure step. Only define it if not already defined by the package
+# .mk file. And take care of the differences between host and target
+# packages.
+#

package/Makefile.cmake.in line 76

Quoted 10 lines
package/Makefile.cmake.in new file +10 -0
+ifndef $(2)_CONFIGURE_CMDS
+ifeq ($(5),target)
+
+# Configure package for target
+define $(2)_CONFIGURE_CMDS
+       (cd $$($$(PKG)_BUILDDIR) && \
+       rm -f CMakeCache.txt && \
+       $$($$(PKG)_CONF_ENV) $(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
+               -DCMAKE_TOOLCHAIN_FILE="$$(BASE_DIR)/toolchainfile.cmake" \
+               -DCMAKE_INSTALL_PREFIX="/usr" \

same remark that patch 4/4

Quoted 1 line

+ $$($$(PKG)_CONF_OPT) \

+ )

Quoted 5 lines
package/Makefile.cmake.in new file +4 -0
+endef
+else
+
+# Configure package for host

package/Makefile.cmake.in line 92

Quoted 10 lines
package/Makefile.cmake.in new file +10 -0
+define $(2)_CONFIGURE_CMDS
+       (cd $$($$(PKG)_BUILDDIR) && \
+       rm -f CMakeCache.txt && \
+       $(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" \
+               -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY="BOTH" \
+               -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE="BOTH" \
+               -DCMAKE_INSTALL_PREFIX="/usr" \

again

Quoted 130 lines
package/Makefile.cmake.in new file +16 -0
+               $$($$(PKG)_CONF_OPT) \
+       )
+endef
+endif
+endif
+
+$(2)_DEPENDENCIES += host-cmake
+
+#
+# Build step. Only define it if not already defined by the package .mk
+# file.
+#
+ifndef $(2)_BUILD_CMDS
+ifeq ($(5),target)
+define $(2)_BUILD_CMDS
+       $(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE)

$$($$(PKG)_MAKE_OPT) -C $$($$(PKG)_BUILDDIR)

package/Makefile.cmake.in new file +4 -0
+endef
+else
+define $(2)_BUILD_CMDS
+       $(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE)

$$($$(PKG)_MAKE_OPT) -C $$($$(PKG)_BUILDDIR)

package/Makefile.cmake.in new file +11 -0
+endef
+endif
+endif
+
+#
+# Host installation step. Only define it if not already defined by the
+# package .mk file.
+#
+ifndef $(2)_INSTALL_CMDS
+define $(2)_INSTALL_CMDS
+       $(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE)

$$($$(PKG)_MAKE_OPT) $$($$(PKG)_INSTALL_HOST_OPT) -C $$($$(PKG)_BUILDDIR)

package/Makefile.cmake.in new file +10 -0
+endef
+endif
+
+#
+# Staging installation step. Only define it if not already defined by
+# the package .mk file.
+#
+ifndef $(2)_INSTALL_STAGING_CMDS
+define $(2)_INSTALL_STAGING_CMDS
+       $(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE)

$$($$(PKG)_MAKE_OPT) $$($$(PKG)_INSTALL_STAGING_OPT) -C $$($$(PKG)_BUILDDIR)

package/Makefile.cmake.in new file +10 -0
+endef
+endif
+
+#
+# Target installation step. Only define it if not already defined by
+# the package .mk file.
+#
+ifndef $(2)_INSTALL_TARGET_CMDS
+define $(2)_INSTALL_TARGET_CMDS
+       $(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE)

$$($$(PKG)_MAKE_OPT) $$($$(PKG)_INSTALL_TARGET_OPT) -C $$($$(PKG)_BUILDDIR)

package/Makefile.cmake.in new file +10 -0
+endef
+endif
+
+#
+# Clean step. Only define it if not already defined by
+# the package .mk file.
+#
+ifndef $(2)_CLEAN_CMDS
+define $(2)_CLEAN_CMDS
+       -$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE)

$$($$(PKG)_MAKE_OPT) $$($$(PKG)_CLEAN_OPT) -C $$($$(PKG)_BUILDDIR)

package/Makefile.cmake.in new file +10 -0
+endef
+endif
+
+#
+# Uninstall from staging step. Only define it if not already defined by
+# the package .mk file.
+#
+ifndef $(2)_UNINSTALL_STAGING_CMDS
+define $(2)_UNINSTALL_STAGING_CMDS
+       (cd $$($$(PKG)_BUILDDIR) && sed "s:\(.*\):$$(STAGING_DIR)\1:"

install_manifest.txt | xargs rm -f)

package/Makefile.cmake.in new file +10 -0
+endef
+endif
+
+#
+# Uninstall from target step. Only define it if not already defined
+# by the package .mk file.
+#
+ifndef $(2)_UNINSTALL_TARGET_CMDS
+define $(2)_UNINSTALL_TARGET_CMDS
+       (cd $$($$(PKG)_BUILDDIR) && sed "s:\(.*\):$$(TARGET_DIR)\1:"

install_manifest.txt | xargs rm -f)

package/Makefile.cmake.in new file +20 -0
+endef
+endif
+
+# Call the generic package infrastructure to generate the necessary
+# make targets
+$(call GENTARGETS_INNER,$(1),$(2),$(3),$(4),$(5))
+
+endef
+
 
+################################################################################
+# CMAKETARGETS -- the target generator macro for CMake packages
+#
+# Argument 1 is the package directory prefix [mandatory]
+# Argument 2 is the lowercase package name   [mandatory]
+# Argument 3 is "target" or "host"           [optional, default: "target"]
 
+################################################################################
+
+define CMAKETARGETS
+ifeq ($(3),host)
+$(call CMAKETARGETS_INNER,$(3)-$(2),$(call UPPERCASE,$(3)-$(2)),$(call

UPPERCASE,$(2)),$(1),host)
+else
+$(call CMAKETARGETS_INNER,$(2),$(call UPPERCASE,$(2)),$(call UPPERCASE,$(2)),$(1),target)

package/Makefile.cmake.in new file +2 -0
+endif
+endef
package/Makefile.in +1 -1
index 0761aa1..3255823 100644
@@ -322,4 +322,5 @@ ENABLE_DEBUG:=
 endif
 
 include package/Makefile.autotools.in
+include package/Makefile.cmake.in
 include package/Makefile.package.in
--

1.7.1

Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110123/2dc57387/attachment-0001.html>

#7 lore raw

PATCH v2 2/4 Add CMAKETARGETS infrastructure for CMake packages

In reply to Bjørn Forsman
Quoted 1 line · On Sat, 15 Jan 2011 21:53:26 +0100 Bj?rn Forsman <[email protected]>…

+$(2)_INSTALL_HOST_OPT ?= DESTDIR=$$(HOST_DIR) install

$(2)_INSTALL_HOST_OPT ?= install

should be sufficient if:

Review

Quoted 1 line
(quoted diff) +1 -0
+		-DCMAKE_INSTALL_PREFIX="/usr" \

is replaced by:

Review

Quoted 1 line
(quoted diff) +1 -0
+		-DCMAKE_INSTALL_PREFIX="$(HOST_DIR)/usr" \

for host packages. I think, like for autotools packages, it is more technically correct to set the installation prefix to $(HOST_DIR)/usr rather than /usr.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#8 lore raw

PATCH v2 2/4 Add CMAKETARGETS infrastructure for CMake packages

Quoted 11 lines · Thomas Petazzoni
Quoted 1 line · On Sat, 15 Jan 2011 21:53:26 +0100 Bj?rn Forsman <[email protected]>…

+$(2)_INSTALL_HOST_OPT ? ? ? ? ? ? ? ??= DESTDIR=$$(HOST_DIR) install

$(2)_INSTALL_HOST_OPT ? ? ? ? ? ?= install

should be sufficient if:

Quoted 1 line

+ ? ? ? ? ? ? -DCMAKE_INSTALL_PREFIX="/usr" \

Quoted 7 lines

is replaced by:

Quoted 1 line

+ ? ? ? ? ? ? -DCMAKE_INSTALL_PREFIX="$(HOST_DIR)/usr" \

for host packages. I think, like for autotools packages, it is more technically correct to set the installation prefix to $(HOST_DIR)/usr rather than /usr.

Yes, I agree. I'll make this change in the next series.

Best regards,
Bj?rn Formsna

#9 lore raw

PATCH v2 3/4 doc: add CMAKETARGETS documentation

In reply to Bjørn Forsman
---
 docs/buildroot.html |  151 +++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 147 insertions(+), 4 deletions(-)
docs/buildroot.html +147 -4
index 9d6e835..a5444cc 100644
@@ -756,6 +756,8 @@ $(ZLIB_DIR)/libz.a: $(ZLIB_DIR)/.configured
           <li><a href="#generic-reference">Makefile for generic packages : reference</a></li>
           <li><a href="#autotools-tutorial">Makefile for autotools-based packages : tutorial</a></li>
           <li><a href="#autotools-reference">Makefile for autotools-based packages : reference</a></li>
+          <li><a href="#cmake-tutorial">Makefile for CMake-based packages : tutorial</a></li>
+          <li><a href="#cmake-reference">Makefile for CMake-based packages : reference</a></li>
           <li><a href="#manual-tutorial">Manual Makefile : tutorial</a></li>
         </ul>
       </li>
@@ -1331,13 +1333,154 @@ LIBFOO_POST_PATCH_HOOKS += LIBFOO_POST_PATCH_FIXUP
       general case.</li>
     </ul>
 
+    <h4 id="cmake-tutorial">Makefile for CMake-based packages : tutorial</h4>
+
+    <p>First, let's see how to write a <code>.mk</code> file for a CMake-based
+    package, with an example :</p>
+
+<pre>
+<span style="color: #000000">01:</span><span style="font-style: italic; color: #9A1900"> #############################################################</span>
+<span style="color: #000000">02:</span><span style="font-style: italic; color: #9A1900"> #</span>
+<span style="color: #000000">03:</span><span style="font-style: italic; color: #9A1900"> # libfoo</span>
+<span style="color: #000000">04:</span><span style="font-style: italic; color: #9A1900"> #</span>
+<span style="color: #000000">05:</span><span style="font-style: italic; color: #9A1900"> #############################################################</span>
+<span style="color: #000000">06:</span><span style="color: #009900"> LIBFOO_VERSION</span> = 1.0
+<span style="color: #000000">07:</span><span style="color: #009900"> LIBFOO_SOURCE</span> = libfoo-<span style="color: #009900">$(LIBFOO_VERSION)</span>.tar.gz
+<span style="color: #000000">08:</span><span style="color: #009900"> LIBFOO_SITE</span> = http://www.foosoftware.org/download
+<span style="color: #000000">09:</span><span style="color: #009900"> LIBFOO_INSTALL_STAGING</span> = YES
+<span style="color: #000000">10:</span><span style="color: #009900"> LIBFOO_INSTALL_TARGET</span> = YES
+<span style="color: #000000">11:</span><span style="color: #009900"> LIBFOO_CONF_OPT</span> = -DBUILD_DEMOS=ON
+<span style="color: #000000">12:</span><span style="color: #009900"> LIBFOO_DEPENDENCIES</span> = libglib2 host-pkg-config
+<span style="color: #000000">13:</span>
+<span style="color: #000000">14:</span><span style="color: #009900"> $(eval $(call CMAKETARGETS,package,libfoo))</span>
+</pre>
+
+    <p>On line 6, we declare the version of the package.</p>
+
+    <p>On line 7 and 8, we declare the name of the tarball and the location
+    of the tarball on the Web. Buildroot will automatically download the
+    tarball from this location.</p>
+
+    <p>On line 9, we tell Buildroot to install the package to the staging
+    directory. The staging directory, located in <code>output/staging/</code>
+    is the directory where all the packages are installed, including their
+    development files, etc. By default, packages are not installed to the
+    staging directory, since usually, only libraries need to be installed in
+    the staging directory: their development files are needed to compile
+    other libraries or applications depending on them. Also by default, when
+    staging installation is enabled, packages are installed in this location
+    using the <code>make install</code> command.</p>
+
+    <p>On line 10, we tell Buildroot to also install the package to the
+    target directory. This directory contains what will become the root
+    filesystem running on the target. Usually, we try not to install header
+    files and to install stripped versions of the binary. By default, target
+    installation is enabled, so in fact, this line is not strictly
+    necessary. Also by default, packages are installed in this location
+    using the <code>make install</code> command.</p>
+
+    <p>On line 11, we tell Buildroot to pass custom options to CMake when it is
+    configuring the package.</p>
+
+    <p>On line 12, we declare our dependencies, so that they are built
+    before the build process of our package starts.</p>
+
+    <p>Finally, on line line 14, we invoke the <code>CMAKETARGETS</code>
+    macro that generates all the Makefile rules that actually allows the
+    package to be built.</p>
+
+    <h4 id="cmake-reference">Makefile for CMake packages : reference</h4>
+
+    <p>The main macro of the CMake package infrastructure is
+    <code>CMAKETARGETS</code>. It has the same number of arguments and the
+    same semantic as the <code>GENTARGETS</code> macro, which is the main
+    macro of the generic package infrastructure. For CMake packages, the
+    ability to have target and host packages is also available.</p>
+
+    <p>Just like the generic infrastructure, the CMake infrastructure
+    works by defining a number of variables before calling the
+    <code>CMAKETARGETS</code> macro.</p>
+
+    <p>First, all the package metadata information variables that exist in the
+    generic infrastructure also exist in the CMake infrastructure:
+    <code>LIBFOO_VERSION</code>, <code>LIBFOO_SOURCE</code>,
+    <code>LIBFOO_PATCH</code>, <code>LIBFOO_SITE</code>,
+    <code>LIBFOO_SUBDIR</code>, <code>LIBFOO_DEPENDENCIES</code>,
+    <code>LIBFOO_INSTALL_STAGING</code>, <code>LIBFOO_INSTALL_TARGET</code>.</p>
+
+    <p>A few additional variables, specific to the CMake infrastructure,
+    can also be defined. Many of them are only useful in very specific
+    cases, typical packages will therefore only use a few of them.</p>
+
+    <ul>
+      <li><code>LIBFOO_SUBDIR</code> may contain the name of a subdirectory
+      inside the package that contains the main CMakeLists.txt file. This is
+      useful, if for example, the main CMakeLists.txt file is not at the root
+      of the tree extracted by the tarball. If <code>HOST_LIBFOO_SUBDIR</code>
+      is not specified, it defaults to <code>LIBFOO_SUBDIR</code>.</li>
+
+      <li><code>LIBFOO_CONF_ENV</code>, to specify additional environment
+      variables to pass to CMake. By default, empty.</li>
+
+      <li><code>LIBFOO_CONF_OPT</code>, to specify additional configure
+      options to pass to CMake. By default, empty.</li>
+
+      <li><code>LIBFOO_MAKE</code>, to specify an alternate <code>make</code>
+      command. This is typically useful when parallel make is enabled in
+      the configuration (using <code>BR2_JLEVEL</code>) but that this
+      feature should be disabled for the given package, for one reason or
+      another. By default, set to <code>$(MAKE)</code>. If parallel building
+      is not supported by the package, then it should be set to
+      <code>LIBFOO_MAKE=$(MAKE1)</code>.</li>
+
+      <li><code>LIBFOO_MAKE_ENV</code>, to specify additional environment
+      variables to pass to make in the build step. These are passed before
+      the <code>make</code> command. By default, empty.</li>
+
+      <li><code>LIBFOO_MAKE_OPT</code>, to specify additional variables to
+      pass to make in the build step. These are passed after the
+      <code>make</code> command. By default, empty.</li>
+
+      <li><code>LIBFOO_INSTALL_STAGING_OPT</code> contains the make options
+      used to install the package to the staging directory. By default, the
+      value is <code>DESTDIR=$$(STAGING_DIR) install</code>, which is
+      correct for most CMake packages. It is still possible to override
+      it.</li>
+
+      <li><code>LIBFOO_INSTALL_TARGET_OPT</code> contains the make options
+      used to install the package to the target directory. By default, the
+      value is <code>DESTDIR=$$(TARGET_DIR) install</code>. The default
+      value is correct for most CMake packages, but it is still possible
+      to override it if needed.</li>
+
+      <li><code>LIBFOO_CLEAN_OPT</code> contains the make options used to
+      clean the package. By default, the value is <code>clean</code>.</li>
+    </ul>
+
+    <p>With the CMake infrastructure, all the steps required to build
+    and install the packages are already defined, and they generally work
+    well for most CMake-based packages. However, when required, it is
+    still possible to customize what is done in any particular step:</p>
+
+    <ul>
+      <li>By adding a post-operation hook (after extract, patch, configure,
+      build or install). See the reference documentation of the generic
+      infrastructure for details.</li>
+
+      <li>By overriding one of the steps. For example, even if the CMake
+      infrastructure is used, if the package <code>.mk</code> file defines its
+      own <code>LIBFOO_CONFIGURE_CMDS</code> variable, it will be used
+      instead of the default CMake one. However, using this method
+      should be restricted to very specific cases. Do not use it in the
+      general case.</li>
+    </ul>
+
     <h4 id ="manual-tutorial">Manual Makefile : tutorial</h4>
 
     <p><b>NOTE: new manual makefiles should not be created, and existing
-    manual makefiles should be converted either to the generic
-    infrastructure or the autotools infrastructure. This section is only
-    kept to document the existing manual makefiles and to help understand
-    how they work.</b></p>
+    manual makefiles should be converted either to the generic, autotools
+    or cmake infrastructure. This section is only kept to document the existing
+    manual makefiles and to help understand how they work.</b></p>
 
 <pre>
 01: #############################################################
Signature · 1 line
1.7.1
#10 lore raw

PATCH v2 4/4 cdrkit: convert to CMAKETARGETS infrastructure

In reply to Bjørn Forsman
---
 package/cdrkit/cdrkit.mk |   65 ++++++---------------------------------------
 1 files changed, 9 insertions(+), 56 deletions(-)
package/cdrkit/cdrkit.mk +9 -56
index a0ce9cb..0e97cc1 100644
@@ -11,61 +11,14 @@ else
 CMAKE_ENDIAN_OPT=-DBITFIELDS_HTOL=0
 endif
 
-# CMake doesn't support having the --sysroot option directly in the
-# compiler path, so move this option to the CFLAGS/CXXFLAGS variables.
-CDRKIT_TARGET_CC = $(filter-out --sysroot=%,$(TARGET_CC))
-CDRKIT_TARGET_CXX = $(filter-out --sysroot=%,$(TARGET_CXX))
-CDRKIT_TARGET_CFLAGS = $(filter --sysroot=%,$(TARGET_CC)) $(TARGET_CFLAGS)
-CDRKIT_TARGET_CXXFLAGS = $(filter --sysroot=%,$(TARGET_CXX)) $(TARGET_CXXFLAGS)
+CDRKIT_CONF_OPT += $(CMAKE_ENDIAN_OPT)
 
-define CDRKIT_CONFIGURE_CMDS
- -mkdir $(@D)/build
- (cd $(@D)/build ; \
-	$(HOST_DIR)/usr/bin/cmake .. \
-		-Wno-dev \
-		-DCMAKE_SYSTEM_NAME:STRING="Linux" \
-		-DCMAKE_C_COMPILER:FILEPATH="$(CDRKIT_TARGET_CC)" \
-		-DCMAKE_CXX_COMPILER:FILEPATH="$(CDRKIT_TARGET_CXX)" \
-		-DCMAKE_C_FLAGS:STRING="$(CDRKIT_TARGET_CFLAGS)" \
-		-DCMAKE_CXX_FLAGS:STRING="$(CDRKIT_TARGET_CXXFLAGS)" \
-		-DCMAKE_EXE_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS)" \
-		-DCMAKE_MODULE_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS)" \
-		-DCMAKE_SHARED_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS)" \
-		-DCMAKE_FIND_ROOT_PATH:PATH="$(STAGING_DIR)" \
-		-DCMAKE_INSTALL_PREFIX:PATH="$(TARGET_DIR)/usr" \
-		$(CMAKE_ENDIAN_OPT) \
- )
-endef
-
-define CDRKIT_BUILD_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/build
-endef
-
-define CDRKIT_INSTALL_TARGET_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/build install
-endef
-
-define HOST_CDRKIT_CONFIGURE_CMDS
- -mkdir $(@D)/build
- (cd $(@D)/build ; \
-	$(HOST_DIR)/usr/bin/cmake .. \
-		-Wno-dev \
-		-DCMAKE_C_FLAGS="$(HOST_CFLAGS)" \
-		-DCMAKE_EXE_LINKER_FLAGS:STRING="$(HOST_LDFLAGS)" \
-		-DCMAKE_MODULE_LINKER_FLAGS:STRING="$(HOST_LDFLAGS)" \
-		-DCMAKE_SHARED_LINKER_FLAGS:STRING="$(HOST_LDFLAGS)" \
-		-DCMAKE_INSTALL_PREFIX:STRING="$(HOST_DIR)/usr" \
- )
-endef
-
-define HOST_CDRKIT_BUILD_CMDS
- $(HOST_MAKE_ENV) $(MAKE) -C $(@D)/build
-endef
-
-define HOST_CDRKIT_INSTALL_CMDS
- $(HOST_MAKE_ENV) $(MAKE) -C $(@D)/build  install
-endef
-
-$(eval $(call GENTARGETS,package,cdrkit))
-$(eval $(call GENTARGETS,package,cdrkit,host))
+## cdrkit isn't completely re-rooted by CMAKE_FIND_ROOT_PATH, so add
+## some extra flags so it finds needed libs and headers.
+CDRKIT_CONF_OPT += -DCMAKE_REQUIRED_INCLUDES="$(STAGING_DIR)/usr/include"
+CDRKIT_CONF_OPT += -DCMAKE_EXE_LINKER_FLAGS="$(TARGET_LDFLAGS)"
+HOST_CDRKIT_CONF_OPT += -DCMAKE_REQUIRED_INCLUDES="$(HOST_DIR)/usr/include"
+HOST_CDRKIT_CONF_OPT += -DCMAKE_EXE_LINKER_FLAGS="$(HOST_LDFLAGS)"
 
+$(eval $(call CMAKETARGETS,package,cdrkit))
+$(eval $(call CMAKETARGETS,package,cdrkit,host))
Signature · 1 line
1.7.1
#11 lore raw

PATCH v2 4/4 cdrkit: convert to CMAKETARGETS infrastructure

Hi,

2011/1/15 Bj?rn Forsman <[email protected]>

Quoted 71 lines
---
 package/cdrkit/cdrkit.mk |   65
++++++---------------------------------------
 1 files changed, 9 insertions(+), 56 deletions(-)
package/cdrkit/cdrkit.mk +1 -53
index a0ce9cb..0e97cc1 100644
@@ -11,61 +11,14 @@ else
 CMAKE_ENDIAN_OPT=-DBITFIELDS_HTOL=0
 endif
 
-# CMake doesn't support having the --sysroot option directly in the
-# compiler path, so move this option to the CFLAGS/CXXFLAGS variables.
-CDRKIT_TARGET_CC = $(filter-out --sysroot=%,$(TARGET_CC))
-CDRKIT_TARGET_CXX = $(filter-out --sysroot=%,$(TARGET_CXX))
-CDRKIT_TARGET_CFLAGS = $(filter --sysroot=%,$(TARGET_CC)) $(TARGET_CFLAGS)
-CDRKIT_TARGET_CXXFLAGS = $(filter --sysroot=%,$(TARGET_CXX))
 $(TARGET_CXXFLAGS)
+CDRKIT_CONF_OPT += $(CMAKE_ENDIAN_OPT)
 
-define CDRKIT_CONFIGURE_CMDS
- -mkdir $(@D)/build
- (cd $(@D)/build ; \
-       $(HOST_DIR)/usr/bin/cmake .. \
-               -Wno-dev \
-               -DCMAKE_SYSTEM_NAME:STRING="Linux" \
-               -DCMAKE_C_COMPILER:FILEPATH="$(CDRKIT_TARGET_CC)" \
-               -DCMAKE_CXX_COMPILER:FILEPATH="$(CDRKIT_TARGET_CXX)" \
-               -DCMAKE_C_FLAGS:STRING="$(CDRKIT_TARGET_CFLAGS)" \
-               -DCMAKE_CXX_FLAGS:STRING="$(CDRKIT_TARGET_CXXFLAGS)" \
-               -DCMAKE_EXE_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS)" \
-               -DCMAKE_MODULE_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS)" \
-               -DCMAKE_SHARED_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS)" \
-               -DCMAKE_FIND_ROOT_PATH:PATH="$(STAGING_DIR)" \
-               -DCMAKE_INSTALL_PREFIX:PATH="$(TARGET_DIR)/usr" \
-               $(CMAKE_ENDIAN_OPT) \
- )
-endef
-
-define CDRKIT_BUILD_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/build
-endef
-
-define CDRKIT_INSTALL_TARGET_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/build install
-endef
-
-define HOST_CDRKIT_CONFIGURE_CMDS
- -mkdir $(@D)/build
- (cd $(@D)/build ; \
-       $(HOST_DIR)/usr/bin/cmake .. \
-               -Wno-dev \
-               -DCMAKE_C_FLAGS="$(HOST_CFLAGS)" \
-               -DCMAKE_EXE_LINKER_FLAGS:STRING="$(HOST_LDFLAGS)" \
-               -DCMAKE_MODULE_LINKER_FLAGS:STRING="$(HOST_LDFLAGS)" \
-               -DCMAKE_SHARED_LINKER_FLAGS:STRING="$(HOST_LDFLAGS)" \
-               -DCMAKE_INSTALL_PREFIX:STRING="$(HOST_DIR)/usr" \
- )
-endef
-
-define HOST_CDRKIT_BUILD_CMDS
- $(HOST_MAKE_ENV) $(MAKE) -C $(@D)/build
-endef
-
-define HOST_CDRKIT_INSTALL_CMDS
- $(HOST_MAKE_ENV) $(MAKE) -C $(@D)/build  install
-endef

package/cdrkit/cdrkit.mk else · line 21

Quoted 10 lines
package/cdrkit/cdrkit.mk +6 -4
-
-$(eval $(call GENTARGETS,package,cdrkit))
-$(eval $(call GENTARGETS,package,cdrkit,host))
+## cdrkit isn't completely re-rooted by CMAKE_FIND_ROOT_PATH, so add
+## some extra flags so it finds needed libs and headers.
+CDRKIT_CONF_OPT += -DCMAKE_REQUIRED_INCLUDES="$(STAGING_DIR)/usr/include"
+CDRKIT_CONF_OPT += -DCMAKE_EXE_LINKER_FLAGS="$(TARGET_LDFLAGS)"
+HOST_CDRKIT_CONF_OPT +=
-DCMAKE_REQUIRED_INCLUDES="$(HOST_DIR)/usr/include"
+HOST_CDRKIT_CONF_OPT += -DCMAKE_EXE_LINKER_FLAGS="$(HOST_LDFLAGS)"

any specific reasons to remove defined variables' type?

Quoted 10 lines

+$(eval $(call CMAKETARGETS,package,cdrkit))
+$(eval $(call CMAKETARGETS,package,cdrkit,host))
--
1.7.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

sounds good.

Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110123/d6a1ce49/attachment.html>

#12 lore raw

PATCH v2 4/4 cdrkit: convert to CMAKETARGETS infrastructure

2011/1/23 Samuel Martin <[email protected]>:

Quoted 80 lines

Hi,

2011/1/15 Bj?rn Forsman <[email protected]>

Quoted 76 lines

---
?package/cdrkit/cdrkit.mk | ? 65
++++++---------------------------------------
?1 files changed, 9 insertions(+), 56 deletions(-)

package/cdrkit/cdrkit.mk +0 -0
index a0ce9cb..0e97cc1 100644
@@ -11,61 +11,14 @@ else

?CMAKE_ENDIAN_OPT=-DBITFIELDS_HTOL=0
?endif

package/cdrkit/cdrkit.mk +0 -5
-# CMake doesn't support having the --sysroot option directly in the
-# compiler path, so move this option to the CFLAGS/CXXFLAGS variables.
-CDRKIT_TARGET_CC = $(filter-out --sysroot=%,$(TARGET_CC))
-CDRKIT_TARGET_CXX = $(filter-out --sysroot=%,$(TARGET_CXX))
-CDRKIT_TARGET_CFLAGS = $(filter --sysroot=%,$(TARGET_CC))

$(TARGET_CFLAGS)
-CDRKIT_TARGET_CXXFLAGS = $(filter --sysroot=%,$(TARGET_CXX)) $(TARGET_CXXFLAGS)

package/cdrkit/cdrkit.mk +2 -50
+CDRKIT_CONF_OPT += $(CMAKE_ENDIAN_OPT)
 
-define CDRKIT_CONFIGURE_CMDS
- -mkdir $(@D)/build
- (cd $(@D)/build ; \
- ? ? ? $(HOST_DIR)/usr/bin/cmake .. \
- ? ? ? ? ? ? ? -Wno-dev \
- ? ? ? ? ? ? ? -DCMAKE_SYSTEM_NAME:STRING="Linux" \
- ? ? ? ? ? ? ? -DCMAKE_C_COMPILER:FILEPATH="$(CDRKIT_TARGET_CC)" \
- ? ? ? ? ? ? ? -DCMAKE_CXX_COMPILER:FILEPATH="$(CDRKIT_TARGET_CXX)" \
- ? ? ? ? ? ? ? -DCMAKE_C_FLAGS:STRING="$(CDRKIT_TARGET_CFLAGS)" \
- ? ? ? ? ? ? ? -DCMAKE_CXX_FLAGS:STRING="$(CDRKIT_TARGET_CXXFLAGS)" \
- ? ? ? ? ? ? ? -DCMAKE_EXE_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS)" \
- ? ? ? ? ? ? ? -DCMAKE_MODULE_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS)" \
- ? ? ? ? ? ? ? -DCMAKE_SHARED_LINKER_FLAGS:STRING="$(TARGET_LDFLAGS)" \
- ? ? ? ? ? ? ? -DCMAKE_FIND_ROOT_PATH:PATH="$(STAGING_DIR)" \
- ? ? ? ? ? ? ? -DCMAKE_INSTALL_PREFIX:PATH="$(TARGET_DIR)/usr" \
- ? ? ? ? ? ? ? $(CMAKE_ENDIAN_OPT) \
- )
-endef
-
-define CDRKIT_BUILD_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/build
-endef
-
-define CDRKIT_INSTALL_TARGET_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/build install
-endef
-
-define HOST_CDRKIT_CONFIGURE_CMDS
- -mkdir $(@D)/build
- (cd $(@D)/build ; \
- ? ? ? $(HOST_DIR)/usr/bin/cmake .. \
- ? ? ? ? ? ? ? -Wno-dev \
- ? ? ? ? ? ? ? -DCMAKE_C_FLAGS="$(HOST_CFLAGS)" \
- ? ? ? ? ? ? ? -DCMAKE_EXE_LINKER_FLAGS:STRING="$(HOST_LDFLAGS)" \
- ? ? ? ? ? ? ? -DCMAKE_MODULE_LINKER_FLAGS:STRING="$(HOST_LDFLAGS)" \
- ? ? ? ? ? ? ? -DCMAKE_SHARED_LINKER_FLAGS:STRING="$(HOST_LDFLAGS)" \
- ? ? ? ? ? ? ? -DCMAKE_INSTALL_PREFIX:STRING="$(HOST_DIR)/usr" \
- )
-endef
-
-define HOST_CDRKIT_BUILD_CMDS
- $(HOST_MAKE_ENV) $(MAKE) -C $(@D)/build
-endef
-
-define HOST_CDRKIT_INSTALL_CMDS
- $(HOST_MAKE_ENV) $(MAKE) -C $(@D)/build ?install
-endef
-
-$(eval $(call GENTARGETS,package,cdrkit))
-$(eval $(call GENTARGETS,package,cdrkit,host))
+## cdrkit isn't completely re-rooted by CMAKE_FIND_ROOT_PATH, so add
Quoted 8 lines

package/cdrkit/cdrkit.mk else · line 21

Quoted 6 lines
package/cdrkit/cdrkit.mk +5 -1
+## some extra flags so it finds needed libs and headers.
+CDRKIT_CONF_OPT += -DCMAKE_REQUIRED_INCLUDES="$(STAGING_DIR)/usr/include"
+CDRKIT_CONF_OPT += -DCMAKE_EXE_LINKER_FLAGS="$(TARGET_LDFLAGS)"
+HOST_CDRKIT_CONF_OPT +=
-DCMAKE_REQUIRED_INCLUDES="$(HOST_DIR)/usr/include"
+HOST_CDRKIT_CONF_OPT += -DCMAKE_EXE_LINKER_FLAGS="$(HOST_LDFLAGS)"

any specific reasons to remove defined variables' type?

AFAIK, the variable type is only used by CMake GUI so it can use the most appropriate widget (when manipulating the variables). I didn't see any use for this in Buildroot so I took it out.

The reason it was included in v1 was that cdrkit.mk had it (which I based this on) and I did an early release :-) Maybe Thomas (original cdrkit.mk author) has any comments?

Best regards,
Bj?rn Forsman

#13 lore raw

PATCH v2 4/4 cdrkit: convert to CMAKETARGETS infrastructure

Quoted 3 lines · On Sun, 23 Jan 2011 15:42:08 +0100 Bj?rn Forsman <[email protected]>…

The reason it was included in v1 was that cdrkit.mk had it (which I based this on) and I did an early release :-) Maybe Thomas (original cdrkit.mk author) has any comments?

No, no specific comment: I'm a CMake newbie, so I didn't know exactly what the variable type was used for. If it's only for some CMake-specific GUI, then yes, they are probably useless in Buildroot.

Regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#14 lore raw

PATCH v2 4/4 cdrkit: convert to CMAKETARGETS infrastructure

In reply to Bjørn Forsman

Hello Bjorn,

package/cdrkit/cdrkit.mk else · line 21

Quoted 6 lines · On Sat, 15 Jan 2011 21:53:28 +0100 Bj?rn Forsman <[email protected]>…
package/cdrkit/cdrkit.mk +6 -0
+## cdrkit isn't completely re-rooted by CMAKE_FIND_ROOT_PATH, so add
+## some extra flags so it finds needed libs and headers.
+CDRKIT_CONF_OPT += -DCMAKE_REQUIRED_INCLUDES="$(STAGING_DIR)/usr/include"
+CDRKIT_CONF_OPT += -DCMAKE_EXE_LINKER_FLAGS="$(TARGET_LDFLAGS)"
+HOST_CDRKIT_CONF_OPT += -DCMAKE_REQUIRED_INCLUDES="$(HOST_DIR)/usr/include"
+HOST_CDRKIT_CONF_OPT += -DCMAKE_EXE_LINKER_FLAGS="$(HOST_LDFLAGS)"

This does not seem to be sufficient: I don't have <sys/capability.h> installed system-wide, but it is present in $(HOST_DIR)/usr/include, but still host-cdrkit doesn't build:

/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/wodim/wodim.c:78:56: error: sys/capability.h: No such file or directory

See the following build log:

Quoted 1 line
Quoted 1 line
Quoted 1 line

host-cdrkit 1.1.10 Configuring

(cd /home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/ && rm -f CMakeCache.txt && /home/thomas/local/outputs/cmake/host/usr/bin/cmake /home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/ -DCMAKE_INSTALL_SO_NO_EXE=0 -DCMAKE_FIND_ROOT_PATH="/home/thomas/local/outputs/cmake/host" -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM="BOTH" -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY="BOTH" -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE="BOTH" -DCMAKE_INSTALL_PREFIX="/usr" -DCMAKE_REQUIRED_INCLUDES="/home/thomas/local/outputs/cmake/host/usr/include" -DCMAKE_EXE_LINKER_FLAGS="-L/home/thomas/local/outputs/cmake/host/lib -L/home/thomas/local/outputs/cmake/host/usr/lib -Wl,-rpath,/home/thomas/local/outputs/cmake/host/usr/lib" ) Re-run cmake no build system arguments
-- The C compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 2.8)

should be added at the top of the file. The version specified may be lower if you wish to support older CMake versions for this project. For more information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.

Configuring Cdrkit, version 1.1.10
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of short
-- Check size of short - done
-- Check size of int
-- Check size of int - done
-- Check size of long
-- Check size of long - done
-- Check size of long long
-- Check size of long long - done
-- Check size of float
-- Check size of float - done
-- Check size of double
-- Check size of double - done
-- Check size of char*
-- Check size of char* - done
-- Check if the system is big endian
-- Searching 16 bit integer
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Looking for include files HAVE_STDARG_H
-- Looking for include files HAVE_STDARG_H - found
-- Looking for include files HAVE_STDLIB_H
-- Looking for include files HAVE_STDLIB_H - found
-- Looking for include files HAVE_STRING_H
-- Looking for include files HAVE_STRING_H - found
-- Looking for include files HAVE_STRINGS_H
-- Looking for include files HAVE_STRINGS_H - found
-- Looking for include files HAVE_UNISTD_H
-- Looking for include files HAVE_UNISTD_H - found
-- Looking for include files HAVE_GETOPT_H
-- Looking for include files HAVE_GETOPT_H - found
-- Looking for include files HAVE_LIMITS_H
-- Looking for include files HAVE_LIMITS_H - found
-- Looking for include files HAVE_FCNTL_H
-- Looking for include files HAVE_FCNTL_H - found
-- Looking for include files HAVE_SYS_FILE_H
-- Looking for include files HAVE_SYS_FILE_H - found
-- Looking for include files HAVE_INTTYPES_H
-- Looking for include files HAVE_INTTYPES_H - found
-- Looking for include files HAVE_DIRENT_H
-- Looking for include files HAVE_DIRENT_H - found
-- Looking for include files HAVE_ALLOCA_H
-- Looking for include files HAVE_ALLOCA_H - found
-- Looking for include files HAVE_TERMIOS_H
-- Looking for include files HAVE_TERMIOS_H - found
-- Looking for include files HAVE_TERMIO_H
-- Looking for include files HAVE_TERMIO_H - found
-- Looking for include files HAVE_PWD_H
-- Looking for include files HAVE_PWD_H - found
-- Looking for include files HAVE_SYS_TIME_H
-- Looking for include files HAVE_SYS_TIME_H - found
-- Looking for include files HAVE_UTIME_H
-- Looking for include files HAVE_UTIME_H - found
-- Looking for include files HAVE_SYS_IOCTL_H
-- Looking for include files HAVE_SYS_IOCTL_H - found
-- Looking for include files HAVE_SYS_PARAM_H
-- Looking for include files HAVE_SYS_PARAM_H - found
-- Looking for include files HAVE_WAIT_H
-- Looking for include files HAVE_WAIT_H - found
-- Looking for include files HAVE_SYS_WAIT_H
-- Looking for include files HAVE_SYS_WAIT_H - found
-- Looking for include files HAVE_SYS_RESOURCE_H
-- Looking for include files HAVE_SYS_RESOURCE_H - found
-- Looking for include files HAVE_SYS_UTSNAME_H
-- Looking for include files HAVE_SYS_UTSNAME_H - found
-- Looking for include files HAVE_POLL_H
-- Looking for include files HAVE_POLL_H - found
-- Looking for include files HAVE_SYS_POLL_H
-- Looking for include files HAVE_SYS_POLL_H - found
-- Looking for include files HAVE_NETDB_H
-- Looking for include files HAVE_NETDB_H - found
-- Looking for include files HAVE_SYS_SOCKET_H
-- Looking for include files HAVE_SYS_SOCKET_H - found
-- Looking for include files HAVE_LINUX_PG_H
-- Looking for include files HAVE_LINUX_PG_H - found
-- Looking for include files HAVE_ARPA_INET_H
-- Looking for include files HAVE_ARPA_INET_H - found
-- Looking for include files HAVE_SYS_IPC_H
-- Looking for include files HAVE_SYS_IPC_H - found
-- Looking for include files HAVE_SYS_MMAN_H
-- Looking for include files HAVE_SYS_MMAN_H - found
-- Looking for include files HAVE_SYS_DKIO_H
-- Looking for include files HAVE_SYS_DKIO_H - not found. -- Looking for include files HAVE_SUN_DKIO_H
-- Looking for include files HAVE_SUN_DKIO_H - not found. -- Looking for include files HAVE_ICONV_H
-- Looking for include files HAVE_ICONV_H - found
-- Performing Test USE_LIBC_ICONV
-- Performing Test USE_LIBC_ICONV - Success
-- Performing Test HAVE_DRAND48
-- Performing Test HAVE_DRAND48 - Success
-- Performing Test HAVE_DRAND
-- Performing Test HAVE_DRAND - Failed
-- Performing Test HAVE_GETNAMEINFO
-- Performing Test HAVE_GETNAMEINFO - Success
-- Performing Test HAVE_INET_NTOA
-- Performing Test HAVE_INET_NTOA - Success
-- Performing Test HAVE_UNION_WAIT
-- Performing Test HAVE_UNION_WAIT - Success
-- Performing Test HAVE_MLOCKALL
-- Performing Test HAVE_MLOCKALL - Success
-- Performing Test HAVE_DYN_ARRAYS
-- Performing Test HAVE_DYN_ARRAYS - Success
-- Looking for include files HAVE_CAMLIB_H
-- Looking for include files HAVE_CAMLIB_H - not found.
-- Performing Test LIBC_SOCKET
-- Performing Test LIBC_SOCKET - Success
-- Performing Test LIBC_SCHED
-- Performing Test LIBC_SCHED - Success
-- Looking for include files USE_MAGIC
-- Looking for include files USE_MAGIC - not found.
-- Looking for include files USE_PTHREAD
-- Looking for include files USE_PTHREAD - found
-- Looking for getopt_long
-- Looking for getopt_long - found
-- Looking for include files HAVE_SYS_CAPABILITY_H
-- Looking for include files HAVE_SYS_CAPABILITY_H - found -- Performing Test USE_LIBC_SOCKET
-- Performing Test USE_LIBC_SOCKET - Success
-- Performing Test USE_LIBC_NLS
-- Performing Test USE_LIBC_NLS - Success
-- Configuring done
CMake Warning (dev) at genisoimage/CMakeLists.txt:52 (ADD_EXECUTABLE):
Policy CMP0003 should be set before this line. Add code such as

if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

as early as possible but after the most recent call to cmake_minimum_required or cmake_policy(VERSION). This warning appears because target "devdump" links to some libraries for which the linker must search:

pthread

and other libraries with known full path:

/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/wodim/libwodimstuff.a /home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/libusal/libusal.a /home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/librols/librols.a /home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/libunls/libunls.a

CMake is adding directories in the second list to the linker search path in case they are needed to find libraries from the first list (for backwards compatibility with CMake 2.4). Set policy CMP0003 to OLD or NEW to enable or disable this behavior explicitly. Run "cmake --help-policy CMP0003" for more information.
This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10

Quoted 1 line
Quoted 1 line
Quoted 1 line

host-cdrkit 1.1.10 Building

PATH=/home/thomas/local/outputs/cmake/host/bin:/home/thomas/local/outputs/cmake/host/usr/bin:/home/thomas/sys/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games LD_LIBRARY_PATH="/home/thomas/local/outputs/cmake/host/usr/lib:" PKG_CONFIG="" PKG_CONFIG_LIBDIR="/home/thomas/local/outputs/cmake/host/usr/lib/pkgconfig" PERLLIB="/home/thomas/local/outputs/cmake/host/usr/lib/perl" /usr/bin/make -j2 -C /home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/ make[1]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
make[2]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/librols/CMakeFiles/rols.dir/DependInfo.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/librols/CMakeFiles/rols.dir/depend.internal".
Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/librols/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/librols/CMakeFiles/rols.dir/depend.internal".
Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/wodim/CMakeFiles/wodimstuff.dir/DependInfo.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/wodim/CMakeFiles/wodimstuff.dir/depend.internal".
Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/wodim/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/wodim/CMakeFiles/wodimstuff.dir/depend.internal".
Scanning dependencies of target wodimstuff
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 0%] Scanning dependencies of target rols
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
Building C object wodim/CMakeFiles/wodimstuff.dir/cd_misc.o
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'

[  1%] Building C object librols/CMakeFiles/rols.dir/astoi.o
[  1%] Building C object librols/CMakeFiles/rols.dir/astoll.o
[  1%] Building C object wodim/CMakeFiles/wodimstuff.dir/defaults.o
[  1%] Building C object librols/CMakeFiles/rols.dir/astoull.o
[  2%] Building C object librols/CMakeFiles/rols.dir/breakline.o
[  3%] Building C object wodim/CMakeFiles/wodimstuff.dir/getnum.o
[  3%] Building C object librols/CMakeFiles/rols.dir/cmpbytes.o
[  3%] Building C object wodim/CMakeFiles/wodimstuff.dir/misc.o
[  4%] Building C object librols/CMakeFiles/rols.dir/comerr.o
[  5%] Building C object wodim/CMakeFiles/wodimstuff.dir/modes.o
[  5%] Building C object librols/CMakeFiles/rols.dir/error.o
[  6%] Building C object librols/CMakeFiles/rols.dir/fexec.o
[  6%] Building C object wodim/CMakeFiles/wodimstuff.dir/movesect.o
[  6%] [  7%] Building C object librols/CMakeFiles/rols.dir/fillbytes.o
Building C object wodim/CMakeFiles/wodimstuff.dir/scsi_cdr.o
[  8%] Building C object librols/CMakeFiles/rols.dir/getargs.o
[  8%] Building C object librols/CMakeFiles/rols.dir/getav0.o
[  8%] Building C object librols/CMakeFiles/rols.dir/getdomainname.o
[  9%] Building C object librols/CMakeFiles/rols.dir/geterrno.o
[  9%] Building C object librols/CMakeFiles/rols.dir/gethostid.o

[ 10%] Building C object librols/CMakeFiles/rols.dir/gethostname.o
[ 10%] Building C object librols/CMakeFiles/rols.dir/getpagesize.o
[ 11%] Building C object librols/CMakeFiles/rols.dir/handlecond.o
[ 11%] Building C object librols/CMakeFiles/rols.dir/movebytes.o
[ 12%] Building C object librols/CMakeFiles/rols.dir/raisecond.o
[ 12%] Building C object wodim/CMakeFiles/wodimstuff.dir/scsi_mmc.o
[ 12%] Building C object librols/CMakeFiles/rols.dir/rename.o
[ 12%] Building C object librols/CMakeFiles/rols.dir/saveargs.o
[ 13%] Building C object librols/CMakeFiles/rols.dir/seterrno.o
[ 13%] Building C object librols/CMakeFiles/rols.dir/spawn.o
[ 14%] Building C object wodim/CMakeFiles/wodimstuff.dir/scsi_scan.o
[ 15%] Building C object librols/CMakeFiles/rols.dir/strcatl.o
[ 15%] Building C object librols/CMakeFiles/rols.dir/strdup.o
[ 16%] Building C object librols/CMakeFiles/rols.dir/streql.o
Linking C static library libwodimstuff.a
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 16%] [ 16%] Built target wodimstuff
[ 17%] Building C object librols/CMakeFiles/rols.dir/swabbytes.o
Building C object librols/CMakeFiles/rols.dir/usleep.o
[ 17%] make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
Building C object librols/CMakeFiles/rols.dir/stdio/cvmod.o
Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/libusal/CMakeFiles/usal.dir/DependInfo.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/libusal/CMakeFiles/usal.dir/depend.internal". Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/libusal/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/libusal/CMakeFiles/usal.dir/depend.internal". Scanning dependencies of target usal
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 17%] Building C object libusal/CMakeFiles/usal.dir/usalsettarget.o
[ 17%] Building C object librols/CMakeFiles/rols.dir/stdio/dat.o
[ 18%] [ 19%] Building C object librols/CMakeFiles/rols.dir/stdio/fcons.o
Building C object libusal/CMakeFiles/usal.dir/usaltimes.o
[ 19%] Building C object libusal/CMakeFiles/usal.dir/scsierrs.o
[ 19%] Building C object librols/CMakeFiles/rols.dir/stdio/fdown.o
[ 20%] Building C object librols/CMakeFiles/rols.dir/stdio/fdup.o
[ 21%] Building C object libusal/CMakeFiles/usal.dir/scsihack.o
[ 21%] Building C object librols/CMakeFiles/rols.dir/stdio/ffileread.o
[ 22%] Building C object librols/CMakeFiles/rols.dir/stdio/ffilewrite.o
[ 22%] Building C object librols/CMakeFiles/rols.dir/stdio/fgetline.o
[ 22%] Building C object librols/CMakeFiles/rols.dir/stdio/file_raise.o
[ 23%] Building C object librols/CMakeFiles/rols.dir/stdio/fileclose.o
[ 23%] Building C object librols/CMakeFiles/rols.dir/stdio/fileluopen.o
[ 23%] Building C object libusal/CMakeFiles/usal.dir/scsihelp.o
[ 24%] Building C object librols/CMakeFiles/rols.dir/stdio/filemopen.o
[ 25%] Building C object libusal/CMakeFiles/usal.dir/scsiopen.o
[ 25%] Building C object librols/CMakeFiles/rols.dir/stdio/fileopen.o
[ 26%] Building C object librols/CMakeFiles/rols.dir/stdio/filepos.o
[ 26%] Building C object libusal/CMakeFiles/usal.dir/scsitransp.o
[ 26%] Building C object librols/CMakeFiles/rols.dir/stdio/fileread.o
[ 27%] Building C object librols/CMakeFiles/rols.dir/stdio/filereopen.o
[ 27%] Building C object librols/CMakeFiles/rols.dir/stdio/fileseek.o
[ 27%] Building C object libusal/CMakeFiles/usal.dir/scsi-remote.o
[ 27%] Building C object librols/CMakeFiles/rols.dir/stdio/filesize.o
[ 28%] Building C object librols/CMakeFiles/rols.dir/stdio/filestat.o
[ 28%] Building C object librols/CMakeFiles/rols.dir/stdio/filewrite.o
Linking C static library libusal.a
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 28%] Built target usal
[ 29%] Building C object librols/CMakeFiles/rols.dir/stdio/flag.o
[ 29%] Building C object librols/CMakeFiles/rols.dir/stdio/flush.o
[ 30%] Building C object librols/CMakeFiles/rols.dir/stdio/fpipe.o
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/libunls/CMakeFiles/unls.dir/DependInfo.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/libunls/CMakeFiles/unls.dir/depend.internal". Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/libunls/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/libunls/CMakeFiles/unls.dir/depend.internal". Scanning dependencies of target unls
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 30%] Building C object libunls/CMakeFiles/unls.dir/nls_base.o
[ 30%] Building C object librols/CMakeFiles/rols.dir/stdio/niread.o
[ 31%] Building C object libunls/CMakeFiles/unls.dir/nls_config.o
[ 32%] Building C object librols/CMakeFiles/rols.dir/stdio/niwrite.o
[ 32%] Building C object libunls/CMakeFiles/unls.dir/nls_cp10000.o
[ 32%] Building C object librols/CMakeFiles/rols.dir/stdio/nixread.o
[ 33%] Building C object libunls/CMakeFiles/unls.dir/nls_cp10006.o
[ 33%] Building C object librols/CMakeFiles/rols.dir/stdio/nixwrite.o
[ 33%] Building C object libunls/CMakeFiles/unls.dir/nls_cp10007.o
[ 34%] Building C object librols/CMakeFiles/rols.dir/stdio/openfd.o
[ 34%] Building C object libunls/CMakeFiles/unls.dir/nls_cp10029.o
[ 34%] Building C object librols/CMakeFiles/rols.dir/stdio/peekc.o
[ 35%] Building C object libunls/CMakeFiles/unls.dir/nls_cp10079.o
[ 36%] [ 36%] Building C object librols/CMakeFiles/rols.dir/default.o
Building C object libunls/CMakeFiles/unls.dir/nls_cp10081.o
[ 37%] Building C object libunls/CMakeFiles/unls.dir/nls_cp1250.o
Linking C static library librols.a
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 37%] [ 37%] Built target rols
Building C object libunls/CMakeFiles/unls.dir/nls_cp1251.o
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/libhfs_iso/CMakeFiles/hfs_iso.dir/DependInfo.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/libhfs_iso/CMakeFiles/hfs_iso.dir/depend.internal". Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/libhfs_iso/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/libhfs_iso/CMakeFiles/hfs_iso.dir/depend.internal". Scanning dependencies of target hfs_iso
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 37%] Building C object libhfs_iso/CMakeFiles/hfs_iso.dir/block.o
[ 38%] Building C object libunls/CMakeFiles/unls.dir/nls_cp437.o
[ 39%] Building C object libhfs_iso/CMakeFiles/hfs_iso.dir/btree.o
[ 39%] Building C object libunls/CMakeFiles/unls.dir/nls_cp737.o
[ 40%] Building C object libunls/CMakeFiles/unls.dir/nls_cp775.o
[ 40%] Building C object libunls/CMakeFiles/unls.dir/nls_cp850.o
[ 40%] Building C object libhfs_iso/CMakeFiles/hfs_iso.dir/data.o
[ 40%] Building C object libunls/CMakeFiles/unls.dir/nls_cp852.o
[ 40%] Building C object libhfs_iso/CMakeFiles/hfs_iso.dir/file.o
[ 41%] Building C object libunls/CMakeFiles/unls.dir/nls_cp855.o
[ 41%] Building C object libunls/CMakeFiles/unls.dir/nls_cp857.o
[ 42%] Building C object libhfs_iso/CMakeFiles/hfs_iso.dir/gdata.o
[ 43%] Building C object libunls/CMakeFiles/unls.dir/nls_cp860.o
[ 43%] Building C object libhfs_iso/CMakeFiles/hfs_iso.dir/hfs.o
[ 43%] Building C object libunls/CMakeFiles/unls.dir/nls_cp861.o
[ 44%] Building C object libunls/CMakeFiles/unls.dir/nls_cp862.o
[ 44%] Building C object libunls/CMakeFiles/unls.dir/nls_cp863.o
[ 45%] Building C object libunls/CMakeFiles/unls.dir/nls_cp864.o
[ 46%] Building C object libhfs_iso/CMakeFiles/hfs_iso.dir/low.o
[ 46%] Building C object libunls/CMakeFiles/unls.dir/nls_cp865.o
[ 46%] Building C object libunls/CMakeFiles/unls.dir/nls_cp866.o
[ 46%] Building C object libhfs_iso/CMakeFiles/hfs_iso.dir/node.o
[ 47%] Building C object libunls/CMakeFiles/unls.dir/nls_cp869.o
[ 47%] Building C object libunls/CMakeFiles/unls.dir/nls_cp874.o
[ 48%] Building C object libhfs_iso/CMakeFiles/hfs_iso.dir/record.o
[ 49%] Building C object libunls/CMakeFiles/unls.dir/nls_file.o
[ 49%] Building C object libunls/CMakeFiles/unls.dir/nls_iso8859-1.o
[ 49%] Building C object libhfs_iso/CMakeFiles/hfs_iso.dir/volume.o
[ 50%] Building C object libunls/CMakeFiles/unls.dir/nls_iso8859-14.o
[ 50%] Building C object libunls/CMakeFiles/unls.dir/nls_iso8859-15.o
[ 50%] Building C object libunls/CMakeFiles/unls.dir/nls_iso8859-2.o
Linking C static library libhfs_iso.a
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 50%] Built target hfs_iso
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 51%] Building C object libunls/CMakeFiles/unls.dir/nls_iso8859-3.o
Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/libedc/CMakeFiles/edc.dir/DependInfo.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/libedc/CMakeFiles/edc.dir/depend.internal". Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/libedc/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/libedc/CMakeFiles/edc.dir/depend.internal". Scanning dependencies of target edc
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 52%] Building C object libedc/CMakeFiles/edc.dir/edc_ecc.o
[ 52%] Building C object libunls/CMakeFiles/unls.dir/nls_iso8859-4.o
[ 53%] Building C object libunls/CMakeFiles/unls.dir/nls_iso8859-5.o
[ 53%] Building C object libunls/CMakeFiles/unls.dir/nls_iso8859-6.o
[ 54%] Building C object libunls/CMakeFiles/unls.dir/nls_iso8859-7.o
[ 54%] Building C object libedc/CMakeFiles/edc.dir/edcspeed.o
[ 54%] Building C object libunls/CMakeFiles/unls.dir/nls_iso8859-8.o
Linking C static library libedc.a
[ 55%] Building C object libunls/CMakeFiles/unls.dir/nls_iso8859-9.o
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 55%] Built target edc
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/libparanoia/CMakeFiles/paranoia.dir/DependInfo.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/libparanoia/CMakeFiles/paranoia.dir/depend.internal". Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/libparanoia/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/libparanoia/CMakeFiles/paranoia.dir/depend.internal". Scanning dependencies of target paranoia
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 55%] Building C object libparanoia/CMakeFiles/paranoia.dir/gap.o
[ 55%] Building C object libunls/CMakeFiles/unls.dir/nls_koi8-r.o
[ 55%] Building C object libunls/CMakeFiles/unls.dir/nls_koi8-u.o
[ 55%] Building C object libparanoia/CMakeFiles/paranoia.dir/isort.o
[ 56%] Building C object libunls/CMakeFiles/unls.dir/nls_iconv.o
Linking C static library libunls.a
[ 57%] Building C object libparanoia/CMakeFiles/paranoia.dir/overlap.o
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 57%] Built target unls
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/readom/CMakeFiles/readom.dir/DependInfo.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/readom/CMakeFiles/readom.dir/depend.internal". Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/readom/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/readom/CMakeFiles/readom.dir/depend.internal". Scanning dependencies of target readom
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 58%] Building C object readom/CMakeFiles/readom.dir/readom.o
[ 58%] Building C object libparanoia/CMakeFiles/paranoia.dir/p_block.o
[ 59%] Building C object libparanoia/CMakeFiles/paranoia.dir/paranoia.o
[ 59%] Building C object readom/CMakeFiles/readom.dir/io.o
[ 59%] Building C object libparanoia/CMakeFiles/paranoia.dir/pmalloc.o
Linking C static library libparanoia.a
Linking C executable readom
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 59%] Built target paranoia
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/netscsid/CMakeFiles/netscsid.dir/DependInfo.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/netscsid/CMakeFiles/netscsid.dir/depend.internal". Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/netscsid/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/netscsid/CMakeFiles/netscsid.dir/depend.internal". Scanning dependencies of target netscsid
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 60%] Building C object netscsid/CMakeFiles/netscsid.dir/netscsid.o
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 60%] Built target readom
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/CMakeFiles/devdump.dir/DependInfo.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/CMakeFiles/devdump.dir/depend.internal". Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/CMakeFiles/devdump.dir/depend.internal". Scanning dependencies of target devdump
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 60%] Building C object genisoimage/CMakeFiles/devdump.dir/diag/dump.o
Linking C executable netscsid
[ 60%] Building C object genisoimage/CMakeFiles/devdump.dir/scsi.o
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 60%] Built target netscsid
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/CMakeFiles/genisoimage.dir/DependInfo.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/CMakeFiles/genisoimage.dir/depend.internal". Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/CMakeFiles/genisoimage.dir/depend.internal". Scanning dependencies of target genisoimage
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 61%] Building C object genisoimage/CMakeFiles/genisoimage.dir/genisoimage.o
Linking C executable devdump
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 61%] Built target devdump
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/CMakeFiles/isodebug.dir/DependInfo.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/CMakeFiles/isodebug.dir/depend.internal". Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/CMakeFiles/isodebug.dir/depend.internal". Scanning dependencies of target isodebug
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 61%] Building C object genisoimage/CMakeFiles/isodebug.dir/diag/isodebug.o
/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/genisoimage.c: In function ?main?:
/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/genisoimage.c:3409: warning: format not a string literal and no format arguments /home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/genisoimage.c:3422: warning: format not a string literal and no format arguments
[ 61%] Building C object genisoimage/CMakeFiles/isodebug.dir/scsi.o
Linking C executable isodebug
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 61%] Built target isodebug
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/CMakeFiles/isodump.dir/DependInfo.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/CMakeFiles/isodump.dir/depend.internal". Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/CMakeFiles/isodump.dir/depend.internal". Scanning dependencies of target isodump
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 62%] Building C object genisoimage/CMakeFiles/isodump.dir/diag/isodump.o
[ 62%] Building C object genisoimage/CMakeFiles/genisoimage.dir/apple.o
[ 62%] Building C object genisoimage/CMakeFiles/isodump.dir/scsi.o
Linking C executable isodump
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 62%] Built target isodump
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/CMakeFiles/isoinfo.dir/DependInfo.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/CMakeFiles/isoinfo.dir/depend.internal". Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/CMakeFiles/isoinfo.dir/depend.internal". Scanning dependencies of target isoinfo
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 63%] Building C object genisoimage/CMakeFiles/isoinfo.dir/diag/isoinfo.o
[ 64%] Building C object genisoimage/CMakeFiles/genisoimage.dir/boot.o
[ 64%] Building C object genisoimage/CMakeFiles/isoinfo.dir/scsi.o
[ 64%] Building C object genisoimage/CMakeFiles/genisoimage.dir/desktop.o
Linking C executable isoinfo
[ 64%] Building C object genisoimage/CMakeFiles/genisoimage.dir/dvd_file.o
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 64%] Built target isoinfo
[ 65%] Building C object genisoimage/CMakeFiles/genisoimage.dir/dvd_reader.o
[ 65%] Building C object genisoimage/CMakeFiles/genisoimage.dir/eltorito.o
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/CMakeFiles/isovfy.dir/DependInfo.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/CMakeFiles/isovfy.dir/depend.internal". Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/CMakeFiles/isovfy.dir/depend.internal". Scanning dependencies of target isovfy
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 66%] Building C object genisoimage/CMakeFiles/isovfy.dir/diag/isovfy.o
[ 67%] Building C object genisoimage/CMakeFiles/genisoimage.dir/exclude.o
[ 67%] Building C object genisoimage/CMakeFiles/genisoimage.dir/files.o
[ 67%] Building C object genisoimage/CMakeFiles/isovfy.dir/scsi.o
[ 68%] Building C object genisoimage/CMakeFiles/genisoimage.dir/fnmatch.o
[ 68%] Building C object genisoimage/CMakeFiles/genisoimage.dir/hash.o
Linking C executable isovfy
[ 69%] Building C object genisoimage/CMakeFiles/genisoimage.dir/ifo_read.o
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 69%] Built target isovfy
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/wodim/CMakeFiles/wodim.dir/DependInfo.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/wodim/CMakeFiles/wodim.dir/depend.internal". Dependee "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/wodim/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/wodim/CMakeFiles/wodim.dir/depend.internal". [ 69%] Building C object genisoimage/CMakeFiles/genisoimage.dir/joliet.o
Scanning dependencies of target wodim
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
make[3]: Entering directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 70%] Building C object wodim/CMakeFiles/wodim.dir/wodim.o
/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/wodim/wodim.c:78:56: error: sys/capability.h: No such file or directory
/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/wodim/wodim.c:259: error: expected ?)? before ?cap_array?
/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/wodim/wodim.c: In function ?main?:
/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/wodim/wodim.c:477: error: ?CAP_SYS_RAWIO? undeclared (first use in this function)
/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/wodim/wodim.c:477: error: (Each undeclared identifier is reported only once
/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/wodim/wodim.c:477: error: for each function it appears in.)
[ 70%] Building C object genisoimage/CMakeFiles/genisoimage.dir/mac_label.o
/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/wodim/wodim.c: At top level:
/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/wodim/wodim.c:4691: error: expected ?)? before ?cap_array?
make[3]: *** [wodim/CMakeFiles/wodim.dir/wodim.o] Error 1
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
make[2]: *** [wodim/CMakeFiles/wodim.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
[ 71%] Building C object genisoimage/CMakeFiles/genisoimage.dir/match.o
[ 71%] Building C object genisoimage/CMakeFiles/genisoimage.dir/multi.o
[ 72%] Building C object genisoimage/CMakeFiles/genisoimage.dir/name.o
[ 72%] Building C object genisoimage/CMakeFiles/genisoimage.dir/rock.o
[ 73%] Building C object genisoimage/CMakeFiles/genisoimage.dir/scsi.o
[ 73%] Building C object genisoimage/CMakeFiles/genisoimage.dir/stream.o
[ 74%] Building C object genisoimage/CMakeFiles/genisoimage.dir/tree.o
/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/tree.c: In function ?sort_n_finish?:
/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/tree.c:650: warning: format not a string literal and no format arguments
[ 74%] Building C object genisoimage/CMakeFiles/genisoimage.dir/udf.o
[ 74%] Building C object genisoimage/CMakeFiles/genisoimage.dir/vms.o
[ 75%] Building C object genisoimage/CMakeFiles/genisoimage.dir/volume.o
[ 75%] Building C object genisoimage/CMakeFiles/genisoimage.dir/write.o
[ 76%] Building C object genisoimage/CMakeFiles/genisoimage.dir/boot-alpha.o
[ 76%] Building C object genisoimage/CMakeFiles/genisoimage.dir/boot-hppa.o
[ 77%] Building C object genisoimage/CMakeFiles/genisoimage.dir/boot-mips.o
[ 77%] Building C object genisoimage/CMakeFiles/genisoimage.dir/md5.o
[ 78%] Building C object genisoimage/CMakeFiles/genisoimage.dir/jte.o
[ 78%] Building C object genisoimage/CMakeFiles/genisoimage.dir/rsync.o
/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/jte.c: In function ?write_compressed_chunk?:
/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/genisoimage/jte.c:676: warning: format ?%d? expects type ?int?, but argument 2 has type ?size_t?
[ 78%] Building C object genisoimage/CMakeFiles/genisoimage.dir/boot-mipsel.o
[ 79%] Building C object genisoimage/CMakeFiles/genisoimage.dir/endian.o
[ 79%] Building C object genisoimage/CMakeFiles/genisoimage.dir/sha1.o
[ 80%] Building C object genisoimage/CMakeFiles/genisoimage.dir/sha256.o
[ 80%] Building C object genisoimage/CMakeFiles/genisoimage.dir/sha512.o
[ 81%] Building C object genisoimage/CMakeFiles/genisoimage.dir/checksum.o
Linking C executable genisoimage
make[3]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
[ 81%] Built target genisoimage
make[2]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10'
make: ***
[/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/.stamp_built] Error 2

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#15 lore raw

PATCH v2 4/4 cdrkit: convert to CMAKETARGETS infrastructure

Quoted 16 lines · Thomas Petazzoni

Hello Bjorn,

package/cdrkit/cdrkit.mk else · line 21

Quoted 6 lines · On Sat, 15 Jan 2011 21:53:28 +0100 Bj?rn Forsman <[email protected]>…
package/cdrkit/cdrkit.mk +6 -0
+## cdrkit isn't completely re-rooted by CMAKE_FIND_ROOT_PATH, so add
+## some extra flags so it finds needed libs and headers.
+CDRKIT_CONF_OPT += -DCMAKE_REQUIRED_INCLUDES="$(STAGING_DIR)/usr/include"
+CDRKIT_CONF_OPT += -DCMAKE_EXE_LINKER_FLAGS="$(TARGET_LDFLAGS)"
+HOST_CDRKIT_CONF_OPT += -DCMAKE_REQUIRED_INCLUDES="$(HOST_DIR)/usr/include"
+HOST_CDRKIT_CONF_OPT += -DCMAKE_EXE_LINKER_FLAGS="$(HOST_LDFLAGS)"

This does not seem to be sufficient: I don't have <sys/capability.h> installed system-wide, but it is present in $(HOST_DIR)/usr/include, but still host-cdrkit doesn't build:

Quoted 1 line

/home/thomas/local/outputs/cmake/build/host-cdrkit-1.1.10/wodim/wodim.c:78:56: error: sys/capability.h: No such file or directory

Ah, I see. CMAKE_REQUIRED_INCLUDES is only used by CHECK_INCLUDE_FILES (the macro that initially finds sys/capability.h):

-- Looking for include files HAVE_SYS_CAPABILITY_H -- Looking for include files HAVE_SYS_CAPABILITY_H - found

But CMAKE_REQUIRED_INCLUDES is clearly not used during the build. I guess I misinterpreted the docs. (Hm... I wonder what purpose CMAKE_REQUIRED_INCLUDES has then...) I'll replace it with CMAKE_C_FLAGS. And I'll remove sys/capability.h from my system so I can spot these things :-)

Thanks for the report.

Best regards,
Bj?rn Forsman

#16 lore raw

v2 cover Introducing CMAKETARGETS infrastructure

In reply to Bjørn Forsman

2011/1/15 Bj?rn Forsman <[email protected]>:

Quoted 2 lines

This patch series adds a new infrastructure for CMake packages called CMAKETARGETS. It is based on the AUTOTARGETS infrastructure.

No comments? Is that good or bad? :-)

I plan on disabling ccache for the CMake infrastructure, like Peter did with cdrkit. Anything else that should be in v3 so it can be merged?

Best regards,
Bj?rn Forsman

#17 lore raw

v2 cover Introducing CMAKETARGETS infrastructure

Quoted 5 lines · On Sat, 22 Jan 2011 12:54:01 +0100 Bj?rn Forsman <[email protected]>…

No comments? Is that good or bad? :-)

I plan on disabling ccache for the CMake infrastructure, like Peter did with cdrkit. Anything else that should be in v3 so it can be merged?

I'm just back from holidays and would like to give this a test with the library and application that use CMake I am currently working on. I'll try to do that tomorrow.

Regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com