netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Undefined reference?
@ 2019-05-12  7:59 Stéphane Veyret
  2019-05-12  8:56 ` Florian Westphal
  0 siblings, 1 reply; 7+ messages in thread
From: Stéphane Veyret @ 2019-05-12  7:59 UTC (permalink / raw)
  To: netfilter-devel

Hello,

I am currently trying to add a new feature to nftables. I made
modifications on the kernel and updated a VM with this modified
kernel. I then made modifications on libnftnl, make && make install it
on this VM. I even made some tests which I managed to execute.

Now, I am trying to modify the nftables userspace tool. I had to set variables:
LIBNFTNL_CFLAGS="-g -O2"
LIBNFTNL_LIBS=$HOME/libnftnl/src/.libs/libnftnl.so ./configure
in order for configure to work, but it worked. But at linking time, I
get the following error for each nftnl_* function:
ld: ./.libs/libnftables.so: undefined reference to `nftnl_trace_free'

I tried to set the LD_LIBRARY_PATH to /usr/local/lib but it did not
change anything. Do you have an idea of what the problem is?

Regards,

Stéphane.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Undefined reference?
  2019-05-12  7:59 Undefined reference? Stéphane Veyret
@ 2019-05-12  8:56 ` Florian Westphal
  2019-05-12 16:20   ` Stéphane Veyret
  0 siblings, 1 reply; 7+ messages in thread
From: Florian Westphal @ 2019-05-12  8:56 UTC (permalink / raw)
  To: Stéphane Veyret; +Cc: netfilter-devel

Stéphane Veyret <sveyret@gmail.com> wrote:
> I am currently trying to add a new feature to nftables. I made
> modifications on the kernel and updated a VM with this modified
> kernel. I then made modifications on libnftnl, make && make install it
> on this VM. I even made some tests which I managed to execute.
> 
> Now, I am trying to modify the nftables userspace tool. I had to set variables:
> LIBNFTNL_CFLAGS="-g -O2"
> LIBNFTNL_LIBS=$HOME/libnftnl/src/.libs/libnftnl.so ./configure
> in order for configure to work, but it worked. But at linking time, I
> get the following error for each nftnl_* function:
> ld: ./.libs/libnftables.so: undefined reference to `nftnl_trace_free'
> 
> I tried to set the LD_LIBRARY_PATH to /usr/local/lib but it did not
> change anything. Do you have an idea of what the problem is?

Try

LIBNFTNL_LIBS="-L$HOME/libnftnl/src/.libs -lnftnl" ./configure

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Undefined reference?
  2019-05-12  8:56 ` Florian Westphal
@ 2019-05-12 16:20   ` Stéphane Veyret
  2019-05-12 16:28     ` Fernando Fernandez Mancera
  2019-05-12 23:00     ` Jan Engelhardt
  0 siblings, 2 replies; 7+ messages in thread
From: Stéphane Veyret @ 2019-05-12 16:20 UTC (permalink / raw)
  To: Florian Westphal; +Cc: netfilter-devel

Le dim. 12 mai 2019 à 10:56, Florian Westphal <fw@strlen.de> a écrit :
>
> > Now, I am trying to modify the nftables userspace tool. I had to set variables:
> > LIBNFTNL_CFLAGS="-g -O2"
> > LIBNFTNL_LIBS=$HOME/libnftnl/src/.libs/libnftnl.so ./configure
> > in order for configure to work, but it worked. But at linking time, I
> > get the following error for each nftnl_* function:
> > ld: ./.libs/libnftables.so: undefined reference to `nftnl_trace_free'
> >
> > I tried to set the LD_LIBRARY_PATH to /usr/local/lib but it did not
> > change anything. Do you have an idea of what the problem is?
>
> Try
>
> LIBNFTNL_LIBS="-L$HOME/libnftnl/src/.libs -lnftnl" ./configure

