Skip to contentSkip to conversation

configure.ac: Make udev a dependency for chamelium

PATCH In review Paul Kocialkowski 2 participants 7 messages Jul 25, 2017 – Jul 26, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 configure.ac: Make udev a dependency for chamelium

Chamelium testing has a hard dependency on udev. This makes this dependency explicit in configure instead of failing the build when it is missing.

---
 configure.ac | 3 +++
 1 file changed, 3 insertions(+)
configure.ac +3 -0
index dec3e923..a6ab9e4a 100644
@@ -194,6 +194,9 @@ if test "x$enable_chamelium" = xyes; then
 			  [AC_MSG_ERROR([Failed to find xmlrpc, required by chamelium. Use --disable-chamelium to disable chamelium support.])])
 	PKG_CHECK_MODULES(PIXMAN, pixman-1, [],
 			  [AC_MSG_ERROR([Failed to find pixman, required by chamelium. Use --disable-chamelium to disable chamelium support.])])
+	if test x"$udev" != xyes; then
+		AC_MSG_ERROR([Failed to find udev, required by chamelium. Use --disable-chamelium to disable chamelium support.])
+	fi
 	if test x"$glib" != xyes; then
 		AC_MSG_ERROR([Failed to find glib, required by chamelium. Use --disable-chamelium to disable chamelium support.])
 	fi
Signature · 6 lines
2.13.2

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH 2/3 configure.ac: Disable chamelium by default and add enable argument

Since the chamelium is not a very usual piece of hardware and requires pulling-in lots of specific dependencies, it makes sense to keep it disabled by default.

An explicit --enable-chamelium argument is provided to enable it when necessary. This also leads to more predictable results than automatically enabling it when its dependencies are met.

Finally, whether chamelium support is enabled is printed by the information summary at end of the configure run.

---
 configure.ac | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)
configure.ac +9 -8
index a6ab9e4a..17a226de 100644
@@ -185,23 +185,23 @@ PKG_CHECK_MODULES(GSL, [gsl], [gsl=yes], [gsl=no])
 AM_CONDITIONAL(HAVE_GSL, [test "x$gsl" = xyes])
 
 # for chamelium
-AC_ARG_ENABLE(chamelium, AS_HELP_STRING([--disable-chamelium],
-	      [Enable building of chamelium libraries and tests (default: yes)]),
-	      [enable_chamelium=no], [enable_chamelium=yes])
+AC_ARG_ENABLE(chamelium, AS_HELP_STRING([--enable-chamelium],
+	      [Enable building of chamelium libraries and tests (default: no)]),
+	      [enable_chamelium=yes], [enable_chamelium=no])
 AM_CONDITIONAL(HAVE_CHAMELIUM, [test "x$enable_chamelium" = xyes])
 if test "x$enable_chamelium" = xyes; then
 	PKG_CHECK_MODULES(XMLRPC, xmlrpc xmlrpc_util xmlrpc_client, [],
-			  [AC_MSG_ERROR([Failed to find xmlrpc, required by chamelium. Use --disable-chamelium to disable chamelium support.])])
+			  [AC_MSG_ERROR([Failed to find xmlrpc, required by chamelium.])])
 	PKG_CHECK_MODULES(PIXMAN, pixman-1, [],
-			  [AC_MSG_ERROR([Failed to find pixman, required by chamelium. Use --disable-chamelium to disable chamelium support.])])
+			  [AC_MSG_ERROR([Failed to find pixman, required by chamelium.])])
 	if test x"$udev" != xyes; then
-		AC_MSG_ERROR([Failed to find udev, required by chamelium. Use --disable-chamelium to disable chamelium support.])
+		AC_MSG_ERROR([Failed to find udev, required by chamelium.])
 	fi
 	if test x"$glib" != xyes; then
-		AC_MSG_ERROR([Failed to find glib, required by chamelium. Use --disable-chamelium to disable chamelium support.])
+		AC_MSG_ERROR([Failed to find glib, required by chamelium.])
 	fi
 	if test x"$gsl" != xyes; then
-		AC_MSG_ERROR([Failed to find gsl, required by chamelium. Use --disable-chamelium to disable chamelium support.])
+		AC_MSG_ERROR([Failed to find gsl, required by chamelium.])
 	fi
 
 	AC_DEFINE(HAVE_CHAMELIUM, 1, [Enable Chamelium support])
