Wow, it looks like you're right. On another computer where the error doesn't 
happen, I took libiconv out of the linked libraries list, and as you said the 
error gives names without the "lib". Now if I can figure out why it happens 
with a clean checkout...

On Nov 9, 2014, at 9:04 AM, Jean-Daniel Dupas <[email protected]> wrote:

> You have a problem with the way libgit2 is compiled. It references symbols 
> that do not exist in libiconv. On OS X, all symbols are prefixed by ‘iconv’ 
> not ‘libiconv’ (iconv_close, iconv_open, …)
> 
> Make sure you use the system libiconv headers when compiling libgit2.
> 
> 
>> Le 8 nov. 2014 à 17:07, David Catmull <[email protected]> a écrit :
>> 
>>> 
>>> On Nov 8, 2014, at 1:14 AM, Jean-Daniel Dupas <[email protected]> wrote:
>>> 
>>> Can you give as the transcript.
>>> 
>>> What is the compiler invocation command, and exact error message ?
>> 
>> Here's the log:
>> 
>>> Ld 
>>> /Users/uncommon/Developer/Xit/DerivedData/Xit/Build/Products/Debug/ObjectiveGit.framework/Versions/A/ObjectiveGit
>>>  normal x86_64
>>>    cd /Users/uncommon/Developer/Xit/objective-git
>>>    export MACOSX_DEPLOYMENT_TARGET=10.7
>>>    
>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
>>>  -arch x86_64 -dynamiclib -isysroot 
>>> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
>>>  -L/Users/uncommon/Developer/Xit/DerivedData/Xit/Build/Products/Debug -L. 
>>> -LExternal 
>>> -F/Users/uncommon/Developer/Xit/DerivedData/Xit/Build/Products/Debug 
>>> -filelist 
>>> /Users/uncommon/Developer/Xit/DerivedData/Xit/Build/Intermediates/ObjectiveGitFramework.build/Debug/ObjectiveGit.build/Objects-normal/x86_64/ObjectiveGit.LinkFileList
>>>  -install_name @rpath/ObjectiveGit.framework/ObjectiveGit 
>>> -mmacosx-version-min=10.7 -lgit2 -force_load External/libgit2.a 
>>> /usr/local/lib/libssh2.a -lcrypto -lssl -fobjc-arc -fobjc-link-runtime 
>>> -liconv -framework Cocoa -lz -single_module -compatibility_version 1 
>>> -current_version 1 -Xlinker -dependency_info -Xlinker 
>>> /Users/uncommon/Developer/Xit/DerivedData/Xit/Build/Intermediates/ObjectiveGitFramework.build/Debug/ObjectiveGit.build/Objects-normal/x86_64/ObjectiveGit_dependency_info.dat
>>>  -o 
>>> /Users/uncommon/Developer/Xit/DerivedData/Xit/Build/Products/Debug/ObjectiveGit.framework/Versions/A/ObjectiveGit
>>> 
>>> Undefined symbols for architecture x86_64:
>>>  "_libiconv", referenced from:
>>>      _git_path_iconv in libgit2.a(path.c.o)
>>>  "_libiconv_close", referenced from:
>>>      _git_path_iconv_clear in libgit2.a(path.c.o)
>>>  "_libiconv_open", referenced from:
>>>      _git_path_iconv_init_precompose in libgit2.a(path.c.o)
>>> ld: symbol(s) not found for architecture x86_64
>>> clang: error: linker command failed with exit code 1 (use -v to see 
>>> invocation)
>> 
>> 
>> 
>>> 
>>>> Le 7 nov. 2014 à 01:51, David Catmull <[email protected]> a écrit :
>>>> 
>>>> On one of my computers, I've started getting a strange error when building 
>>>> Objective Git - the linker claims that libiconv (which is in /usr/lib) 
>>>> can't be found. It doesn't happen on any other computer, and I've tried 
>>>> with a completely clean checkout.
>>>> 
>>>> Other things tried to no avail:
>>>> - Asking the Objective Git people. Since it's not reproducible, they have 
>>>> no ideas.
>>>> - Using later versions of Objective Git (my project is currently using it 
>>>> at commit 2baa965)
>>>> - Adding libiconv to the target's link phase instead of using the -liconv 
>>>> linker flag
>>>> - Re-downloading Xcode
>>>> - Updating to Xcode 6 and 6.1, and Yosemite
>>>> - Using different base SDKs (10.8, 10.9, 10.10)
>>>> - Reformatting my hard disk and restoring from the backup (this was 
>>>> recommended by Disk Utility, which now says my disk is fine)
>>>> - Running the full suite of Apple Diagnostics tests; all passed
>>>> - A simple app that makes calls to libiconv builds and links just fine
>>>> 
>>>> Any other suggestions? Since it's not reproducible anywhere else, that 
>>>> suggests some kind of corruption, but after everything I've tried I can't 
>>>> imagine where it would be.
>>>> _______________________________________________
>>>> Do not post admin requests to the list. They will be ignored.
>>>> Xcode-users mailing list      ([email protected])
>>>> Help/Unsubscribe/Update your Subscription:
>>>> https://lists.apple.com/mailman/options/xcode-users/mailing%40xenonium.com
>>>> 
>>>> This email sent to [email protected]
>>> 
>>> -- Jean-Daniel
>>> 
>>> 
>>> 
>>> 
>> 
>> 
>> -- 
>> David Catmull
>> [email protected]
>> http://www.uncommonplace.com/
> 
> -- Jean-Daniel
> 
> 
> 
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to