Link failures on Cygwin clang 3.8.1-5.0.1: "multiple definition of TLS wrapper function"

Issue #7 resolved
Dan Bonachea created an issue

I get the build failure below using clang 3.8.1 on my Cygwin 2.6.0 system (same system passes with g++ 5.4.0).

Marking as trivial since this platform is not a priority and I can use g++ instead - however this clang is not that old (released Jul 2016) so we may want to eventually look into it.

$ export CC=clang CXX=clang++ DBGSYM=1 OPTLEV=0 GASNET="/home/bonachea/UPC/bupcr-ex-clang/dbg/upcxx/gasnet/include" GASNET_CONDUIT=smp   && nobs exe test/dist_object.cpp 

clang++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea -DUPCXX_BACKEND=gasnet1_seq -D_GNU_SOURCE=1 -DGASNET_SEQ -I/home/bonachea/UPC/bupcr-ex-clang/dbg/upcxx/gasnet/include -I/home/bonachea/UPC/bupcr-ex-clang/dbg/upcxx/gasnet/include/smp-conduit -MM -MT x /home/bonachea/UPC/upcxx/test/dist_object.cpp

clang++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea -DUPCXX_BACKEND=gasnet1_seq -D_GNU_SOURCE=1 -DGASNET_SEQ -I/home/bonachea/UPC/bupcr-ex-clang/dbg/upcxx/gasnet/include -I/home/bonachea/UPC/bupcr-ex-clang/dbg/upcxx/gasnet/include/smp-conduit -O0 -g -Wall -g -Wall -Wpointer-arith -Wnested-externs -Wwrite-strings -Wmissing-format-attribute -Wno-unused -Wno-unused-parameter -Wno-address -c /home/bonachea/UPC/upcxx/test/dist_object.cpp -o /home/bonachea/UPC/upcxx/.nobs/art/53ede1085f5336a2f206df4d1e5c035a96955b7a.dist_object.cpp.o

clang++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea -MM -MT x /home/bonachea/UPC/upcxx/src/future/core.cpp

clang++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea -MM -MT x /home/bonachea/UPC/upcxx/src/diagnostic.cpp

clang++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea -MM -MT x /home/bonachea/UPC/upcxx/src/packing.cpp

clang++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea -MM -MT x /home/bonachea/UPC/upcxx/src/digest.cpp

clang++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea -DUPCXX_BACKEND=gasnet1_seq -D_GNU_SOURCE=1 -DGASNET_SEQ -I/home/bonachea/UPC/bupcr-ex-clang/dbg/upcxx/gasnet/include -I/home/bonachea/UPC/bupcr-ex-clang/dbg/upcxx/gasnet/include/smp-conduit -MM -MT x /home/bonachea/UPC/upcxx/src/dist_object.cpp

clang++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea -DUPCXX_BACKEND=gasnet1_seq -D_GNU_SOURCE=1 -DGASNET_SEQ -I/home/bonachea/UPC/bupcr-ex-clang/dbg/upcxx/gasnet/include -I/home/bonachea/UPC/bupcr-ex-clang/dbg/upcxx/gasnet/include/smp-conduit -MM -MT x /home/bonachea/UPC/upcxx/src/backend/gasnet1_seq/backend.cpp

clang++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea -O0 -g -Wall -c /home/bonachea/UPC/upcxx/src/future/core.cpp -o /home/bonachea/UPC/upcxx/.nobs/art/0201dea24c92cd16f93e3c6e91a17b6ef71aa6f2.core.cpp.o

clang++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea -O0 -g -Wall -c /home/bonachea/UPC/upcxx/src/diagnostic.cpp -o /home/bonachea/UPC/upcxx/.nobs/art/2dc0a3ae7b6d0b107ad14762fe81f25ca0e443f3.diagnostic.cpp.o

clang++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea -O0 -g -Wall -c /home/bonachea/UPC/upcxx/src/packing.cpp -o /home/bonachea/UPC/upcxx/.nobs/art/9649f5092d9c995d61252f79916e80cad4f3785b.packing.cpp.o

clang++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea -O0 -g -Wall -c /home/bonachea/UPC/upcxx/src/digest.cpp -o /home/bonachea/UPC/upcxx/.nobs/art/479dd89be9b4f518c1d08fbad76c466716275f67.digest.cpp.o

clang++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea -DUPCXX_BACKEND=gasnet1_seq -D_GNU_SOURCE=1 -DGASNET_SEQ -I/home/bonachea/UPC/bupcr-ex-clang/dbg/upcxx/gasnet/include -I/home/bonachea/UPC/bupcr-ex-clang/dbg/upcxx/gasnet/include/smp-conduit -O0 -g -Wall -g -Wall -Wpointer-arith -Wnested-externs -Wwrite-strings -Wmissing-format-attribute -Wno-unused -Wno-unused-parameter -Wno-address -c /home/bonachea/UPC/upcxx/src/dist_object.cpp -o /home/bonachea/UPC/upcxx/.nobs/art/4a8ab72cf3d8e4fa5b2b736fbb88627861b3868d.dist_object.cpp.o

clang++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea -DUPCXX_BACKEND=gasnet1_seq -D_GNU_SOURCE=1 -DGASNET_SEQ -I/home/bonachea/UPC/bupcr-ex-clang/dbg/upcxx/gasnet/include -I/home/bonachea/UPC/bupcr-ex-clang/dbg/upcxx/gasnet/include/smp-conduit -O0 -g -Wall -g -Wall -Wpointer-arith -Wnested-externs -Wwrite-strings -Wmissing-format-attribute -Wno-unused -Wno-unused-parameter -Wno-address -c /home/bonachea/UPC/upcxx/src/backend/gasnet1_seq/backend.cpp -o /home/bonachea/UPC/upcxx/.nobs/art/ed6eb90e2060ff17216b1591b536499d34004ab3.backend.cpp.o

clang -std=c11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea -MM -MT x /home/bonachea/UPC/upcxx/src/dl_malloc.c

clang -std=c11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea -O0 -g -Wall -c /home/bonachea/UPC/upcxx/src/dl_malloc.c -o /home/bonachea/UPC/upcxx/.nobs/art/5b95202545a2ae6639e3d0f9da2f570e87b49b49.dl_malloc.c.o

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
clang++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea -DUPCXX_BACKEND=gasnet1_seq -D_GNU_SOURCE=1 -DGASNET_SEQ -I/home/bonachea/UPC/bupcr-ex-clang/dbg/upcxx/gasnet/include -I/home/bonachea/UPC/bupcr-ex-clang/dbg/upcxx/gasnet/include/smp-conduit -O0 -g -Wall -g -Wall -Wpointer-arith -Wnested-externs -Wwrite-strings -Wmissing-format-attribute -Wno-unused -Wno-unused-parameter -Wno-address -c /home/bonachea/UPC/upcxx/src/dist_object.cpp -o /home/bonachea/UPC/upcxx/.nobs/art/4a8ab72cf3d8e4fa5b2b736fbb88627861b3868d.dist_object.cpp.o

