OpenWrt/LEDE Project

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category Packages
  • Assigned To
    Hans Dedecker
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by MikePetullo - 19.08.2018
Last edited by Hans Dedecker - 08.10.2018

FS#1796 - e2fsprogs does not compile against glibc

The e2fsprogs package fails to build when I configure the OpenWrt build process to produce an image for x86/x86_64 using glibc. I am using OpenWrt master as of commit d1ea8ac3b476e1e552f42dbf1042b521c57a0df4.

From what I can tell, a number of the programs in e2fsprogs need to link against -lpthread when using glibc. However, several Makefiles (for example, e2fsck/Makefile) contain the following:

      LIBCOM_ERR = $(LIB)/libcom_err.so # -lpthread

It looks like the ‘#’ character is a result of the definition of @PRIVATE_LIBS_CMT@ which autotools uses to transform MCONFIG.in into MCONFIG. This, in turn, seems to follow from the use of –enable-elf-shlibs in the OpenWrt package definition.

Here is the tail end of a failed build:

LD e2fsck
e2fsck.h:598:13: warning: type of ‘fatal_error’ does not match original declaration [-Wlto-type-mismatch]
extern void fatal_error(e2fsck_t ctx, const char * fmt_string);

           ^

util.c:53:6: note: ‘fatal_error’ was previously declared here
void fatal_error(e2fsck_t ctx, const char *msg)

    ^

util.c:53:6: note: code may be misoptimized unless -fno-strict-aliasing is used
jfs_user.h:208:17: warning: type of ‘e2fsck_global_ctx’ does not match original declaration [-Wlto-type-mismatch]
extern e2fsck_t e2fsck_global_ctx; /* Try your very best not to use this! */

               ^

e2fsck.h:221:31: note: type ‘struct e2fsck_struct *’ should match type ‘struct e2fsck_struct *’ typedef struct e2fsck_struct *e2fsck_t;

                             ^

unix.c:68:10: note: ‘e2fsck_global_ctx’ was previously declared here
e2fsck_t e2fsck_global_ctx; /* Try your very best not to use this! */

        ^

unix.c:68:10: note: code may be misoptimized unless -fno-strict-aliasing is used
../lib/libcom_err.so: undefined reference to `sem_post’ ../lib/libcom_err.so: undefined reference to `sem_wait’ ../lib/libcom_err.so: undefined reference to `sem_init’ ../lib/libcom_err.so: undefined reference to `sem_destroy’ collect2: error: ld returned 1 exit status

Closed by  Hans Dedecker
08.10.2018 15:25
Reason for closing:  Fixed
Additional comments about closing:  

Fixed in commit https://git.o penwrt.org/?p=openwrt/openwrt.git;a=comm it;h=16c712501cdcb10f333f4abc027a0dcdb8f 8101b

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing