Skip to content

No longer builds Arch 6.12.1 - unaligned.h #237

Description

@jayray-git

Getting the following build error that is fixable:
Compiling 2.6-17-g0eb2092-dirty for kernel 6.12.1-arch1-1
make -C /lib/modules/6.12.1-arch1-1/build M=/root/ipt-netflow modules
make[1]: Entering directory '/usr/lib/modules/6.12.1-arch1-1/build'
CC [M] /root/ipt-netflow/ipt_NETFLOW.o
/root/ipt-netflow/ipt_NETFLOW.c:71:10: fatal error: asm/unaligned.h: No such file or directory
71 | #include <asm/unaligned.h>
| ^~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:229: /root/ipt-netflow/ipt_NETFLOW.o] Error 1
make[2]: *** [/usr/lib/modules/6.12.1-arch1-1/build/Makefile:1936: /root/ipt-netflow] Error 2
make[1]: *** [Makefile:224: __sub-make] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.12.1-arch1-1/build'
make: *** [Makefile:27: ipt_NETFLOW.ko] Error 2
Compiling 2.6-17-g0eb2092-dirty for kernel 6.12.1-arch1-1
make -C /lib/modules/6.12.1-arch1-1/build M=/root/ipt-netflow modules
make[1]: Entering directory '/usr/lib/modules/6.12.1-arch1-1/build'
CC [M] /root/ipt-netflow/ipt_NETFLOW.o
/root/ipt-netflow/ipt_NETFLOW.c:71:10: fatal error: asm/unaligned.h: No such file or directory
71 | #include <asm/unaligned.h>
| ^~~~~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [scripts/Makefile.build:229: /root/ipt-netflow/ipt_NETFLOW.o] Error 1
make[2]: *** [/usr/lib/modules/6.12.1-arch1-1/build/Makefile:1936: /root/ipt-netflow] Error 2
make[1]: *** [Makefile:224: __sub-make] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.12.1-arch1-1/build'
make: *** [Makefile:27: ipt_NETFLOW.ko] Error 2

#change the following:
< #include <asm/unaligned.h>

#include <linux/unaligned.h>

Then the build error is this array:
Compiling 2.6-17-g0eb2092-dirty for kernel 6.12.1-arch1-1
make -C /lib/modules/6.12.1-arch1-1/build M=/root/ipt-netflow modules
make[1]: Entering directory '/usr/lib/modules/6.12.1-arch1-1/build'
CC [M] /root/ipt-netflow/ipt_NETFLOW.o
In file included from /root/ipt-netflow/ipt_NETFLOW.c:77:
/root/ipt-netflow/compat.h:219:15: warning: no previous prototype for 'timeval_to_jiffies' [-Wmissing-prototypes]
219 | unsigned long timeval_to_jiffies(const struct timeval *tv)
| ^~~~~~~~~~~~~~~~~~
/root/ipt-netflow/compat.h:384:20: warning: no previous prototype for 'compat_hex_to_bin' [-Wmissing-prototypes]
384 | #define hex_to_bin compat_hex_to_bin
| ^~~~~~~~~~~~~~~~~
/root/ipt-netflow/compat.h:386:5: note: in expansion of macro 'hex_to_bin'
386 | int hex_to_bin(char ch)
| ^~~~~~~~~~
/root/ipt-netflow/compat.h:716:20: warning: no previous prototype for 'strtoul' [-Wmissing-prototypes]
716 | unsigned long long strtoul(const char *cp, char **endp, unsigned int base)
| ^~~~~~~
/root/ipt-netflow/ipt_NETFLOW.c:3538:20: error: conflicting types for 'put_unaligned_be24'; have 'void(u32, unsigned char *)' {aka 'void(unsigned int, unsigned char *)'}
3538 | static inline void put_unaligned_be24(u32 val, unsigned char *p)
| ^~~~~~~~~~~~~~~~~~
In file included from ./include/linux/etherdevice.h:24,
from /root/ipt-netflow/ipt_NETFLOW.c:38:
./include/linux/unaligned.h:103:20: note: previous definition of 'put_unaligned_be24' with type 'void(const u32, void *)' {aka 'void(const unsigned int, void *)'}
103 | static inline void put_unaligned_be24(const u32 val, void *p)
| ^~~~~~~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:229: /root/ipt-netflow/ipt_NETFLOW.o] Error 1
make[2]: *** [/usr/lib/modules/6.12.1-arch1-1/build/Makefile:1936: /root/ipt-netflow] Error 2
make[1]: *** [Makefile:224: __sub-make] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.12.1-arch1-1/build'
make: *** [Makefile:27: ipt_NETFLOW.ko] Error 2

Anyone want to give me a hand in fixing this?
error: conflicting types for 'put_unaligned_be24'; have 'void(u32, unsigned char *)' {aka 'void(unsigned int, unsigned char *)'}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions