OpenWrt/LEDE Project

  • Status Closed
  • Percent Complete
  • Task Type Build Failure
  • Category Toolchain
  • Assigned To No-one
  • Operating System All
  • Severity Medium
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by xnoreq - 17.05.2020
Last edited by Hauke Mehrtens - 24.05.2020

FS#3104 - tools/squashfs does not compile on gcc 10

openwrt master tools/squashfs does not compile on gcc 10:

make -C /home/user/dev/openwrt/build_dir/host/squashfs3.0/squashfs-tools CC="ccache gcc" CFLAGS="-O2 -I/home/user/dev/openwrt/staging_dir/host/include  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I." CXX="g++" LZMAPATH=/home/user/dev/openwrt/staging_dir/host/lib mksquashfs-lzma unsquashfs-lzma
make[4]: Entering directory '/home/user/dev/openwrt/build_dir/host/squashfs3.0/squashfs-tools'
ccache gcc -O2 -I/home/user/dev/openwrt/staging_dir/host/include  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I.   -c -o mksquashfs.o mksquashfs.c
mksquashfs.c: In function 'dir_scan':
mksquashfs.c:1568:2: warning: implicit declaration of function 'dir_scan2'; did you mean 'dir_scan'? [-Wimplicit-function-declaration]
 1568 |  dir_scan2(inode, dir_info);
      |  ^~~~~~~~~
      |  dir_scan
ccache gcc -O2 -I/home/user/dev/openwrt/staging_dir/host/include  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I.   -c -o read_fs.o read_fs.c
ccache gcc -O2 -I/home/user/dev/openwrt/staging_dir/host/include  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I.   -c -o sort.o sort.c
g++ mksquashfs.o read_fs.o sort.o -L/home/user/dev/openwrt/staging_dir/host/lib -llzma-old -o mksquashfs-lzma
/usr/bin/ld: read_fs.o:(.bss+0x0): multiple definition of `swap'; mksquashfs.o:(.bss+0x1b2a88): first defined here
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:11: mksquashfs-lzma] Error 1
make[4]: Leaving directory '/home/user/dev/openwrt/build_dir/host/squashfs3.0/squashfs-tools'
make[3]: *** [Makefile:42: /home/user/dev/openwrt/build_dir/host/squashfs3.0/.built] Error 2
make[3]: Leaving directory '/home/user/dev/openwrt/tools/squashfs'
time: tools/squashfs/compile#0.09#0.03#0.11
make[2]: *** [tools/Makefile:163: tools/squashfs/compile] Error 2
make[2]: Leaving directory '/home/user/dev/openwrt'
make[1]: *** [tools/Makefile:159: /home/user/dev/openwrt/staging_dir/host/stamp/.tools_compile_yyyyynnyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynynynyyyynnyyy] Error 2
make[1]: Leaving directory '/home/user/dev/openwrt'
make: *** [/home/user/dev/openwrt/include/ world] Error 2
Closed by  Hauke Mehrtens
24.05.2020 13:39
Reason for closing:  Fixed
Additional comments about closing:  

Fixed in https:/ / 53d68b2ba0b18683f and backported to 19.07 and 18.06.

xnoreq commented on 17.05.2020 15:29

Fyi, read_fs.c line 64 defines the global

int swap;

mksquashfs.c line 92 defines the same global again:

int swap, silent = TRUE;
MikePetullo commented on 25.05.2020 15:53
MikePetullo commented on 25.05.2020 23:52

This does indeed seem fixed. I was able to build an image for my Microtik RouterBoard 493G using GCC 10 on Fedora 32.

xnoreq commented on 26.05.2020 17:17

This issue is fixed but now there's the next issue:  FS#3127 


Available keyboard shortcuts


Task Details

Task Editing