Ticket #4464 (closed defect: fixed)

Opened 19 months ago

Last modified 19 months ago

FTBFS without ext2fs attributes support

Reported by: karlson2k Owned by: andrew_b
Priority: major Milestone: 4.8.30
Component: compilation Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

Discovered when built on Solaris.

info.c: In function ‘info_show_info’:
info.c:269:50: warning: implicit declaration of function ‘chattr_get_as_str’ [-Wimplicit-function-declaration]
  269 |                 tty_printf (_("Attributes: %s"), chattr_get_as_str (attr));
      |                                                  ^~~~~~~~~~~~~~~~~
info.c:269:50: warning: nested extern declaration of ‘chattr_get_as_str’ [-Wnested-externs]
In file included from info.c:38:

and then

Undefined                       first referenced
 symbol                             in file
chattr_get_as_str                   ./.libs/libinternal.a(info.o)
ld: fatal: symbol referencing errors

I do not have any ext2fs library on Solaris, so mc is configured without ext2fs attributes support.
The suggested fix: https://github.com/MidnightCommander/mc/pull/188
Alternative fix: https://github.com/MidnightCommander/mc/pull/189

Attachments

0001-FTBFS-without-ext2fs-attributes-support.patch (892 bytes) - added by karlson2k 19 months ago.
Suggested fix
0001-FTBFS-without-ext2fs-attributes-support-alt.patch (898 bytes) - added by karlson2k 19 months ago.
Alternative fix

Change History

Changed 19 months ago by karlson2k

Suggested fix

comment:1 Changed 19 months ago by karlson2k

Function chattr_cmd is declared in src/filemanager/cmd.h as

#ifdef ENABLE_EXT2FS_ATTR
/* chattr.c */
void chattr_cmd (WPanel * panel);
const char *chattr_get_as_str (unsigned long attr);
#endif

Version 0, edited 19 months ago by karlson2k (next)

Changed 19 months ago by karlson2k

Alternative fix

comment:2 Changed 19 months ago by andrew_b

  • Owner set to andrew_b
  • Status changed from new to accepted
  • Milestone changed from Future Releases to 4.8.30

comment:3 Changed 19 months ago by andrew_b

  • Branch state changed from no branch to on review

Thanks!

Branch: 4464_FTBFS_without_ext2fs_attrs
changeset:cfe9ae814bd48876865966bb98d82797968a2558

comment:4 Changed 19 months ago by andrew_b

  • Votes for changeset set to andrew_b
  • Branch state changed from on review to approved

comment:5 Changed 19 months ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from andrew_b to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

comment:6 Changed 19 months ago by andrew_b

  • Status changed from testing to closed

comment:7 follow-up: ↓ 8 Changed 19 months ago by karlson2k

I've tested the git master. Now dist could be made (tested on Debian Sid) and then mc could be built on Solaris.

However, there are a few compiler warnings, including the warning introduced by this patch:

info.c: In function ‘info_show_info’:
info.c:264:27: warning: unused variable ‘attr’ [-Wunused-variable]
  264 |             unsigned long attr;
      |                           ^~~~

The alternative patch could fix this warning as well.

comment:8 in reply to: ↑ 7 Changed 19 months ago by andrew_b

Replying to karlson2k:

However, there are a few compiler warnings, including the warning introduced by this patch:

I've fixed that in the 4426_cleanup branch. But not pushed yet.

Last edited 19 months ago by andrew_b (previous) (diff)
Note: See TracTickets for help on using tickets.