Opened 11 years ago

Closed 11 years ago

#3255 closed defect (fixed)

e2fsprogs-1.42.6 make check fail to compile

Reported by: Gilles Espinasse Owned by: bdubbs@…
Priority: high Milestone: 7.3
Component: Book Version: SVN
Severity: normal Keywords:
Cc:

Description

1.42.6 fail to build on make check

making check in lib/ext2fs
	CC ../../../lib/ext2fs/tst_bitops.c
	LD tst_bitops
	CC ../../../lib/ext2fs/tst_badblocks.c
	LD tst_badblocks
	CC ../../../lib/ext2fs/tst_iscan.c
	LD tst_iscan
	CC ../../../lib/ext2fs/tst_types.c
	LD tst_types
	LD tst_icount
	CC ../../../lib/ext2fs/tst_super_size.c
	LD tst_super_size
	CC ../../../lib/ext2fs/tst_inode_size.c
	LD tst_inode_size
	LD tst_csum
	CC ../../../lib/ext2fs/tst_bitmaps.c
	MK_CMDS tst_bitmaps_cmd.c
	CC tst_bitmaps_cmd.c
	LD tst_bitmaps
/usr/bin/ld: warning: libcom_err.so.2, needed by ../../lib/libss.so, not found (try using -rpath or -rpath-link)
collect2: ld returned 1 exit status
make[2]: *** [tst_bitmaps] Error 1

Should be related to commit ab3f5c5aad6310be1d1891c05f1bc8cf7ccf0cef

--- a/lib/ext2fs/Makefile.in
+++ b/lib/ext2fs/Makefile.in
@@ -356,33 +356,33 @@ tst_bitmaps_cmd.c: tst_bitmaps_cmd.ct
 	$(Q) DIR=$(srcdir) $(MK_CMDS) $(srcdir)/tst_bitmaps_cmd.ct
 
 tst_bitmaps: tst_bitmaps.o tst_bitmaps_cmd.o $(STATIC_LIBEXT2FS) $(DEPLIBSS) \
-		$(DEPLIBCOM_ERR)
+		$(DEPSTATIC_LIBCOM_ERR)
 	$(E) "	LD $@"
 	$(Q) $(CC) -o $@ tst_bitmaps.o tst_bitmaps_cmd.o $(ALL_CFLAGS) \
-		$(STATIC_LIBEXT2FS) $(LIBSS) $(LIBCOM_ERR)
+		$(STATIC_LIBEXT2FS) $(LIBSS) $(STATIC_LIBCOM_ERR)
 
 tst_extents: $(srcdir)/extent.c extent_dbg.c $(DEBUG_OBJS) $(DEPLIBSS) \
-	$(LIBE2P) $(DEPLIBUUID) $(DEPLIBBLKID) $(DEPLIBCOM_ERR)
+	$(LIBE2P) $(DEPLIBUUID) $(DEPLIBBLKID) $(DEPSTATIC_LIBCOM_ERR)
 	$(E) "	LD $@"
 	$(Q) $(CC) -o tst_extents $(srcdir)/extent.c extent_dbg.c \
 		$(ALL_CFLAGS) -DDEBUG $(DEBUG_OBJS) $(LIBSS) $(LIBE2P) \
-		$(STATIC_LIBEXT2FS) $(LIBBLKID) $(LIBUUID) $(LIBCOM_ERR) \
+		$(STATIC_LIBEXT2FS) $(LIBBLKID) $(LIBUUID) $(STATIC_LIBCOM_ERR) \
 		-I $(top_srcdir)/debugfs

Supplying the static libcom_err imply libss fail to link because libss depend on dynamic libcomm_err.

I reported the issue upstream.

For 1.42.6, a simple workaround is to 'make check' after 'make install'. libcom_err become available in the path and test compile and run successfully.

Change History (8)

comment:1 by bdubbs@…, 11 years ago

Setting LIBRARY_PATH should enable ld to find the local libcom_err.so.2 before install.

I didn't run all the tests in my latest install from two days ago, but I'll check next week.

comment:2 by Matthew Burgess, 11 years ago

Type: taskenhancement
Ouch, well spotted. I missed this failure as it's invoked by 'make -k check', and I've configured jhalfs to ignore errors, so it was executed as 'make -k check
true' so happily skipped straight past that. I wonder whether that fix will also stop the test suite from eventually filling up all of my /mnt/lfs partition with a runaway test process that never ends! I'm probably not going to get a chance to test this until after Christmas though.

comment:3 by bdubbs@…, 11 years ago

Owner: changed from lfs-book@… to bdubbs@…
Priority: normalhigh
Status: newassigned
Type: enhancementdefect

I tried to move the make check to after the install, but still get a zombie process filling up the disk drive. The directory running the checks does get deleted, so the disk is filled with no inodes pointing to it. When the process is killed, the space is freed up.

When I looked at it this morning, I had three processes running. The test that uses e2fsprogs-1.42.6/tests/f_mmp/script has:

kill_debugfs() {
   trap 0
   PID=$(ps -o pid,command | grep -v awk |
      awk "/debugfs -w $TMPFILE/ { print \$1 }")
   [ "x$PID" != "x" ] && kill -9 $PID
}

# this will cause debugfs to create the $test_name.mark file once it has
# passed the MMP startup, then continue reading input until it is killed

MARKFILE=$test_name.new
rm -f $MARKFILE
trap kill_debugfs EXIT
echo "set mmp sequence to EXT2_MMP_SEQ_FSCK..." >> $test_name.log
( { echo dump_mmp; echo "dump_inode <2> $MARKFILE"; cat /dev/zero; } |
   $DEBUGFS -w $TMPFILE >> $test_name.log 2>&1 & ) > /dev/null 2>&1 &
echo "wait until debugfs has started ..." >> $test_name.log
while [ ! -e $MARKFILE ]; do
   sleep 1
done
rm -f $MARKFILE
echo "kill debugfs abruptly (simulates e2fsck failure) ..." >> $test_name.log
kill_debugfs

I'm wondering if there is a race here in that the MARKFILE is created before the first sleep occurs and then the kill_debugfs call to ps doesn't find debugfs.

Perhaps a forced 'sleep 1' before the while loop would help.

Alternatively, because we are running in a Makefile, the ps command is not finding the process. A change from ps -o to ps -ao may work.

The third alternative is to just skip the f_mmp test. I'll run some tests and report back.

comment:4 by Gilles Espinasse, 11 years ago

Concerning the failure to build on make check, tytso send me a patch, not yet commited to the git tree. Unfortunatly, the patch is white space damaged. Running make check after install is the simpliest solution.

Concerning ps, it is just not yet build. Fixing that may require building procps earlier. I haven't tested if this is doable without drawback (and procps-3.3.6 should be released very soon).

I am inclined to skip f_mmp test for 1.42.6 doing something like (in a Makefile, remove the double $$ in a bash script)

echo 'echo "$$test_name: $$test_description: skipped ps no build"' >tests/f_mmp/script

comment:5 by bdubbs@…, 11 years ago

Duh. Of course. I forgot completely that ps wasn't available yet. Moving procps up above e2fsutils would be quite easy. All it's dependencies are in Chapter 5.

Can you send a copy of the patch you got. Even if whitespace is an issue, I'd like to see it.

comment:6 by bdubbs@…, 11 years ago

We have two issues mixed in this ticket. The second issue, missing ps, has been resolved.

I cannot completely duplicate the first issue. I built a complete system via jhalfs, but I changed my generated script for the check to a simple 'make check' but left it before the install phase. I also deleted the '
true' pipeline that ignores check errors, The full output was put into the test log including the:

/usr/bin/ld: warning: libcom_err.so.2, needed by ../../lib/libss.so, not found (try using -rpath or -rpath-link)

message, but make did not stop and all 125 tests passed.

I don't think the warning caused the problem and it can be ignored. I recommend changing this to fixed, but would like additional feedback.

comment:7 by Matthew Burgess, 11 years ago

I think the warning can be ignored too; I'm running a test build now with 'make -k check' changed to a plain 'make check'; my jhalfs config breaks on all testsuite failures, so didn't generate the '
true' pipeline. I'll close this ticket once e2fsprogs is built and tested without errors.

comment:8 by Matthew Burgess, 11 years ago

Resolution: fixed
Status: assignedclosed

Confirmed; I still get the warning, but all tests pass. '-k' switch removed in r10085.

Note: See TracTickets for help on using tickets.