Opened 7 years ago

Closed 5 years ago

#2630 closed defect (wontfix)

configure --with-pythonpath problems

Reported by: jreed Owned by: UnAssigned
Priority: medium Milestone: Remaining BIND10 tickets
Component: build system Version: bind10-old
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: Core Feature Depending on Ticket:
Estimated Difficulty: 2 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

./configure --with-pythonpath was set to a binary that no longer existed:

./configure: line 15351: /usr/pkg/bin/python3.2: No such file or directory
(standard_in) 1: parse error
./configure: line 15352: test: !=: unary operator expected
./configure: line 15356: /usr/pkg/bin/python3.2: No such file or directory

It should check if it exists/executable first.

Looked further at the --with-pythonpath and see another bug.

reed  5577  1.6  0.1    8616    844 ttyp0  T    11:53AM  0:56.72 yes -c import sys; sys.stdout.write(sys.version[:3])

If you use argument but didn't set it configure hangs forever with the above. No value defaults to "yes" which is a unix tool :)

I have a minor patch to improve both problems:

diff --git a/configure.ac b/configure.ac
index 892bc6c..103cfc8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -239,7 +239,7 @@ AC_HELP_STRING([--with-pythonpath=PATH],
   [python_path="$withval"], [python_path="auto"])
 if test "$python_path" = auto; then
 	AM_PATH_PYTHON([3.1])
-else
+elif test -x "$python_path" ; then
 	# Older versions of automake can't handle python3 well.  This is an
 	# in-house workaround for them.
 	PYTHON=$python_path
@@ -249,6 +249,9 @@ else
 	PYTHON_EXEC_PREFIX='$(exec_prefix)'
 	AC_SUBST(PYTHON_EXEC_PREFIX)
 	PYTHON_VERSION=[`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`]
+	if test "x$PYTHON_VERSION" = "x" ; then
+		AC_MSG_ERROR(["Python $PYTHON did not work."])
+	fi
 	if test `echo "$PYTHON_VERSION >= 3.1" | bc` != 1 ; then
 		AC_MSG_ERROR(["Python version too old: $PYTHON_VERSION, need 3.1 or higher"])
 	fi
@@ -263,6 +266,8 @@ else
 	AC_SUBST(pyexecdir)
 	pkgpyexecdir='${pyexecdir}/'$PACKAGE
 	AC_SUBST(pkgpyexecdir)
+else
+	AC_MSG_ERROR(["Set --with-pythonpath to an existing Python 3 executable."])
 fi
 
 # We need to store the default pyexecdir in a separate variable so that

Subtickets

Change History (3)

comment:1 Changed 7 years ago by jwright

  • Milestone changed from New Tasks to Next-Sprint-Proposed

comment:2 Changed 6 years ago by tomek

  • Milestone set to Remaining BIND10 tickets

comment:3 Changed 5 years ago by tomek

  • Resolution set to wontfix
  • Status changed from new to closed
  • Version set to old-bind10

This task is no longer applicable to Kea. For Bundy
(a project that continues DNS development after BIND10 cancellation),
see http://bundy-dns.de

Closing ticket.

Note: See TracTickets for help on using tickets.