(Linking) issue with MacGPG2

eno's Avatar

eno

21 Aug, 2013 12:10 PM

I would like to inform you that the current MacGPG installer breaks other installations. As an example:

This file (which is created during installation of some ruby gems)
compiles fine with `gcc-4.2 -o conftest conftest.c -liconv`, but not
with `gcc-4.2 -o conftest conftest.c -I/usr/local/MacGPG2/include -liconv`

--- snip ------------------------------------------------------------
#include <iconv.h>

/*top*/
int t() { void ((*volatile p)()); p = (void ((*)()))iconv_open; return 0; }
/* int t() { iconv_open(); return 0; } */
int main(int argc, char **argv)
{
if (argc > 1000000) {
printf("%p", &t);
}

return 0;
}
--- snap ------------------------------------------------------------

What I make of it is that the copy of iconv.h, that comes bundled with MacGPG2
in /usr/local/MacGPG2/include somehow sets up the compiler to link with the libiconv
library in /usr/local/MacGPG2/lib, which is somehow not compatible with the one in
/usr/lib (probably compiled for 32bit?) I think it would be nice to either

a) not install any headers at all, or
b) not install the iconv headers, and instead use the ones provided by OSX, or
c) install headers in non-default locations.

This is on OSX 10.7 with the recent MacGPG2 release.

  1. Support Staff 1 Posted by Luke Le on 21 Aug, 2013 08:51 PM

    Luke Le's Avatar

    Hi eno,

    not sure why the include folder of /usr/local/MacGPG2/include is even considered, but we'll make sure to exclude it in future releases.

    Thanks for reporting.

  2. Steve closed this discussion on 18 Sep, 2013 01:23 PM.

  3. Steve closed this discussion on 26 Jan, 2014 10:40 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac