Opened 6 years ago

Closed 6 years ago

#12693 closed defect (fixed)

autoreconf 2.62 can't handle AS_VAR_IF in our configure.ac

Reported by: arma Owned by: ioerror
Priority: Medium Milestone: Tor: 0.2.6.x-final
Component: Core Tor/Tor Version: Tor: 0.2.5.2-alpha
Severity: Keywords: tor, 026-triaged-1, 025-backport, nickm-patch
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

configure.ac:607: error: possibly undefined macro: AS_VAR_IF If this
token and others are legitimate, please use m4_pattern_allow. See the
Autoconf documentation.
autoreconf-2.62: /usr/local/bin/autoconf-2.62 failed with exit status: 1

http://www.winehq.org/pipermail/wine-devel/2010-May/083662.html indicates that autoreconf 2.62 can't handle AS_VAR_IF.

We introduced AS_VAR_IF in two places in git commit 21ac2928 which went into Tor 0.2.5.2-alpha.

If this is easy to fix, it seems wise to do so -- we have some relays (including at least one directory authority) that are still on autoreconf 2.62.

Child Tickets

Change History (11)

comment:1 Changed 6 years ago by ioerror

Indeed - to upgrade urras to Tor version 0.2.6.0-alpha-dev (git-50390d4ae4fa83dd) I made a simple patch before rebuilding:

commit 50390d4ae4fa83dd33f6c9e9533c7ed670ca145f
Author: Jacob Appelbaum <jacob@appelbaum.net>
Date:   Wed Jul 23 23:37:27 2014 +0000

    remove AS_VAR_IF

diff --git a/configure.ac b/configure.ac
index 414c72a..51b62bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -604,11 +604,6 @@ if test x$enable_gcc_hardening != xno; then
     TOR_CHECK_CFLAGS(-fstack-protector-all, also_link)
     AS_VAR_PUSHDEF([can_compile], [tor_cv_cflags_-fstack-protector-all])
     AS_VAR_PUSHDEF([can_link], [tor_can_link_-fstack-protector-all])
-    AS_VAR_IF(can_compile, [yes],
-        AS_VAR_IF(can_link, [yes],
-                  [],
-                  AC_MSG_ERROR([We tried to build with stack protection; it looks like your compiler supports it 
-        )
     AS_VAR_POPDEF([can_link])
     AS_VAR_POPDEF([can_compile])
     TOR_CHECK_CFLAGS(-Wstack-protector)

This is not the fix we want but it is the fix that allowed me to upgrade my Directory Authority when it was sorely needed. I could probably produce a reasonable patch but I was in a hurry. This is largely just to document the problem and to provide a simple solution. I think we should remove the need for AS_VAR_IF unless we're going to drop support for autoreconf 2.62. in Tor.

comment:2 Changed 6 years ago by nickm

Milestone: Tor: 0.2.5.x-finalTor: 0.2.6.x-final

What OS is this? Autoconf 2.63 came out in 2008.

comment:3 Changed 6 years ago by nickm

Keywords: tor 026-triaged-1 025-backport added

The easy workaround here is an m4_ifdef. See branch "bug12693_025" in my public repository.

comment:4 Changed 6 years ago by nickm

Status: newneeds_review

comment:5 Changed 6 years ago by nickm

Keywords: nickm-patch added

Apply a nickm-patch keyword to tickets in needs_review in 0.2.6 where I wrote the patch, so I know which ones I can('t) review myself.

comment:6 Changed 6 years ago by arma

Owner: set to ioerror
Status: needs_reviewassigned

comment:7 Changed 6 years ago by arma

Status: assignedneeds_review

comment:8 Changed 6 years ago by andrea

Nickm's patch looks good to me; recommend merging.

comment:9 Changed 6 years ago by nickm

Milestone: Tor: 0.2.6.x-finalTor: 0.2.5.x-final

Merged to 0.2.6. Marking for possible 0.2.5 backport

comment:10 Changed 6 years ago by arma

Argument in favor of backport: this is a regression introduced in 0.2.5, so 0.2.5 is a good place to fix it.

Argument against backport: we have heard from one affected user so far.

I think that sums to 'no backport needed'.

comment:11 Changed 6 years ago by nickm

Milestone: Tor: 0.2.5.x-finalTor: 0.2.6.x-final
Resolution: fixed
Status: needs_reviewclosed

I think that sums to 'no backport needed'.

fair enough.

Note: See TracTickets for help on using tickets.