@@ -404,6 +404,7 @@ echo "Intel GPU tools"
 echo ""
 echo " • Tests:"
 echo "       Build tests        : ${BUILD_TESTS}"
+echo "       Chamelium tests    : ${enable_chamelium}"
 echo "       Compile prime tests: ${NOUVEAU}"
 echo "       Print stack traces : ${with_libunwind}"
 echo "       Debug flags        : ${DEBUG_CFLAGS}"
Signature · 6 lines
2.13.2

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

Re: [PATCH i-g-t 2/3] configure.ac: Disable chamelium by default and add enable argument

I like this patch, however there's a mistake in it:

Quoted 24 lines · Paul Kocialkowski

Since the chamelium is not a very usual piece of hardware and requires
pulling-in lots of specific dependencies, it makes sense to keep it disabled by default.

An explicit --enable-chamelium argument is provided to enable it when necessary. This also leads to more predictable results than automatically enabling it when its dependencies are met.

Finally, whether chamelium support is enabled is printed by the information summary at end of the configure run.

---
 configure.ac | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)
configure.ac +0 -0
index a6ab9e4a..17a226de 100644
@@ -185,23 +185,23 @@ PKG_CHECK_MODULES(GSL, [gsl], [gsl=yes],
 [gsl=no])
 AM_CONDITIONAL(HAVE_GSL, [test "x$gsl" = xyes])

configure.ac PKG_CHECK_MODULES(GSL, [gsl], [gsl=yes], · line 193

Quoted 10 lines
configure.ac +3 -3
 
 # for chamelium
-AC_ARG_ENABLE(chamelium, AS_HELP_STRING([--disable-chamelium],
-	      [Enable building of chamelium libraries and tests
 (default: yes)]),
-	      [enable_chamelium=no], [enable_chamelium=yes])
+AC_ARG_ENABLE(chamelium, AS_HELP_STRING([--enable-chamelium],
+	      [Enable building of chamelium libraries and tests
 (default: no)]),
+	      [enable_chamelium=yes], [enable_chamelium=no])

It appears you repeated my original mistake of switching the yes and no parameters by accident :P. This causes passing --disable-chamelium to result in enabling the chamelium tests instead of disabling them.

Quoted 43 lines
configure.ac +0 -1
 AM_CONDITIONAL(HAVE_CHAMELIUM, [test "x$enable_chamelium" = xyes])
 if test "x$enable_chamelium" = xyes; then
 	PKG_CHECK_MODULES(XMLRPC, xmlrpc xmlrpc_util xmlrpc_client,
 [],
-			  [AC_MSG_ERROR([Failed to find xmlrpc,

required by chamelium. Use --disable-chamelium to disable chamelium support.])])

configure.ac +1 -0
+			  [AC_MSG_ERROR([Failed to find xmlrpc,

required by chamelium.])])

configure.ac +0 -1
 	PKG_CHECK_MODULES(PIXMAN, pixman-1, [],
-			  [AC_MSG_ERROR([Failed to find pixman,

required by chamelium. Use --disable-chamelium to disable chamelium support.])])

configure.ac +1 -0
+			  [AC_MSG_ERROR([Failed to find pixman,

required by chamelium.])])

configure.ac +0 -1
 	if test x"$udev" != xyes; then
-		AC_MSG_ERROR([Failed to find udev, required by

chamelium. Use --disable-chamelium to disable chamelium support.])

configure.ac +1 -0
+		AC_MSG_ERROR([Failed to find udev, required by

chamelium.])

configure.ac +0 -1
 	fi
 	if test x"$glib" != xyes; then
-		AC_MSG_ERROR([Failed to find glib, required by

chamelium. Use --disable-chamelium to disable chamelium support.])

configure.ac +1 -0
+		AC_MSG_ERROR([Failed to find glib, required by

chamelium.])

configure.ac +0 -1
 	fi
 	if test x"$gsl" != xyes; then
-		AC_MSG_ERROR([Failed to find gsl, required by

chamelium. Use --disable-chamelium to disable chamelium support.])

configure.ac +1 -0
+		AC_MSG_ERROR([Failed to find gsl, required by

chamelium.])

configure.ac +1 -0
 	fi
 
 	AC_DEFINE(HAVE_CHAMELIUM, 1, [Enable Chamelium support])
@@ -404,6 +404,7 @@ echo "Intel GPU tools"
 echo ""
 echo " • Tests:"
 echo "       Build tests        : ${BUILD_TESTS}"
+echo "       Chamelium tests    : ${enable_chamelium}"
 echo "       Compile prime tests: ${NOUVEAU}"
 echo "       Print stack traces : ${with_libunwind}"
 echo "       Debug flags        : ${DEBUG_CFLAGS}"
Signature · 6 lines
Cheers,
	Lyude
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

Re: [PATCH i-g-t 2/3] configure.ac: Disable chamelium by default and add enable argument

Quoted 29 lines · Lyude Paul

I like this patch, however there's a mistake in it:

Quoted 26 lines · Paul Kocialkowski

Since the chamelium is not a very usual piece of hardware and requires
pulling-in lots of specific dependencies, it makes sense to keep it disabled by default.

An explicit --enable-chamelium argument is provided to enable it when
necessary. This also leads to more predictable results than automatically enabling it when its dependencies are met.

Finally, whether chamelium support is enabled is printed by the information summary at end of the configure run.

---
 configure.ac | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)
configure.ac +0 -0
index a6ab9e4a..17a226de 100644
@@ -185,23 +185,23 @@ PKG_CHECK_MODULES(GSL, [gsl], [gsl=yes],
 [gsl=no])
 AM_CONDITIONAL(HAVE_GSL, [test "x$gsl" = xyes])
 
Quoted 14 lines

configure.ac PKG_CHECK_MODULES(GSL, [gsl], [gsl=yes], [gsl=no]) · line 190

Quoted 9 lines
configure.ac +3 -3
 # for chamelium
-AC_ARG_ENABLE(chamelium, AS_HELP_STRING([--disable-chamelium],
-	      [Enable building of chamelium libraries and tests
 (default: yes)]),
-	      [enable_chamelium=no], [enable_chamelium=yes])
+AC_ARG_ENABLE(chamelium, AS_HELP_STRING([--enable-chamelium],
+	      [Enable building of chamelium libraries and tests
 (default: no)]),
+	      [enable_chamelium=yes], [enable_chamelium=no])

It appears you repeated my original mistake of switching the yes and no
parameters by accident :P. This causes passing --disable-chamelium to result in enabling the chamelium tests instead of disabling them.

Well, the order is correct since the option is --enable-chamelium and not --disable-chamelium anymore. However, that made me realize that it will still enable it if --disable-chamelium is passed because I'm not checking enableval. Will fix this in v2!

Quoted 43 lines
Quoted 43 lines
configure.ac +0 -1
 AM_CONDITIONAL(HAVE_CHAMELIUM, [test "x$enable_chamelium" = xyes])
 if test "x$enable_chamelium" = xyes; then
 	PKG_CHECK_MODULES(XMLRPC, xmlrpc xmlrpc_util xmlrpc_client,
 [],
-			  [AC_MSG_ERROR([Failed to find xmlrpc,

required by chamelium. Use --disable-chamelium to disable chamelium support.])])

configure.ac +1 -0
+			  [AC_MSG_ERROR([Failed to find xmlrpc,

required by chamelium.])])

configure.ac +0 -1
 	PKG_CHECK_MODULES(PIXMAN, pixman-1, [],
-			  [AC_MSG_ERROR([Failed to find pixman,

required by chamelium. Use --disable-chamelium to disable chamelium support.])])

configure.ac +1 -0
+			  [AC_MSG_ERROR([Failed to find pixman,

required by chamelium.])])

configure.ac +0 -1
 	if test x"$udev" != xyes; then
-		AC_MSG_ERROR([Failed to find udev, required by

chamelium. Use --disable-chamelium to disable chamelium support.])

configure.ac +1 -0
+		AC_MSG_ERROR([Failed to find udev, required by

chamelium.])

configure.ac +0 -1
 	fi
 	if test x"$glib" != xyes; then
-		AC_MSG_ERROR([Failed to find glib, required by

chamelium. Use --disable-chamelium to disable chamelium support.])

configure.ac +1 -0
+		AC_MSG_ERROR([Failed to find glib, required by

chamelium.])

configure.ac +0 -1
 	fi
 	if test x"$gsl" != xyes; then
-		AC_MSG_ERROR([Failed to find gsl, required by

chamelium. Use --disable-chamelium to disable chamelium support.])

configure.ac +1 -0
+		AC_MSG_ERROR([Failed to find gsl, required by

chamelium.])

