From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 832C3385841A; Sun, 18 Sep 2022 16:53:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 832C3385841A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1663519991; bh=1QMrrc2NuRTyBF7rYkEhNLd6+dGIz5AFbSOfh+ej1E8=; h=From:To:Subject:Date:From; b=VwahQnWkzOcltCipJht53FbfQgbsH4WRAKV1UUa8kFPvRiUaEPSi8FnqeCCwqIA5X qobp1niC3RVpU4fDaWieEg5j6iUDB9/d026DqgWRpiJuA+EzREJCikqrDYynmUuthy BTTkgWEkaiaCRP3VD5v8SaFSYJKvg1uLUUdTChng= From: "deller at gmx dot de" To: glibc-bugs@sourceware.org Subject: [Bug build/29583] New: iconv failures on 32bit platform due to missing large file support Date: Sun, 18 Sep 2022 16:53:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: build X-Bugzilla-Version: 2.38 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: deller at gmx dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29583 Bug ID: 29583 Summary: iconv failures on 32bit platform due to missing large file support Product: glibc Version: 2.38 Status: UNCONFIRMED Severity: normal Priority: P2 Component: build Assignee: unassigned at sourceware dot org Reporter: deller at gmx dot de CC: carlos at redhat dot com Target Milestone: --- While compiling glibc in a 32-bit environment (hppa architecture, 32-bit userspace, but 64-bit kernel, glibc target is 32-bit as well) I see lots of failures with iconv like this one: /build/glibc/glibc-2.34/build-tree/hppa-libc/iconv/iconv_prog: failed to st= art conversion processing I traced it with strace: 3438821 openat(AT_FDCWD,"/build/glibc/glibc-2.34/build-tree/hppa-libc/iconvdata/gco= nv-modules",O_RDONLY|O_CLOEXEC) =3D 3 3438821 statx(3,"",AT_EMPTY_PATH|AT_NO_AUTOMOUNT,STATX_BASIC_STATS,0xf50013= c8) =3D 0 3438821 read(3,0xfa034678,4096) =3D 3808 3438821 read(3,0xfa034678,4096) =3D 0 3438821 close(3) =3D 0 3438821 openat(AT_FDCWD,"/build/glibc/glibc-2.34/build-tree/hppa-libc/iconvdata/gco= nv-modules.d",O_RDONLY|O_DIRECTORY|O_LARGEFILE|O_NONBLOCK|O_CLOEXEC) =3D 3 3438821 statx(3,"",AT_EMPTY_PATH|AT_NO_AUTOMOUNT,STATX_BASIC_STATS,0xf50011= 48) =3D 0 3438821 getdents64(3,-100439584,32768,99,8,0) =3D 96 3438821 close(3) =3D 0 This part comes from gconv_parseconfdir() in conv/gconv_parseconfdir.h: /* Read the gconv-modules configuration file first. */ found =3D read_conf_file (buf, dir, dir_len); /* Next, see if there is a gconv-modules.d directory containing configuration files and if it is non-empty. */ cp--; cp[0] =3D '.'; cp[1] =3D 'd'; cp[2] =3D '\0'; DIR *confdir =3D opendir (buf); if (confdir !=3D NULL) { struct dirent *ent; while ((ent =3D readdir (confdir)) !=3D NULL) as can be seen, readdir() is called and the syscall returns 96 bytes for getdents64(), but the "ent" variable nevertheless gets NULL and returns wit= hout reading the "gconv-modules-extra.conf" file. Finally it turns out, that this is a problem of missing large file support while scanning the contents of the gconv-modules.d/ directory. In my build environment the /build/glibc/glibc-2.34/build-tree/hppa-libc/iconvdata/gconv-modules.d/gcon= v-modules-extra.conf file is located on-disk on a high inode,=20 thus the readdir() function returns NULL. I manually changed the code above to use the 64-bit variants to become: struct dirent64 *ent; while ((ent =3D readdir64 (confdir)) !=3D NULL) which then worked. So finally, I'd suggest to enable 64-bit file-support for this specific function. Either by manually using the 64-bit variants, or by compiling with=20 -D_LARGE_FILE_SOURCE=3D1 -D_FILE_OFFSET_BITS=3D64 (whatever is possible and makes sense). --=20 You are receiving this mail because: You are on the CC list for the bug.=