| View previous topic :: View next topic |
| Author |
Message |
josephg l33t


Joined: 10 Jan 2016 Posts: 783 Location: usually offline
|
Posted: Tue Oct 09, 2018 1:19 pm Post subject: net-firewall/nftables -gmp |
|
|
I wanted to emerge nftables without dependency dev-lib/gmp, in order to use the builtin mini-gmp. Alas, compile fails with the errors below.
| Code: | >>> Compiling source in /var/tmp/portage/net-firewall/nftables-0.8-r3/work/v0.8 ...
make --jobs=5 --load-average=2 --silent
Making all in src
updating parser_bison.h
main.c: In function 'nft_gmp_print':
main.c:410:8: warning: implicit declaration of function 'gmp_vfprintf'; did you mean 'gmp_printf'? [-Wimplicit-function-declaration]
ret = gmp_vfprintf(octx->output_fp, fmt, arg);
^~~~~~~~~~~~
gmp_printf
In file included from ../include/utils.h:12:0,
from ../include/nftables.h:6,
from ../include/rule.h:5,
from segtree.c:15:
segtree.c: In function 'ei_insert':
../include/gmputil.h:12:20: error: too many arguments to function 'mpz_printf'
#define gmp_printf mpz_printf
^
../include/utils.h:18:35: note: in expansion of macro 'gmp_printf'
#define pr_gmp_debug(fmt, arg...) gmp_printf(fmt, ##arg)
^~~~~~~~~~
segtree.c:199:3: note: in expansion of macro 'pr_gmp_debug'
pr_gmp_debug("insert: [%Zx %Zx]\n", new->left, new->right);
^~~~~~~~~~~~
../include/gmputil.h:11:12: note: declared here
extern int mpz_printf(const char *format, const mpz_t value);
^~~~~~~~~~
../include/gmputil.h:12:20: error: too many arguments to function 'mpz_printf'
#define gmp_printf mpz_printf
^
../include/utils.h:18:35: note: in expansion of macro 'gmp_printf'
#define pr_gmp_debug(fmt, arg...) gmp_printf(fmt, ##arg)
^~~~~~~~~~
segtree.c:209:4: note: in expansion of macro 'pr_gmp_debug'
pr_gmp_debug("split [%Zx %Zx]\n", lei->left, lei->right);
^~~~~~~~~~~~
../include/gmputil.h:11:12: note: declared here
extern int mpz_printf(const char *format, const mpz_t value);
^~~~~~~~~~
../include/gmputil.h:12:20: error: too many arguments to function 'mpz_printf'
#define gmp_printf mpz_printf
^
../include/utils.h:18:35: note: in expansion of macro 'gmp_printf'
#define pr_gmp_debug(fmt, arg...) gmp_printf(fmt, ##arg)
^~~~~~~~~~
segtree.c:229:5: note: in expansion of macro 'pr_gmp_debug'
pr_gmp_debug("adjust left [%Zx %Zx]\n",
^~~~~~~~~~~~
../include/gmputil.h:11:12: note: declared here
extern int mpz_printf(const char *format, const mpz_t value);
^~~~~~~~~~
../include/gmputil.h:12:20: error: too many arguments to function 'mpz_printf'
#define gmp_printf mpz_printf
^
../include/utils.h:18:35: note: in expansion of macro 'gmp_printf'
#define pr_gmp_debug(fmt, arg...) gmp_printf(fmt, ##arg)
^~~~~~~~~~
segtree.c:247:5: note: in expansion of macro 'pr_gmp_debug'
pr_gmp_debug("adjust right [%Zx %Zx]\n",
^~~~~~~~~~~~
../include/gmputil.h:11:12: note: declared here
extern int mpz_printf(const char *format, const mpz_t value);
^~~~~~~~~~
segtree.c: In function 'segtree_linearize':
../include/gmputil.h:12:20: error: too many arguments to function 'mpz_printf'
#define gmp_printf mpz_printf
^
../include/utils.h:18:35: note: in expansion of macro 'gmp_printf'
#define pr_gmp_debug(fmt, arg...) gmp_printf(fmt, ##arg)
^~~~~~~~~~
segtree.c:468:4: note: in expansion of macro 'pr_gmp_debug'
pr_gmp_debug("iter: [%Zx %Zx]\n", ei->left, ei->right);
^~~~~~~~~~~~
../include/gmputil.h:11:12: note: declared here
extern int mpz_printf(const char *format, const mpz_t value);
^~~~~~~~~~
In file included from ../include/nftables.h:6:0,
from ../include/rule.h:5,
from segtree.c:15:
segtree.c: In function 'set_to_intervals':
segtree.c:568:10: warning: passing argument 2 of 'mpz_printf' makes pointer from integer without a cast [-Wint-conversion]
2 * tree.keylen / BITS_PER_BYTE, ei->left,
^
../include/utils.h:18:53: note: in definition of macro 'pr_gmp_debug'
#define pr_gmp_debug(fmt, arg...) gmp_printf(fmt, ##arg)
^~~
In file included from ../include/utils.h:12:0,
from ../include/nftables.h:6,
from ../include/rule.h:5,
from segtree.c:15:
../include/gmputil.h:11:12: note: expected 'const __mpz_struct * {aka const struct <anonymous> *}' but argument is of type 'unsigned int'
extern int mpz_printf(const char *format, const mpz_t value);
^~~~~~~~~~
../include/gmputil.h:12:20: error: too many arguments to function 'mpz_printf'
#define gmp_printf mpz_printf
^
../include/utils.h:18:35: note: in expansion of macro 'gmp_printf'
#define pr_gmp_debug(fmt, arg...) gmp_printf(fmt, ##arg)
^~~~~~~~~~
segtree.c:567:4: note: in expansion of macro 'pr_gmp_debug'
pr_gmp_debug("list: [%.*Zx %.*Zx]\n",
^~~~~~~~~~~~
../include/gmputil.h:11:12: note: declared here
extern int mpz_printf(const char *format, const mpz_t value);
^~~~~~~~~~
../include/gmputil.h:12:20: error: too few arguments to function 'mpz_printf'
#define gmp_printf mpz_printf
^
../include/utils.h:18:35: note: in expansion of macro 'gmp_printf'
#define pr_gmp_debug(fmt, arg...) gmp_printf(fmt, ##arg)
^~~~~~~~~~
segtree.c:577:3: note: in expansion of macro 'pr_gmp_debug'
pr_gmp_debug("\n");
^~~~~~~~~~~~
../include/gmputil.h:11:12: note: declared here
extern int mpz_printf(const char *format, const mpz_t value);
^~~~~~~~~~
make[3]: *** [Makefile:474: segtree.o] Error 1
make[2]: *** [Makefile:345: all] Error 2
make[1]: *** [Makefile:395: all-recursive] Error 1
make: *** [Makefile:336: all] Error 2
* ERROR: net-firewall/nftables-0.8-r3::gentoo failed (compile phase):
* emake failed |
_________________ "Growth for the sake of growth is the ideology of the cancer cell." Edward Abbey |
|
| Back to top |
|
 |
Anon-E-moose Watchman


Joined: 23 May 2008 Posts: 6139 Location: Dallas area
|
Posted: Tue Oct 09, 2018 1:41 pm Post subject: |
|
|
I would imagine that you'll have to add those by way of a patch.
But it brings up the question of why use the mini, if you're using gcc it likely pulls gmp in.
Edit to add: it looks like the mini-gmp was derived from gmp quite a while back and hasn't been updated in a while.
ETA2: if you're using the 0.8-r3 you might try either the 0.8.5 or 0.9*, it seems there were updates during 0.8.4 but don't know if it will fix the problem _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Last edited by Anon-E-moose on Tue Oct 09, 2018 2:00 pm; edited 3 times in total |
|
| Back to top |
|
 |
josephg l33t


Joined: 10 Jan 2016 Posts: 783 Location: usually offline
|
Posted: Tue Oct 09, 2018 1:43 pm Post subject: |
|
|
After a few days of unsuccessfully attempting to emerge nftables with -gmp, I just tried each of the higher versions marked unstable.
I can successfully emerge both unstable versions nftables-0.8.5 and nftables-0.9.0 with -gmp.
So it seems only the current stable version of nftables-0.8-r3 is suspect. _________________ "Growth for the sake of growth is the ideology of the cancer cell." Edward Abbey |
|
| Back to top |
|
 |
fedeliallalinea Administrator


Joined: 08 Mar 2003 Posts: 31097 Location: here
|
|
| Back to top |
|
 |
Anon-E-moose Watchman


Joined: 23 May 2008 Posts: 6139 Location: Dallas area
|
Posted: Tue Oct 09, 2018 1:46 pm Post subject: |
|
|
josephg see ETA2 from above.  _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
| Back to top |
|
 |
josephg l33t


Joined: 10 Jan 2016 Posts: 783 Location: usually offline
|
Posted: Tue Oct 09, 2018 2:21 pm Post subject: |
|
|
Wow that bug is long outstanding almost a year old. Thanks for letting me know. I have updated the bug, saying I can emerge both higher unstable versions successfully. Only the stable version is suspect. _________________ "Growth for the sake of growth is the ideology of the cancer cell." Edward Abbey |
|
| Back to top |
|
 |
Anon-E-moose Watchman


Joined: 23 May 2008 Posts: 6139 Location: Dallas area
|
Posted: Tue Oct 09, 2018 2:25 pm Post subject: |
|
|
I doubt they will update the old 0.8, it would be better if they made 0.8.5 the new stable _________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|