Open CatspersCoffee opened 5 years ago
Removing the -Werror flags from share/mk-pic32/local.prog.mk
and share/mk-pic32/sys.mk
should fix your problem.
adding
to files: usr.sbin/config/mkswapconf.c and usr.sbin/config/config.c
works
Your solution is less than desirable since that's a Linux-specific solution. If the glibc people are going to make an ABI change, then the proper solution is to detect broken glibc versions and work around them, not force everyone to inherit broken glibc problems.
Thanks @ibara , implemented your solution removing -Werror flags. compiles fine. thankyou
my original solution was not meant to be long term or merged into the project. It was only to get it compiled for me at the time. Im using gcc version 7.4.0, just for your information - if you want to implement a solution to use the -Werror flags and check compiler version.
thanks for the quick reply! :-)
Also get a few error when building file system:
:~/LiteBSD$ bmake fs
make -C`dirname contrib/ufstool/ufstool`
make[1]: Entering directory '/home/xx/LiteBSD/contrib/ufstool'
cc -O1 -g -Wall -Werror -c -o block.o block.c
cc -O1 -g -Wall -Werror -c -o cgroup.o cgroup.c
cc -O1 -g -Wall -Werror -c -o disk.o disk.c
cc -O1 -g -Wall -Werror -c -o inode.o inode.c
cc -O1 -g -Wall -Werror -c -o sblock.o sblock.c
cc -O1 -g -Wall -Werror -c -o bitmap.o bitmap.c
cc -O1 -g -Wall -Werror -c -o mkfs.o mkfs.c
cc -O1 -g -Wall -Werror -c -o check.o check.c
cc -O1 -g -Wall -Werror -c -o check_suj.o check_suj.c
ar cr libufs.a block.o cgroup.o disk.o inode.o sblock.o bitmap.o mkfs.o check.o check_suj.o
cc -O1 -g -Wall -Werror -c -o ufstool.o ufstool.c
cc -O1 -g -Wall -Werror -c -o manifest.o manifest.c
cc -O1 -g -Wall -Werror `pkg-config --cflags fuse` -c -o mount.o mount.c
/bin/sh: 1: pkg-config: not found
In file included from /usr/include/fuse/fuse.h:26:0,
from /usr/include/fuse.h:9,
from mount.c:32:
/usr/include/fuse/fuse_common.h:33:2: error: #error Please add -D_FILE_OFFSET_BITS=64 to your compile flags!
#error Please add -D_FILE_OFFSET_BITS=64 to your compile flags!
^~~~~
mount.c: In function ‘make_rdev’:
mount.c:56:13: error: In the GNU C Library, "makedev" is defined
by <sys/sysmacros.h>. For historical compatibility, it is
currently defined by <sys/types.h> as well, but we plan to
remove this soon. To use "makedev", include <sys/sysmacros.h>
directly. If you did not intend to use a system-defined macro
"makedev", you should undefine it after including <sys/types.h>. [-Werror]
return makedev (raw >> 8, raw & 0xff);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mount.c: In function ‘op_mknod’:
mount.c:552:13: error: In the GNU C Library, "major" is defined
by <sys/sysmacros.h>. For historical compatibility, it is
currently defined by <sys/types.h> as well, but we plan to
remove this soon. To use "major", include <sys/sysmacros.h>
directly. If you did not intend to use a system-defined macro
"major", you should undefine it after including <sys/types.h>. [-Werror]
inode.daddr[0] = major(dev) << 8 | minor(dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mount.c:552:13: error: In the GNU C Library, "minor" is defined
by <sys/sysmacros.h>. For historical compatibility, it is
currently defined by <sys/types.h> as well, but we plan to
remove this soon. To use "minor", include <sys/sysmacros.h>
directly. If you did not intend to use a system-defined macro
"minor", you should undefine it after including <sys/types.h>. [-Werror]
cc1: all warnings being treated as errors
Makefile:28: recipe for target 'mount.o' failed
make[1]: *** [mount.o] Error 1
make[1]: Leaving directory '/home/xx/LiteBSD/contrib/ufstool'
*** Error code 2
modified the line: CFLAGS = -O1 -g -Wall -D_FILE_OFFSET_BITS=64
in file LiteBSD/contrib/ufstool/Makefile and installed package "pkg-config"
just wondering if these changes should be made to the build files, or would you like to make more significant changes to keep using -Werror flag ? @ibara
It's disappointing to see glibc changes breaking the build. I'm not a Linux user myself (I use OpenBSD) so I'll have to think about what a good solution is going forward. It would be nice to keep the -Werror flags. Adding a note about needing pkg-config installed is certainly easy. I'll come up with something soon.
I have already created a pull request (#75) to fix this issue.
Hi all, trying to compile the kernel and getting error: