title: Trying to compile GnuPG-2.1.1 on OS X Yosemite 10.10.1
body: <p>While trying to build the latest GnuPG (2.1.1 <em>modern</em>), my build fails when trying to link <code>t-stringhelp</code>. <code>make</code> outputs:</p>
  
  <pre><code>ld: warning: ignoring file libcommon.a, file was built for archive which is not the architecture being linked (x86_64): libcommon.a
  Undefined symbols for architecture x86_64:
    "_compare_filenames", referenced from:
        _main in t-stringhelp.o
    "_make_absfilename_try", referenced from:
        _main in t-stringhelp.o
    "_make_filename_try", referenced from:
        _main in t-stringhelp.o
    "_percent_escape", referenced from:
        _main in t-stringhelp.o
    "_strconcat", referenced from:
        _main in t-stringhelp.o
    "_xstrconcat", referenced from:
        _main in t-stringhelp.o
  </code></pre>
  
  <p>I don't know how to fix this as <code>libcommon</code> is part of the source, so it should build fine. When building with <code>CFLAGS="-m64"</code> (<code>-arch x86_64</code> does nothing), I get this:</p>
  
  <pre><code>ld: warning: ignoring file ../common/libgpgrl.a, file was built for archive which is not the architecture being linked (x86_64): ../common/libgpgrl.a
  Undefined symbols for architecture x86_64:
    "_gnupg_rl_initialize", referenced from:
        _main in gpg.o
  </code></pre>
  
  <p>I've also rebuilt all the depandancies (as I built them on Mavericks), except <code>pinentry</code>, as it can't find <code>libiconv</code> which is also installed.  My <code>configure</code> outputs that its target is <code>Darwin (x86_64-apple-darwin14.0.0)</code>, so this should work. I have also got all the latest prerequisites, tried to install everything in its own directory (--prefix=/usr/local/gnupg-2.1.1), build all the dependancies and GnuPG as 32 bits (again, fails on same error), created a separate build folder and tried to build in there, but only one thing so far has solved the error: looking at how <code>libgpgrl.a</code> is being built - it's only component is <code>common/gpgrlhelp.c</code> - so I <code>cd</code>'ed into <code>g10</code> and tried to build <code>gpg2</code>, replacing <code>../common/libgpgrl.a</code> with <code>../common/gpgrlhelp.o</code>, the <code>lib common.a</code> with all of its object files, for all the libraries that didn't work. Then some programs weren't linking to <code>libksba</code> <code>libgcrypt</code> and <code>libassuan</code>, so I changed the Makefiles, so that they could link. I can now compile all the code well, I installed everything, but I get a new error, when I try to run <code>gpg2</code>:</p>
  
  <pre><code>dyld: lazy symbol binding failed: Symbol not found: __gcry_mpi_init
    Referenced from: /usr/local/gnupg-2.1.1/lib/libgcrypt.20.dylib
    Expected in: flat namespace
  
  dyld: Symbol not found: __gcry_mpi_init
    Referenced from: /usr/local/gnupg-2.1.1/lib/libgcrypt.20.dylib
    Expected in: flat namespace
  </code></pre>
  
  <p>I have everything in my path, which is:</p>
  
  <pre><code>/usr/local/gnupg-2.1.1/bin:/usr/local/gnupg-2.1.1/lib:/Library/Frameworks/Python.framework/Versions/3.4/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/local/mysql/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
  </code></pre>
  
  <p>I could compile GnuPG-2.0.22 on Mavericks, but no version of GnuPG builds on Yosemite.</p>
  
  <p>Please help, I'm really confused.</p>