Skip to contentSkip to conversation

Misc set of fixes

PATCH New Thomas Petazzoni 3 participants 11 messages Feb 23, 2014 – Feb 24, 2014

lore
Share & tools
lore
#0 lore raw

cover Misc set of fixes

Hello,

The first three patches are fixes for build failures. The last four patches are fixes for missing dependency propagation of BR2_USE_MMU.

Thomas

Thomas Petazzoni (7):
cairo: fix build on Blackfin in test/cairo-test-runner.c
cairo: improve the Blackfin build fix
util-linux: libblkid needs fork(), disable on !MMU
opencv: add missing dependency on !MMU for gtk support
packages: missing propagation of !mmu from pango
pcmanfm: add missing BR2_USE_MMU dependency from gamin
sconeserver: missing dependency on BR2_USE_MMU

 package/cairo/cairo-001-blackfin-build-fix.patch | 19 ++++++++++++++++
 package/cairo/cairo-003-fix-nofork-build.patch   | 29 ++++++++++++++++++++++++
 package/cryptsetup/Config.in                     |  2 +-
 package/e2fsprogs/Config.in                      |  1 +
 package/gstreamer/gst-plugins-base/Config.in     |  1 +
 package/gstreamer1/gst1-plugins-base/Config.in   |  1 +
 package/libgail/Config.in                        |  1 +
 package/opencv/Config.in                         |  1 +
 package/pcmanfm/Config.in                        |  1 +
 package/sconeserver/Config.in                    |  1 +
 package/udev/Config.in                           |  1 +
 package/util-linux/Config.in                     |  2 ++
 package/webkit/Config.in                         |  1 +
 system/Config.in                                 |  1 +
 14 files changed, 61 insertions(+), 1 deletion(-)
 create mode 100644 package/cairo/cairo-003-fix-nofork-build.patch
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH 1/7 cairo: fix build on Blackfin in test/cairo-test-runner.c

Add a patch for Cairo that ensures <unistd.h> is properly included to get the prototype of readlink and getppid even on non-MMU platforms.

Fixes:

http://autobuild.buildroot.net/results/93a97f90345d193b52035b2dc7559a306e11098e/

---
 package/cairo/cairo-003-fix-nofork-build.patch | 29 ++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 package/cairo/cairo-003-fix-nofork-build.patch
package/cairo/cairo-003-fix-nofork-build.patch new file +29 -0
new file mode 100644
index 0000000..702e991
@@ -0,0 +1,29 @@
+test: fix build when SHOULD_FORK is false
+
+The code in test/cairo-test-runner.c properly takes into account
+platforms that do have fork() support, and uses the SHOULD_FORK define
+to know whether fork is available or not.
+
+However, this SHOULD_FORK macro is used to guard the inclusion of
+<unistd.h>, which is needed to get the prototype of other functions
+(namely readlink and getppid), that are used in portions of this file
+not guarded by SHOULD_FORK.
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+
+Index: b/test/cairo-test-runner.c
+===================================================================
+--- a/test/cairo-test-runner.c
++++ b/test/cairo-test-runner.c
+@@ -36,10 +36,10 @@
+ #include <pixman.h> /* for version information */
+ 
+ #define SHOULD_FORK HAVE_FORK && HAVE_WAITPID
+-#if SHOULD_FORK
+ #if HAVE_UNISTD_H
+ #include <unistd.h>
+ #endif
++#if SHOULD_FORK
+ #if HAVE_SIGNAL_H
+ #include <signal.h>
+ #endif
Signature · 1 line
1.8.3.2
#2 lore raw

PATCH 2/7 cairo: improve the Blackfin build fix

In reply to Thomas Petazzoni

Patch cairo-001-blackfin-build-fix.patch was added in commit d372d0b6777f52cd493dc0a892593d4390536ec5 ('cairo: add patch to fix Blackfin build failure') to take into account the fact that Blackfin has a non-empty USER_LABEL_PREFIX: C symbol 'foo' corresponds to assembly symbol '_foo', contrary to most other architectures where they are the same.

However, the patch was only fixing the relevant macros in src/cairo-compiler-private.h and did not take into account the duplicated version of these macros in util/cairo-script/cairo-script-private.h. This commit fixes that.

This commit is fixing a build failure on Blackfin, for which there was no recorded autobuilder result because this problem was hidden by the problem fixed by the previous commit ('cairo: fix build on Blackfin in test/cairo-test-runner.c').

---
 package/cairo/cairo-001-blackfin-build-fix.patch | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
package/cairo/cairo-001-blackfin-build-fix.patch +19 -0
index 94dff6b..0e8dd3a 100644
@@ -34,3 +34,22 @@ Index: b/src/cairo-compiler-private.h
  #else
  # define slim_hidden_proto(name)		int _cairo_dummy_prototype(void)
  # define slim_hidden_proto_no_warn(name)	int _cairo_dummy_prototype(void)
+Index: b/util/cairo-script/cairo-script-private.h
+===================================================================
+--- a/util/cairo-script/cairo-script-private.h
++++ b/util/cairo-script/cairo-script-private.h
+@@ -109,12 +109,13 @@
+ 	__asm__ (slim_hidden_asmname (internal))
+ # define slim_hidden_def1(name, internal)				\
+   extern __typeof (name) EXT_##name __asm__(slim_hidden_asmname(name))	\
+-	__attribute__((__alias__(slim_hidden_asmname(internal))))
++	__attribute__((__alias__(slim_hidden_realname(internal))))
+ # define slim_hidden_ulp		slim_hidden_ulp1(__USER_LABEL_PREFIX__)
+ # define slim_hidden_ulp1(x)		slim_hidden_ulp2(x)
+ # define slim_hidden_ulp2(x)		#x
+ # define slim_hidden_asmname(name)	slim_hidden_asmname1(name)
+ # define slim_hidden_asmname1(name)	slim_hidden_ulp #name
++# define slim_hidden_realname(name)     #name
+ #else
+ # define slim_hidden_proto(name)		int _csi_dummy_prototype(void)
+ # define slim_hidden_proto_no_warn(name)	int _csi_dummy_prototype(void)
Signature · 1 line
1.8.3.2
#3 lore raw

PATCH 3/7 util-linux: libblkid needs fork(), disable on !MMU

In reply to Thomas Petazzoni

The libblkid library in util-linux uses fork. While it seems potentially possible to disable the parts of the library that use fork (the only parts using fork are parts related to LVM and Device Mapper, which are said to be legacy as they are replaced by sysfs based scanning, instead of having to fork to run a separate process).

However, since libblkid is used by:

- e2fsprogs, which uses lots of fork all over the place
- udev, which most likely will also need fork

There is not much point in making libblkid fork-less. As a consequence, this commit makes util-linux/libblkid unavailable on non-MMU architectures, and propagates the relevant dependency to the reverse dependencies of libblkid.

This fixes the e2fsprogs build failure seen on Blackfin. The failure was due to a configure test of e2fsprogs which was trying to link a small test program against libblkid, which failed because there was an undefined reference to fork() in the libblkid code.

Fixes:

http://autobuild.buildroot.net/results/ee2c1568d16ac040011dd4d6d8b543ff9e9e2622/

---
 package/cryptsetup/Config.in | 2 +-
 package/e2fsprogs/Config.in  | 1 +
 package/udev/Config.in       | 1 +
 package/util-linux/Config.in | 2 ++
 system/Config.in             | 1 +
 5 files changed, 6 insertions(+), 1 deletion(-)
package/cryptsetup/Config.in +1 -1
index 9fbe74c..8405963 100644
@@ -6,7 +6,7 @@ config BR2_PACKAGE_CRYPTSETUP
 	select BR2_PACKAGE_E2FSPROGS
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
 	depends on BR2_LARGEFILE # lvm2, util-linux
-	depends on BR2_USE_MMU # lvm2
+	depends on BR2_USE_MMU # lvm2, e2fsprogs
 	depends on !BR2_PREFER_STATIC_LIB # lvm2
 	depends on BR2_USE_WCHAR # util-linux
 	help
package/e2fsprogs/Config.in +1 -0
index 7775e94..ae4da95 100644
@@ -3,6 +3,7 @@ config BR2_PACKAGE_E2FSPROGS
 	bool "e2fsprogs"
 	depends on BR2_LARGEFILE
 	depends on BR2_USE_WCHAR # util-linux
+	depends on BR2_USE_MMU # util-linux/libblkid
 	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
 	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
package/udev/Config.in +1 -0
index 7aa79c4..c59abbe 100644
@@ -5,6 +5,7 @@ config BR2_PACKAGE_UDEV
 	depends on BR2_LARGEFILE # util-linux
 	depends on BR2_USE_WCHAR # util-linux
 	depends on !BR2_PREFER_STATIC_LIB # kmod
+	depends on BR2_USE_MMU # util-linux/libblkid
 	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
 	select BR2_PACKAGE_KMOD
package/util-linux/Config.in +2 -0
index 8c8fd7a..b1db99a 100644
@@ -14,6 +14,7 @@ if BR2_PACKAGE_UTIL_LINUX
 
 config BR2_PACKAGE_UTIL_LINUX_LIBBLKID
 	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
+	depends on BR2_USE_MMU # fork
 	bool "libblkid"
 	help
 	  Install libblkid.
@@ -22,6 +23,7 @@ config BR2_PACKAGE_UTIL_LINUX_LIBMOUNT
 	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
 	# libc lacks UTIME_NOW & UTIME_COMMIT
 	depends on !(BR2_microblazeel || BR2_microblazebe)
+	depends on BR2_USE_MMU # util-linux/libblkid
 	bool "libmount"
 	help
 	  Install libmount.
system/Config.in +1 -0
index 181a0ac..f9623b9 100644
@@ -127,6 +127,7 @@ config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
 	depends on BR2_LARGEFILE # udev
 	depends on BR2_USE_WCHAR # udev
 	depends on !BR2_PREFER_STATIC_LIB # udev -> kmod
+	depends on BR2_USE_MMU # udev -> util-linux/libblkid
 	select BR2_PACKAGE_UDEV
 
 comment "udev needs a toolchain w/ largefile, wchar"
Signature · 1 line
1.8.3.2
#4 lore raw

PATCH 4/7 opencv: add missing dependency on !MMU for gtk support

In reply to Thomas Petazzoni

libgtk2 depends on !MMU, so when OpenCV selects Gtk, it should propagate this dependency.

---
 package/opencv/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/opencv/Config.in +1 -0
index 9e952ca..94688cb 100644
@@ -151,6 +151,7 @@ config BR2_PACKAGE_OPENCV_WITH_GTK
 	depends on BR2_USE_WCHAR # libgtk2 -> libglib2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk2 -> libglib2
 	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_USE_MMU # libgtk2 -> glib2
 	select BR2_PACKAGE_LIBGTK2
 
 config BR2_PACKAGE_OPENCV_WITH_JPEG
Signature · 1 line
1.8.3.2
#5 lore raw

PATCH 5/7 packages: missing propagation of !mmu from pango

In reply to Thomas Petazzoni

A number of packages that select Pango (which depends on BR2_USE_MMU) forget to also depends on BR2_USE_MMU. This commit fixes that.

---
 package/gstreamer/gst-plugins-base/Config.in   | 1 +
 package/gstreamer1/gst1-plugins-base/Config.in | 1 +
 package/libgail/Config.in                      | 1 +
 package/webkit/Config.in                       | 1 +
 4 files changed, 4 insertions(+)
package/gstreamer/gst-plugins-base/Config.in +1 -0
index 95f84d3..ccc88f7 100644
@@ -87,6 +87,7 @@ config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_PANGO
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_USE_WCHAR # pango -> libglib2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # pango -> libglib2
+	depends on BR2_USE_MMU # pango -> glib2
 	select BR2_PACKAGE_PANGO
 
 comment "pango plugin needs a toolchain w/ C++, wchar, threads"
package/gstreamer1/gst1-plugins-base/Config.in +1 -0
index 55960ea..3b487c5 100644
@@ -131,6 +131,7 @@ config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_PANGO
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_USE_WCHAR # pango -> libglib2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # pango -> libglib2
+	depends on BR2_USE_MMU # pango -> libglib2
 	select BR2_PACKAGE_PANGO
 	help
 	  Pango-based text rendering and overlay
package/libgail/Config.in +1 -0
index 4335bef..e997532 100644
@@ -2,6 +2,7 @@ config BR2_PACKAGE_LIBGAIL
 	bool "libgail"
 	depends on BR2_USE_WCHAR # pango -> libglib2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # pango -> libglib2
+	depends on BR2_USE_MMU # pango -> libglib2
 	depends on BR2_PACKAGE_LIBGTK2
 	select BR2_PACKAGE_PANGO
 	help
