DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Build errors due to duplicate version.map entries in librte_power
@ 2021-02-15 19:18 Aaron Conole
  2021-02-22 10:31 ` Juraj Linkeš
  0 siblings, 1 reply; 3+ messages in thread
From: Aaron Conole @ 2021-02-15 19:18 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson, David Hunt, Anatoly Burakov

Greetings,

During CI runs, I've noticed lots of failures from the Travis-CI side
all related to librte_power/version.map containing some duplicate
symbols.  It seems commit 4d3892dcd77b ("power: make channel message
functions public") made the following hunk:

diff --git a/lib/librte_power/version.map b/lib/librte_power/version.map
index 69ca9af616..13f0af3b2d 100644
--- a/lib/librte_power/version.map
+++ b/lib/librte_power/version.map
@@ -34,4 +34,8 @@ EXPERIMENTAL {
        rte_power_guest_channel_receive_msg;
        rte_power_poll_stat_fetch;
        rte_power_poll_stat_update;
+
+       # added in 21.02
+       rte_power_guest_channel_receive_msg;
+       rte_power_guest_channel_send_msg;
 };


As can be seen, rte_power_guest_channel_receive_msg was added already
(it's present in the hunk itself).  The rte_power_guest_channel_send_msg
function was added as part of 85ff364f3bd3 ("build: align symbols with
global ABI version").

I guess it may not be allowed to have duplicate symbols here, because in
travis, I see (only for some builds):

clang  -o lib/librte_power.so.21.1 'lib/lib@@rte_power@sta/librte_power_rte_power.c.o' 'lib/lib@@rte_power@sta/librte_power_power_acpi_cpufreq.c.o' 'lib/lib@@rte_power@sta/librte_power_power_kvm_vm.c.o' 'lib/lib@@rte_power@sta/librte_power_guest_channel.c.o' 'lib/lib@@rte_power@sta/librte_power_rte_power_empty_poll.c.o' 'lib/lib@@rte_power@sta/librte_power_power_pstate_cpufreq.c.o' 'lib/lib@@rte_power@sta/librte_power_rte_power_pmd_mgmt.c.o' 'lib/lib@@rte_power@sta/librte_power_power_common.c.o' -Wl,--no-undefined -Wl,--as-needed -shared -fPIC -Wl,--start-group -Wl,-soname,librte_power.so.21 -Wl,--no-as-needed -pthread -lm -ldl lib/librte_eal.so.21.1 lib/librte_kvargs.so.21.1 lib/librte_telemetry.so.21.1 lib/librte_timer.so.21.1 lib/librte_ethdev.so.21.1 lib/librte_net.so.21.1 lib/librte_mbuf.so.21.1 lib/librte_mempool.so.21.1 lib/librte_ring.so.21.1 lib/librte_meter.so.21.1 -Wl,--end-group -Wl,--version-script=/home/travis/build/ovsrobot/dpdk/lib/librte_power/version.map '-Wl,-rpath,$ORIGIN/' -Wl,-rpath-link,/home/travis/build/ovsrobot/dpdk/build/lib -target aarch64-linux-gnu -fuse-ld=lld --gcc-toolchain=/usr 

ld.lld: error: duplicate symbol 'rte_power_guest_channel_send_msg' in version script

Thoughts?


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

* Re: [dpdk-dev] Build errors due to duplicate version.map entries in librte_power
  2021-02-15 19:18 [dpdk-dev] Build errors due to duplicate version.map entries in librte_power Aaron Conole
@ 2021-02-22 10:31 ` Juraj Linkeš
  2021-02-22 19:50   ` Aaron Conole
  0 siblings, 1 reply; 3+ messages in thread
From: Juraj Linkeš @ 2021-02-22 10:31 UTC (permalink / raw)
  To: Aaron Conole, dev; +Cc: Bruce Richardson, David Hunt, Anatoly Burakov

This seems to have gone unnoticed.

lib/librte_power/version.map specifies rte_power_guest_channel_send_msg both under DPDK_21 and EXPERIMENTAL.

This is causing the clang cross-compile job to always fail with the error Aaron provided:
ld.lld: error: duplicate symbol 'rte_power_guest_channel_send_msg' in version script

Only the clang cross compile jobs are failing. This could be due to them using the LLVM linker (ld.lld) and the other clang jobs using the default linker.

I have two questions about this:
1. Is this a real failure?
2. If this is a real failure, should we also use ld.lld in the other clang jobs?

Thanks,
Juraj

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Aaron Conole
> Sent: Monday, February 15, 2021 8:18 PM
> To: dev@dpdk.org
> Cc: Bruce Richardson <bruce.richardson@intel.com>; David Hunt
> <david.hunt@intel.com>; Anatoly Burakov <anatoly.burakov@intel.com>
> Subject: [dpdk-dev] Build errors due to duplicate version.map entries in
> librte_power
> 
> Greetings,
> 
> During CI runs, I've noticed lots of failures from the Travis-CI side all related to
> librte_power/version.map containing some duplicate symbols.  It seems commit
> 4d3892dcd77b ("power: make channel message functions public") made the
> following hunk:
> 
> diff --git a/lib/librte_power/version.map b/lib/librte_power/version.map index
> 69ca9af616..13f0af3b2d 100644
> --- a/lib/librte_power/version.map
> +++ b/lib/librte_power/version.map
> @@ -34,4 +34,8 @@ EXPERIMENTAL {
>         rte_power_guest_channel_receive_msg;
>         rte_power_poll_stat_fetch;
>         rte_power_poll_stat_update;
> +
> +       # added in 21.02
> +       rte_power_guest_channel_receive_msg;
> +       rte_power_guest_channel_send_msg;
>  };
> 
> 
> As can be seen, rte_power_guest_channel_receive_msg was added already (it's
> present in the hunk itself).  The rte_power_guest_channel_send_msg function
> was added as part of 85ff364f3bd3 ("build: align symbols with global ABI
> version").
> 
> I guess it may not be allowed to have duplicate symbols here, because in travis, I
> see (only for some builds):
> 
> clang  -o lib/librte_power.so.21.1
> 'lib/lib@@rte_power@sta/librte_power_rte_power.c.o'
> 'lib/lib@@rte_power@sta/librte_power_power_acpi_cpufreq.c.o'
> 'lib/lib@@rte_power@sta/librte_power_power_kvm_vm.c.o'
> 'lib/lib@@rte_power@sta/librte_power_guest_channel.c.o'
> 'lib/lib@@rte_power@sta/librte_power_rte_power_empty_poll.c.o'
> 'lib/lib@@rte_power@sta/librte_power_power_pstate_cpufreq.c.o'
> 'lib/lib@@rte_power@sta/librte_power_rte_power_pmd_mgmt.c.o'
> 'lib/lib@@rte_power@sta/librte_power_power_common.c.o' -Wl,--no-
> undefined -Wl,--as-needed -shared -fPIC -Wl,--start-group -Wl,-
> soname,librte_power.so.21 -Wl,--no-as-needed -pthread -lm -ldl
> lib/librte_eal.so.21.1 lib/librte_kvargs.so.21.1 lib/librte_telemetry.so.21.1
> lib/librte_timer.so.21.1 lib/librte_ethdev.so.21.1 lib/librte_net.so.21.1
> lib/librte_mbuf.so.21.1 lib/librte_mempool.so.21.1 lib/librte_ring.so.21.1
> lib/librte_meter.so.21.1 -Wl,--end-group -Wl,--version-
> script=/home/travis/build/ovsrobot/dpdk/lib/librte_power/version.map '-Wl,-
> rpath,$ORIGIN/' -Wl,-rpath-link,/home/travis/build/ovsrobot/dpdk/build/lib -
> target aarch64-linux-gnu -fuse-ld=lld --gcc-toolchain=/usr
> 
> ld.lld: error: duplicate symbol 'rte_power_guest_channel_send_msg' in version
> script
> 
> Thoughts?
> 



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

* Re: [dpdk-dev] Build errors due to duplicate version.map entries in librte_power
  2021-02-22 10:31 ` Juraj Linkeš
