Bug 264364 - net-mgmt/aircrack-ng: Build fails with GCC 11 on i386: configure: error: _AX_COMPILER_VERSION_GNU unknown gcc major
Summary: net-mgmt/aircrack-ng: Build fails with GCC 11 on i386: configure: error: _AX_...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Alexey Dokuchaev
URL: http://package23.nyi.freebsd.org/data...
Keywords:
Depends on:
Blocks: 258378
  Show dependency treegraph
 
Reported: 2022-05-31 10:11 UTC by Lorenzo Salvadore
Modified: 2022-06-07 14:17 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (danfe)


Attachments
aircrack-ng - mark broken on i386 (1.21 KB, patch)
2022-06-07 08:32 UTC, Lorenzo Salvadore
danfe: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lorenzo Salvadore freebsd_committer freebsd_triage 2022-05-31 10:11:22 UTC
Updating GCC_DEFAULT from GCC 10 to GCC 11 is blocked by the fact that building this port with GCC 11 on i386 fails.

The error message is
configure: error: _AX_COMPILER_VERSION_GNU unknown gcc major

Please also see the log in the URL field.
Comment 1 Lorenzo Salvadore freebsd_committer freebsd_triage 2022-06-06 21:00:13 UTC
The patch in https://reviews.freebsd.org/D35416 updates the port and remove USE_GCC=yes, so that the issue is solved as much as GCC default version is concerned.

However, the port does not still compile with GCC 11. Indeed the build fails during configure phase with the following error:

checking size of off_t... configure: error: in `/wrkdirs/usr/ports/net-mgmt/aircrack-ng/work/aircrack-ng-1.7':
configure: error: cannot compute sizeof (off_t)

Thus, if the above patch is committed, the exp-run can be removed from the Blocks: field, but the bug should not be closed yet: it should instead be renamed with the new error message.
Comment 2 Gerald Pfeifer freebsd_committer freebsd_triage 2022-06-06 21:08:58 UTC
(In reply to Lorenzo Salvadore from comment #1)
> Thus, if the above patch is committed, the exp-run can be removed from
> the Blocks: field, but the bug should not be closed yet: it should instead
> be renamed with the new error message.

Does this build currently, with GCC 10 as the default version of GCC?

If so, then USE_GCC=10 may be the best approach for now to unstall the
update to GCC 11 as the default.

(I like the version update as I've seen in Phabricator, just if it's
building/working now, and then won't build any more, I'm afraid that
is not going to fly as such.)
Comment 3 Gerald Pfeifer freebsd_committer freebsd_triage 2022-06-06 21:10:54 UTC
(In reply to Lorenzo Salvadore from comment #1)
> However, the port does not still compile with GCC 11. Indeed the
> build fails during configure phase with the following error:
>
> checking size of off_t... configure: error: in `/wrkdirs/usr/ports/net-mgmt/aircrack-ng/work/aircrack-ng-1.7':
> configure: error: cannot compute sizeof (off_t)

