* nftables-20140407 compilation error @ 2014-04-09 9:17 Nazim Wahid Djafar 2014-04-09 9:51 ` Florian Westphal 2014-04-09 10:26 ` Arturo Borrero Gonzalez 0 siblings, 2 replies; 9+ messages in thread From: Nazim Wahid Djafar @ 2014-04-09 9:17 UTC (permalink / raw) To: netfilter-devel There is an error of compilation of nftables-20140407 on Debian 7.0 Wheezy (eglibc 2.13 ) nwd@mozart:~/lab/nftables/nftables-20140407$ LANG=us_EN make -e SUBDIR src/ -e LEX src/scanner.l -e YACC src/parser.y -e DEP src/scanner.c -e DEP src/parser.c -e DEP src/mnl.c -e DEP src/erec.c -e DEP src/utils.c -e DEP src/gmputil.c -e DEP src/rbtree.c -e DEP src/segtree.c -e DEP src/netlink_delinearize.c -e DEP src/netlink_linearize.c -e DEP src/netlink.c -e DEP src/ct.c -e DEP src/meta.c -e DEP src/exthdr.c -e DEP src/payload.c -e DEP src/proto.c -e DEP src/evaluate.c -e DEP src/expression.c -e DEP src/datatype.c -e DEP src/statement.c -e DEP src/rule.c -e DEP src/cli.c -e DEP src/main.c -e YACC src/parser.y -e DEP src/parser.c -e DEP src/scanner.c -e CC src/main.c -e CC src/cli.c -e CC src/rule.c -e CC src/statement.c -e CC src/datatype.c -e CC src/expression.c -e CC src/evaluate.c -e CC src/proto.c -e CC src/payload.c -e CC src/exthdr.c -e CC src/meta.c -e CC src/ct.c -e CC src/netlink.c -e CC src/netlink_linearize.c -e CC src/netlink_delinearize.c -e CC src/segtree.c -e CC src/rbtree.c -e CC src/gmputil.c -e CC src/utils.c -e CC src/erec.c -e CC src/mnl.c -e CC src/parser.c -e CC src/scanner.c -e LD src/nft src/scanner.o: In function `nft_realloc': /home/nwd/lab/nftables/nftables-20140407/<stdout>:4260: undefined reference to `rpl_realloc' src/scanner.o: In function `nft_alloc': /home/nwd/lab/nftables/nftables-20140407/<stdout>:4248: undefined reference to `rpl_malloc' /home/nwd/lab/nftables/nftables-20140407/<stdout>:4248: undefined reference to `rpl_malloc' /home/nwd/lab/nftables/nftables-20140407/<stdout>:4248: undefined reference to `rpl_malloc' src/scanner.o: In function `nft_realloc': /home/nwd/lab/nftables/nftables-20140407/<stdout>:4260: undefined reference to `rpl_realloc' /home/nwd/lab/nftables/nftables-20140407/<stdout>:4260: undefined reference to `rpl_realloc' src/scanner.o: In function `nft_alloc': /home/nwd/lab/nftables/nftables-20140407/<stdout>:4248: undefined reference to `rpl_malloc' /home/nwd/lab/nftables/nftables-20140407/<stdout>:4248: undefined reference to `rpl_malloc' /home/nwd/lab/nftables/nftables-20140407/<stdout>:4248: undefined reference to `rpl_malloc' /home/nwd/lab/nftables/nftables-20140407/<stdout>:4248: undefined reference to `rpl_malloc' /home/nwd/lab/nftables/nftables-20140407/<stdout>:4248: undefined reference to `rpl_malloc' src/scanner.o: In function `nft_realloc': /home/nwd/lab/nftables/nftables-20140407/<stdout>:4260: undefined reference to `rpl_realloc' src/utils.o: In function `xmalloc': /home/nwd/lab/nftables/nftables-20140407/src/utils.c:36: undefined reference to `rpl_malloc' src/utils.o: In function `xrealloc': /home/nwd/lab/nftables/nftables-20140407/src/utils.c:44: undefined reference to `rpl_realloc' src/parser.o: In function `nft_parse': /home/nwd/lab/nftables/nftables-20140407/src/parser.c:3419: undefined reference to `rpl_malloc' /home/nwd/lab/nftables/nftables-20140407/src/parser.c:6698: undefined reference to `rpl_malloc' collect2: error: ld returned 1 exit status make[1]: *** [src/nft] Error 1 make: *** [src] Error 2 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: nftables-20140407 compilation error 2014-04-09 9:17 nftables-20140407 compilation error Nazim Wahid Djafar @ 2014-04-09 9:51 ` Florian Westphal 2014-04-09 12:31 ` Pablo Neira Ayuso 2014-04-09 10:26 ` Arturo Borrero Gonzalez 1 sibling, 1 reply; 9+ messages in thread From: Florian Westphal @ 2014-04-09 9:51 UTC (permalink / raw) To: Nazim Wahid Djafar; +Cc: netfilter-devel Nazim Wahid Djafar <nwd.dev@gmail.com> wrote: > There is an error of compilation of nftables-20140407 on Debian 7.0 > Wheezy (eglibc 2.13 ) > src/scanner.o: In function `nft_realloc': > /home/nwd/lab/nftables/nftables-20140407/<stdout>:4260: undefined > reference to `rpl_realloc' This happens when configure thinks malloc/realloc are missing. Any objetions wrt. removing AC_FUNC_MALLOC/AC_FUNC_REALLOC from nftables configure.ac? ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: nftables-20140407 compilation error 2014-04-09 9:51 ` Florian Westphal @ 2014-04-09 12:31 ` Pablo Neira Ayuso 2014-04-09 15:29 ` Florian Westphal 0 siblings, 1 reply; 9+ messages in thread From: Pablo Neira Ayuso @ 2014-04-09 12:31 UTC (permalink / raw) To: Florian Westphal; +Cc: Nazim Wahid Djafar, netfilter-devel On Wed, Apr 09, 2014 at 11:51:43AM +0200, Florian Westphal wrote: > Nazim Wahid Djafar <nwd.dev@gmail.com> wrote: > > There is an error of compilation of nftables-20140407 on Debian 7.0 > > Wheezy (eglibc 2.13 ) > > > src/scanner.o: In function `nft_realloc': > > /home/nwd/lab/nftables/nftables-20140407/<stdout>:4260: undefined > > reference to `rpl_realloc' > > This happens when configure thinks malloc/realloc are missing. > > Any objetions wrt. removing AC_FUNC_MALLOC/AC_FUNC_REALLOC from > nftables configure.ac? If that resolves the problem, please go ahead, thanks Florian. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: nftables-20140407 compilation error 2014-04-09 12:31 ` Pablo Neira Ayuso @ 2014-04-09 15:29 ` Florian Westphal 2014-04-09 18:44 ` Pablo Neira Ayuso 0 siblings, 1 reply; 9+ messages in thread From: Florian Westphal @ 2014-04-09 15:29 UTC (permalink / raw) To: Pablo Neira Ayuso; +Cc: Florian Westphal, Nazim Wahid Djafar, netfilter-devel Pablo Neira Ayuso <pablo@netfilter.org> wrote: > > > src/scanner.o: In function `nft_realloc': > > > /home/nwd/lab/nftables/nftables-20140407/<stdout>:4260: undefined > > > reference to `rpl_realloc' > > > > This happens when configure thinks malloc/realloc are missing. > > > > Any objetions wrt. removing AC_FUNC_MALLOC/AC_FUNC_REALLOC from > > nftables configure.ac? > > If that resolves the problem, please go ahead, thanks Florian. The problem is two-fold. When libnftnl has just been installed and is not yet in linker path, the malloc/realloc test will fail: configure:4557: gcc -o conftest -I/usr/local/libnftnl/include -L/usr/local/libnftnl/lib conftest.c -lreadline -lgmp -lnftnl -lmnl >&5 configure:4557: $? = 0 configure:4557: ./conftest ./conftest: error while loading shared libraries: libnftnl.so.0: cannot open shared object file: No such file or directory That error is only in config.log, and config.h redefines malloc/realloc with rpl_ prefix, which then yields the mysterious 'undefined reference to `rpl_realloc'' error when compiling nftables. The 2nd problem is that the macro executes the built program, which has the usual cross-compiling issue. AFAIU these macros are only useful to check if malloc(0) returns non-NULL and that realloc(NULL, .. works, hence the question if these should just be removed. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: nftables-20140407 compilation error 2014-04-09 15:29 ` Florian Westphal @ 2014-04-09 18:44 ` Pablo Neira Ayuso 2014-04-09 21:27 ` Florian Westphal 0 siblings, 1 reply; 9+ messages in thread From: Pablo Neira Ayuso @ 2014-04-09 18:44 UTC (permalink / raw) To: Florian Westphal; +Cc: Nazim Wahid Djafar, netfilter-devel, kaber On Wed, Apr 09, 2014 at 05:29:49PM +0200, Florian Westphal wrote: > Pablo Neira Ayuso <pablo@netfilter.org> wrote: > > > > src/scanner.o: In function `nft_realloc': > > > > /home/nwd/lab/nftables/nftables-20140407/<stdout>:4260: undefined > > > > reference to `rpl_realloc' > > > > > > This happens when configure thinks malloc/realloc are missing. > > > > > > Any objetions wrt. removing AC_FUNC_MALLOC/AC_FUNC_REALLOC from > > > nftables configure.ac? > > > > If that resolves the problem, please go ahead, thanks Florian. > > The problem is two-fold. When libnftnl has just been installed and > is not yet in linker path, the malloc/realloc test will fail: > > configure:4557: gcc -o conftest -I/usr/local/libnftnl/include > -L/usr/local/libnftnl/lib conftest.c -lreadline -lgmp -lnftnl -lmnl >&5 > configure:4557: $? = 0 > configure:4557: ./conftest > ./conftest: error while loading shared libraries: libnftnl.so.0: cannot > open shared object file: No such file or directory > > That error is only in config.log, and config.h redefines malloc/realloc > with rpl_ prefix, which then yields the mysterious > 'undefined reference to `rpl_realloc'' error when compiling nftables. > > The 2nd problem is that the macro executes the built program, which has > the usual cross-compiling issue. > > AFAIU these macros are only useful to check if malloc(0) returns > non-NULL and that realloc(NULL, .. works, hence the question if these > should just be removed. OK, so if we remove the macros, we may still hit the first problem, right? Patrick has some build updates in his queue, not sure if this removal may clash with his changes. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: nftables-20140407 compilation error 2014-04-09 18:44 ` Pablo Neira Ayuso @ 2014-04-09 21:27 ` Florian Westphal 2014-04-10 10:16 ` Patrick McHardy 0 siblings, 1 reply; 9+ messages in thread From: Florian Westphal @ 2014-04-09 21:27 UTC (permalink / raw) To: Pablo Neira Ayuso Cc: Florian Westphal, Nazim Wahid Djafar, netfilter-devel, kaber Pablo Neira Ayuso <pablo@netfilter.org> wrote: > On Wed, Apr 09, 2014 at 05:29:49PM +0200, Florian Westphal wrote: > > Pablo Neira Ayuso <pablo@netfilter.org> wrote: > > > > > src/scanner.o: In function `nft_realloc': > > > > > /home/nwd/lab/nftables/nftables-20140407/<stdout>:4260: undefined > > > > > reference to `rpl_realloc' > > > > > > > > This happens when configure thinks malloc/realloc are missing. > > > > > > > > Any objetions wrt. removing AC_FUNC_MALLOC/AC_FUNC_REALLOC from > > > > nftables configure.ac? > > > > > > If that resolves the problem, please go ahead, thanks Florian. > > > > The problem is two-fold. When libnftnl has just been installed and > > is not yet in linker path, the malloc/realloc test will fail: > > > > configure:4557: gcc -o conftest -I/usr/local/libnftnl/include > > -L/usr/local/libnftnl/lib conftest.c -lreadline -lgmp -lnftnl -lmnl >&5 > > configure:4557: $? = 0 > > configure:4557: ./conftest > > ./conftest: error while loading shared libraries: libnftnl.so.0: cannot > > open shared object file: No such file or directory > > > > That error is only in config.log, and config.h redefines malloc/realloc > > with rpl_ prefix, which then yields the mysterious > > 'undefined reference to `rpl_realloc'' error when compiling nftables. > > > > The 2nd problem is that the macro executes the built program, which has > > the usual cross-compiling issue. > > > > AFAIU these macros are only useful to check if malloc(0) returns > > non-NULL and that realloc(NULL, .. works, hence the question if these > > should just be removed. > > OK, so if we remove the macros, we may still hit the first problem, > right? No, since no "#define malloc rpl_malloc" will be done nft things will compile/link. You won't be able to run src/nft without fixing ld library path, but at least then you'll get a clear message as to where the problem is :-) > Patrick has some build updates in his queue, not sure if this removal > may clash with his changes. I see, I'll leave it alone then (at least until his changes are in). Thanks for the heads-up. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: nftables-20140407 compilation error 2014-04-09 21:27 ` Florian Westphal @ 2014-04-10 10:16 ` Patrick McHardy 2014-04-10 10:41 ` Florian Westphal 0 siblings, 1 reply; 9+ messages in thread From: Patrick McHardy @ 2014-04-10 10:16 UTC (permalink / raw) To: Florian Westphal; +Cc: Pablo Neira Ayuso, Nazim Wahid Djafar, netfilter-devel On Wed, Apr 09, 2014 at 11:27:14PM +0200, Florian Westphal wrote: > Pablo Neira Ayuso <pablo@netfilter.org> wrote: > > No, since no "#define malloc rpl_malloc" will be done nft things will > compile/link. You won't be able to run src/nft without fixing ld library > path, but at least then you'll get a clear message as to where the > problem is :-) > > > Patrick has some build updates in his queue, not sure if this removal > > may clash with his changes. > > I see, I'll leave it alone then (at least until his changes are in). Please go ahead, they're quite minimal and shouldn't be hard to merge if any conflicts occur. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: nftables-20140407 compilation error 2014-04-10 10:16 ` Patrick McHardy @ 2014-04-10 10:41 ` Florian Westphal 0 siblings, 0 replies; 9+ messages in thread From: Florian Westphal @ 2014-04-10 10:41 UTC (permalink / raw) To: Patrick McHardy Cc: Florian Westphal, Pablo Neira Ayuso, Nazim Wahid Djafar, netfilter-devel Patrick McHardy <kaber@trash.net> wrote: > Please go ahead, they're quite minimal and shouldn't be hard to merge > if any conflicts occur. Done, thanks Patrick. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: nftables-20140407 compilation error 2014-04-09 9:17 nftables-20140407 compilation error Nazim Wahid Djafar 2014-04-09 9:51 ` Florian Westphal @ 2014-04-09 10:26 ` Arturo Borrero Gonzalez 1 sibling, 0 replies; 9+ messages in thread From: Arturo Borrero Gonzalez @ 2014-04-09 10:26 UTC (permalink / raw) To: Nazim Wahid Djafar; +Cc: Netfilter Development Mailing list On 9 April 2014 11:17, Nazim Wahid Djafar <nwd.dev@gmail.com> wrote: > There is an error of compilation of nftables-20140407 on Debian 7.0 > Wheezy (eglibc 2.13 ) Hi! thanks for your report. Would you like to test this debian package? https://github.com/aborrero/pkg-nftables you will need git-buildpackage and others build-deps. $ sudo aptitude install git-buildpackage $ gbp clone https://github.com/aborrero/pkg-nftables $ cd pkg-nftables $ git-buildpackage regards -- Arturo Borrero González -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-04-10 10:41 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-04-09 9:17 nftables-20140407 compilation error Nazim Wahid Djafar 2014-04-09 9:51 ` Florian Westphal 2014-04-09 12:31 ` Pablo Neira Ayuso 2014-04-09 15:29 ` Florian Westphal 2014-04-09 18:44 ` Pablo Neira Ayuso 2014-04-09 21:27 ` Florian Westphal 2014-04-10 10:16 ` Patrick McHardy 2014-04-10 10:41 ` Florian Westphal 2014-04-09 10:26 ` Arturo Borrero Gonzalez
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).