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

Error while "make all install" on Debian 12 #28

Open
alekskomp opened this issue May 10, 2023 · 2 comments
Open

Error while "make all install" on Debian 12 #28

alekskomp opened this issue May 10, 2023 · 2 comments

Comments

@alekskomp
Copy link

alekskomp commented May 10, 2023

Hi.
Trying to install on Debian 12 beta

# make all install
make -C /lib/modules/6.1.0-8-amd64/build/ M=/root/ipt-ratelimit-0.3.2 modules CONFIG_DEBUG_INFO=y
make[1]: Entering directory '/usr/src/linux-headers-6.1.0-8-amd64'
  CC [M]  /root/ipt-ratelimit-0.3.2/xt_ratelimit.o
/root/ipt-ratelimit-0.3.2/xt_ratelimit.c: In function ‘ratelimit_proc_open’:
/root/ipt-ratelimit-0.3.2/xt_ratelimit.c:318:31: error: implicit declaration of function ‘PDE_DATA’; did you mean ‘NODE_DATA’? [-Werror=implicit-function-declaration]
  318 |                 sf->private = PDE_DATA(inode);
      |                               ^~~~~~~~
      |                               NODE_DATA
/root/ipt-ratelimit-0.3.2/xt_ratelimit.c:318:29: warning: assignment to ‘void *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  318 |                 sf->private = PDE_DATA(inode);
      |                             ^
/root/ipt-ratelimit-0.3.2/xt_ratelimit.c: In function ‘ratelimit_proc_write’:
/root/ipt-ratelimit-0.3.2/xt_ratelimit.c:623:42: warning: initialization of ‘struct xt_ratelimit_htable *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  623 |         struct xt_ratelimit_htable *ht = PDE_DATA(file_inode(file));
      |                                          ^~~~~~~~
/root/ipt-ratelimit-0.3.2/xt_ratelimit.c: In function ‘parse_rule’:
/root/ipt-ratelimit-0.3.2/xt_ratelimit.c:530:37: warning: this statement may fall through [-Wimplicit-fallthrough=]
  530 |                                 val = val / 8 + (val / 8 / 2);
      |                                 ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/root/ipt-ratelimit-0.3.2/xt_ratelimit.c:532:25: note: here
  532 |                         case 1:
      |                         ^~~~
/root/ipt-ratelimit-0.3.2/xt_ratelimit.c:534:37: warning: this statement may fall through [-Wimplicit-fallthrough=]
  534 |                                 val *= 2;
      |                                 ~~~~^~~~
/root/ipt-ratelimit-0.3.2/xt_ratelimit.c:536:25: note: here
  536 |                         case 2:
      |                         ^~~~
cc1: some warnings being treated as errors
make[2]: *** [/usr/src/linux-headers-6.1.0-8-common/scripts/Makefile.build:255: /root/ipt-ratelimit-0.3.2/xt_ratelimit.o] Error 1
make[1]: *** [/usr/src/linux-headers-6.1.0-8-common/Makefile:2037: /root/ipt-ratelimit-0.3.2] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.1.0-8-amd64'
make: *** [Makefile:12: xt_ratelimit.ko] Error 2
# uname -a
Linux  6.1.0-8-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.25-1 (2023-04-22) x86_64 GNU/Linux

Should i try version 0.3.3?

@alekskomp
Copy link
Author

Got this with version 0.3.3

# make all install 
make -C /lib/modules/6.1.0-8-amd64/build/ M=/root/ipt-ratelimit-0.3.3 modules
make[1]: Entering directory '/usr/src/linux-headers-6.1.0-8-amd64'
  CC [M]  /root/ipt-ratelimit-0.3.3/xt_ratelimit.o
/root/ipt-ratelimit-0.3.3/xt_ratelimit.c: In function ‘parse_rule’:
/root/ipt-ratelimit-0.3.3/xt_ratelimit.c:530:37: warning: this statement may fall through [-Wimplicit-fallthrough=]
  530 |                                 val = val / 8 + (val / 8 / 2);
      |                                 ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/root/ipt-ratelimit-0.3.3/xt_ratelimit.c:532:25: note: here
  532 |                         case 1:
      |                         ^~~~
/root/ipt-ratelimit-0.3.3/xt_ratelimit.c:534:37: warning: this statement may fall through [-Wimplicit-fallthrough=]
  534 |                                 val *= 2;
      |                                 ~~~~^~~~
/root/ipt-ratelimit-0.3.3/xt_ratelimit.c:536:25: note: here
  536 |                         case 2:
      |                         ^~~~
  MODPOST /root/ipt-ratelimit-0.3.3/Module.symvers
  CC [M]  /root/ipt-ratelimit-0.3.3/xt_ratelimit.mod.o
  LD [M]  /root/ipt-ratelimit-0.3.3/xt_ratelimit.ko
  BTF [M] /root/ipt-ratelimit-0.3.3/xt_ratelimit.ko
Skipping BTF generation for /root/ipt-ratelimit-0.3.3/xt_ratelimit.ko due to unavailability of vmlinux
make[1]: Leaving directory '/usr/src/linux-headers-6.1.0-8-amd64'
sync
gcc -O2 -Wall -Wunused -fPIC   -o libxt_ratelimit_sh.o -c libxt_ratelimit.c
gcc -shared -o libxt_ratelimit.so libxt_ratelimit_sh.o
/usr/bin/ld: libxt_ratelimit_sh.o: in function `_init':
libxt_ratelimit.c:(.text+0x210): multiple definition of `_init'; /usr/lib/gcc/x86_64-linux-gnu/12/../../../x86_64-linux-gnu/crti.o:(.init+0x0): first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:19: libxt_ratelimit.so] Error 1
rm libxt_ratelimit_sh.o

@manchelsi
Copy link

pr: #27

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

No branches or pull requests

2 participants