Skip to contentSkip to conversation

evas: depend on thread support

PATCH New Thomas Petazzoni 2 participants 3 messages Feb 22, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 evas: depend on thread support

Evas has an optional mechanism to do asynchronous preloading of images. This mechanism is optional, and in commit b6d92bf415df33ac86487d68f5f8299f406859d2 ("libevas: async image preload support needs threads support in toolchain"), Peter made sure to disable the asychronous preloading when no thread support was available.

Unfortunately, it seems like disabling the asynchronous loading is rarely used, and it in facts fails to build: a member of structure is not present when asynchronous preloading is disabled, but the code continues to use it.

Since the fix is not obvious, and all this mechanism seems to have changed completely in EFL 1.8.x, and we probably don't care much about EFL without threads, this commit adds a dependency of libevas on thread support. Consequently, it also reverts commit b6d92bf415df33ac86487d68f5f8299f406859d2 which is no longer necessary.

Of course, this commit propagates this additional dependency to the reverse dependencies of libevas.

Fixes:

http://autobuild.buildroot.org/results/6de/6de90018a9eeb9c495d15046a8b3270eb95a5550//
http://autobuild.buildroot.org/results/693/693df99db4ab357b48d427be3a72f6d64dd53065//

---
 package/efl/expedite/Config.in      |  4 +++-
 package/efl/libecore/Config.in      |  5 +++++
 package/efl/libedje/Config.in       |  5 +++++
 package/efl/libelementary/Config.in |  5 +++++
 package/efl/libethumb/Config.in     |  5 +++++
 package/efl/libevas/Config.in       | 10 ++++++++++
 package/efl/libevas/libevas.mk      |  5 -----
 package/enlightenment/Config.in     |  2 +-
 8 files changed, 34 insertions(+), 7 deletions(-)
package/efl/expedite/Config.in +3 -1
index 918c34e..96db266 100644
@@ -4,6 +4,7 @@ config BR2_PACKAGE_EXPEDITE
 	select BR2_PACKAGE_LIBEVAS
 	select BR2_PACKAGE_LIBEET
 	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libevas
 	depends on !BR2_avr32 # libevas
 	help
 	  Expedite is the official Evas benchmark tool. It can test different
@@ -11,6 +12,7 @@ config BR2_PACKAGE_EXPEDITE
 	  DirectFB and so on. Its tests are quite extensive, trying to
 	  reproduce real world usage cases.
 
-comment "expedite needs a toolchain w/ C++"
+comment "expedite needs a toolchain w/ C++, threads"
 	depends on !BR2_INSTALL_LIBSTDCPP
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
 	depends on !BR2_avr32
package/efl/libecore/Config.in +5 -0
index 41a16f9..3db036c 100644
@@ -38,6 +38,11 @@ config BR2_PACKAGE_LIBECORE_X_XCB
 config BR2_PACKAGE_LIBECORE_EVAS
 	bool "libecore Evas support"
 	select BR2_PACKAGE_LIBEVAS
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_avr32 # libevas
+
+comment "evas support needs a toolchain w/ threads"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
 	depends on !BR2_avr32 # libevas
 
 endif # BR2_PACKAGE_LIBECORE
package/efl/libedje/Config.in +5 -0
index 4a0831a..503919c 100644
@@ -1,3 +1,7 @@
+comment "libedje needs a toolchain w/ threads"
+	depends on !BR2_avr32
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
+
 config BR2_PACKAGE_LIBEDJE
 	bool "libedje"
 	select BR2_PACKAGE_LIBEINA
@@ -8,6 +12,7 @@ config BR2_PACKAGE_LIBEDJE
 	select BR2_PACKAGE_LIBEVAS
 	select BR2_PACKAGE_LUA
 	depends on !BR2_avr32 # libevas
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libevas
 	help
 	  A graphical layout and animation library for animated
 	  resizable, compressed and scalable themes.
package/efl/libelementary/Config.in +5 -0
index d4584e8..91740af 100644
@@ -1,3 +1,7 @@
+comment "libelementary needs a toolchain w/ threads"
+	depends on !BR2_avr32
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
+
 config BR2_PACKAGE_LIBELEMENTARY
 	bool "libelementary"
 	select BR2_PACKAGE_LIBEINA
@@ -5,6 +9,7 @@ config BR2_PACKAGE_LIBELEMENTARY
 	select BR2_PACKAGE_LIBECORE
 	select BR2_PACKAGE_LIBEDJE
 	depends on !BR2_avr32 # libevas
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libevas
 	help
 	  Elementary is a widget toolkit and EFL wrapper and convenience
 	  library to make it easy to build applications and tools with UIs
package/efl/libethumb/Config.in +5 -0
index 3a2f3dc..64574a0 100644
@@ -1,3 +1,7 @@
+comment "libethumb needs a toolchain w/ threads"
+	depends on !BR2_avr32
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
+
 config BR2_PACKAGE_LIBETHUMB
 	bool "libethumb"
 	select BR2_PACKAGE_LIBEINA