No luck, same result… :-(

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Undefined reference?
  2019-05-12 16:20   ` Stéphane Veyret
@ 2019-05-12 16:28     ` Fernando Fernandez Mancera
  2019-05-12 16:41       ` Stéphane Veyret
  2019-05-12 23:00     ` Jan Engelhardt
  1 sibling, 1 reply; 7+ messages in thread
From: Fernando Fernandez Mancera @ 2019-05-12 16:28 UTC (permalink / raw)
  To: Stéphane Veyret; +Cc: netfilter-devel

I faced a similar problem a long time ago, I solved it by resetting the
linker cache. Try this.

# rm /etc/ld.so.cache
# ldconfig

On 5/12/19 6:20 PM, Stéphane Veyret wrote:
> Le dim. 12 mai 2019 à 10:56, Florian Westphal <fw@strlen.de> a écrit :
>>
>>> Now, I am trying to modify the nftables userspace tool. I had to set variables:
>>> LIBNFTNL_CFLAGS="-g -O2"
>>> LIBNFTNL_LIBS=$HOME/libnftnl/src/.libs/libnftnl.so ./configure
>>> in order for configure to work, but it worked. But at linking time, I
>>> get the following error for each nftnl_* function:
>>> ld: ./.libs/libnftables.so: undefined reference to `nftnl_trace_free'
>>>
>>> I tried to set the LD_LIBRARY_PATH to /usr/local/lib but it did not
>>> change anything. Do you have an idea of what the problem is?
>>
>> Try
>>
>> LIBNFTNL_LIBS="-L$HOME/libnftnl/src/.libs -lnftnl" ./configure
> 
> No luck, same result… :-(
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Undefined reference?
  2019-05-12 16:28     ` Fernando Fernandez Mancera
@ 2019-05-12 16:41       ` Stéphane Veyret
  0 siblings, 0 replies; 7+ messages in thread
From: Stéphane Veyret @ 2019-05-12 16:41 UTC (permalink / raw)
  To: Fernando Fernandez Mancera; +Cc: netfilter-devel

Le dim. 12 mai 2019 à 18:28, Fernando Fernandez Mancera
<ffmancera@riseup.net> a écrit :
>
> I faced a similar problem a long time ago, I solved it by resetting the
> linker cache. Try this.
>
> # rm /etc/ld.so.cache
> # ldconfig

Thank you for your suggestion, but it is still not working. I think
that your suggested action is done by make install with the library,
anyway.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Undefined reference?
  2019-05-12 16:20   ` Stéphane Veyret
  2019-05-12 16:28     ` Fernando Fernandez Mancera
@ 2019-05-12 23:00     ` Jan Engelhardt
  2019-05-13  5:32       ` Stéphane Veyret
  1 sibling, 1 reply; 7+ messages in thread
From: Jan Engelhardt @ 2019-05-12 23:00 UTC (permalink / raw)
  To: Stéphane Veyret; +Cc: Florian Westphal, netfilter-devel


On Sunday 2019-05-12 18:20, Stéphane Veyret wrote:
>Le dim. 12 mai 2019 à 10:56, Florian Westphal <fw@strlen.de> a écrit :
>>
>> > Now, I am trying to modify the nftables userspace tool. I had to set variables:
>> > LIBNFTNL_CFLAGS="-g -O2"
>> > LIBNFTNL_LIBS=$HOME/libnftnl/src/.libs/libnftnl.so ./configure
>> > in order for configure to work, but it worked. But at linking time, I
>> > get the following error for each nftnl_* function:
>> > ld: ./.libs/libnftables.so: undefined reference to `nftnl_trace_free'
>> >
>> > I tried to set the LD_LIBRARY_PATH to /usr/local/lib but it did not
>> > change anything. Do you have an idea of what the problem is?
>>
>> Try
>>
>> LIBNFTNL_LIBS="-L$HOME/libnftnl/src/.libs -lnftnl" ./configure
>
>No luck, same result… :-(

This must be

./configure LIBNFTNL_LIBS="-L$HOME/libnftnl/src/.libs -lnftnl"

like.. since forever.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Undefined reference?
  2019-05-12 23:00     ` Jan Engelhardt
@ 2019-05-13  5:32       ` Stéphane Veyret
  0 siblings, 0 replies; 7+ messages in thread
From: Stéphane Veyret @ 2019-05-13  5:32 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Florian Westphal, netfilter-devel

Le lun. 13 mai 2019 à 01:00, Jan Engelhardt <jengelh@inai.de> a écrit :
> This must be
>
> ./configure LIBNFTNL_LIBS="-L$HOME/libnftnl/src/.libs -lnftnl"
>
> like.. since forever.

Thank you, Jan, but I still have the same result.
(the configure seems to take environment variables anyway).

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-05-13  5:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-12  7:59 Undefined reference? Stéphane Veyret
2019-05-12  8:56 ` Florian Westphal
2019-05-12 16:20   ` Stéphane Veyret
2019-05-12 16:28     ` Fernando Fernandez Mancera
2019-05-12 16:41       ` Stéphane Veyret
2019-05-12 23:00     ` Jan Engelhardt
2019-05-13  5:32       ` Stéphane Veyret

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).