USNavalResearchLaboratory / norm

NACK-Oriented Reliable Multicast (NORM) implementation & tools (RFCs 5740, 5401)
https://www.nrl.navy.mil/Our-Work/Areas-of-Research/Information-Technology/NCS/NORM/
Other
98 stars 35 forks source link

Building release v1.5.8 with protolib v3.0b1 results in build errors #5

Closed eelcocramer closed 4 years ago

eelcocramer commented 4 years ago

I'm trying to build libnorm version 1.5.8 that previously worked fine when I obtained the source tarball from https://downloads.pf.itd.nrl.navy.mil/norm/.

When I'm trying to build libnorm with the latest (only) protolib release I get build errors.

When I'm building libnorm with protolib master everything builds fine.

What version of protolib should I use? I assume protolib master but it is not made fully clear from the documentation.

Thanks (build log included below)

user@node:/build/norm-1.5.8/makefiles$ make -j 4 -f Makefile.linux libnorm.so
g++ -c -g -DPROTO_DEBUG -DUNIX -D_FILE_OFFSET_BITS=64 -O -Wall -Wcast-align -pedantic -fPIC -Wno-variadic-macros -DLINUX -DECN_SUPPORT  -DHAVE_IPV6 -DHAVE_GETLOGIN -D_FILE_OFFSET_BITS=64 -DHAVE_LOCKF -DHAVE_OLD_SIGNALHANDLER -DHAVE_DIRFD -DHAVE_ASSERT -DNO_SCM_RIGHTS -DHAVE_SCHED -DUNIX -DUSE_SELECT -DUSE_TIMERFD -DUSE_EVENTFD -DHAVE_PSELECT -Wall -I/usr/X11R6/include  -I../src/unix -I../include -I../protolib/include -o ../src/common/normMessage.o ../src/common/normMessage.cpp
g++ -c -g -DPROTO_DEBUG -DUNIX -D_FILE_OFFSET_BITS=64 -O -Wall -Wcast-align -pedantic -fPIC -Wno-variadic-macros -DLINUX -DECN_SUPPORT  -DHAVE_IPV6 -DHAVE_GETLOGIN -D_FILE_OFFSET_BITS=64 -DHAVE_LOCKF -DHAVE_OLD_SIGNALHANDLER -DHAVE_DIRFD -DHAVE_ASSERT -DNO_SCM_RIGHTS -DHAVE_SCHED -DUNIX -DUSE_SELECT -DUSE_TIMERFD -DUSE_EVENTFD -DHAVE_PSELECT -Wall -I/usr/X11R6/include  -I../src/unix -I../include -I../protolib/include -o ../src/common/normSession.o ../src/common/normSession.cpp
g++ -c -g -DPROTO_DEBUG -DUNIX -D_FILE_OFFSET_BITS=64 -O -Wall -Wcast-align -pedantic -fPIC -Wno-variadic-macros -DLINUX -DECN_SUPPORT  -DHAVE_IPV6 -DHAVE_GETLOGIN -D_FILE_OFFSET_BITS=64 -DHAVE_LOCKF -DHAVE_OLD_SIGNALHANDLER -DHAVE_DIRFD -DHAVE_ASSERT -DNO_SCM_RIGHTS -DHAVE_SCHED -DUNIX -DUSE_SELECT -DUSE_TIMERFD -DUSE_EVENTFD -DHAVE_PSELECT -Wall -I/usr/X11R6/include  -I../src/unix -I../include -I../protolib/include -o ../src/common/normNode.o ../src/common/normNode.cpp
g++ -c -g -DPROTO_DEBUG -DUNIX -D_FILE_OFFSET_BITS=64 -O -Wall -Wcast-align -pedantic -fPIC -Wno-variadic-macros -DLINUX -DECN_SUPPORT  -DHAVE_IPV6 -DHAVE_GETLOGIN -D_FILE_OFFSET_BITS=64 -DHAVE_LOCKF -DHAVE_OLD_SIGNALHANDLER -DHAVE_DIRFD -DHAVE_ASSERT -DNO_SCM_RIGHTS -DHAVE_SCHED -DUNIX -DUSE_SELECT -DUSE_TIMERFD -DUSE_EVENTFD -DHAVE_PSELECT -Wall -I/usr/X11R6/include  -I../src/unix -I../include -I../protolib/include -o ../src/common/normObject.o ../src/common/normObject.cpp
In file included from ../protolib/include/protoAddress.h:8,
                 from ../protolib/include/protoSocket.h:4,
                 from ../protolib/include/protokit.h:6,
                 from ../include/normMessage.h:5,
                 from ../src/common/normMessage.cpp:1:
../protolib/include/protoTree.h: In member function ‘ITEM_TYPE* ProtoSortedTreeTemplate<ITEM_TYPE>::Iterator::PeekPrevItem() const’:
../protolib/include/protoTree.h:664:93: error: no matching function for call to ‘ProtoSortedTreeTemplate<ITEM_TYPE>::Iterator::PeekPrevItem() const’
                     {return static_cast<ITEM_TYPE*>(ProtoSortedTree::Iterator::PeekPrevItem());}
                                                                                             ^
