Ticket #2691 (new defect)

Opened 11 years ago

Last modified 7 months ago

Error (cross)compiling mc 4.8.1

Reported by: zyxmon Owned by:
Priority: major Milestone: Future Releases
Component: cross-compilation Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:


The configure script seems to work correct.
In config.h the variables


are undefined.

In this case there is an error compiling mc:

mountlist.c: In function 'get_fs_usage':
mountlist.c:1442: error: 'fsd' undeclared (first use in this  function)

There IS a bug in defines in the function get_fs_usage(...)


config.h (27.0 KB) - added by zyxmon 11 years ago.

Change History

comment:1 Changed 11 years ago by andrew_b

Could you please attach your config.h here?

Changed 11 years ago by zyxmon


comment:2 Changed 11 years ago by zyxmon

Added my config.h

comment:3 in reply to: ↑ description Changed 11 years ago by andrew_b

Replying to zyxmon:

There IS a bug in defines in the function get_fs_usage(...)

Yes. But get_fs_usage() is get from gnulib almost as is (only trivial formatting was made). You can compare yourself the gnulib code and mc code.

So... you found a bug in gnulib. Please repost this bug to gnulib mailing list. Thanks!

Last edited 11 years ago by andrew_b (previous) (diff)

comment:4 Changed 11 years ago by zyxmon

I have fixed crosscompiling mc-4.8.1 by adding


to configuration script. May be this solution will help in other cases.

Gnu coreutils use the same get_fs_usage function. The issue is (quote):

"The coreutils configure script is unable determine how to get free
space from the Operating System when cross-compiling.
This changes caches the result of the "statfs2_bsize" test for the
coreutils configure script.
Both glibc and uclibc defines statfs as a two-argument function
and uses a struct statfs containing a f_bsize field. That's why
the fu_cv_sys_stat_statfs2_bsize variable has to be defined for
both libcs."

BTW I was crosscompiling for mips le platform with uclibc.

Version 1, edited 11 years ago by zyxmon (previous) (next) (diff)

comment:5 Changed 5 years ago by andrew_b

  • Component changed from mc-core to cross-compilation

comment:6 Changed 7 months ago by andrew_b

Ticket #2915 has been marked as a duplicate of this ticket.

Note: See TracTickets for help on using tickets.