Bug 221447 - sysutils/e2fsprogs fail to build on 11.1 i386, but build fine on amd64
Summary: sysutils/e2fsprogs fail to build on 11.1 i386, but build fine on amd64
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: Matthias Andree
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-12 15:34 UTC by Vladimir Druzenko
Modified: 2017-08-12 21:51 UTC (History)
0 users

See Also:
mandree: maintainer-feedback+


Attachments
Full build log (138.71 KB, text/x-log)
2017-08-12 15:34 UTC, Vladimir Druzenko
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Druzenko freebsd_committer freebsd_triage 2017-08-12 15:34:37 UTC
Created attachment 185323 [details]
Full build log

Fail 3 tests (full log in attach):
     298 tests succeeded               3 tests failed
Tests failed: f_del_dup_quota f_quota f_quota_extent_opt 
gmake[2]: *** [Makefile:367: test_post] Error 1
gmake[2]: Leaving directory '/usr/obj/usr/ports/sysutils/e2fsprogs/work/e2fsprogs-1.43.5/tests'
==> /usr/obj/usr/ports/sysutils/e2fsprogs/work/e2fsprogs-1.43.5/tests/f_del_dup_quota.failed <==
--- f_del_dup_quota/expect.1    2017-06-23 21:28:12.000000000 +0000
+++ f_del_dup_quota.1.log       2017-08-12 15:19:17.802113000 +0000
@@ -29,9 +29,9 @@
 Fix<y>? yes
 Free blocks count wrong (6815, counted=6816).
 Fix<y>? yes
-[QUOTA WARNING] Usage inconsistent for ID 0:actual (15360, 3) != expected (17408, 4)
+[QUOTA WARNING] Usage inconsistent for ID 0:actual (15360, 0) != expected (3, 0)
 Update quota info for quota type 0<y>? yes
-[QUOTA WARNING] Usage inconsistent for ID 0:actual (15360, 3) != expected (17408, 4)
+[QUOTA WARNING] Usage inconsistent for ID 0:actual (15360, 0) != expected (3, 0)
 Update quota info for quota type 1<y>? yes
 
 test_filesys: ***** FILE SYSTEM WAS MODIFIED *****

==> /usr/obj/usr/ports/sysutils/e2fsprogs/work/e2fsprogs-1.43.5/tests/f_quota.failed <==
--- f_quota/expect.1    2014-07-03 14:33:48.000000000 +0000
+++ f_quota.1.log       2017-08-12 15:19:12.810260000 +0000
@@ -3,8 +3,8 @@
 Pass 3: Checking directory connectivity
 Pass 4: Checking reference counts
 Pass 5: Checking group summary information
-[QUOTA WARNING] Usage inconsistent for ID 0:actual (13312, 2) != expected (14336, 3)
-[QUOTA WARNING] Usage inconsistent for ID 100:actual (2048, 2) != expected (1024, 1)
+[QUOTA WARNING] Usage inconsistent for ID 0:actual (13312, 0) != expected (2, 0)
+[QUOTA WARNING] Usage inconsistent for ID 100:actual (2048, 0) != expected (2, 0)
 Update quota info for quota type 0? yes

==> /usr/obj/usr/ports/sysutils/e2fsprogs/work/e2fsprogs-1.43.5/tests/f_quota_extent_opt.failed <==
--- f_quota_extent_opt/expect.1 2017-04-21 07:33:47.000000000 +0000
+++ f_quota_extent_opt.1.log    2017-08-12 15:19:17.187360000 +0000
@@ -6,7 +6,7 @@
 Pass 3: Checking directory connectivity
 Pass 4: Checking reference counts
 Pass 5: Checking group summary information
-[QUOTA WARNING] Usage inconsistent for ID 0:actual (147456, 3) != expected (148480, 3)
+[QUOTA WARNING] Usage inconsistent for ID 0:actual (147456, 0) != expected (3, 0)
 Update quota info for quota type 0? yes
Comment 1 Matthias Andree freebsd_committer freebsd_triage 2017-08-12 17:05:46 UTC
uh, this built fine on 10.3 i386 in poudriere... is your hardware alright?
Comment 2 Matthias Andree freebsd_committer freebsd_triage 2017-08-12 20:36:47 UTC
interesting enough, I can reproduce the problem with your 11.1 + i386 combination.
Comment 3 Matthias Andree freebsd_committer freebsd_triage 2017-08-12 21:00:56 UTC
narrowing this down, 11.0 i386 also fails.
Comment 4 Matthias Andree freebsd_committer freebsd_triage 2017-08-12 21:40:36 UTC
Found the cause, lib/support/mkquota.c - which prints these [QUOTA WARNING] - was contributed by Google and assumes that "%ld" is suitable to print int64_t values, which is untrue on 11.x i386. I am now replacing these by "%" PRId64 and #include <inttypes.h>, which seems to fix this issue.  The shifted 3 value in the quoted failure output was the cue to looking into the width of printf/varargs stack arguments. 

Someone should give the contributor of mkquota.c a good book on modern C and stdio.h and stdint.h.

Now testing patches.
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-08-12 21:50:52 UTC
A commit references this bug:

Author: mandree
Date: Sat Aug 12 21:49:49 UTC 2017
New revision: 447863
URL: https://svnweb.freebsd.org/changeset/ports/447863

Log:
  Fix quota warnings in non-LP64 mode (11.x i386).

  PR:		221447
  Reported by:	vvd@unislabs.com

Changes:
  head/sysutils/e2fsprogs/files/patch-lib_support_mkquota.c
Comment 6 Matthias Andree freebsd_committer freebsd_triage 2017-08-12 21:51:02 UTC
Fixed in r447863, and tested on 10.3, 11.0, 11.1 i386; and 11.0/11.1 amd64.