librte_power/rte_power.h causes link error
Hi list,
I got " multiple definition of 'rte_power_freq_min' " link error, while compiling my dpdk project. I think extern keyword was missed in rte_power.h header for some reason:
/**
* Scale down the frequency of a specific lcore to the lowest according to the
* available frequencies.
* Review each environments specific documentation for usage..
*
* @param lcore_id
* lcore id.
*
* @return
* - 1 on success with frequency changed.
* - 0 on success without frequency changed.
* - Negative on error.
*/rte_power_freq_change_t rte_power_freq_min;
Thanks,
Ildar
Hi,
2015-01-19 16:55, Ильдар Мустафин:
Quoted 4 lines
Hi list,
I got " multiple definition of '
rte_power_freq_min' " link error, while compiling my dpdk project. I think extern keyword was missed inrte_power.hheader for some reason:
You're right.
It can be seen in this commit:
http://dpdk.org/browse/dpdk/commit/lib/librte_power/rte_power.h?id=445c6528b55f9025
Thanks for reporting
Signature · 1 line
Thomas
PATCH 1/1 power: added missing extern keyword in rte_power.h
In reply to a message not in the archiverte_power_freq_min function did not include "extern" keyword, causing linking errors.
--- lib/librte_power/rte_power.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
lib/librte_power/rte_power.h +1 -1
@@ -242,7 +242,7 @@ extern rte_power_freq_change_t rte_power_freq_max;* - 0 on success without frequency changed. * - Negative on error. */ -rte_power_freq_change_t rte_power_freq_min; +extern rte_power_freq_change_t rte_power_freq_min; #ifdef __cplusplus }
Signature · 1 line
1.7.4.1
Re: [PATCH] power: added missing extern keyword in rte_power.h
In reply to a message not in the archiveQuoted 5 lines
rte_power_freq_minfunction did not include "extern" keyword, causing linking errors.Signed-off-by Pablo de Lara <[email protected]>Reported-by Ildar Mustafin <[email protected]>
Applied
Thanks
Signature · 1 line
Thomas