nebulasio / wiki

This repository is out of date, please check the new wiki:
http://wiki.nebulas.io/en/latest/
GNU General Public License v3.0
421 stars 154 forks source link

go-nebulas build error #128

Open Arion-Dsh opened 6 years ago

Arion-Dsh commented 6 years ago

环境

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    
MuZiRuoYi commented 6 years ago

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

ChengOrangeJu commented 6 years ago

We are looking into the issue, stay tuned

sunnypandas commented 6 years ago

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

yupnano commented 6 years ago

@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.

sunnypandas commented 6 years ago

@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.

yupnano commented 6 years ago

@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

sunnypandas commented 6 years ago

@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.

Arion-Dsh commented 6 years ago

@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

weiht12 commented 5 years ago

你好,此版本为星云旧版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)