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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#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

A message that is not in the archive (sent off-list or not yet received): 1421745495-10702-1-git-send-email-pablo.de.lara.guarch-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org