package/webkit/Config.in +1 -0
index 45f2058..92a7895 100644
@@ -11,6 +11,7 @@ config BR2_PACKAGE_WEBKIT
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_USE_WCHAR # enchant -> libglib2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # enchant -> libglib2
+	depends on BR2_USE_MMU # libgail -> pango -> libglib2
 	depends on BR2_PACKAGE_LIBGTK2
 	depends on BR2_PACKAGE_WEBKIT_ARCH_SUPPORTS
 	depends on !BR2_BINFMT_FLAT # icu
Signature · 1 line
1.8.3.2
#6 lore raw

PATCH 6/7 pcmanfm: add missing BR2_USE_MMU dependency from gamin

In reply to Thomas Petazzoni
---
 package/pcmanfm/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/pcmanfm/Config.in +1 -0
index f6a3984..cf77e36 100644
@@ -3,6 +3,7 @@ config BR2_PACKAGE_PCMANFM
 	depends on BR2_PACKAGE_XORG7
 	depends on BR2_USE_WCHAR # glib2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
+	depends on BR2_USE_MMU # glib2
 	select BR2_PACKAGE_GAMIN
 	select BR2_PACKAGE_STARTUP_NOTIFICATION
 	select BR2_PACKAGE_XLIB_LIBX11
Signature · 1 line
1.8.3.2
#7 lore raw

PATCH 7/7 sconeserver: missing dependency on BR2_USE_MMU

In reply to Thomas Petazzoni

The BR2_PACKAGE_SCONESERVER_HTTP_SCONESITE_IMAGE option of sconeserver selects imagemagick, but forgets to depends on BR2_USE_MMU, which imagemagick depends on.

---
 package/sconeserver/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/sconeserver/Config.in +1 -0
index ccb9c00..16b731e 100644
@@ -31,6 +31,7 @@ config BR2_PACKAGE_SCONESERVER_HTTP_SCONESITE
 config BR2_PACKAGE_SCONESERVER_HTTP_SCONESITE_IMAGE
 	bool "http::sconesite::image"
 	depends on BR2_PACKAGE_SCONESERVER_HTTP_SCONESITE
+	depends on BR2_USE_MMU # imagemagick
 	select BR2_PACKAGE_IMAGEMAGICK
 	help
 	  http::sconesite::image module for Sconeserver
Signature · 1 line
1.8.3.2
#8 lore raw

cover Misc set of fixes

In reply to Thomas Petazzoni
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Hello,
The first three patches are fixes for build failures. The last four patches are fixes for missing dependency propagation of BR2_USE_MMU.

Thomas

Quoted 8 lines

Thomas Petazzoni (7):
cairo: fix build on Blackfin in test/cairo-test-runner.c
cairo: improve the Blackfin build fix
util-linux: libblkid needs fork(), disable on !MMU
opencv: add missing dependency on !MMU for gtk support
packages: missing propagation of !mmu from pango
pcmanfm: add missing BR2_USE_MMU dependency from gamin
sconeserver: missing dependency on BR2_USE_MMU

Committed series, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#9 lore raw

cover Misc set of fixes

In reply to Thomas Petazzoni
Quoted 5 lines · Thomas Petazzoni

Hello,

The first three patches are fixes for build failures. The last four patches are fixes for missing dependency propagation of BR2_USE_MMU.

It would be great if someone could create a script (for example based on kconfiglib) that automatically verifies whether all needed dependencies are in place. Since the logic to determine this is pretty straightforward, it should not be th?t hard. It may take a while to execute, but that shouldn't be a problem.

Any interested persons?

Samuel: you have been using kconfiglib before, what is your view on it?

Thanks,
Thomas

#10 lore raw

cover Misc set of fixes

Dear Thomas De Schampheleire,

Quoted 8 lines · Thomas De Schampheleire
Quoted 2 lines

The first three patches are fixes for build failures. The last four patches are fixes for missing dependency propagation of BR2_USE_MMU.

It would be great if someone could create a script (for example based on kconfiglib) that automatically verifies whether all needed dependencies are in place. Since the logic to determine this is pretty straightforward, it should not be th?t hard. It may take a while to execute, but that shouldn't be a problem.

Maybe there's no need for a tool. Just take some configuration of architecture, toolchain, static lib, and other "global configurations", and then run "make randpackageconfig" a number of times. You might get some warnings telling you that there are dependency violations.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com