<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]--></head><body><div style="font-family:courier new, courier, monaco, monospace, sans-serif;font-size:13px;"><div style="font-family: courier new, courier, monaco, monospace, sans-serif; font-size: 13px;"><div id="ydp65e0f14ayiv4118553652"><div><div style="font-family: courier new, courier, monaco, monospace, sans-serif; font-size: 13px;"><div><span><p>Hi,</p><p><br></p><p>I got some error when building build2-toolchain on cygwin64:<br>````<br>Administrator@ND9999999 /cygdrive/g/prj/odb/build2-build/build2-toolchain-0.6.2/build2<br>$ ./bootstrap.sh g++<br>+ g++ -I../libbutl -I. '-DBUILD2_HOST_TRIPLET="x86_64-unknown-cygwin"' -std=c++1y -o build2/b-boot build2/algorithm.cxx build2/b.cxx build2/b-options.cxx build2/context.cxx build2/depdb.cxx build2/diagnostics.cxx build2/dump.cxx build2/file.cxx build2/filesystem.cxx build2/function.cxx build2/functions-builtin.cxx build2/functions-filesystem.cxx build2/functions-path.cxx build2/functions-process-path.cxx build2/functions-regex.cxx build2/functions-string.cxx build2/functions-target-triplet.cxx build2/lexer.cxx build2/module.cxx build2/name.cxx build2/operation.cxx build2/parser.cxx build2/prerequisite.cxx build2/rule.cxx build2/scheduler.cxx build2/scope.cxx build2/search.cxx build2/spec.cxx build2/target.cxx build2/token.cxx build2/types-parsers.cxx build2/utility.cxx build2/variable.cxx build2/config/init.cxx build2/config/module.cxx build2/config/operation.cxx build2/config/utility.cxx build2/dist/init.cxx build2/dist/module.cxx build2/dist/operation.cxx build2/dist/rule.cxx build2/bin/guess.cxx build2/bin/init.cxx build2/bin/rule.cxx build2/bin/target.cxx build2/c/init.cxx build2/cc/common.cxx build2/cc/compile.cxx build2/cc/gcc.cxx build2/cc/guess.cxx build2/cc/init.cxx build2/cc/install.cxx build2/cc/lexer.cxx build2/cc/link.cxx build2/cc/module.cxx build2/cc/msvc.cxx build2/cc/parser.cxx build2/cc/pkgconfig.cxx build2/cc/target.cxx build2/cc/utility.cxx build2/cc/windows-manifest.cxx build2/cc/windows-rpath.cxx build2/cxx/init.cxx build2/cxx/target.cxx build2/cli/init.cxx build2/cli/rule.cxx build2/cli/target.cxx build2/test/common.cxx build2/test/init.cxx build2/test/operation.cxx build2/test/rule.cxx build2/test/target.cxx build2/test/script/builtin.cxx build2/test/script/lexer.cxx build2/test/script/parser.cxx build2/test/script/regex.cxx build2/test/script/runner.cxx build2/test/script/script.cxx build2/test/script/token.cxx build2/version/init.cxx build2/version/module.cxx build2/version/rule.cxx build2/version/snapshot.cxx build2/version/snapshot-git.cxx build2/install/init.cxx build2/install/operation.cxx build2/install/rule.cxx build2/pkgconfig/init.cxx build2/pkgconfig/target.cxx ../libbutl/libbutl/base64.cxx ../libbutl/libbutl/char-scanner.cxx ../libbutl/libbutl/curl.cxx ../libbutl/libbutl/diagnostics.cxx ../libbutl/libbutl/fdstream.cxx ../libbutl/libbutl/filesystem.cxx ../libbutl/libbutl/manifest-parser.cxx ../libbutl/libbutl/manifest-serializer.cxx ../libbutl/libbutl/openssl.cxx ../libbutl/libbutl/pager.cxx ../libbutl/libbutl/path.cxx ../libbutl/libbutl/process.cxx ../libbutl/libbutl/process-run.cxx ../libbutl/libbutl/regex.cxx ../libbutl/libbutl/sendmail.cxx ../libbutl/libbutl/sha256.cxx ../libbutl/libbutl/standard-version.cxx ../libbutl/libbutl/string-parser.cxx ../libbutl/libbutl/tab-parser.cxx ../libbutl/libbutl/target-triplet.cxx ../libbutl/libbutl/timestamp.cxx ../libbutl/libbutl/utility.cxx ../libbutl/libbutl/win32-utility.cxx -lpthread<br>In file included from ../libbutl/libbutl/ft/shared_mutex.hxx:9:0,<br>                 from ./build2/types.hxx:26,<br>                 from ./build2/algorithm.hxx:8,<br>                 from build2/algorithm.cxx:5:<br>/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/include/c++/shared_mutex: In member function ‘void std::__shared_mutex_pthread::lock()’:<br>/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/include/c++/shared_mutex:105:51: error: ‘pthread_rwlock_wrlock’ was not declared in this scope<br>       int __ret = pthread_rwlock_wrlock(&_M_rwlock);<br>````</p><p>I suggest to change "-std=c++1y" to "-std=gnu++14" for g++ options. BTW, "-std=c++14" doesn't work either.<br>See the attached patch file.</p><p>FYI:<br><a class="enhancr_card_7661932992" href="https://stackoverflow.com/questions/38139631/posix-visible-is-ruining-my-pthreading-on-cygwin">__POSIX_VISIBLE is ruining my pthreading on cygwin</a></p><div><br></div><div class="ydp29862cadyahoo-link-enhancr-card ydp29862cadymail-preserve-class ydp29862cadymail-preserve-style" id="ydp29862cadenhancr_card_7661932992" style='font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif; max-width: 400px;' contenteditable="false" data-size="MEDIUM" data-type="YENHANCER" data-url="https://stackoverflow.com/questions/38139631/posix-visible-is-ruining-my-pthreading-on-cygwin"><a class="ydp29862cadyahoo-enhancr-cardlink" style="color: rgb(0, 0, 0) !important; text-decoration: none !important;" href="https://stackoverflow.com/questions/38139631/posix-visible-is-ruining-my-pthreading-on-cygwin" target="_blank" rel="nofollow"><table class="ydp29862cadcard-wrapper ydp29862cadyahoo-ignore-table" style="max-width: 400px;" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td width="400"><table width="100%" class="ydp29862cadcard ydp29862cadyahoo-ignore-table" style="border-radius: 2px; border: 1px solid rgb(224, 228, 233); border-image: none; max-width: 400px;" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td height="175" class="ydp29862cadcard-primary-image-cell" background="https://s.yimg.com/lo/api/res/1.2/1wUG32ibNb9ItOe48vjFFw--~A/Zmk9ZmlsbDt3PTQwMDtoPTIwMDthcHBpZD1pZXh0cmFjdA--/https://cdn.sstatic.net/Sites/stackoverflow/img/apple-touch-icon@2.png?v=73d79a89bded.cf.jpg" valign="top" style="border-radius: 2px 2px 0px 0px; position: relative; min-height: 175px; background-repeat: no-repeat; background-size: cover; background-color: rgb(0, 0, 0);" bgcolor="#000000"><!--[if gte mso 9]><v:rect fill="true" stroke="false" style="width:396px;height:175px;position:absolute;top:0;left:0;"><v:fill type="frame" color="#000000" src="https://s.yimg.com/lo/api/res/1.2/1wUG32ibNb9ItOe48vjFFw--~A/Zmk9ZmlsbDt3PTQwMDtoPTIwMDthcHBpZD1pZXh0cmFjdA--/https://cdn.sstatic.net/Sites/stackoverflow/img/apple-touch-icon@2.png?v=73d79a89bded.cf.jpg"/></v:rect><![endif]--><table class="ydp29862cadcard-overlay-container-table ydp29862cadyahoo-ignore-table" style="width: 100%;" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td class="ydp29862cadcard-overlay-cell" background="https://s.yimg.com/cv/ae/nq/storm/assets/enhancrV21/1/enhancr_gradient-400x175.png" valign="top" style="border-radius: 2px 2px 0px 0px; min-height: 175px; background-color: transparent;" bgcolor="transparent"><!--[if gte mso 9]><v:rect fill="true" stroke="false" style="width:396px;height:175px;position:absolute;top:-18px;left:0;"><v:fill type="pattern" color="#000000" src="https://s.yimg.com/cv/ae/nq/storm/assets/enhancrV21/1/enhancr_gradient-400x175.png"/><v:textbox inset="0,0,20px,0"><![endif]--><table height="175" class="ydp29862cadyahoo-ignore-table" style="width: 100%; min-height: 175px;" border="0"><tbody><tr><td class="ydp29862cadcard-richInfo2" style="padding: 15px 0px 0px 15px; text-align: left; vertical-align: top;"></td><td class="ydp29862cadcard-actions" style="padding: 15px 15px 0px 0px; text-align: right; vertical-align: top;"><div class="ydp29862cadcard-share-container"></div></td></tr></tbody></table><!--[if gte mso 9]></v:textbox></v:rect><![endif]--></td></tr></tbody></table></td></tr><tr><td><table align="center" class="ydp29862cadcard-info ydp29862cadyahoo-ignore-table" style="border-radius: 0px 0px 2px 2px; width: 100%; border-top-color: rgb(224, 228, 233); border-top-width: 1px; border-top-style: solid; position: relative; z-index: 2; max-width: 400px; background-image: none; background-attachment: scroll; background-repeat: repeat; background-size: auto; background-color: rgb(255, 255, 255);" border="0" cellspacing="0" cellpadding="0"><tbody><tr><td style="padding: 16px 0px 16px 12px; border-radius: 0px 0px 0px 2px; vertical-align: top; background-color: rgb(255, 255, 255);"></td><td style='padding: 12px 24px 16px 12px; border-radius: 0px 0px 2px; width: 99%; font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif; vertical-align: middle;'><h2 class="ydp29862cadcard-title" style='margin: 0px 0px 6px; color: rgb(38, 40, 42); line-height: 19px; font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif; font-size: 14px;'>__POSIX_VISIBLE is ruining my pthreading on cygwin</h2><p class="ydp29862cadcard-description" style="margin: 0px; color: rgb(151, 155, 167); line-height: 16px; font-size: 12px;">I'm compiling a project that uses pthreads with gcc (g++ exactly) on cygwin. Seeing as how I have always develop...</p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></a></div><div><br></div><div>My g++ version:<br></div><p>````</p><p><span></span><p>Administrator@ND9999999 /cygdrive/g/prj/odb/build2-build/build2-toolchain-0.6.2/build2<br>$ which g++<br>/usr/bin/g++</p><p>Administrator@ND9999999 /cygdrive/g/prj/odb/build2-build/build2-toolchain-0.6.2/build2<br>$ g++ --version<br>g++ (GCC) 6.4.0<br>Copyright (C) 2017 Free Software Foundation, Inc.<br>This is free software; see the source for copying conditions.  There is NO<br>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br></p></span>````<p></p><p>Sincerely,<br>Feiyun Wang</p><p><br></p><p><br></p></div></div></div></div></div></div></body></html>