In file included from /home/bonachea/UPC/upcxx/src/dist_object.cpp:1:
/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea/upcxx/dist_object.hpp:51:3: warning: 'dist_id' defined as a struct template here but previously declared as a class template [-Wmismatched-tags]
  struct dist_id {
  ^
/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea/upcxx/dist_object.hpp:15:3: note: did you mean struct here?
  class dist_id;
  ^~~~~
  struct
1 warning generated.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
clang++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea -DUPCXX_BACKEND=gasnet1_seq -D_GNU_SOURCE=1 -DGASNET_SEQ -I/home/bonachea/UPC/bupcr-ex-clang/dbg/upcxx/gasnet/include -I/home/bonachea/UPC/bupcr-ex-clang/dbg/upcxx/gasnet/include/smp-conduit -O0 -g -Wall -g -Wall -Wpointer-arith -Wnested-externs -Wwrite-strings -Wmissing-format-attribute -Wno-unused -Wno-unused-parameter -Wno-address -c /home/bonachea/UPC/upcxx/test/dist_object.cpp -o /home/bonachea/UPC/upcxx/.nobs/art/53ede1085f5336a2f206df4d1e5c035a96955b7a.dist_object.cpp.o

In file included from /home/bonachea/UPC/upcxx/test/dist_object.cpp:1:
/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea/upcxx/dist_object.hpp:51:3: warning: 'dist_id' defined as a struct template here but previously declared as a class template [-Wmismatched-tags]
  struct dist_id {
  ^
/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea/upcxx/dist_object.hpp:15:3: note: did you mean struct here?
  class dist_id;
  ^~~~~
  struct
1 warning generated.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
clang++ -g -O0 -Wall -Wpointer-arith -Wnested-externs -Wwrite-strings -Wmissing-format-attribute -Wno-unused -Wno-unused-parameter -Wno-address -o /home/bonachea/UPC/upcxx/.nobs/art/aee7ea7a3ffa20d1c4625826f506bcd6b1c4bd46.x /home/bonachea/UPC/upcxx/.nobs/art/479dd89be9b4f518c1d08fbad76c466716275f67.digest.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/2dc0a3ae7b6d0b107ad14762fe81f25ca0e443f3.diagnostic.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/0201dea24c92cd16f93e3c6e91a17b6ef71aa6f2.core.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/9649f5092d9c995d61252f79916e80cad4f3785b.packing.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/4a8ab72cf3d8e4fa5b2b736fbb88627861b3868d.dist_object.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/5b95202545a2ae6639e3d0f9da2f570e87b49b49.dl_malloc.c.o /home/bonachea/UPC/upcxx/.nobs/art/53ede1085f5336a2f206df4d1e5c035a96955b7a.dist_object.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/ed6eb90e2060ff17216b1591b536499d34004ab3.backend.cpp.o -L/home/bonachea/UPC/bupcr-ex-clang/dbg/upcxx/gasnet/lib -lgasnet-smp-seq -lm

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
clang++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea -DUPCXX_BACKEND=gasnet1_seq -D_GNU_SOURCE=1 -DGASNET_SEQ -I/home/bonachea/UPC/bupcr-ex-clang/dbg/upcxx/gasnet/include -I/home/bonachea/UPC/bupcr-ex-clang/dbg/upcxx/gasnet/include/smp-conduit -O0 -g -Wall -g -Wall -Wpointer-arith -Wnested-externs -Wwrite-strings -Wmissing-format-attribute -Wno-unused -Wno-unused-parameter -Wno-address -c /home/bonachea/UPC/upcxx/src/dist_object.cpp -o /home/bonachea/UPC/upcxx/.nobs/art/4a8ab72cf3d8e4fa5b2b736fbb88627861b3868d.dist_object.cpp.o

In file included from /home/bonachea/UPC/upcxx/src/dist_object.cpp:1:
/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea/upcxx/dist_object.hpp:51:3: warning: 'dist_id' defined as a struct template here but previously declared as a class template [-Wmismatched-tags]
  struct dist_id {
  ^
/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea/upcxx/dist_object.hpp:15:3: note: did you mean struct here?
  class dist_id;
  ^~~~~
  struct
1 warning generated.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
clang++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea -DUPCXX_BACKEND=gasnet1_seq -D_GNU_SOURCE=1 -DGASNET_SEQ -I/home/bonachea/UPC/bupcr-ex-clang/dbg/upcxx/gasnet/include -I/home/bonachea/UPC/bupcr-ex-clang/dbg/upcxx/gasnet/include/smp-conduit -O0 -g -Wall -g -Wall -Wpointer-arith -Wnested-externs -Wwrite-strings -Wmissing-format-attribute -Wno-unused -Wno-unused-parameter -Wno-address -c /home/bonachea/UPC/upcxx/test/dist_object.cpp -o /home/bonachea/UPC/upcxx/.nobs/art/53ede1085f5336a2f206df4d1e5c035a96955b7a.dist_object.cpp.o

In file included from /home/bonachea/UPC/upcxx/test/dist_object.cpp:1:
/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea/upcxx/dist_object.hpp:51:3: warning: 'dist_id' defined as a struct template here but previously declared as a class template [-Wmismatched-tags]
  struct dist_id {
  ^
/home/bonachea/UPC/upcxx/.nobs/art/b926136af1e701cb104698f164718b020cbfd2ea/upcxx/dist_object.hpp:15:3: note: did you mean struct here?
  class dist_id;
  ^~~~~
  struct
1 warning generated.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
clang++ -g -O0 -Wall -Wpointer-arith -Wnested-externs -Wwrite-strings -Wmissing-format-attribute -Wno-unused -Wno-unused-parameter -Wno-address -o /home/bonachea/UPC/upcxx/.nobs/art/aee7ea7a3ffa20d1c4625826f506bcd6b1c4bd46.x /home/bonachea/UPC/upcxx/.nobs/art/479dd89be9b4f518c1d08fbad76c466716275f67.digest.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/2dc0a3ae7b6d0b107ad14762fe81f25ca0e443f3.diagnostic.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/0201dea24c92cd16f93e3c6e91a17b6ef71aa6f2.core.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/9649f5092d9c995d61252f79916e80cad4f3785b.packing.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/4a8ab72cf3d8e4fa5b2b736fbb88627861b3868d.dist_object.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/5b95202545a2ae6639e3d0f9da2f570e87b49b49.dl_malloc.c.o /home/bonachea/UPC/upcxx/.nobs/art/53ede1085f5336a2f206df4d1e5c035a96955b7a.dist_object.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/ed6eb90e2060ff17216b1591b536499d34004ab3.backend.cpp.o -L/home/bonachea/UPC/bupcr-ex-clang/dbg/upcxx/gasnet/lib -lgasnet-smp-seq -lm

/home/bonachea/UPC/upcxx/.nobs/art/0201dea24c92cd16f93e3c6e91a17b6ef71aa6f2.core.cpp.o:(.text+0x216): undefined reference to `__emutls_v._ZN12_GLOBAL__N_112active_tail_E'
collect2: error: ld returned 1 exit status
clang-3.8: error: linker (via gcc) command failed with exit code 1 (use -v to see invocation)

$ clang++ --version
clang version 3.8.1 (tags/RELEASE_381/final)
Target: x86_64-unknown-windows-cygnus
Thread model: posix
InstalledDir: /usr/bin

Comments (23)

  1. Dan Bonachea reporter

    I get additional (non-fatal) warnings on clang 8.1.0 on Mac OS X Sierra.

    Raising priority because this is the default compiler on a target platform we do care about for release.

    $ export CC=clang CXX=clang++ DBGSYM=1 OPTLEV=0 GASNET_CONDUIT=smp   && nobs exe test/dist_object.cpp 
    ...
    clang++ -std=c++11 -D_GNU_SOURCE=1 -I/Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c -DUPCXX_BACKEND=gasnet1_seq -D_GNU_SOURCE=1 -DGASNET_SEQ -I/Users/bonachea/UPC/upcxx/.nobs/art/7aa4bbe869e6e0da87f05ced6f171bc5582df1d6/GASNet-2017.6.0 -I/Users/bonachea/UPC/upcxx/.nobs/art/7aa4bbe869e6e0da87f05ced6f171bc5582df1d6/GASNet-2017.6.0/smp-conduit -I/Users/bonachea/UPC/upcxx/.nobs/art/7aa4bbe869e6e0da87f05ced6f171bc5582df1d6/GASNet-2017.6.0/other -I/Users/bonachea/UPC/upcxx/.nobs/art/7aa4bbe869e6e0da87f05ced6f171bc5582df1d6/GASNet-2017.6.0/extended-ref -I/Users/bonachea/UPC/upcxx/.nobs/art/ae46fe3cc87b970dc466d0d8aba6ae59d3da2731 -O0 -g -Wall -g -Wall -Wpointer-arith -Wnested-externs -Wwrite-strings -Wmissing-format-attribute -Wno-unused -Wno-unused-parameter -Wno-address -c /Users/bonachea/UPC/upcxx/test/dist_object.cpp -o /Users/bonachea/UPC/upcxx/.nobs/art/d8f1846855a8c94dd934efd44078bf93cccc5030.dist_object.cpp.o
    
    In file included from /Users/bonachea/UPC/upcxx/test/dist_object.cpp:1:
    /Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c/upcxx/dist_object.hpp:51:3: warning: 'dist_id' defined as a struct template here but previously declared as a class template [-Wmismatched-tags]
      struct dist_id {
      ^
    /Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c/upcxx/dist_object.hpp:15:3: note: did you mean struct here?
      class dist_id;
      ^~~~~
      struct
    In file included from /Users/bonachea/UPC/upcxx/test/dist_object.cpp:1:
    In file included from /Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c/upcxx/dist_object.hpp:4:
    In file included from /Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c/upcxx/bind.hpp:4:
    In file included from /Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c/upcxx/future.hpp:10:
    In file included from /Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c/upcxx/future/then.hpp:6:
    In file included from /Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c/upcxx/future/impl_mapped.hpp:6:
    /Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c/upcxx/future/body_pure.hpp:27:7: warning: destructor called on non-final
          'upcxx::detail::future_body_pure<upcxx::future1<upcxx::detail::future_kind_when_all<upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_result>>,
          upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_general>, int> >, int> >' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
          this->~future_body_pure();
          ^
    /Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c/upcxx/future/body_pure.hpp:16:5: note: in instantiation of member function
          'upcxx::detail::future_body_pure<upcxx::future1<upcxx::detail::future_kind_when_all<upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_result>>,
          upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_general>, int> >, int> >::destruct_early' requested here
        future_body_pure(
        ^
    /Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c/upcxx/future/impl_when_all.hpp:107:36: note: in instantiation of member function
          'upcxx::detail::future_body_pure<upcxx::future1<upcxx::detail::future_kind_when_all<upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_result>>,
          upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_general>, int> >, int> >::future_body_pure' requested here
            hdr->body_ = new(body_mem) body_type{body_mem, hdr, std::move(*this)};
                                       ^
    /Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c/upcxx/future/impl_shref.hpp:125:27: note: in instantiation of member function
          'upcxx::detail::future_impl_when_all<std::__1::tuple<upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_result>>,
          upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_general>, int> >, int>::steal_header' requested here
            this->hdr_ = that.steal_header();
                              ^
    /Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c/upcxx/future/future1.hpp:71:42: note: in instantiation of function template specialization
          'upcxx::detail::future_impl_shref<upcxx::detail::future_header_ops_general,
          int>::future_impl_shref<upcxx::detail::future_impl_when_all<std::__1::tuple<upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_result>>,
          upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_general>, int> >, int> >' requested here
        future1(future1<Kind1,T...> &&that): impl_{std::move(that.impl_)} {}
                                             ^
    /Users/bonachea/UPC/upcxx/test/dist_object.cpp:22:21: note: in instantiation of function template specialization 'upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_general>,
          int>::future1<upcxx::detail::future_kind_when_all<upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_result>>,
          upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_general>, int> > >' requested here
        future<int> f = when_all(
                        ^
    /Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c/upcxx/future/body_pure.hpp:27:14: note: qualify call to silence this warning
          this->~future_body_pure();
                 ^
                 upcxx::detail::future_body_pure<upcxx::future1<upcxx::detail::future_kind_when_all<upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_result>>, upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_general>, int> >, int> >::
    /Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c/upcxx/future/body_pure.hpp:35:9: warning: destructor called on non-final
          'upcxx::detail::future_body_pure<upcxx::future1<upcxx::detail::future_kind_when_all<upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_result>>,
          upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_general>, int> >, int> >' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
            this->~future_body_pure();
            ^
    /Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c/upcxx/future/body_pure.hpp:16:5: note: in instantiation of member function
          'upcxx::detail::future_body_pure<upcxx::future1<upcxx::detail::future_kind_when_all<upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_result>>,
          upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_general>, int> >, int> >::leave_active' requested here
        future_body_pure(
        ^
    /Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c/upcxx/future/impl_when_all.hpp:107:36: note: in instantiation of member function
          'upcxx::detail::future_body_pure<upcxx::future1<upcxx::detail::future_kind_when_all<upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_result>>,
          upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_general>, int> >, int> >::future_body_pure' requested here
            hdr->body_ = new(body_mem) body_type{body_mem, hdr, std::move(*this)};
                                       ^
    /Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c/upcxx/future/impl_shref.hpp:125:27: note: in instantiation of member function
          'upcxx::detail::future_impl_when_all<std::__1::tuple<upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_result>>,
          upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_general>, int> >, int>::steal_header' requested here
            this->hdr_ = that.steal_header();
                              ^
    /Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c/upcxx/future/future1.hpp:71:42: note: in instantiation of function template specialization
          'upcxx::detail::future_impl_shref<upcxx::detail::future_header_ops_general,
          int>::future_impl_shref<upcxx::detail::future_impl_when_all<std::__1::tuple<upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_result>>,
          upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_general>, int> >, int> >' requested here
        future1(future1<Kind1,T...> &&that): impl_{std::move(that.impl_)} {}
                                             ^
    /Users/bonachea/UPC/upcxx/test/dist_object.cpp:22:21: note: in instantiation of function template specialization 'upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_general>,
          int>::future1<upcxx::detail::future_kind_when_all<upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_result>>,
          upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_general>, int> > >' requested here
        future<int> f = when_all(
                        ^
    /Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c/upcxx/future/body_pure.hpp:35:16: note: qualify call to silence this warning
            this->~future_body_pure();
                   ^
                   upcxx::detail::future_body_pure<upcxx::future1<upcxx::detail::future_kind_when_all<upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_result>>, upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_general>, int> >, int> >::
    /Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c/upcxx/future/body_pure.hpp:41:9: warning: destructor called on non-final
          'upcxx::detail::future_body_pure<upcxx::future1<upcxx::detail::future_kind_when_all<upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_result>>,
          upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_general>, int> >, int> >' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
            this->~future_body_pure();
            ^
    /Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c/upcxx/future/body_pure.hpp:41:16: note: qualify call to silence this warning
            this->~future_body_pure();
                   ^
                   upcxx::detail::future_body_pure<upcxx::future1<upcxx::detail::future_kind_when_all<upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_result>>, upcxx::future1<upcxx::detail::future_kind_shref<upcxx::detail::future_header_ops_general>, int> >, int> >::
    4 warnings generated.
    
    $ clang++ --version
    Apple LLVM version 8.1.0 (clang-802.0.42)
    Target: x86_64-apple-darwin16.7.0
    Thread model: posix
    InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
    
  2. Dan Bonachea reporter

    test/future.cpp->make_future.hpp is generating a fatal error on Sierra with clang 8.1.0 (the default compiler).

    This elevates the problem to critical.

    bash-3.2$ source ./sourceme && export CC=gcc CXX=c++ DBGSYM=1 OPTLEV=0 GASNET="/Users/bonachea/UPC/bupcr-ex/dbg/upcxx/gasnet/include" GASNET_CONDUIT=smp   && nobs exe test/future.cpp
    c++ -std=c++11 -D_GNU_SOURCE=1 -I/Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c -MM -MT x /Users/bonachea/UPC/upcxx/test/future.cpp
    
    c++ -std=c++11 -D_GNU_SOURCE=1 -I/Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c -O0 -g -Wall -c /Users/bonachea/UPC/upcxx/test/future.cpp -o /Users/bonachea/UPC/upcxx/.nobs/art/22b45c53689fdeeab76911dc8c22c92d6fc1f72e.future.cpp.o
    
    c++ -std=c++11 -D_GNU_SOURCE=1 -I/Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c -MM -MT x /Users/bonachea/UPC/upcxx/src/future/core.cpp
    
    c++ -std=c++11 -D_GNU_SOURCE=1 -I/Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c -O0 -g -Wall -c /Users/bonachea/UPC/upcxx/src/future/core.cpp -o /Users/bonachea/UPC/upcxx/.nobs/art/aa33346459fd99487cfa53c197149fcb36b66fe0.core.cpp.o
    
    *** Something FAILED! ***
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    c++ -std=c++11 -D_GNU_SOURCE=1 -I/Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c -O0 -g -Wall -c /Users/bonachea/UPC/upcxx/test/future.cpp -o /Users/bonachea/UPC/upcxx/.nobs/art/22b45c53689fdeeab76911dc8c22c92d6fc1f72e.future.cpp.o
    
    In file included from /Users/bonachea/UPC/upcxx/test/future.cpp:2:
    In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/queue:169:
    In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/deque:158:
    In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__split_buffer:7:
    In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:628:
    In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:609:
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/tuple:221:10: error: static_assert failed "Attempted to construct a reference element in a tuple with an rvalue"
            {static_assert(!is_reference<_Hp>::value ||
             ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/tuple:414:13: note: in instantiation of function template specialization 'std::__1::__tuple_leaf<0, const int &,
          false>::__tuple_leaf<const int, void>' requested here
                __tuple_leaf<_Uf, _Tf>(_VSTD::forward<_Up>(__u))...,
                ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/tuple:587:15: note: in instantiation of function template specialization 'std::__1::__tuple_impl<std::__1::__tuple_indices<0>,
          const int &>::__tuple_impl<0, const int &, const int>' requested here
                : base_(typename __make_tuple_indices<sizeof...(_Up)>::type(),
                  ^
    /Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c/upcxx/future/make_future.hpp:28:23: note: in instantiation of function template specialization 'std::__1::tuple<const int &>::tuple<const int, false>'
          requested here
                /*values*/std::tuple<T...>{std::move(values)...}
                          ^
    /Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c/upcxx/future/make_future.hpp:46:12: note: in instantiation of member function 'upcxx::detail::make_future_<false, const int &>::operator()' requested here
        return detail::make_future<T...>()(std::move(values)...);
               ^
    /Users/bonachea/UPC/upcxx/test/future.cpp:110:9: note: in instantiation of function template specialization 'upcxx::make_future<const int &>' requested here
            make_future<const int&>(arg)
            ^
    1 error generated.
    
    bash-3.2$ c++ --version
    Apple LLVM version 8.1.0 (clang-802.0.42)
    Target: x86_64-apple-darwin16.7.0
    Thread model: posix
    InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
    
  3. Dan Bonachea reporter
    • changed status to open

    d711692 fixed the warnings, but both the errors are still present. Here is the current behavior on Mac OS X Sierra:

    bash-3.2$ rm -Rf .nobs/; source ./sourceme && export CC=cc CXX=c++ DBGSYM=1 OPTLEV=0 GASNET="/Users/bonachea/UPC/bupcr-ex/dbg/upcxx/gasnet" GASNET_CONDUIT=smp   && nobs exe test/future.cpp 
    c++ -std=c++11 -D_GNU_SOURCE=1 -I/Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c -MM -MT x /Users/bonachea/UPC/upcxx/test/future.cpp
    
    c++ -std=c++11 -D_GNU_SOURCE=1 -I/Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c -O0 -g -Wall -c /Users/bonachea/UPC/upcxx/test/future.cpp -o /Users/bonachea/UPC/upcxx/.nobs/art/f09bb3a409df114a9a1e09e94c4adb5d2005f209.future.cpp.o
    
    c++ -std=c++11 -D_GNU_SOURCE=1 -I/Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c -MM -MT x /Users/bonachea/UPC/upcxx/src/diagnostic.cpp
    
    c++ -std=c++11 -D_GNU_SOURCE=1 -I/Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c -MM -MT x /Users/bonachea/UPC/upcxx/src/future/core.cpp
    
    c++ -std=c++11 -D_GNU_SOURCE=1 -I/Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c -O0 -g -Wall -c /Users/bonachea/UPC/upcxx/src/diagnostic.cpp -o /Users/bonachea/UPC/upcxx/.nobs/art/51e645c9635093aff7aa09604cb26ea926d7ea15.diagnostic.cpp.o
    
    c++ -std=c++11 -D_GNU_SOURCE=1 -I/Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c -O0 -g -Wall -c /Users/bonachea/UPC/upcxx/src/future/core.cpp -o /Users/bonachea/UPC/upcxx/.nobs/art/89f892ea2a630f94945545137a90a90053a910d4.core.cpp.o
    
    *** Something FAILED! ***
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    c++ -std=c++11 -D_GNU_SOURCE=1 -I/Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c -O0 -g -Wall -c /Users/bonachea/UPC/upcxx/test/future.cpp -o /Users/bonachea/UPC/upcxx/.nobs/art/f09bb3a409df114a9a1e09e94c4adb5d2005f209.future.cpp.o
    
    In file included from /Users/bonachea/UPC/upcxx/test/future.cpp:2:
    In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/queue:169:
    In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/deque:158:
    In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__split_buffer:7:
    In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:628:
    In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/memory:609:
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/tuple:221:10: error: static_assert failed "Attempted to construct a reference element in a tuple with an rvalue"
            {static_assert(!is_reference<_Hp>::value ||
             ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/tuple:414:13: note: in instantiation of function template specialization 'std::__1::__tuple_leaf<0, const int &, false>::__tuple_leaf<const int, void>' requested here
                __tuple_leaf<_Uf, _Tf>(_VSTD::forward<_Up>(__u))...,
                ^
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/tuple:587:15: note: in instantiation of function template specialization 'std::__1::__tuple_impl<std::__1::__tuple_indices<0>, const int &>::__tuple_impl<0, const int &, const int>' requested here
                : base_(typename __make_tuple_indices<sizeof...(_Up)>::type(),
                  ^
    /Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c/upcxx/future/make_future.hpp:28:23: note: in instantiation of function template specialization 'std::__1::tuple<const int &>::tuple<const int, false>' requested here
                /*values*/std::tuple<T...>{std::move(values)...}
                          ^
    /Users/bonachea/UPC/upcxx/.nobs/art/1675c09f378f769b0368d7acfa75aaae2a96e19c/upcxx/future/make_future.hpp:46:12: note: in instantiation of member function 'upcxx::detail::make_future_<false, const int &>::operator()' requested here
        return detail::make_future<T...>()(std::move(values)...);
               ^
    /Users/bonachea/UPC/upcxx/test/future.cpp:110:9: note: in instantiation of function template specialization 'upcxx::make_future<const int &>' requested here
            make_future<const int&>(arg)
            ^
    1 error generated.
    bash-3.2$ c++ --version
    Apple LLVM version 8.1.0 (clang-802.0.42)
    Target: x86_64-apple-darwin16.7.0
    Thread model: posix
    InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
    bash-3.2$ git describe
    fatal: No tags can describe 'd711692ab006969abb63b182ef6fd5e968150869'.
    Try --always, or create some tags.
    

    The link error on Cygwin+clang in the first comment is also still present, although that is lower priority.

  4. Dan Bonachea reporter

    To clarify, the OS X Sierra errors above are using the default XCode clang compiler in /usr/bin/, not a homebrew install of gcc (which ideally we should not require).

  5. Former user Account Deleted

    I'm not getting any warnings or errors and am also using OS X Sierra with the default clang=8.1.0. Running c++ --version gives me mostly the same output as yours except see InstalledDir:

    Apple LLVM version 8.1.0 (clang-802.0.42)
    Target: x86_64-apple-darwin16.7.0
    Thread model: posix
    InstalledDir: /Library/Developer/CommandLineTools/usr/bin
    
  6. Dan Bonachea reporter

    Same error persists in f441bf34ad33e118ed6294b954d768c2e1c7b5f4

    Here is more complete system info:

    ash-3.2$ xcodebuild -version               
    Xcode 8.3.3
    Build version 8E3004b
    bash-3.2$ /usr/bin/c++ --version                       
    Apple LLVM version 8.1.0 (clang-802.0.42)
    Target: x86_64-apple-darwin16.7.0
    Thread model: posix
    InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
    bash-3.2$ system_profiler SPSoftwareDataType
    Software:
    
        System Software Overview:
    
          System Version: macOS 10.12.6 (16G29)
          Kernel Version: Darwin 16.7.0
          Boot Volume: Macintosh HD
          Boot Mode: Normal
          Computer Name: sierra
          User Name: Dan Bonachea (bonachea)
          Secure Virtual Memory: Enabled
          System Integrity Protection: Enabled
          Time since boot: 6 days 15:48
    

    This is a freshly-installed Sierra that Paul setup in our machine room for testing purposes a few weeks ago, so it should be pretty close to what a user with a recent, bare minimum install might have.

    @PHHargrove can you please add a user for John?

  7. Former user Account Deleted

    I fixed the static_assert template error and now both gcc and clang on sierra pass test/future and test/dist_object. The linker error just went away magically.

  8. Dan Bonachea reporter

    The linker error just went away magically.

    The linker error is still present on my laptop Cygwin with clang 3.8.1, but not on the main turtle VM which is running clang 3.9.1. I will give John access to the affected version.

    I don't know offhand of another system running clang 3.8.1 that I can use to determine if the remaining problem is cygwin-specific. Downgrading this to minor until we have reason to believe this affects an important platform.

  9. Paul Hargrove

    @bonachea wrote:

    I don't know offhand of another system running clang 3.8.1 that I can use to determine if the remaining problem is cygwin-specific.

    In a sneak preview of my upcoming book Building out-of-date compilers for fun and profit, I will be testing clang-3.8.1 on Linux/x86_64.
    This will determine if this issue is Cygwin specific, as well as getting us a step closer to having a lower-bound for clang on Linux.

  10. Paul Hargrove

    On Linux/x86-64 I am testing with clang-3.8.1 built with gcc-7.2.0.
    Note that this means clang-3.8.1 is using libstdc++ from gcc-7.2.0. This may be a more meaningful difference from Dan's Cygwin system than the host O/S.
    However, the missing symbol __emutls_v._ZN12_GLOBAL__N_112active_tail_E is related to thread-local storage (tls), which leaves me thinking O/S is the deciding factor.

    Regardless of which difference is the deciding one, I can attest that this configuration can build all the tests.

  11. Dan Bonachea reporter

    Same problem confirmed using the latest Cygwin 2.8.2 (tortoise) and clang 4.0.1, where the link errors look like this:

    /cygdrive/e/Dan/UPC/bupcr-ex-clang/dbg/upcxx/.nobs/art/3664139879587419b8821bcf6db473dc4fb15696.persona.cpp.o:(.text+0x150): multiple definition of `TLS wrapper function for upcxx::detail::tl_default_persona'
    
    /cygdrive/e/Dan/UPC/bupcr-ex-clang/dbg/upcxx/.nobs/art/4c7112e8118280f5abc5c87086aa087ee81dc87f.runtime.cpp.o:(.text+0x2bd0): first defined here
    
    /cygdrive/e/Dan/UPC/bupcr-ex-clang/dbg/upcxx/.nobs/art/3664139879587419b8821bcf6db473dc4fb15696.persona.cpp.o:(.text+0x200): multiple definition of `TLS wrapper function for upcxx::detail::tl_progressing'
    
    /cygdrive/e/Dan/UPC/bupcr-ex-clang/dbg/upcxx/.nobs/art/4c7112e8118280f5abc5c87086aa087ee81dc87f.runtime.cpp.o:(.text+0x2910): first defined here
    
    /cygdrive/e/Dan/UPC/bupcr-ex-clang/dbg/upcxx/.nobs/art/3664139879587419b8821bcf6db473dc4fb15696.persona.cpp.o:(.text+0x220): multiple definition of `TLS wrapper function for upcxx::detail::tl_top_persona'
    
    /cygdrive/e/Dan/UPC/bupcr-ex-clang/dbg/upcxx/.nobs/art/4c7112e8118280f5abc5c87086aa087ee81dc87f.runtime.cpp.o:(.text+0x2b90): first defined here
    

    This is notably different from the TLS problem with Cygwin+gcc described in issue #58, and the workaround for that issue is NOT effective at making Cygwin+clang work.

    If the use of the C++ thread_local keyword in the SEQ backend is disabled (ie -Dthread_local=) that is sufficient for the SEQ backend to pass all current tests on this platform, but is obviously not a workable solution for the PAR backend.

    It's also worth noting this platform has a fully-functional implementation of both C-language __thread and pthread_getspecific, either of which could be used to implement working TLS for the PAR backend if we had an internal procedural abstraction layer for TLS instead of raw use of C++ thread_local, which relies on OS-level linker support that appears to be shaky on this platform.

    CC: @PHHargrove

  12. BrianS

    pthread_getspecific is a bit of an awkward API. going through a C library interface for any reference to TLS. Do all compilers implement TLS by generating calls to a library code like pthread_getspecific ?

  13. Dan Bonachea reporter

    @bvstraalen: I think you may be missing some of the context of this discussion. See the email thread "Use of thread_local in UPC++" that you were copied on.

    The design motivation for our internal TLS to allow use of a procedural interface like pthread_getspecific is not for elegance or even performance, it's for portability and interoperability. The C++ thread_local feature imposes some rather strong feature requirements on the system linker which are not available on all OSs (even when using compilers that are otherwise C++11-compliant), and it just plain does the wrong thing for user-level threading libraries like Qthreads with whom we wish to interoperate.

  14. Dan Bonachea reporter

    Same problem persists on the latest Cygwin 2.9/64/Win10 and clang++ v5.0.1:

    2b0f34a4daf9d0d.persona.cpp.o:(.text+0x150): multiple definition of `TLS wrapper function for upcxx::detail::tl_default_persona'
    83788957211442f.runtime.cpp.o:(.text+0x14e0): first defined here
    2b0f34a4daf9d0d.persona.cpp.o: In function `~lpc_inbox_locked':
    81c1a8ae239b41a/upcxx/persona.hpp:189: multiple definition of `TLS wrapper function for upcxx::detail::tl_progressing'
    83788957211442f.runtime.cpp.o:/cygdrive/e/Dan/UPC/bupcr64cyg-clang/dbg/upcxx/src/backend/gasnet/runtime.cpp:313: first defined here
    2b0f34a4daf9d0d.persona.cpp.o: In function `~lpc_inbox_locked':
    81c1a8ae239b41a/upcxx/persona.hpp:190: multiple definition of `TLS wrapper function for upcxx::detail::tl_top_persona'
    83788957211442f.runtime.cpp.o:/cygdrive/e/Dan/UPC/bupcr64cyg-clang/dbg/upcxx/.nobs/art/8bb7eee14b8f75b54db34bdfd81c1a8ae239b41a/upcxx/persona.hpp:315: first defined here
    clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
    
  15. Log in to comment