I'm trying to compile pbeApp which is part of ca2a and get the following error:
/usr/bin/g++ -c -D_GNU_SOURCE -D_DEFAULT_SOURCE -D_X86_64_ -DUNIX -Dlinux -O3 -g -Wall -m64 -MMD -I. -I../O.Common -I. -I.. -I../../include/os/Linux -I../../include -I/home/epics/EPICS/base/include/os/Linux -I/home/epics/EPICS/base/include -I/home/epics/EPICS/extensions/include -I/home/epics/EPICS/extensions/src/ChannelArchiver/Storage ../listpvs.cpp
../listpvs.cpp: In function ‘int main(int, char**)’:
../listpvs.cpp:38:25: error: cannot declare variable ‘iter’ to be of abstract type ‘Index::NameIterator’
Index::NameIterator iter;
^~~~
In file included from /home/epics/EPICS/extensions/src/ChannelArchiver/Storage/ReaderFactory.h:9:0,
from /home/epics/EPICS/extensions/src/ChannelArchiver/Storage/SpreadsheetReader.h:7,
from ../listpvs.cpp:26:
/home/epics/EPICS/extensions/src/ChannelArchiver/Storage/Index.h:104:11: note: because the following virtual functions are pure within ‘Index::NameIterator’:
class NameIterator
^~~~~~~~~~~~
/home/epics/EPICS/extensions/src/ChannelArchiver/Storage/Index.h:110:22: note: virtual bool Index::NameIterator::isValid() const
virtual bool isValid() const = 0;
^~~~~~~
/home/epics/EPICS/extensions/src/ChannelArchiver/Storage/Index.h:113:34: note: virtual const stdString& Index::NameIterator::getName() const
virtual const stdString &getName() const = 0;
^~~~~~~
/home/epics/EPICS/extensions/src/ChannelArchiver/Storage/Index.h:118:23: note: virtual void Index::NameIterator::next()
virtual void next() = 0;
^~~~
../listpvs.cpp:39:13: error: ‘class AutoIndex’ has no member named ‘getFirstChannel’; did you mean ‘findChannel’?
if(!idx.getFirstChannel(iter)) {
^~~~~~~~~~~~~~~
../listpvs.cpp:46:16: error: ‘class AutoIndex’ has no member named ‘getNextChannel’; did you mean ‘addChannel’?
}while(idx.getNextChannel(iter));
^~~~~~~~~~~~~~
/home/epics/EPICS/base/configure/RULES_BUILD:221: recipe for target 'listpvs.o' failed
make[2]: *** [listpvs.o] Error 1
Heinz
> On 15. Dec 2017, at 16:42, Michael Davidsaver <[email protected]> wrote:
>
> You might also try https://github.com/epicsdeb/channelarchiver which is what I developed/tested my
> ca2aa converter against.
>
>
> On 12/15/2017 04:49 AM, Wang, Lin wrote:
>> Hello Kay,
>>
>> I would like to build a Channel Archiver test environment to investigate data migration to Archiver Appliance.
>>
>> When I built the latest Channel Archiver source code from github [1] within EPICS_BASE/src directory, I encountered the following error:
>>
>> /usr/bin/g++ -c -D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500 -D_X86_64_ -DUNIX -D_BSD_SOURCE -Dlinux -D_REENTRANT -g -Wall -D ARCH_VERSION=3 -D ARCH_RELEASE=0 -D ARCH_PATCH=0 -D ARCH_VERSION_TXT=\"3.0.0\" -I../../../../include -I../../../../include/os/Linux -I/usr/local/include -DFUX_XERCES -m64 -MMD -I. -I../O.Common -I. -I.. -I../../../../include/os/Linux -I../../../../include ../AVLTreeTest.cpp
>> In file included from ../AVLTreeTest.cpp:4:0:
>> ../AVLTree.h: In instantiation of ‘bool AVLTree<Item>::find(Item&) [with Item = int]’:
>> ../AVLTreeTest.cpp:37:24: required from here
>> ../AVLTree.h:80:46: error: ‘sort_compare’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
>> comp = sort_compare(item, n->item);
>> ^
>> ../AVLTreeTest.cpp:7:12: note: ‘int sort_compare(const int&, const int&)’ declared here, later in the translation unit
>> static int sort_compare(const int &a, const int &b)
>> ^
>> In file included from ../AVLTreeTest.cpp:4:0:
>> ../AVLTree.h: In instantiation of ‘bool AVLTree<Item>::insert(AVLItem<Item>*, AVLItem<Item>**) [with Item = int]’:
>> ../AVLTree.h:61:28: required from ‘void AVLTree<Item>::add(const Item&) [with Item = int]’
>> ../AVLTreeTest.cpp:31:24: required from here
>> ../AVLTree.h:168:62: error: ‘sort_compare’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
>> int comp = sort_compare(new_node->item, (*node)->item);
>> ^
>> ../AVLTreeTest.cpp:7:12: note: ‘int sort_compare(const int&, const int&)’ declared here, later in the translation unit
>> static int sort_compare(const int &a, const int &b)
>> ^
>> In file included from ../AVLTreeTest.cpp:4:0:
>> ../AVLTree.h: In instantiation of ‘void AVLTree<Item>::print_dot_node(FILE*, AVLItem<Item>*, int&) [with Item = int; FILE = _IO_FILE]’:
>> ../AVLTree.h:286:34: required from ‘void AVLTree<Item>::make_dotfile(const char*) [with Item = int]’
>> ../AVLTreeTest.cpp:49:28: required from here
>> ../AVLTree.h:220:40: error: ‘toString’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
>> me, toString(node->item), (int)node->balance);
>> ^
>> ../AVLTreeTest.cpp:20:20: note: ‘const char* toString(const int&)’ declared here, later in the translation unit
>> static const char *toString(const int &i)
>> ^
>> ../../../../configure/RULES_BUILD:209: recipe for target 'AVLTreeTest.o' failed
>> make[2]: *** [AVLTreeTest.o] Error 1
>> make[2]: Leaving directory '/home/wanglin/base-3.14.12.3/src/ChannelArchiver/Tools/O.linux-x86_64'
>> ../../../configure/RULES_ARCHS:63: recipe for target 'install.linux-x86_64' failed
>> make[1]: *** [install.linux-x86_64] Error 2
>> make[1]: Leaving directory '/home/wanglin/base-3.14.12.3/src/ChannelArchiver/Tools'
>> ../../configure/RULES_DIRS:70: recipe for target 'Tools.install' failed
>> make: *** [Tools.install] Error 2
>>
>> If I move sort_compare() and toString() methods to the position before "#include AVLTree.h" in Tools/AVLTreeTest.cpp as follows, the problem is gone.
>>
>>
>> #include <stdio.h>
>> #include <stdlib.h>
>>
>> static int sort_compare(const int &a, const int &b)
>> { return b-a; }
>>
>> static const char *toString(const int &i)
>> {
>> static char txt[10];
>> sprintf(txt, "%d", i);
>> return txt;
>> }
>>
>> #include "AVLTree.h"
>> #include "UnitTest.h"
>>
>> static int avl_last_number;
>> static bool tree_is_ordered;
>>
>> static void avl_order_test(const int &i, void *)
>> {
>> if (i < avl_last_number)
>> tree_is_ordered = false;
>> avl_last_number = i;
>> }
>>
>> Will this workaround cause any issue? Is there any other solution recommended?
>>
>>
>> My platform is Debian 8 (Jessie), gcc/g++ 4.9.2
>>
>>
>>
>> Thanks,
>>
>> Lin
>>
>>
>> [1] https://github.com/EPICSTools/ChannelArchiver
>>
>
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
- Replies:
- Re: Channel Archiver compilation error Michael Davidsaver
- References:
- Channel Archiver compilation error Wang, Lin
- Re: Channel Archiver compilation error Michael Davidsaver
- Navigate by Date:
- Prev:
EPICS Releases (two!) Andrew Johnson
- Next:
Re: Puzzled with lockset(?) problem Dirk Zimoch
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
<2017>
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Channel Archiver compilation error Michael Davidsaver
- Next:
Re: Channel Archiver compilation error Michael Davidsaver
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
<2017>
2018
2019
2020
2021
2022
2023
2024
|