Linker error when using PrgEnv-gnu and -std=c++17

Issue #244 duplicate
Benjamin Driscoll created an issue

The code

#include <upcxx/upcxx.hpp>

int main() {
  int dummy = upcxx::reduce_one(1, upcxx::op_fast_add, 0).wait();
}

gives the following linker error when compiling with PrgEnv-gnu/6.0.5 and -std=c++17 (it works with -std=c++11 and -std=c++14 and with PrgEnv-intel):


/usr/bin/ld: /usr/common/ftg/upcxx/2019.3.2/hsw/gnu/PrgEnv-gnu-6.0.5-8.2.0/upcxx.O3.gasnet_seq.aries/lib/libupcxx.a(143f26788085fe2a3d0f27f4a007f2d15bb0359b.core.cpp.o):(.rodata+0x0): multiple definition of upcxx::detail::future_header_nil::the_nil; /tmp/ccjX3jLk.o:(.rodata._ZN5upcxx6detail17future_header_nil7the_nilE[_ZN5upcxx6detail17future_header_nil7the_nilE]+0x0): first defined here

/usr/bin/ld: link errors found, deleting executable a.out;
collect2: error: ld returned 1 exit status

Comments (3)

  1. Log in to comment