On Fri, Feb 15, 2013 at 09:09:51AM +0100, Martin Costabel wrote:
> On 15/02/13 01:06, Jack Howarth wrote:
> []
>>     On x86_64 10.6 fink, I ran into the following build failure...
>>
>> /usr/bin/make -f Makefile.doxygen    PERL=/usr/bin/perl all
>> c++ -c -pipe -D__FreeBSD__=6 -DYY_TYPEDEF_YY_SIZE_T -Dyy_size_t=int -Wall -W 
>> -Wno-deprecated-declarations -O2 -I../qtools -I../libmd5 -I. -I/sw/include 
>> -o ../
>> objects/main.o main.cpp
>> c++ -Wl,-search_paths_first -o ../bin/doxygen ../objects/main.o  -L../lib 
>> -L/sw/lib -ldoxygen -ldoxycfg -lqtools -lmd5 -lpthread -liconv -framework 
>> CoreServic
>> es
>> Undefined symbols for architecture x86_64:
>>    "_iconv_open", referenced from:
>>        _portable_iconv_open in libdoxycfg.a(portable_c.o)
>
> You see that -L/sw/lib is already on the linker line. The error is not  
> in some dylib or other, it is that the linker is asked to resolve the  
> symbol "_iconv_open" and not, as it should be, "_libiconv_open". This  
> mistake happened at the compilation of portable_c.c. It is an indication  
> that at that time, the header file /sw/include/iconv.h was not included  
> correctly. Now why this should have been the case is not clear.
> []
>> I initially worked around that by changing doxygen.patch from...
>
> By "worked around", you mean when you did not do this, you got the error  
> reproducibly, and when you did it, you did not get the error?
>

By worked around, I mean that dropping the "-Wl,-search_paths_first" flag
was sufficient to eliminate the linkage error.

>> @@ -36,7 +36,7 @@
>>
>>   TMAKE_LINK             = c++
>>   TMAKE_LINK_SHLIB       = c++
>> -TMAKE_LFLAGS           = -Wl,-search_paths_first -arch i386 -arch ppc
>> +TMAKE_LFLAGS           = -Wl,-search_paths_first -arch @FINK_ARCH@
>>   TMAKE_LFLAGS_RELEASE   =
>>   TMAKE_LFLAGS_DEBUG     =
>>   TMAKE_LFLAGS_SHLIB     = -shared
>>
>> to
>>
>> @@ -36,7 +36,7 @@
>>
>>   TMAKE_LINK             = c++
>>   TMAKE_LINK_SHLIB       = c++
>> -TMAKE_LFLAGS           = -Wl,-search_paths_first -arch i386 -arch ppc
>> +TMAKE_LFLAGS           = -arch @FINK_ARCH@
>>   TMAKE_LFLAGS_RELEASE   =
>>   TMAKE_LFLAGS_DEBUG     =
>>   TMAKE_LFLAGS_SHLIB     = -shared
>
> The -Wl,-search_paths_first is employed because the static libs  
> ../libdoxycfg.a etc that were just built are being used for linking.  
> When -Wl,-search_paths_first is not there, then any old libdoxycfg.dylib  
> that might be found anywhere, for example in /usr/local/lib, would take  
> precedence. According to the error message, this was not the case here,  
> however. So it is not clear how this could have had any effect.
>
>> which led me to search for other instances of this failure. I found MacPort's
>> hack which solved the problem without changing the doxygen.patch.
>>               Jack
>
> -- 
> Martin
>

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Fink-users mailing list
Fink-users@lists.sourceforge.net
List archive:
http://news.gmane.org/gmane.os.macosx.fink.user
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to