../protolib/include/protoTree.h:566:23: note: candidate: ‘ProtoSortedTree::Item* ProtoSortedTree::Iterator::PeekPrevItem()’ <near match>
                 Item* PeekPrevItem()
                       ^~~~~~~~~~~~
../protolib/include/protoTree.h:566:23: note:   passing ‘const ProtoSortedTreeTemplate<ITEM_TYPE>::Iterator*’ as ‘this’ argument discards qualifiers
../protolib/include/protoTree.h: In member function ‘ITEM_TYPE* ProtoSortedTreeTemplate<ITEM_TYPE>::Iterator::PeekNextItem() const’:
../protolib/include/protoTree.h:669:93: error: no matching function for call to ‘ProtoSortedTreeTemplate<ITEM_TYPE>::Iterator::PeekNextItem() const’
                     {return static_cast<ITEM_TYPE*>(ProtoSortedTree::Iterator::PeekNextItem());}
                                                                                             ^
../protolib/include/protoTree.h:564:23: note: candidate: ‘ProtoSortedTree::Item* ProtoSortedTree::Iterator::PeekNextItem()’ <near match>
                 Item* PeekNextItem()
                       ^~~~~~~~~~~~
../protolib/include/protoTree.h:564:23: note:   passing ‘const ProtoSortedTreeTemplate<ITEM_TYPE>::Iterator*’ as ‘this’ argument discards qualifiers
In file included from ../protolib/include/protoAddress.h:8,
                 from ../protolib/include/protoSocket.h:4,
                 from ../protolib/include/protokit.h:6,
                 from ../include/normMessage.h:5,
                 from ../include/normNode.h:4,
                 from ../src/common/normNode.cpp:1:
../protolib/include/protoTree.h: In member function ‘ITEM_TYPE* ProtoSortedTreeTemplate<ITEM_TYPE>::Iterator::PeekPrevItem() const’:
../protolib/include/protoTree.h:664:93: error: no matching function for call to ‘ProtoSortedTreeTemplate<ITEM_TYPE>::Iterator::PeekPrevItem() const’
                     {return static_cast<ITEM_TYPE*>(ProtoSortedTree::Iterator::PeekPrevItem());}
                                                                                             ^
../protolib/include/protoTree.h:566:23: note: candidate: ‘ProtoSortedTree::Item* ProtoSortedTree::Iterator::PeekPrevItem()’ <near match>
                 Item* PeekPrevItem()
                       ^~~~~~~~~~~~
In file included from ../protolib/include/protoAddress.h:8,
                 from ../protolib/include/protoSocket.h:4,
                 from ../protolib/include/protokit.h:6,
                 from ../include/normMessage.h:5,
                 from ../include/normSegment.h:4,
                 from ../include/normObject.h:4,
                 from ../src/common/normObject.cpp:1:
../protolib/include/protoTree.h: In member function ‘ITEM_TYPE* ProtoSortedTreeTemplate<ITEM_TYPE>::Iterator::PeekPrevItem() const’:
../protolib/include/protoTree.h:664:93: error: no matching function for call to ‘ProtoSortedTreeTemplate<ITEM_TYPE>::Iterator::PeekPrevItem() const’
                     {return static_cast<ITEM_TYPE*>(ProtoSortedTree::Iterator::PeekPrevItem());}
                                                                                             ^
../protolib/include/protoTree.h:566:23: note:   passing ‘const ProtoSortedTreeTemplate<ITEM_TYPE>::Iterator*’ as ‘this’ argument discards qualifiers
../protolib/include/protoTree.h: In member function ‘ITEM_TYPE* ProtoSortedTreeTemplate<ITEM_TYPE>::Iterator::PeekNextItem() const’:
../protolib/include/protoTree.h:669:93: error: no matching function for call to ‘ProtoSortedTreeTemplate<ITEM_TYPE>::Iterator::PeekNextItem() const’
                     {return static_cast<ITEM_TYPE*>(ProtoSortedTree::Iterator::PeekNextItem());}
                                                                                             ^
../protolib/include/protoTree.h:564:23: note: candidate: ‘ProtoSortedTree::Item* ProtoSortedTree::Iterator::PeekNextItem()’ <near match>
                 Item* PeekNextItem()
                       ^~~~~~~~~~~~
../protolib/include/protoTree.h:564:23: note:   passing ‘const ProtoSortedTreeTemplate<ITEM_TYPE>::Iterator*’ as ‘this’ argument discards qualifiers
../protolib/include/protoTree.h:566:23: note: candidate: ‘ProtoSortedTree::Item* ProtoSortedTree::Iterator::PeekPrevItem()’ <near match>
                 Item* PeekPrevItem()
                       ^~~~~~~~~~~~
In file included from ../protolib/include/protoAddress.h:8,
                 from ../protolib/include/protoSocket.h:4,
                 from ../protolib/include/protokit.h:6,
                 from ../include/normMessage.h:5,
                 from ../include/normSession.h:4,
                 from ../src/common/normSession.cpp:1:
../protolib/include/protoTree.h: In member function ‘ITEM_TYPE* ProtoSortedTreeTemplate<ITEM_TYPE>::Iterator::PeekPrevItem() const’:
../protolib/include/protoTree.h:664:93: error: no matching function for call to ‘ProtoSortedTreeTemplate<ITEM_TYPE>::Iterator::PeekPrevItem() const’
                     {return static_cast<ITEM_TYPE*>(ProtoSortedTree::Iterator::PeekPrevItem());}
                                                                                             ^
../protolib/include/protoTree.h:566:23: note: candidate: ‘ProtoSortedTree::Item* ProtoSortedTree::Iterator::PeekPrevItem()’ <near match>
                 Item* PeekPrevItem()
                       ^~~~~~~~~~~~
../protolib/include/protoTree.h:566:23: note:   passing ‘const ProtoSortedTreeTemplate<ITEM_TYPE>::Iterator*’ as ‘this’ argument discards qualifiers
../protolib/include/protoTree.h: In member function ‘ITEM_TYPE* ProtoSortedTreeTemplate<ITEM_TYPE>::Iterator::PeekNextItem() const’:
../protolib/include/protoTree.h:669:93: error: no matching function for call to ‘ProtoSortedTreeTemplate<ITEM_TYPE>::Iterator::PeekNextItem() const’
                     {return static_cast<ITEM_TYPE*>(ProtoSortedTree::Iterator::PeekNextItem());}
                                                                                             ^
../protolib/include/protoTree.h:564:23: note: candidate: ‘ProtoSortedTree::Item* ProtoSortedTree::Iterator::PeekNextItem()’ <near match>
                 Item* PeekNextItem()
                       ^~~~~~~~~~~~
../protolib/include/protoTree.h:564:23: note:   passing ‘const ProtoSortedTreeTemplate<ITEM_TYPE>::Iterator*’ as ‘this’ argument discards qualifiers
../protolib/include/protoTree.h:566:23: note:   passing ‘const ProtoSortedTreeTemplate<ITEM_TYPE>::Iterator*’ as ‘this’ argument discards qualifiers
../protolib/include/protoTree.h: In member function ‘ITEM_TYPE* ProtoSortedTreeTemplate<ITEM_TYPE>::Iterator::PeekNextItem() const’:
../protolib/include/protoTree.h:669:93: error: no matching function for call to ‘ProtoSortedTreeTemplate<ITEM_TYPE>::Iterator::PeekNextItem() const’
                     {return static_cast<ITEM_TYPE*>(ProtoSortedTree::Iterator::PeekNextItem());}
                                                                                             ^
../protolib/include/protoTree.h:564:23: note: candidate: ‘ProtoSortedTree::Item* ProtoSortedTree::Iterator::PeekNextItem()’ <near match>
                 Item* PeekNextItem()
                       ^~~~~~~~~~~~
../protolib/include/protoTree.h:564:23: note:   passing ‘const ProtoSortedTreeTemplate<ITEM_TYPE>::Iterator*’ as ‘this’ argument discards qualifiers
make: *** [Makefile.common:31: ../src/common/normMessage.o] Error 1
make: *** Waiting for unfinished jobs....
../src/common/normSession.cpp: In member function ‘void NormSession::SenderHandleCCFeedback(timeval, NormNodeId, UINT8, double, double, double, UINT16)’:
../src/common/normSession.cpp:3287:50: warning: enum constant in boolean context [-Wint-in-bool-context]
         bool haveRtt = (0 != (ccFlags && NormCC::RTT));
                                                  ^~~
make: *** [Makefile.common:31: ../src/common/normNode.o] Error 1
make: *** [Makefile.common:31: ../src/common/normObject.o] Error 1
make: *** [Makefile.common:31: ../src/common/normSession.o] Error 1
bebopagogo commented 4 years ago

Thanks for the comment. I suspect that Protolib release was created before or during the migration of our stuff to Github. At the moment, I recommend using the Protolib 'master' with the NORM 'master" (and same for other projects here that use Protolib). Our prior practice for packaging NORM source tree "releases" was to include the current Protolib tree tested with that NORM release as part of the NORM tarball. I will try to determine the best approach for this now that the code is being maintained on Github.

eelcocramer commented 4 years ago

Thanks. I will use the master for now.

Maybe adding protolib as a git submodule would suffice?

weston-nrl commented 4 years ago

Protolib 3.0b1 is from August 2017. NORM 1.5.8 is from July 2018. We should probably create new releases of each. It's possible to upload additional downloads with each release (e.g. to include a version with Protolib like we did before), I just didn't know that was necessary in this case.

weston-nrl commented 4 years ago

In case it's useful, I just added the 1.5.8 source tarball that contains the corresponding (at the time) protolib from the original 'downloads.pf' site to the 1.5.8 release.

eelcocramer commented 4 years ago

That is useful. Thanks a lot.

bebopagogo commented 4 years ago

Thanks for the tip on git submodule. That seems to be what is needed to manage protolib as part of NORM and other projects using it.