Erstellt vor 13 Tagen

Geschlossen vor 5 Tagen

#2961 closed defect (fixed)

build faild for e2fsprogs-1.42.13

Erstellt von: Thorsten Verantwortlicher:
Priorität: normal Meilenstein: freetz-next
Komponente: tools Version: devel
Stichworte: e2fsprogs, squashfs-tools Beobachter:
Product Id: Firmware Version:

Beschreibung

e2fsprogs won´t build for 6.3x / 6.8x. Other versions are surely affected too.

the problem: …undefined reference to 'major' and later on to 'makedev'
../lib/libext2fs.a(ismounted.o): In function `check_loop_mounted':
/mnt/autofs/share/bin/freetz/7490/freetz-devel-06.8x/source/host-tools/e2fsprogs-1.42.13/lib/ext2fs/ismounted.c:57: undefined reference to `major'
../lib/libblkid.a(devname.o): In function `evms_probe_all':
/mnt/autofs/share/bin/freetz/7490/freetz-devel-06.8x/source/host-tools/e2fsprogs-1.42.13/lib/blkid/devname.c:382: undefined reference to `makedev'

Unfortunately i´m no programmer. so i don´t understand the main reason for that.
Some googling piont me to https://github.com/android-ndk/ndk/issues/398.

They mention "Unified headers breaks code which defines any function called major(), minor() or makedev()"

I´m not sure if my/freetz´s problem is the same.

Anhänge (1)

make_20180609-223734.txt (129.2 KB) - hinzugefügt von Thorsten vor 13 Tagen.
Make stdout/stderr

Alle Anhänge herunterladen als: .zip

Änderungshistorie (20)

Geändert vor 13 Tagen durch Thorsten

Make stdout/stderr

comment:1 Geändert vor 13 Tagen durch Thorsten

I should mention: you can ignore the warnings "warning: Clock skew detected. Your build may be incomplete." because my svn directory resides on a nfs share. The e2fsprogs problem persists if i build inside a locale filesystem.

So nfs/local is not the main problem.

I write in english…should i switch to german language because freetz seems to be a german project ?

with kind regards Thorsten

comment:2 Geändert vor 13 Tagen durch er13

What build system do you use? Gentoo? Which glibc version?

this upstream commit would probably fix the problem.

https://forums.gentoo.org/viewtopic-t-1039602-postdays-0-postorder-asc-start-0.html

comment:3 Geändert vor 12 Tagen durch Thorsten

Hello er13,
you guess right. It´s a gentoo x86. Kernel 4.16.12 / gcc 7.3.0-r3 with glibc-2.26-r7

I tried a make tools with:

glibc-2.26-r7 —> fails
glibc-2.25-r11 —> works fine

So the problem rises with the glibc-update on my driving system.

glibc-2.25-r11 put some interesting messages to my eyes:

warning: In the GNU C Library, "makedev" is defined
 by <sys/sysmacros.h>. For historical compatibility, it is
 currently defined by <sys/types.h> as well, but we plan to
 remove this soon. To use "makedev", include <sys/sysmacros.h>
 directly. If you did not intend to use a system-defined macro
 "makedev", you should undefine it after including <sys/types.h>.
        MINOR_FROM_HEADER (header->header.devminor));

Conclusion: they have put their plan into action.

What does it mean for me/freetz ?

I guess, over time, all distros will move to glibc-2.26/2.27 or never.
So every build will fail ? Or does someone fix e2fsprogs and other packages ?

Thorsten

comment:4 Geändert vor 12 Tagen durch Thorsten

The solution for e2fsprogs seems to upgrade to e2fsprogs-1.43.9.

e2fsprogs-1.43.9 with additional "#include <sys/sysmacros.h>" statements in various source files will compile with glibc-2.26-r7.

Wo will update that package ?

Thorsten

comment:5 Geändert vor 11 Tagen durch er13

In 14724:

e2fsprogs: add upstream patch addressing makedev/major/glibc-2.26.x related build issues

refs #2961
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/commit/?id=3fb715b55426875902dfef3056b2cf7335953178

comment:6 Geändert vor 11 Tagen durch er13

  1. please update to the latest svn/git revision
  2. call make e2fsprogs-host-distclean
  3. call make e2fsprogs-host
  4. and report if the problem still persists

comment:7 Geändert vor 10 Tagen durch Thorsten

I´m not able to post a comparism between 1.42.13 and 1.43.9 because trac feels my post is spam....and reCaptcha don´t work because of shutdown reCaptcha V1.

comment:8 Antwort: Geändert vor 10 Tagen durch Thorsten

…and this morning it (trac) works once again…

//e2fsprogs-1.43.9/misc/mk_hugefiles.c:#include <sys/sysmacros.h>
//e2fsprogs-1.43.9/misc/create_inode.c:#include <sys/sysmacros.h>      <-- missing in 1.42.13
//e2fsprogs-1.43.9/lib/ext2fs/ismounted.c:#include <sys/sysmacros.h>   <-- missing in 1.42.13
//e2fsprogs-1.43.9/lib/ext2fs/finddev.c:#include <sys/sysmacros.h> 
//e2fsprogs-1.43.9/lib/blkid/devno.c:#include <sys/sysmacros.h>
//e2fsprogs-1.43.9/lib/blkid/devname.c:#include <sys/sysmacros.h>
//e2fsprogs-1.43.9/debugfs/debugfs.c:#include <sys/sysmacros.h>        <-- missing in 1.42.13

Just for lack of interest: why not upgrade to 1.43.9 ?

comment:9 als Antwort auf: ↑ 8 Geändert vor 10 Tagen durch er13

Replying to Thorsten:

e2fsprogs-1.43.9/misc/create_inode.c:#include <sys/sysmacros.h> ←- missing in 1.42.13

there is no misc/create_inode.c in 1.42.13

e2fsprogs-1.43.9/lib/ext2fs/ismounted.c:#include <sys/sysmacros.h> ←- missing in 1.42.13

fixed in r14725, thanks

e2fsprogs-1.43.9/debugfs/debugfs.c:#include <sys/sysmacros.h> ←- missing in 1.42.13

debugfs/debugfs.c from 1.42.13 contains no calls to makedev/major, debugfs.c is also not contained in your log file, so no need to add the #include

Just for lack of interest: why not upgrade to 1.43.9 ?

Cause it's not that easy, we have a lot of patches to e2fsprogs, in particular for the target version of it, they all need to be adjusted. It was easier to backport the upstream patch.

Could you please update to r14725 and test, if it solves the problem, I have no access to an Gentoo system. That's the reason I've missed that with lib/ext2fs/ismounted.c (it was actually contained but in incorrect/incomplete diff-format).

comment:11 Antwort: Geändert vor 10 Tagen durch Thorsten

please have a look at dump.c:

dump.o: In function `rdump_inode':
/mnt/autofs/share/bin/freetz/build/7490.trunc/freetz-devel-06.8x/source/host-tools/e2fsprogs-1.42.13/debugfs/dump.c:325: undefined reference to `makedev'

To my understanding: patching e2fsprogs is not only helpfull for gentoo-users, but also for all other distros which upgrade beyond 2.25, right ?

comment:12 Geändert vor 10 Tagen durch er13

In 14726:

e2fsprogs: update sysmacros-patch once again (debugfs/dump.c was missing)

rediff/reorder other patches
refs #2961

comment:13 als Antwort auf: ↑ 11 Geändert vor 10 Tagen durch er13

Replying to Thorsten:

please have a look at dump.c:

should be fixed in r14726, please test and provide feedback

To my understanding: patching e2fsprogs is not only helpfull for gentoo-users, but also for all other distros which upgrade beyond 2.25, right ?

yes

comment:14 Geändert vor 10 Tagen durch Thorsten

you´ve fixed that bug. thank you !

i´ve done a new build from scratch. next problem package: squashfs2.2-r2

source/host-tools/squashfs2.2-r2/squashfs-tools/mksquashfs.c:601: undefined reference to `major'
source/host-tools/squashfs2.2-r2/squashfs-tools/mksquashfs.c:602: undefined reference to `minor'

Should i make a new ticket, or should we continue inside this ticket till a build from scratch run without problems ?

comment:15 Geändert vor 10 Tagen durch er13

I'll take a look, but not today. In the meantime you could try to fix it yourself, see e.g. this patch.

Zuletzt geändert vor 10 Tagen von er13 (vorher) (Diff)

comment:16 Geändert vor 9 Tagen durch Thorsten

Ok….thank you.
I´ll take a look at Fr./Sa.
I´ll hope i can find a freetz doc which explains how to patch (provide fixes) in freetz.

comment:17 Geändert vor 6 Tagen durch er13

In 14729:

squashfs*-tools: add patches addressing makedev/major/minor/glibc-2.26.x related build issues

refs #2961

comment:18 Geändert vor 6 Tagen durch Thorsten

squashfs compiles fine.
thank you.
a complete build from sratch was running without errors (but many warnings, of course).

my point of view: you can close the ticket.

regards Thorsten

comment:19 Geändert vor 5 Tagen durch er13

  • Lösung auf fixed gesetzt
  • Product Id 7490 gelöscht
  • Status von new nach closed geändert
  • Stichworte squashfs-tools hinzugefügt

fixed in r14729

@Thorsten: thanks for testing!

Hinweis: Hilfe zur Verwendung von Tickets finden Sie in TracTickets.