Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E33F0200BD8 for ; Wed, 23 Nov 2016 04:29:04 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id E1C88160B1C; Wed, 23 Nov 2016 03:29:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 354F2160B0C for ; Wed, 23 Nov 2016 04:29:04 +0100 (CET) Received: (qmail 84395 invoked by uid 500); 23 Nov 2016 03:29:03 -0000 Mailing-List: contact dev-help@singa.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@singa.incubator.apache.org Delivered-To: mailing list dev@singa.incubator.apache.org Received: (qmail 84385 invoked by uid 99); 23 Nov 2016 03:29:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Nov 2016 03:29:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id D2C9F1A9CB4 for ; Wed, 23 Nov 2016 03:29:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -7.018 X-Spam-Level: X-Spam-Status: No, score=-7.018 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 4Yw8UiYQ5qP9 for ; Wed, 23 Nov 2016 03:29:00 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id C4FB55FB4F for ; Wed, 23 Nov 2016 03:28:59 +0000 (UTC) Received: (qmail 84356 invoked by uid 99); 23 Nov 2016 03:28:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Nov 2016 03:28:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 87D4A2C4C76 for ; Wed, 23 Nov 2016 03:28:58 +0000 (UTC) Date: Wed, 23 Nov 2016 03:28:58 +0000 (UTC) From: "Xie Zhongle (JIRA)" To: dev@singa.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SINGA-272) singa::logging classes are missing from libsinga.so MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 23 Nov 2016 03:29:05 -0000 [ https://issues.apache.org/jira/browse/SINGA-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15688755#comment-15688755 ] Xie Zhongle commented on SINGA-272: ----------------------------------- Glog is an optional lib, which means we can compile SINGA without glog. I have already passed the compilation for SINGA and your test code without glog libs. Please clean your build directory for SINGA after you uninstall glog libs, especially cmake cache files. Perhaps this is the cause leading to your ERROR message. Normally, it should be a warning but the compilation should continue. > singa::logging classes are missing from libsinga.so > ---------------------------------------------------- > > Key: SINGA-272 > URL: https://issues.apache.org/jira/browse/SINGA-272 > Project: Singa > Issue Type: Bug > Environment: Linux (Ubuntu) > Reporter: Moaz Reyad > > When I try to compile a C++ file like > {code:title=test.cpp|borderStyle=solid} > #include "singa/io/encoder.h" > #include "singa/io/decoder.h" > #include > #include > #include > using namespace std; > using singa::Shape; > using singa::Tensor; > int main() > { > cout << "Testing..." << endl; > singa::CSVEncoder encoder; > singa::CSVDecoder decoder; > singa::DecoderConf decoder_conf; > decoder_conf.set_has_label(true); > decoder.Setup(decoder_conf); > float in_data[] = {1.23f, 4.5f, 5.1f, 3.33f, 0.44f}; > std::string in_str = "2, 1.23, 4.5, 5.1, 3.33, 0.44"; > int in_label = 2; > size_t size = 5; > std::vector input; > Tensor data(Shape{size}, singa::kFloat32), label(Shape{1}, singa::kInt); > data.CopyDataFromHostPtr(in_data, size); > label.CopyDataFromHostPtr(&in_label, 1); > input.push_back(data); > input.push_back(label); > std::string value = encoder.Encode(input); > in_str.erase(std::remove(in_str.begin(), in_str.end(), ' '), in_str.end()); > std::vector output = decoder.Decode(value); > const auto* out_data = output.at(0).data(); > const auto* out_label = output.at(1).data(); > return 0; > } > {code} > I get this error: > {code:title=compiling|borderStyle=solid} > $ g++ ./test.cpp -l singa > /tmp/cc46xzSI.o: In function `singa::Block::data() const': > test.cpp:(.text._ZNK5singa5Block4dataEv[_ZNK5singa5Block4dataEv]+0x4b): undefined reference to `singa::logging::LogMessageFatal::LogMessageFatal(char const*, int)' > test.cpp:(.text._ZNK5singa5Block4dataEv[_ZNK5singa5Block4dataEv]+0x7f): undefined reference to `singa::logging::LogMessageFatal::~LogMessageFatal()' > test.cpp:(.text._ZNK5singa5Block4dataEv[_ZNK5singa5Block4dataEv]+0xba): undefined reference to `singa::logging::LogMessageFatal::~LogMessageFatal()' > collect2: error: ld returned 1 exit status > {code} > I think singa::logging classes are not linked correctly in libsinga.so during installation. > The workaround is to do: > $g++ -DUSE_GLOG ./test.cpp -l singa -l glog > But it is better if libsinga.so is built with singa::logging classes. -- This message was sent by Atlassian JIRA (v6.3.4#6332)