Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
openwrt-bot opened this issue May 17, 2020 · 4 comments
Closed

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

openwrt-bot opened this issue May 17, 2020 · 4 comments
Labels

Comments

@openwrt-bot
Copy link

xnoreq:

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/toplevel.mk:220: world] Error 2

@openwrt-bot
Copy link
Author

xnoreq:

Fyi, read_fs.c line 64 defines the global
int swap;

mksquashfs.c line 92 defines the same global again:
int swap, silent = TRUE;

@openwrt-bot
Copy link
Author

MikePetullo:

See also http://lists.infradead.org/pipermail/openwrt-devel/2020-May/023212.html from May 3, 2020.

@openwrt-bot
Copy link
Author

MikePetullo:

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

@openwrt-bot
Copy link
Author

xnoreq:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant