Regression on cygwin/opt: undefined symbol `TLS init function for upcxx::detail::tl_{progressing,top_persona}

Issue #58 resolved
Dan Bonachea created an issue

Starting 3 days ago, UPC++ now fails to link all programs on Cygwin/gcc/opt, on two different systems running Cygwin 2.6 and 2.7.

First automated test on turtle showing the regression

git bisect shows the regression was introduced in 8c7c872 when the par backend was added, despite the fact the test in question is using the gasnet1_seq backend. Full output from my laptop for that revision is below.

The problem appears to be specific to opt-mode.

Marking as minor since this is not an officially supported platform for this release.

{lh ~/UPC/upcxx} git describe --always
8c7c872
{lh ~/UPC/upcxx} rm -Rf .nobs ; env GASNET=/home/bonachea/UPC/bupcr-ex/opt/gasnet DBGSYM=0 OPTLEV=3 nobs exe test/dist_object.cpp
Building GASNet (conduit=smp, threading=seq)...
(in /home/bonachea/UPC/bupcr-ex/opt/gasnet/smp-conduit)
make seq

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make seq

../other/Makefile-conduit.mak:270: warning: overriding recipe for target 'Makefile'
Makefile:597: warning: ignoring old recipe for target 'Makefile'
make[1]: Entering directory '/home/bonachea/UPC/bupcr-ex/opt/gasnet/smp-conduit'
../other/Makefile-conduit.mak:270: warning: overriding recipe for target 'Makefile'
Makefile:597: warning: ignoring old recipe for target 'Makefile'
make[1]: 'gasnet-smp-seq.pc' is up to date.
make[1]: 'libgasnet-smp-seq.a' is up to date.
make[1]: Leaving directory '/home/bonachea/UPC/bupcr-ex/opt/gasnet/smp-conduit'
g++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/0b8b0ced51232a4bd1a57a66ba3f3673267426cd -DUPCXX_BACKEND=gasnet1_seq -D_GNU_SOURCE=1 -DGASNET_SEQ -I/home/bonachea/UPC/upcr-ex/gasnet -I/home/bonachea/UPC/upcr-ex/gasnet/smp-conduit -I/home/bonachea/UPC/upcr-ex/gasnet/other -I/home/bonachea/UPC/upcr-ex/gasnet/extended-ref -I/home/bonachea/UPC/bupcr-ex/opt/gasnet -MM -MT x /home/bonachea/UPC/upcxx/test/dist_object.cpp

g++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/0b8b0ced51232a4bd1a57a66ba3f3673267426cd -DUPCXX_BACKEND=gasnet1_seq -D_GNU_SOURCE=1 -DGASNET_SEQ -I/home/bonachea/UPC/upcr-ex/gasnet -I/home/bonachea/UPC/upcr-ex/gasnet/smp-conduit -I/home/bonachea/UPC/upcr-ex/gasnet/other -I/home/bonachea/UPC/upcr-ex/gasnet/extended-ref -I/home/bonachea/UPC/bupcr-ex/opt/gasnet -O3 -Wall -O2 -Wno-unused -Wno-unused-parameter -Wno-address -c /home/bonachea/UPC/upcxx/test/dist_object.cpp -o /home/bonachea/UPC/upcxx/.nobs/art/a972f70c9c06cb66f42366d435f45beedeb20c9f.dist_object.cpp.o

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

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

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

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

g++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/03a6ec09e66a049e55df65a5c955ecbae0a74872 -MM -MT x /home/bonachea/UPC/upcxx/src/persona.cpp

g++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/03a6ec09e66a049e55df65a5c955ecbae0a74872 -MM -MT x /home/bonachea/UPC/upcxx/src/lpc_inbox.cpp

g++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/03a6ec09e66a049e55df65a5c955ecbae0a74872 -DUPCXX_BACKEND=gasnet1_seq -D_GNU_SOURCE=1 -DGASNET_SEQ -I/home/bonachea/UPC/upcr-ex/gasnet -I/home/bonachea/UPC/upcr-ex/gasnet/smp-conduit -I/home/bonachea/UPC/upcr-ex/gasnet/other -I/home/bonachea/UPC/upcr-ex/gasnet/extended-ref -I/home/bonachea/UPC/bupcr-ex/opt/gasnet -MM -MT x /home/bonachea/UPC/upcxx/src/dist_object.cpp

g++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/03a6ec09e66a049e55df65a5c955ecbae0a74872 -DUPCXX_BACKEND=gasnet1_seq -D_GNU_SOURCE=1 -DGASNET_SEQ -I/home/bonachea/UPC/upcr-ex/gasnet -I/home/bonachea/UPC/upcr-ex/gasnet/smp-conduit -I/home/bonachea/UPC/upcr-ex/gasnet/other -I/home/bonachea/UPC/upcr-ex/gasnet/extended-ref -I/home/bonachea/UPC/bupcr-ex/opt/gasnet -MM -MT x /home/bonachea/UPC/upcxx/src/backend/gasnet/runtime.cpp

g++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/03a6ec09e66a049e55df65a5c955ecbae0a74872 -DUPCXX_BACKEND=gasnet1_seq -D_GNU_SOURCE=1 -DGASNET_SEQ -I/home/bonachea/UPC/upcr-ex/gasnet -I/home/bonachea/UPC/upcr-ex/gasnet/smp-conduit -I/home/bonachea/UPC/upcr-ex/gasnet/other -I/home/bonachea/UPC/upcr-ex/gasnet/extended-ref -I/home/bonachea/UPC/bupcr-ex/opt/gasnet -MM -MT x /home/bonachea/UPC/upcxx/src/backend/gasnet/handle_cb.cpp

g++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/03a6ec09e66a049e55df65a5c955ecbae0a74872 -O3 -Wall -c /home/bonachea/UPC/upcxx/src/future/core.cpp -o /home/bonachea/UPC/upcxx/.nobs/art/1569a0bc5913190440a28fa2064db29403c0b724.core.cpp.o

g++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/03a6ec09e66a049e55df65a5c955ecbae0a74872 -O3 -Wall -c /home/bonachea/UPC/upcxx/src/diagnostic.cpp -o /home/bonachea/UPC/upcxx/.nobs/art/256c82cc1d5f425f8057d7edcdd299a670833e57.diagnostic.cpp.o

g++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/03a6ec09e66a049e55df65a5c955ecbae0a74872 -O3 -Wall -c /home/bonachea/UPC/upcxx/src/packing.cpp -o /home/bonachea/UPC/upcxx/.nobs/art/5cb0b70a76fb681f942701741995d65fff20e15b.packing.cpp.o

g++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/03a6ec09e66a049e55df65a5c955ecbae0a74872 -O3 -Wall -c /home/bonachea/UPC/upcxx/src/digest.cpp -o /home/bonachea/UPC/upcxx/.nobs/art/f17e13f71b91904cd63117914c08fd2d7fa0d7b0.digest.cpp.o

g++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/03a6ec09e66a049e55df65a5c955ecbae0a74872 -O3 -Wall -c /home/bonachea/UPC/upcxx/src/lpc_inbox.cpp -o /home/bonachea/UPC/upcxx/.nobs/art/58adfef339517ece0645c5553bf56a6e6a51d1b7.lpc_inbox.cpp.o

g++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/03a6ec09e66a049e55df65a5c955ecbae0a74872 -O3 -Wall -c /home/bonachea/UPC/upcxx/src/persona.cpp -o /home/bonachea/UPC/upcxx/.nobs/art/80ab0c60931e88c1f09ca3aa7f2cff77fea741d6.persona.cpp.o

g++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/03a6ec09e66a049e55df65a5c955ecbae0a74872 -DUPCXX_BACKEND=gasnet1_seq -D_GNU_SOURCE=1 -DGASNET_SEQ -I/home/bonachea/UPC/upcr-ex/gasnet -I/home/bonachea/UPC/upcr-ex/gasnet/smp-conduit -I/home/bonachea/UPC/upcr-ex/gasnet/other -I/home/bonachea/UPC/upcr-ex/gasnet/extended-ref -I/home/bonachea/UPC/bupcr-ex/opt/gasnet -O3 -Wall -O2 -Wno-unused -Wno-unused-parameter -Wno-address -c /home/bonachea/UPC/upcxx/src/dist_object.cpp -o /home/bonachea/UPC/upcxx/.nobs/art/4bbcbc03b656e900501c6fbb41949278c5e4fcc0.dist_object.cpp.o

g++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/03a6ec09e66a049e55df65a5c955ecbae0a74872 -DUPCXX_BACKEND=gasnet1_seq -D_GNU_SOURCE=1 -DGASNET_SEQ -I/home/bonachea/UPC/upcr-ex/gasnet -I/home/bonachea/UPC/upcr-ex/gasnet/smp-conduit -I/home/bonachea/UPC/upcr-ex/gasnet/other -I/home/bonachea/UPC/upcr-ex/gasnet/extended-ref -I/home/bonachea/UPC/bupcr-ex/opt/gasnet -O3 -Wall -O2 -Wno-unused -Wno-unused-parameter -Wno-address -c /home/bonachea/UPC/upcxx/src/backend/gasnet/handle_cb.cpp -o /home/bonachea/UPC/upcxx/.nobs/art/e51fa25fa1efb8e9c60c525c888356c937b90d3d.handle_cb.cpp.o

g++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/03a6ec09e66a049e55df65a5c955ecbae0a74872 -DUPCXX_BACKEND=gasnet1_seq -D_GNU_SOURCE=1 -DGASNET_SEQ -I/home/bonachea/UPC/upcr-ex/gasnet -I/home/bonachea/UPC/upcr-ex/gasnet/smp-conduit -I/home/bonachea/UPC/upcr-ex/gasnet/other -I/home/bonachea/UPC/upcr-ex/gasnet/extended-ref -I/home/bonachea/UPC/bupcr-ex/opt/gasnet -O3 -Wall -O2 -Wno-unused -Wno-unused-parameter -Wno-address -c /home/bonachea/UPC/upcxx/src/backend/gasnet/runtime.cpp -o /home/bonachea/UPC/upcxx/.nobs/art/482502fcc692e658ab41f12fdc72929e105ae7ef.runtime.cpp.o

g++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/03a6ec09e66a049e55df65a5c955ecbae0a74872 -MM -MT x /home/bonachea/UPC/upcxx/src/backend/gasnet/rpc_inbox.cpp

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

gcc -std=c11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/03a6ec09e66a049e55df65a5c955ecbae0a74872 -O3 -Wall -c /home/bonachea/UPC/upcxx/src/dl_malloc.c -o /home/bonachea/UPC/upcxx/.nobs/art/5c155e5daeaa8605926b058adb8fedfc104f6adf.dl_malloc.c.o

g++ -std=c++11 -D_GNU_SOURCE=1 -I/home/bonachea/UPC/upcxx/.nobs/art/03a6ec09e66a049e55df65a5c955ecbae0a74872 -O3 -Wall -c /home/bonachea/UPC/upcxx/src/backend/gasnet/rpc_inbox.cpp -o /home/bonachea/UPC/upcxx/.nobs/art/aa2831f649332863b74116df14d03be073f19130.rpc_inbox.cpp.o

g++ -O3 --param max-inline-insns-single=35000 --param inline-unit-growth=10000 --param large-function-growth=200000 -Winline -Wno-unused -Wno-unused-parameter -Wno-address -o /home/bonachea/UPC/upcxx/.nobs/art/45e35612a8fcc756261e7efcf600ba8dd7272756.x /home/bonachea/UPC/upcxx/.nobs/art/256c82cc1d5f425f8057d7edcdd299a670833e57.diagnostic.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/1569a0bc5913190440a28fa2064db29403c0b724.core.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/5cb0b70a76fb681f942701741995d65fff20e15b.packing.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/58adfef339517ece0645c5553bf56a6e6a51d1b7.lpc_inbox.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/f17e13f71b91904cd63117914c08fd2d7fa0d7b0.digest.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/80ab0c60931e88c1f09ca3aa7f2cff77fea741d6.persona.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/4bbcbc03b656e900501c6fbb41949278c5e4fcc0.dist_object.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/aa2831f649332863b74116df14d03be073f19130.rpc_inbox.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/5c155e5daeaa8605926b058adb8fedfc104f6adf.dl_malloc.c.o /home/bonachea/UPC/upcxx/.nobs/art/e51fa25fa1efb8e9c60c525c888356c937b90d3d.handle_cb.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/a972f70c9c06cb66f42366d435f45beedeb20c9f.dist_object.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/482502fcc692e658ab41f12fdc72929e105ae7ef.runtime.cpp.o -L/home/bonachea/UPC/bupcr-ex/opt/gasnet/smp-conduit -lpthread -lgasnet-smp-seq -L/usr/lib/gcc/x86_64-pc-cygwin/5.4.0 -lgcc -lm

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make seq

../other/Makefile-conduit.mak:270: warning: overriding recipe for target 'Makefile'
Makefile:597: warning: ignoring old recipe for target 'Makefile'
make[1]: Entering directory '/home/bonachea/UPC/bupcr-ex/opt/gasnet/smp-conduit'
../other/Makefile-conduit.mak:270: warning: overriding recipe for target 'Makefile'
Makefile:597: warning: ignoring old recipe for target 'Makefile'
make[1]: 'gasnet-smp-seq.pc' is up to date.
make[1]: 'libgasnet-smp-seq.a' is up to date.
make[1]: Leaving directory '/home/bonachea/UPC/bupcr-ex/opt/gasnet/smp-conduit'

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
g++ -O3 --param max-inline-insns-single=35000 --param inline-unit-growth=10000 --param large-function-growth=200000 -Winline -Wno-unused -Wno-unused-parameter -Wno-address -o /home/bonachea/UPC/upcxx/.nobs/art/45e35612a8fcc756261e7efcf600ba8dd7272756.x /home/bonachea/UPC/upcxx/.nobs/art/256c82cc1d5f425f8057d7edcdd299a670833e57.diagnostic.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/1569a0bc5913190440a28fa2064db29403c0b724.core.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/5cb0b70a76fb681f942701741995d65fff20e15b.packing.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/58adfef339517ece0645c5553bf56a6e6a51d1b7.lpc_inbox.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/f17e13f71b91904cd63117914c08fd2d7fa0d7b0.digest.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/80ab0c60931e88c1f09ca3aa7f2cff77fea741d6.persona.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/4bbcbc03b656e900501c6fbb41949278c5e4fcc0.dist_object.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/aa2831f649332863b74116df14d03be073f19130.rpc_inbox.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/5c155e5daeaa8605926b058adb8fedfc104f6adf.dl_malloc.c.o /home/bonachea/UPC/upcxx/.nobs/art/e51fa25fa1efb8e9c60c525c888356c937b90d3d.handle_cb.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/a972f70c9c06cb66f42366d435f45beedeb20c9f.dist_object.cpp.o /home/bonachea/UPC/upcxx/.nobs/art/482502fcc692e658ab41f12fdc72929e105ae7ef.runtime.cpp.o -L/home/bonachea/UPC/bupcr-ex/opt/gasnet/smp-conduit -lpthread -lgasnet-smp-seq -L/usr/lib/gcc/x86_64-pc-cygwin/5.4.0 -lgcc -lm

/home/bonachea/UPC/upcxx/.nobs/art/482502fcc692e658ab41f12fdc72929e105ae7ef.runtime.cpp.o:runtime.cpp:(.text+0x263): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for upcxx::detail::tl_progressing'
/home/bonachea/UPC/upcxx/.nobs/art/482502fcc692e658ab41f12fdc72929e105ae7ef.runtime.cpp.o:runtime.cpp:(.text+0x26d): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for upcxx::detail::tl_progressing'
/home/bonachea/UPC/upcxx/.nobs/art/482502fcc692e658ab41f12fdc72929e105ae7ef.runtime.cpp.o:runtime.cpp:(.text+0x27b): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for upcxx::detail::tl_top_persona'
/home/bonachea/UPC/upcxx/.nobs/art/482502fcc692e658ab41f12fdc72929e105ae7ef.runtime.cpp.o:runtime.cpp:(.text+0x2be): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for upcxx::detail::tl_top_persona'
/home/bonachea/UPC/upcxx/.nobs/art/482502fcc692e658ab41f12fdc72929e105ae7ef.runtime.cpp.o:runtime.cpp:(.text+0x2c6): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for upcxx::detail::tl_top_persona'
/home/bonachea/UPC/upcxx/.nobs/art/482502fcc692e658ab41f12fdc72929e105ae7ef.runtime.cpp.o:runtime.cpp:(.text+0x2e8): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for upcxx::detail::tl_top_persona'
/home/bonachea/UPC/upcxx/.nobs/art/482502fcc692e658ab41f12fdc72929e105ae7ef.runtime.cpp.o:runtime.cpp:(.text+0x2f0): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for upcxx::detail::tl_top_persona'
/home/bonachea/UPC/upcxx/.nobs/art/482502fcc692e658ab41f12fdc72929e105ae7ef.runtime.cpp.o:runtime.cpp:(.text+0x346): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for upcxx::detail::tl_top_persona'
/home/bonachea/UPC/upcxx/.nobs/art/482502fcc692e658ab41f12fdc72929e105ae7ef.runtime.cpp.o:runtime.cpp:(.text+0x382): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for upcxx::detail::tl_top_persona'
/home/bonachea/UPC/upcxx/.nobs/art/482502fcc692e658ab41f12fdc72929e105ae7ef.runtime.cpp.o:runtime.cpp:(.text+0x3a0): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for upcxx::detail::tl_progressing'
/home/bonachea/UPC/upcxx/.nobs/art/482502fcc692e658ab41f12fdc72929e105ae7ef.runtime.cpp.o:runtime.cpp:(.text+0x589): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status

CC: @PHHargrove

Comments (13)

  1. Paul Hargrove

    Before the question is asked. This is from the automated test Dan linked to:

    g++ (GCC) 5.4.0
    Copyright (C) 2015 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
  2. Dan Bonachea reporter

    I found a g++ bug report that may be relevant, apparently triggered by the use of extern thread_local variables from within inline functions (exactly the situation we have in persona.*).

    I was able to workaround the problem for our test programs using:

    LDFLAGS='-Wl,--image-base,0x10000000'
    

    however I don't know if that's a reliable solution or what other negative consequences it might have.

  3. Paul Hargrove

    FWIW: I have built gcc-7.2.0 on Cygwin.
    The build was broken in various ways, but was functional enough to reproduce the errors reported in this issue.
    So, if this is simply a g++/gcc bug, it is still present in 7.2.0.

  4. Dan Bonachea reporter

    Underlying problem still exists on latest Cygwin 2.9/64/win10 + g++ 6.4.0, when the workaround is disabled.

    Workaround remains effective for g++ to pass CI.

  5. Dan Bonachea reporter

    Despite some minor (unrelated) warnings, initial tests with pull request #28 and Cygwin 2.10/64/win10 g++6.4.0 and clang 5.0.1 indicate the PR may resolve this problem, obviating the need for the additional LDFLAGS.

  6. Roger Pack

    It's a shame I can't actually see any PR's etc. to try and understand this problem more fully for related error messages...

  7. Dan Bonachea reporter

    It's a shame I can't actually see any PR's etc. to try and understand this problem more fully for related error messages...

    @rogerdpack : this issue should be resolved in the current 2018.9.0 release (although Cygwin is not an officially supported platform).

    If you are encountering a problem with the latest release, please open a new issue report.

  8. Dan Bonachea reporter

    @rogerdpack coincidentally, our PR's actually should be going public later this week.

    However to save you the suspense - we used the LDFLAGS='-Wl,--image-base,0x10000000' workaround for Cygwin discussed above for awhile. However we ultimately resolved it by excising the use of thread_local entirely, because thread_local constructors are not portably robust (see issue #49), and on some platforms like MacOS there is no workaround. We now instead use __thread and manual branch for initialization, which seems to be more portable in practice (although still less portable than pthread_{get,set}specific)

  9. Log in to comment