clang:错误:未知参数:来自macos上libtool的'-n'

时间:2018-02-28 13:10:53

标签: xcode clang libtool

/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am                                                                          
/bin/sh ./libtool  --tag=CXX   --mode=link /Applications/Xcode.app/Contents/Developer/usr/bin/g++  -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -I/Users/unhammer/src/macdivvun-service/Dependencies
/Static/x86_64/include -fvisibility=hidden -std=c++1z  -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -L/Users/unhammer/src/macdivvun-service/Dependencies/Static/x86_64/lib -o hfst-ospell main.o lib
hfstospell.la -n  -L/usr/local/lib -licui18n -licuuc -licudata                                                                           
libtool: link: /Applications/Xcode.app/Contents/Developer/usr/bin/g++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -I/Users/unhammer/src/macdivvun-service/Dependencies/Static/x86_64/include -fvisi
bility=hidden -std=c++1z -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -o hfst-ospell main.o -n -Wl,-bind_at_load  -L/Users/unhammer/src/macdivvun-service/Dependencies/Static/x86_64/lib ./.libs/lib
hfstospell.a -L/usr/local/lib -licui18n -licuuc -licudata                                                                                
clang: error: unknown argument: '-n'                                                                                                     
make[1]: *** [hfst-ospell] Error 1                                                                                                       
make: *** [all] Error 2      

-n来自哪里?我该怎么知道?我正在使用xcodebuild,但xcodebuild -showBuildSettings -scheme Dependencies|grep -e -n没有提供任何内容,我在Makefile.am中的任何标志或实际(autotools)项目中的configure.ac中都看不到-n。 / p>

1 个答案:

答案 0 :(得分:0)

我查看了生成的 Makefile中构建的实际目标,从$(AM_V_CXXLD)$(hfst_ospell_LINK) $(hfst_ospell_OBJECTS) $(hfst_ospell_LDADD) $(LIBS)行开始 并递归地手动检查所有变量。最后,我看到LIBS-n -L/usr/local/lib -licui18n -licuuc -licudataLIBS中的LIBS = @LIBS@Makefile.in,因此由configure.ac设置,icu-config --ldflags运行icu-config --ldflags来设置它。

出于某种原因,我-n -L/usr/local/lib -licui18n -licuuc -licudata的版本(57.1)已经-L/usr/local/lib -licui18n -licuuc -licudata而不是$(document).on('click', "'.span_" + editableObj.textContent + "'", function(e){ } 。升级icu解决了它。