Skip to contentSkip to conversation

librte_power/rte_power.h causes link error

PATCH Applied Ильдар Мустафин 3 participants 4 messages Jan 19, 2015 – Jan 27, 2015 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

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

#2 lore raw
In reply to a message not in the archive

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 in rte_power.h header 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
#3 lore raw

PATCH 1/1 power: added missing extern keyword in rte_power.h

In reply to a message not in the archive

rte_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
index 9338069..7d57359 100644
@@ -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
Acked-by Applied
#5 lore raw

Re: [PATCH] power: added missing extern keyword in rte_power.h

In reply to a message not in the archive
Quoted 5 lines

rte_power_freq_min function did not include "extern" keyword, causing linking errors.

Fixes 445c6528b55f ("power: common interface for guest and host")

Applied

Thanks

Signature · 1 line
Thomas