@@ -6,6 +10,7 @@ config BR2_PACKAGE_LIBETHUMB
 	select BR2_PACKAGE_LIBECORE_EVAS
 	select BR2_PACKAGE_LIBEDJE
 	depends on !BR2_avr32 # libevas
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libevas
 	help
 	  Ethumb is a library for generating thumbnail images of documents.
 
package/efl/libevas/Config.in +10 -0
index b14a319..2afa888 100644
@@ -1,6 +1,16 @@
+comment "libevas needs a toolchain w/ threads"
+	depends on !BR2_avr32
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
+
 config BR2_PACKAGE_LIBEVAS
 	bool "libevas"
 	depends on !BR2_avr32 # no epoll_create1 or inotify_init1
+	# libevas should normally build without threads, but due to a
+	# build issue when the async preloader is disabled, which is
+	# needed when no threads are available, we don't allow evas to
+	# be built without threads. This should be revisited when efl
+	# is bumped to 1.8.
+	depends on BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_PACKAGE_FREETYPE
 	select BR2_PACKAGE_LIBEINA
 	# required to build so far
package/efl/libevas/libevas.mk +0 -5
index 46de4cb..41ceb49 100644
@@ -203,11 +203,6 @@ else
 LIBEVAS_CONF_OPT += --disable-font-loader-eet
 endif
 
-# async image preload support needs threads support in toolchain
-ifneq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
-LIBEVAS_CONF_OPT += --disable-async-preload
-endif
-
 # libevas installs the source code of examples on the target, which
 # are generally not useful.
 define LIBEVAS_REMOVE_EXAMPLES
package/enlightenment/Config.in +1 -1
index 66c7055..43efe58 100644
@@ -21,7 +21,7 @@ config BR2_PACKAGE_ENLIGHTENMENT
 	depends on BR2_USE_WCHAR
 	depends on BR2_INSTALL_LIBSTDCPP
 	# libedbus -> dbus
-	# libedbus -> glib2
+	# libedbus -> glib2, libevas
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	# libedbus -> dbus
 	depends on BR2_USE_MMU
Signature · 1 line
1.8.3.2
#1 lore raw

PATCH 2/2 efl: disallow on non-MMU systems

The libeina library uses the madvise() system call, that isn't available on non-MMU systems. Also, several other components of EFL use fork(). Therefore, the easiest solution is to simply disallow the EFL as a whole on non-MMU systems.

Fixes:

http://autobuild.buildroot.org/results/ad9/ad90baa5e07569308a7e2b2510b67c5b2a563b44//

Thanks to Ryan Barnett for helping in the investigation!

---
 package/efl/Config.in           | 2 ++
 package/enlightenment/Config.in | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
package/efl/Config.in +2 -0
index 36afd1a..3d31a26 100644
@@ -1,6 +1,8 @@
 menuconfig BR2_PACKAGE_EFL
 	bool "Enlightenment Foundation Libraries"
 	depends on BR2_USE_WCHAR
+	# libeina uses madvise(). To revisit when bumping EFL to 1.8
+	depends on BR2_USE_MMU
 	help
 	  Enlightenment Foundation Libraries
 
package/enlightenment/Config.in +1 -1
index 43efe58..f34140b 100644
@@ -23,7 +23,7 @@ config BR2_PACKAGE_ENLIGHTENMENT
 	# libedbus -> dbus
 	# libedbus -> glib2, libevas
 	depends on BR2_TOOLCHAIN_HAS_THREADS
-	# libedbus -> dbus
+	# libedbus -> dbus, efl libraries
 	depends on BR2_USE_MMU
 	depends on BR2_PACKAGE_XORG7
 	depends on !BR2_avr32 # libevas
Signature · 1 line
1.8.3.2
#2 lore raw

PATCH 1/2 evas: depend on thread support

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

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

Evas has an optional mechanism to do asynchronous preloading of images. This mechanism is optional, and in commit b6d92bf415df33ac86487d68f5f8299f406859d2 ("libevas: async image preload support needs threads support in toolchain"), Peter made sure to disable the asychronous preloading when no thread support was available.

Unfortunately, it seems like disabling the asynchronous loading is rarely used, and it in facts fails to build: a member of structure is not present when asynchronous preloading is disabled, but the code continues to use it.

Since the fix is not obvious, and all this mechanism seems to have changed completely in EFL 1.8.x, and we probably don't care much about EFL without threads, this commit adds a dependency of libevas on thread support. Consequently, it also reverts commit b6d92bf415df33ac86487d68f5f8299f406859d2 which is no longer necessary.

Quoted 7 lines

Of course, this commit propagates this additional dependency to the reverse dependencies of libevas.

Fixes:

http://autobuild.buildroot.org/results/6de/6de90018a9eeb9c495d15046a8b3270eb95a5550//
http://autobuild.buildroot.org/results/693/693df99db4ab357b48d427be3a72f6d64dd53065//

Committed both, thanks.

Signature · 1 line
Bye, Peter Korsgaard