[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Debugging du v9.3
From: |
Pádraig Brady |
Subject: |
Re: Debugging du v9.3 |
Date: |
Thu, 20 Jul 2023 14:13:25 +0100 |
User-agent: |
Mozilla Thunderbird |
On 19/07/2023 19:27, Saulius Krasuckas wrote:
Hello,
I am trying to build Coreutils-9.3 from source. [1]
If I run ./configure && make, it builds.
But I noticed that it calculates some things wrong. So I decided to
enable some debugging. Any suggestions?
Since I found none, I looked up at the source and noticed the DU_DEBUG
define: [2]
Now if I clean the dir and run make CFLAGS="-DDU_DEBUG", it fails:
--- snip ---
CC src/dircolors.o
CCLD src/dircolors
CC src/dirname.o
CCLD src/dirname
CC src/du.o
In file included from src/du.c:26:
src/du.c: In function 'du_files':
./lib/config.h:4385:25: warning: implicit declaration of function
'rpl_fts_cross_check'; did you mean 'fts_cross_check'?
[-Wimplicit-function-declaration]
4385 | #define fts_cross_check rpl_fts_cross_check
| ^~~~~~~~~~~~~~~~~~~
src/du.c:60:31: note: in expansion of macro 'fts_cross_check'
60 | # define FTS_CROSS_CHECK(Fts) fts_cross_check (Fts)
| ^~~~~~~~~~~~~~~
src/du.c:707:11: note: in expansion of macro 'FTS_CROSS_CHECK'
707 | FTS_CROSS_CHECK (fts);
| ^~~~~~~~~~~~~~~
CCLD src/du
/usr/bin/ld: src/du.o: in function `du_files':
du.c:(.text+0x14b5): undefined reference to `rpl_fts_cross_check'
/usr/bin/ld: src/du.o: in function `main':
du.c:(.text+0x16fa): undefined reference to `fts_debug'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:10638: src/du] Error 1
make[2]: Leaving directory '/home/sskras/debug/src/coreutils-9.3'
make[1]: *** [Makefile:21297: all-recursive] Error 1
make[1]: Leaving directory '/home/sskras/debug/src/coreutils-9.3'
make: *** [Makefile:8434: all] Error 2
--- snip ---
Is this a bug and/how should I report it?
It looks like an issue with gnulib.
With the attached gnulib patch applied you should be able to build with:
make CFLAGS="-DDU_DEBUG -DGNULIB_FTS_DEBUG=1 -O2"
Note -O2 is specified to avoid compiler warnings at default optimization levels.
It would be useful to know if fts_cross_check() is useful to you.
cheers,
Pádraig
gnulib-fts-cross-check.patch
Description: Text Data