configure.ac +1 -0
 	fi
 
 	AC_DEFINE(HAVE_CHAMELIUM, 1, [Enable Chamelium support])
@@ -404,6 +404,7 @@ echo "Intel GPU tools"
 echo ""
 echo " • Tests:"
 echo "       Build tests        : ${BUILD_TESTS}"
+echo "       Chamelium tests    : ${enable_chamelium}"
 echo "       Compile prime tests: ${NOUVEAU}"
 echo "       Print stack traces : ${with_libunwind}"
 echo "       Debug flags        : ${DEBUG_CFLAGS}"
Signature · 6 lines
Paul Kocialkowski <[email protected]>
Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo, Finland
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw

PATCH 3/3 README: Add information about chamelium dependencies

In reply to Paul Kocialkowski

This adds a list of dependencies required to build chamelium support, so that what needs to be installed to get it going is more obvious.

As done previously in the file, the list is relevant for Debian and its derivatives but should provide a template for other systems as well.

---
 README | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
README +10 -1
index 26171a17..d1ea9529 100644
@@ -131,7 +131,7 @@ Requirements
 ------------
 
 This is a non-exhaustive list of package dependencies required for building
-everything (package names may vary):
+the default configuration (package names may vary):
 
 	gtk-doc-tools
 	libcairo2-dev
@@ -144,6 +144,15 @@ everything (package names may vary):
 	x11proto-dri2-dev
 	xutils-dev
 
+The following dependencies are required for building chamelium support
+(package names may vary):
+
+	libxmlrpc-core-c3-dev
+	libpixman-1-dev
+	libudev-dev
+	libglib2.0-dev
+	libgsl-dev
+
 Releases for maintainers
 ------------------------
 
Signature · 6 lines
2.13.2

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#5 lore raw

Re: [PATCH i-g-t 3/3] README: Add information about chamelium dependencies

R-b'd and pushed, thanks!

Quoted 43 lines · Paul Kocialkowski

This adds a list of dependencies required to build chamelium support, so that what needs to be installed to get it going is more obvious.

As done previously in the file, the list is relevant for Debian and its
derivatives but should provide a template for other systems as well.

---
 README | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
README +0 -0
index 26171a17..d1ea9529 100644
@@ -131,7 +131,7 @@ Requirements
 ------------
 
 This is a non-exhaustive list of package dependencies required for

building

README +2 -1
-everything (package names may vary):
+the default configuration (package names may vary):
 
 	gtk-doc-tools
 	libcairo2-dev
@@ -144,6 +144,15 @@ everything (package names may vary):
 	x11proto-dri2-dev
 	xutils-dev
 
+The following dependencies are required for building chamelium

support

README +8 -0
+(package names may vary):
+
+	libxmlrpc-core-c3-dev
+	libpixman-1-dev
+	libudev-dev
+	libglib2.0-dev
+	libgsl-dev
+
 Releases for maintainers
 ------------------------
Signature · 6 lines
Cheers,
	Lyude
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#6 lore raw
In reply to Paul Kocialkowski

R-b'd and pushed, thanks!

Quoted 29 lines · Paul Kocialkowski

Chamelium testing has a hard dependency on udev. This makes this dependency explicit in configure instead of failing the build when it is missing.

---
 configure.ac | 3 +++
 1 file changed, 3 insertions(+)
configure.ac +0 -0
index dec3e923..a6ab9e4a 100644
@@ -194,6 +194,9 @@ if test "x$enable_chamelium" = xyes; then
 			  [AC_MSG_ERROR([Failed to find xmlrpc,

required by chamelium. Use --disable-chamelium to disable chamelium support.])])

configure.ac +0 -0
 	PKG_CHECK_MODULES(PIXMAN, pixman-1, [],
 			  [AC_MSG_ERROR([Failed to find pixman,

required by chamelium. Use --disable-chamelium to disable chamelium support.])])

configure.ac +2 -0
+	if test x"$udev" != xyes; then
+		AC_MSG_ERROR([Failed to find udev, required by

chamelium. Use --disable-chamelium to disable chamelium support.])

configure.ac +1 -0
+	fi
 	if test x"$glib" != xyes; then
 		AC_MSG_ERROR([Failed to find glib, required by

chamelium. Use --disable-chamelium to disable chamelium support.])
fi

Signature · 6 lines
Cheers,
	Lyude
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx