wiki icon indicating copy to clipboard operation
wiki copied to clipboard

go-nebulas build error

Open Arion-Dsh opened this issue 7 years ago • 9 comments

环境

go-nebulas git:(master) ✗ go version  
go version go1.10.1 linux/amd64

已经 运行make deploy-v8 /usr/local/lib 中有 v8的库 仍 有下面错误出现。

cd cmd/neb; go build -ldflags "-X main.version=1.0.1 -X main.commit=ce7e09897df516f5877fb4ed209cf5f42d244b55 -X main.branch=master -X main.c
ompileAt=`date +%s`" -o ../../neb-ce7e09897df516f5877fb4ed209cf5f42d244b55                                                                  
# github.com/nebulasio/go-nebulas/nf/nvm                                                                                                    
/usr/local/lib/libv8.so: undefined reference to `icu_59::StringPiece::StringPiece(char const*)'                                             
/usr/local/lib/libv8.so: undefined reference to `icu_59::UnicodeSet::removeAllStrings()'                                                    
/usr/local/lib/libv8.so: undefined reference to `ucurr_getDefaultFractionDigits_59'                                                         
/usr/local/lib/libv8.so: undefined reference to `icu_59::NumberFormat::createPercentInstance(icu_59::Locale const&, UErrorCode&)'           
/usr/local/lib/libv8.so: undefined reference to `icu_59::UnicodeString::operator=(icu_59::UnicodeString const&)'                            
/usr/local/lib/libv8.so: undefined reference to `icu_59::UnicodeString::toUTF8(icu_59::ByteSink&) const'                                    
/usr/local/lib/libv8.so: undefined reference to `vtable for icu_59::FieldPosition'                                                          
/usr/local/lib/libv8.so: undefined reference to `icu_59::DateFormat::getAvailableLocales(int&)'                                             
/usr/local/lib/libv8.so: undefined reference to `icu_59::NumberFormat::format(double, icu_59::UnicodeString&) const'                        
/usr/local/lib/libv8.so: undefined reference to `icu_59::UnicodeSet::getRangeStart(int) const'                                              
/usr/local/lib/libv8.so: undefined reference to `icu_59::DecimalFormat::getMaximumSignificantDigits() const'
/usr/local/lib/libv8.so: undefined reference to `icu_59::BreakIterator::createCharacterInstance(icu_59::Locale const&, UErrorCode&)'
/usr/local/lib/libv8.so: undefined reference to `icu_59::NumberFormat::getCurrency() const'
/usr/local/lib/libv8.so: undefined reference to `icu_59::BreakIterator::createWordInstance(icu_59::Locale const&, UErrorCode&)'
/usr/local/lib/libv8.so: undefined reference to `icu_59::DateFormat::format(double, icu_59::UnicodeString&) const'
/usr/local/lib/libv8.so: undefined reference to `icu_59::UnicodeString::tempSubString(int, int) const'
/usr/local/lib/libv8.so: undefined reference to `vtable for icu_59::UnicodeString'
/usr/local/lib/libv8.so: undefined reference to `icu_59::NumberFormat::getMinimumFractionDigits() const'
/usr/local/lib/libv8.so: undefined reference to `u_getPropertyName_59'
/usr/local/lib/libv8.so: undefined reference to `icu_59::DateTimePatternGenerator::getBestPattern(icu_59::UnicodeString const&, UErrorCode&)
'
/usr/local/lib/libv8.so: undefined reference to `icu_59::UMemory::operator delete(void*)'
/usr/local/lib/libv8.so: undefined reference to `icu_59::PluralRules::select(double) const'
/usr/local/lib/libv8.so: undefined reference to `icu_59::Calendar::getNow()'
/usr/local/lib/libv8.so: undefined reference to `u_getPropertyValueEnum_59'
/usr/local/lib/libv8.so: undefined reference to `u_hasBinaryProperty_59'                                                                    
/usr/local/lib/libv8.so: undefined reference to `icu_59::ByteSink::~ByteSink()'                                                             
/usr/local/lib/libv8.so: undefined reference to `icu_59::TimeZone::getCanonicalID(icu_59::UnicodeString const&, icu_59::UnicodeString&, UErr
orCode&)'                                                                                                                                   
/usr/local/lib/libv8.so: undefined reference to `icu_59::UnicodeString::doEquals(icu_59::UnicodeString const&, int) const'                  
/usr/local/lib/libv8.so: undefined reference to `icu_59::NumberFormat::isGroupingUsed() const'                                              
/usr/local/lib/libv8.so: undefined reference to `icu_59::GregorianCalendar::setGregorianChange(double, UErrorCode&)'                        
/usr/local/lib/libv8.so: undefined reference to `u_strToUpper_59'                                                                           
/usr/local/lib/libv8.so: undefined reference to `icu_59::FieldPositionIterator::next(icu_59::FieldPosition&)'                               
/usr/local/lib/libv8.so: undefined reference to `icu_59::Formattable::getDouble(UErrorCode&) const'                                         
/usr/local/lib/libv8.so: undefined reference to `icu_59::UnicodeString::UnicodeString(signed char, icu_59::ConstChar16Ptr, int)'            
/usr/local/lib/libv8.so: undefined reference to `icu_59::NumberingSystem::createInstance(icu_59::Locale const&, UErrorCode&)'               
/usr/local/lib/libv8.so: undefined reference to `icu_59::TimeZone::createTimeZone(icu_59::UnicodeString const&)'                            
/usr/local/lib/libv8.so: undefined reference to `icu_59::Formattable::~Formattable()'                                                       
/usr/local/lib/libv8.so: undefined reference to `icu_59::UnicodeSet::isEmpty() const'                                                       
/usr/local/lib/libv8.so: undefined reference to `icu_59::FieldPositionIterator::~FieldPositionIterator()'                                   
/usr/local/lib/libv8.so: undefined reference to `icu_59::DateFormat::format(double, icu_59::UnicodeString&, icu_59::FieldPositionIterator*, 
UErrorCode&) const'                                                                                                                         
/usr/local/lib/libv8.so: undefined reference to `icu_59::SimpleDateFormat::SimpleDateFormat(icu_59::UnicodeString const&, icu_59::Locale con
st&, UErrorCode&)'                                                                                                                          
/usr/local/lib/libv8.so: undefined reference to `u_strToLower_59'                                                                           
/usr/local/lib/libv8.so: undefined reference to `icu_59::Calendar::getTimeZone() const'                                                     
/usr/local/lib/libv8.so: undefined reference to `icu_59::UnicodeString::fromUTF8(icu_59::StringPiece)'                                      
/usr/local/lib/libv8.so: undefined reference to `icu_59::UnicodeString::setTo(signed char, icu_59::ConstChar16Ptr, int)'                    
collect2: error: ld returned 1 exit status                                                                                                  
make: *** [Makefile:66: build] Error 2    

Arion-Dsh avatar May 11 '18 05:05 Arion-Dsh

@Arion-Dsh 请问是否解决了,出现同样错误 go version go1.10.2 linux/amd64

MuZiRuoYi avatar May 13 '18 03:05 MuZiRuoYi

We are looking into the issue, stay tuned

ChengOrangeJu avatar May 13 '18 05:05 ChengOrangeJu

I have occurred the same errors, please check it. Thanks. @ChengOrangeJu

sunnypandas avatar May 15 '18 14:05 sunnypandas

@Arion-Dsh @MuZiRuoYi @sppsun

When running make deploy-v8, it will install *.so files form nf/nvm/natve-lib to dir /usr/local/lib : 2

To check if make deploy-v8 is succeed, please check if there are libicui18n.so libicuuc.so files under /usr/local/lib.
qq 20180517174025

If there is not, then check if there are these two files under nf/nvm/natve-lib of go-nebulas directory. qq 20180517173933

If there is no these file under nf/nvm/natve-lib , please pull the latest code of go-nebulas again. Then you can run make deploy-v8 again.

yupnano avatar May 17 '18 09:05 yupnano

@yupnano Hello, I have try according to your advice, the libicui18n.so and libicuuc.so two files also exist in nf/nvm/natve-lib and /usr/local/lib dirs , but make build occurred the same error. My platform is centos 7, please check it. Many thanks.

sunnypandas avatar May 18 '18 00:05 sunnypandas

@sppsun please try ldd /usr/local/lib/libnebulasv8.so to list the shared object dependencies. There might be some items "not found" , then try sudo ldconfig.

@Arion-Dsh @MuZiRuoYi Have you resolved this problem?

qq 20180518120257

yupnano avatar May 18 '18 04:05 yupnano

@yupnano Thank you. I have resolved. But your advice have some problems in my platform. My steps are: 1. create a file name like libv8.conf in /etc/ld.so.conf.d, and its content is /usr/local/lib/; 2. ldconfig; 3. make build.

sunnypandas avatar May 18 '18 04:05 sunnypandas

@yupnano resolved too. I just clone the project and build again.

but I think the issue is when git pull the change will break symbolic link of those files.

look there https://github.com/nebulasio/go-nebulas/issues/110

Arion-Dsh avatar May 18 '18 10:05 Arion-Dsh

你好,此版本为星云旧版wiki,欢迎将您的问题提交星云新版wiki,以便于及时与星云开发人员及其他社区开发者进行交流。同时,参与wiki的编辑维护工作还会有奖励哦。新版wiki链接:https://wiki.nebulas.io/en/latest/ (英文);https://wiki.nebulas.io/zh_CN/latest/ (中文) Hello, this version is the nebulas old wiki (later stop maintenance), welcome to submit your question to the new nebulas wiki, in order to get timely answers. At the same time, there will be rewards for editing and maintaining the wiki. New wiki link: https://wiki.nebulas.io/en/latest/ (English); https://wiki.nebulas.io/zh_CN/latest/ (Chinese)

weiht12 avatar Dec 05 '18 07:12 weiht12