@ 2021-02-22 19:50   ` Aaron Conole
  0 siblings, 0 replies; 3+ messages in thread
From: Aaron Conole @ 2021-02-22 19:50 UTC (permalink / raw)
  To: Juraj Linkeš; +Cc: dev\, Bruce Richardson, David Hunt, Anatoly Burakov

Juraj Linkeš <juraj.linkes@pantheon.tech> writes:

> This seems to have gone unnoticed.
>
> lib/librte_power/version.map specifies
> rte_power_guest_channel_send_msg both under DPDK_21 and EXPERIMENTAL.
>
> This is causing the clang cross-compile job to always fail with the error Aaron provided:
> ld.lld: error: duplicate symbol 'rte_power_guest_channel_send_msg' in version script
>
> Only the clang cross compile jobs are failing. This could be due to
> them using the LLVM linker (ld.lld) and the other clang jobs using the
> default linker.

The LLVM linker might not support all the same symbol versioning - but
ALSO I don't find what we're doing particularly correct - at least
according to:

   https://www.akkadia.org/drepper/dsohowto.pdf

There doesn't seem to be any case where we would have the symbol appear
in multiple versions without using an alias in the code.  And if the
symbol is changed in an incompatible way, then we've really done the
wrong thing.

> I have two questions about this:
> 1. Is this a real failure?

Maybe.  I think we probably wrote a bad version.map, but I don't know
the history of these symbols.  David?  Anything?

> 2. If this is a real failure, should we also use ld.lld in the other clang jobs?

We need to know if this is also an area where the LLVM linker doesn't
support the same featureset as GNU.

> Thanks,
> Juraj
>
>> -----Original Message-----
>> From: dev <dev-bounces@dpdk.org> On Behalf Of Aaron Conole
>> Sent: Monday, February 15, 2021 8:18 PM
>> To: dev@dpdk.org
>> Cc: Bruce Richardson <bruce.richardson@intel.com>; David Hunt
>> <david.hunt@intel.com>; Anatoly Burakov <anatoly.burakov@intel.com>
>> Subject: [dpdk-dev] Build errors due to duplicate version.map entries in
>> librte_power
>> 
>> Greetings,
>> 
>> During CI runs, I've noticed lots of failures from the Travis-CI side all related to
>> librte_power/version.map containing some duplicate symbols.  It seems commit
>> 4d3892dcd77b ("power: make channel message functions public") made the
>> following hunk:
>> 
>> diff --git a/lib/librte_power/version.map b/lib/librte_power/version.map index
>> 69ca9af616..13f0af3b2d 100644
>> --- a/lib/librte_power/version.map
>> +++ b/lib/librte_power/version.map
>> @@ -34,4 +34,8 @@ EXPERIMENTAL {
>>         rte_power_guest_channel_receive_msg;
>>         rte_power_poll_stat_fetch;
>>         rte_power_poll_stat_update;
>> +
>> +       # added in 21.02
>> +       rte_power_guest_channel_receive_msg;
>> +       rte_power_guest_channel_send_msg;
>>  };
>> 
>> 
>> As can be seen, rte_power_guest_channel_receive_msg was added already (it's
>> present in the hunk itself).  The rte_power_guest_channel_send_msg function
>> was added as part of 85ff364f3bd3 ("build: align symbols with global ABI
>> version").
>> 
>> I guess it may not be allowed to have duplicate symbols here, because in travis, I
>> see (only for some builds):
>> 
>> clang  -o lib/librte_power.so.21.1
>> 'lib/lib@@rte_power@sta/librte_power_rte_power.c.o'
>> 'lib/lib@@rte_power@sta/librte_power_power_acpi_cpufreq.c.o'
>> 'lib/lib@@rte_power@sta/librte_power_power_kvm_vm.c.o'
>> 'lib/lib@@rte_power@sta/librte_power_guest_channel.c.o'
>> 'lib/lib@@rte_power@sta/librte_power_rte_power_empty_poll.c.o'
>> 'lib/lib@@rte_power@sta/librte_power_power_pstate_cpufreq.c.o'
>> 'lib/lib@@rte_power@sta/librte_power_rte_power_pmd_mgmt.c.o'
>> 'lib/lib@@rte_power@sta/librte_power_power_common.c.o' -Wl,--no-
>> undefined -Wl,--as-needed -shared -fPIC -Wl,--start-group -Wl,-
>> soname,librte_power.so.21 -Wl,--no-as-needed -pthread -lm -ldl
>> lib/librte_eal.so.21.1 lib/librte_kvargs.so.21.1 lib/librte_telemetry.so.21.1
>> lib/librte_timer.so.21.1 lib/librte_ethdev.so.21.1 lib/librte_net.so.21.1
>> lib/librte_mbuf.so.21.1 lib/librte_mempool.so.21.1 lib/librte_ring.so.21.1
>> lib/librte_meter.so.21.1 -Wl,--end-group -Wl,--version-
>> script=/home/travis/build/ovsrobot/dpdk/lib/librte_power/version.map '-Wl,-
>> rpath,$ORIGIN/' -Wl,-rpath-link,/home/travis/build/ovsrobot/dpdk/build/lib -
>> target aarch64-linux-gnu -fuse-ld=lld --gcc-toolchain=/usr
>> 
>> ld.lld: error: duplicate symbol 'rte_power_guest_channel_send_msg' in version
>> script
>> 
>> Thoughts?
>> 


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

end of thread, other threads:[~2021-02-22 19:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-15 19:18 [dpdk-dev] Build errors due to duplicate version.map entries in librte_power Aaron Conole
2021-02-22 10:31 ` Juraj Linkeš
2021-02-22 19:50   ` Aaron Conole

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git