Is the configure script #include-ing <stdio.h> for a declaration of off_t?
Comment 4 Lorenzo Salvadore freebsd_committer freebsd_triage 2022-06-06 21:38:34 UTC
(In reply to Gerald Pfeifer from comment #2)

I think I have not explained things clearly enough: with that patch the port builds successfully on amd64 and i386 and becomes indipendent from GCC. The port does not care anymore about what the GCC default version is and then it cannot block the GCC default version update.

I think the patch unbreaks other architecture as well: aarch64, armv6, armv7; but I have not tested them. (And to be honest, I do not know how to test them: they are not tier 1 architectures.)

However, with this patch if a user overrides the default compiler (i.e. clang) with gcc 11, then the build still fails (with a new error message, not with the same as before). But gcc 11 would never be the default compiler, even with GCC_DEFAULT=11: clang is the default compiler.

That said, if the patch needs a long review I agree to commit a USE_GCC=10 as a temporary quick fix.

(In reply to Gerald Pfeifer from comment #3)

I am not used to read configure script, but I think it does include stdio.h. Relevant lines are

# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>

and later

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
$as_echo_n "checking size of off_t... " >&6; }
if ${ac_cv_sizeof_off_t+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t"        "$ac_includes_default"; then :

else
  if test "$ac_cv_type_off_t" = yes; then
     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "cannot compute sizeof (off_t)
See \`config.log' for more details" "$LINENO" 5; }
   else
     ac_cv_sizeof_off_t=0
   fi
fi
Comment 5 Alexey Dokuchaev freebsd_committer freebsd_triage 2022-06-07 02:12:25 UTC
(In reply to Lorenzo Salvadore from comment #0)
> building this port with GCC 11 on i386 fails.
Looking it the existing BROKEN_* knobs and the error message, it reads the same "_AX_COMPILER_VERSION_GNU unknown gcc major" as on those architectures.  Please mark the port as BROKEN_i386 so it does not block your GCC update.  I'll address both USE_GCC issue and update of the port to version 1.7 separately.

(In reply to Gerald Pfeifer from comment #2)
> Does this build currently, with GCC 10 as the default version of GCC?
Yes it does, albeit I use 8 everywhere. :)  Like I've said, USE_GCC requirement needs to be revisited.  I've kept it around as it was allegedly giving better results (performance?), but that was from several years ago and might not be accurate these days.

> If so, then USE_GCC=10 may be the best approach for now to unstall the
> update to GCC 11 as the default.
Or, better, just specify BROKEN_i386 as recommended above.

(In reply to Lorenzo Salvadore from comment #1)
> Thus, if the above patch is committed, ...
Please don't.  Let's not put two things in the mix.  Deal with your GCC update first, I'll take care of the port later.
Comment 6 Lorenzo Salvadore freebsd_committer freebsd_triage 2022-06-07 08:32:06 UTC
Created attachment 234517 [details]
aircrack-ng - mark broken on i386

Here is the patch to mark the port broken on i386.

@danfe: What do you prefer I do with the opened review? Do you prefer I close it? Feel free to commandeer it if you want.

@gerald: Is the patch mentor approved?
Comment 7 Alexey Dokuchaev freebsd_committer freebsd_triage 2022-06-07 12:27:03 UTC
Comment on attachment 234517 [details]
aircrack-ng - mark broken on i386

(In reply to Lorenzo Salvadore from comment #6)
> Here is the patch to mark the port broken on i386.
Approved, but you don't need to bump PORTREVISION in this case as it does not change anything WRT existing packages.

> What do you prefer I do with the opened review? Do you prefer I close it?
> Feel free to commandeer it if you want.
Just leave it as is for now, we'll do something about it closer to the port update.
Comment 8 Lorenzo Salvadore freebsd_committer freebsd_triage 2022-06-07 14:00:06 UTC
(In reply to Alexey Dokuchaev from comment #7)

> Approved, but you don't need to bump PORTREVISION in this case as it does not
> change anything WRT existing packages.

Thanks, I am going to commit it as soon as Gerald gives me his mentor approval, removing the PORTREVISION bump.
Comment 9 Gerald Pfeifer freebsd_committer freebsd_triage 2022-06-07 14:05:07 UTC
(In reply to Lorenzo Salvadore from comment #6)
> @gerald: Is the patch mentor approved?

Yes (based on danfe@'s. :-).
Comment 10 commit-hook freebsd_committer freebsd_triage 2022-06-07 14:16:10 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8c4813216022a5d0e00b75a184e3ce3c58a2b4c2

commit 8c4813216022a5d0e00b75a184e3ce3c58a2b4c2
Author:     Lorenzo Salvadore <salvadore@FreeBSD.org>
AuthorDate: 2022-06-06 12:32:46 +0000
Commit:     Lorenzo Salvadore <salvadore@FreeBSD.org>
CommitDate: 2022-06-07 14:14:46 +0000

    net-mgmt/aircrack-ng: Mark broken on i386

    The port does not compile with GCC 11, which is soon to become the
    default GCC version.

    PR:             264364
    Reported by:    exp-run (antoine)
    Approved by:    danfe (maintainer), gerald (mentor)

 net-mgmt/aircrack-ng/Makefile | 1 +
 1 file changed, 1 insertion(+)
Comment 11 Lorenzo Salvadore freebsd_committer freebsd_triage 2022-06-07 14:17:09 UTC
Patch commited (without PORTREVISION bump). Thanks gerald and danfe.