I'm trying to set up a nightly build for CMake on OpenBSD and I'm getting some linker issues. When I configure CMake to use it's internal versions of curl, expat, and libz, then everything builds. It does, however, fail the X11 test because of a linker error:<br>
<br><a href="http://www.cdash.org/CDash/testDetails.php?test=43846434&build=534940">http://www.cdash.org/CDash/testDetails.php?test=43846434&build=534940</a><br><br><span style="font-family: courier new,monospace;">[100%] Building C object CMakeFiles/UseX11.dir/X11.c.o</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Linking C executable UseX11</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">/usr/X11R6/lib/libSM.so.8.0: warning: strcpy() is almost always misused, please use strlcpy()</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">/usr/X11R6/lib/libICE.so.9.0: warning: strcat() is almost always misused, please use strlcat()</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">/usr/X11R6/lib/libSM.so.8.0: warning: sprintf() is often misused, please use snprintf()</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">/usr/bin/ld: warning: libICE.so.9.0, needed by /usr/X11R6/lib/libSM.so.8.0, not found (try using -rpath or -rpath-link)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">/usr/bin/ld: warning: libXau.so.9.0, needed by /usr/X11R6/lib/libX11.so.11.2, not found (try using -rpath or -rpath-link)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">/usr/bin/ld: warning: libXdmcp.so.9.0, needed by /usr/X11R6/lib/libX11.so.11.2, not found (try using -rpath or -rpath-link)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">/usr/bin/ld: warning: libX11.so.11.2, needed by /usr/X11R6/lib/libXext.so.10.0, not found (try using -rpath or -rpath-link)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">/usr/X11R6/lib/libX11.so.11.2: undefined reference to `XdmcpWrap'</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">/usr/X11R6/lib/libX11.so.11.2: undefined reference to `XauGetBestAuthByAddr'</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">/usr/X11R6/lib/libX11.so.11.2: undefined reference to `XauDisposeAuth'</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">collect2: ld returned 1 exit status</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">gmake[2]: *** [UseX11] Error 1</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">gmake[1]: *** [CMakeFiles/UseX11.dir/all] Error 2</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">gmake: *** [all] Error 2</span><br><br>But when I try to configure cmake using the system libraries for curl, expat, and libz, then I get similar linker errors for the cmake build itself:<br>
<br><a href="http://www.cdash.org/CDash/buildSummary.php?buildid=534978">http://www.cdash.org/CDash/buildSummary.php?buildid=534978</a><br><br><span style="font-family: courier new,monospace;">/usr/bin/ld: warning: libintl.so.4.0, needed by /usr/local/lib/libcurl.so.13.2, not found (try using -rpath or -rpath-link)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">/usr/bin/ld: warning: libiconv.so.6.0, needed by /usr/local/lib/libcurl.so.13.2, not found (try using -rpath or -rpath-link)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">/usr/bin/ld: warning: libidn.so.16.30, needed by /usr/local/lib/libcurl.so.13.2, not found (try using -rpath or -rpath-link)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">/usr/local/lib/libcurl.so.13.2: undefined reference to `tld_strerror'</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">/usr/local/lib/libcurl.so.13.2: undefined reference to `stringprep_check_version'</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">/usr/local/lib/libcurl.so.13.2: undefined reference to `idn_free'</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">/usr/local/lib/libcurl.so.13.2: undefined reference to `idna_strerror'</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">/usr/local/lib/libcurl.so.13.2: undefined reference to `idna_to_unicode_lzlz'</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">/usr/local/lib/libcurl.so.13.2: undefined reference to `stringprep_locale_charset'</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">/usr/local/lib/libcurl.so.13.2: undefined reference to `idna_to_ascii_lz'</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">/usr/local/lib/libcurl.so.13.2: undefined reference to `tld_check_lz'</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">collect2: ld returned 1 exit status</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">gmake[2]: *** [bin/DumpDocumentation] Error 1</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">gmake[1]: *** [Source/CMakeFiles/DumpDocumentation.dir/all] Error 2</span><br><br><br><br>Chuck Atkins<br>R&D Engineer<br>Kitware, Inc.<br>(518) 371-3971 x603<br><br>
-- "Mathematicians are tools for turning coffee grounds into formulas.", Paul Erdos<br>