I've been beating my head against quirky linking issues for the past couple of days. This may be related to #1158, and may not be. I'm on arch linux instead of windows, and I'm missing a different symbol in a different target (lwgeom_init_allocators missing from <a href="http://rtpostgis-2.0.so">rtpostgis-2.0.so</a> instead of PG_MODULE_MAGIC missing in postgis-2.0.dll). However, in both cases, the linker just seems to be refusing to copy symbols to the destination, and in both cases, the missing symbol is not directly referenced by anything else which is being linked into the same target.  The effect is that compilation completes successfully, but the shared library won't load. Note that when libpgcommon is linked against <a href="http://postgis-2.0.so">postgis-2.0.so</a>, the symbol is included. See:<br>
<br>[bnordgren@ghosty-mosty postgis]$ !nm<br>nm -a raster/rt_pg/<a href="http://rtpostgis-2.0.so">rtpostgis-2.0.so</a> | grep lwgeom_ini<br>                 U lwgeom_init_allocators<br>[bnordgren@ghosty-mosty postgis]$ nm -a postgis/<a href="http://postgis-2.0.so">postgis-2.0.so</a> | grep lwgeom_ini<br>
0000000000045b80 T lwgeom_init_allocators<br>[bnordgren@ghosty-mosty postgis]$ <br><br><br>The most aggravating thing is that there's no observable reason for it; while at the same time, it's reproducible.  Yesterday I identified "working" and "non-working" commits in the git repo I'm using for raster iterator development. Performing a "diff" on the build output revealed one extra compile and one extra item on the linking line in /postgis (the commits were "before/working" and "after/broken" for the patch on #1163). Well, my problem is between libpgcommon and raster; postgis should have nothing to do with it (and the symbol is present in <a href="http://postgis-2.0.so">postgis-2.0.so</a> anyway).  The working/non-working link commands which produce <a href="http://rtpostgis-2.0.so">rtpostgis-2.0.so</a> are line for line and character-for-character identical, as is everything involving the building of liblwgeom.a, libpgcommon.a, and everything in raster.<br>
<br>Here's the real kicker: I updated against svn this morning, reverting my own local version of #1163 to bring in strk's. The update involves two branches:  the branch containing my development code (branch ri-gen2-arch) and the branch
 which reflects svn head + my own hardcoded adaptation to address #960 on arch
(branch archpostgis). Before the merge, both branches were including lwgeom_init_allocators in <a href="http://rtpostgis-2.0.so">rtpostgis-2.0.so</a>. After the merge, ri-gen2-arch is not including lwgeom_init_allocators. I can repeatably checkout the pre-merge source, and everything is fine. Also reliably, I can checkout the post-merge source and the symbol is missing. <br>
<br>So it's happened to me twice. This morning I reverted the commits which were causing my issue yesterday, and this had become my pre-merge source which is reliably working.  Strk re-introduced these changes to SVN via my patch on #1163, and this became my "archpostgis" branch, which is reliably working. Reunited, these two hard-working branches become broken.<br>
<br>The graphical depiction of my flailing around blindly may be found at: <br><br><a href="https://github.com/bnordgren/postgis/network">https://github.com/bnordgren/postgis/network</a><br><br>Specifically, I have found that commits         
        <a href="https://github.com/bnordgren/postgis/commit/fb7b369beade85f0c1dd62b7bea63971e149eebf" class="js-parent-link">fb7b369beade85f0c1dd</a> and         
        <a href="https://github.com/bnordgren/postgis/commit/50fbb5ef6cf7c9deeaad37a8f419c14f8ee971cc" class="js-parent-link">50fbb5ef6cf7c9deeaad</a> include the symbol, whereas commit <a href="https://github.com/bnordgren/postgis/commit/62a627b78779ce372c85f4d87e50160eda520149" class="js-commit-link">62a627b78779ce372c85</a> does not.<br>
<br>Does anyone have any ideas? <br><br>Bryce<br>