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
100 stars 36 forks source link

waf build error #3

Closed j-joshua closed 5 years ago

j-joshua commented 5 years ago
$ ./waf -v --targets=*
Waf: Entering directory `/home/xxx/norm/build'
[ 98/140] Linking build/libnorm.so
12:56:34 runner ['/opt/rh/devtoolset-7/root/usr/bin/g++', '-shared', '-Wl,-h,libnorm.so.1', 'src/common/galois.cpp.2.o', 'src/common/normApi.cpp.2.o', 'src/common/normEncoder.cpp.2.o', 'src/common/normEncoderMDP.cpp.2.o', 'src/common/normEncoderRS16.cpp.2.o', 'src/common/normEncoderRS8.cpp.2.o', 'src/common/normFile.cpp.2.o', 'src/common/normMessage.cpp.2.o', 'src/common/normNode.cpp.2.o', 'src/common/normObject.cpp.2.o', 'src/common/normSegment.cpp.2.o', 'src/common/normSession.cpp.2.o', '-o/home/xxx/norm/build/libnorm.so', '-Wl,-Bstatic', '-Lprotolib', '-lprotolib', '-lprotolib', '-Wl,-Bdynamic', '-lpthread', '-lnetfilter_queue']
[ 99/140] Compiling src/unix/unixPostProcess.cpp
12:56:34 runner ['/opt/rh/devtoolset-7/root/usr/bin/g++', '-fPIC', '-O3', '-fvisibility=hidden', '-Wno-attributes', '-Iprotolib/include', '-I../protolib/include', '-Iprotolib/include/unix', '-I../protolib/include/unix', '-I/usr/include/libxml2', '-DUNIX', '-DHAVE_DIRFD', '-DHAVE_IPV6', '-DHAVE_ASSERT', '-DHAVE_GETLOGIN', '-DLINUX', '-DHAVE_LOCKF', '-D_FILE_OFFSET_BITS=64', '-DHAVE_OLD_SIGNALHANDLER', '-DNO_SCM_RIGHTS', '-DHAVE_SCHED', '-DUSE_TIMERFD', '-DUSE_EVENTFD', '-DHAVE_PSELECT', '-DUSE_SELECT', '-DNDEBUG', '-DPROTO_DEBUG', '../src/unix/unixPostProcess.cpp', '-c', '-o/home/xxx/norm/build/src/unix/unixPostProcess.cpp.4.o']
[100/140] Compiling src/common/normPostProcess.cpp
12:56:34 runner ['/opt/rh/devtoolset-7/root/usr/bin/g++', '-fPIC', '-O3', '-fvisibility=hidden', '-Wno-attributes', '-Iprotolib/include', '-I../protolib/include', '-Iprotolib/include/unix', '-I../protolib/include/unix', '-I/usr/include/libxml2', '-DUNIX', '-DHAVE_DIRFD', '-DHAVE_IPV6', '-DHAVE_ASSERT', '-DHAVE_GETLOGIN', '-DLINUX', '-DHAVE_LOCKF', '-D_FILE_OFFSET_BITS=64', '-DHAVE_OLD_SIGNALHANDLER', '-DNO_SCM_RIGHTS', '-DHAVE_SCHED', '-DUSE_TIMERFD', '-DUSE_EVENTFD', '-DHAVE_PSELECT', '-DUSE_SELECT', '-DNDEBUG', '-DPROTO_DEBUG', '../src/common/normPostProcess.cpp', '-c', '-o/home/xxx/norm/build/src/common/normPostProcess.cpp.4.o']
../src/unix/unixPostProcess.cpp:44:10: fatal error: normPostProcess.h: No such file or directory
 #include "normPostProcess.h"
          ^~~~~~~~~~~~~~~~~~~
compilation terminated.

../src/common/normPostProcess.cpp:1:10: fatal error: normPostProcess.h: No such file or directory
 #include "normPostProcess.h"
          ^~~~~~~~~~~~~~~~~~~
compilation terminated.

Waf: Leaving directory `/home/xxx/norm/build'
Build failed
 -> task in 'normapp' failed with exit status 1:
        {task 139753374494544: cxx unixPostProcess.cpp -> unixPostProcess.cpp.4.o}
['/opt/rh/devtoolset-7/root/usr/bin/g++', '-fPIC', '-O3', '-fvisibility=hidden', '-Wno-attributes', '-Iprotolib/include', '-I../protolib/include', '-Iprotolib/include/unix', '-I../protolib/include/unix', '-I/usr/include/libxml2', '-DUNIX', '-DHAVE_DIRFD', '-DHAVE_IPV6', '-DHAVE_ASSERT', '-DHAVE_GETLOGIN', '-DLINUX', '-DHAVE_LOCKF', '-D_FILE_OFFSET_BITS=64', '-DHAVE_OLD_SIGNALHANDLER', '-DNO_SCM_RIGHTS', '-DHAVE_SCHED', '-DUSE_TIMERFD', '-DUSE_EVENTFD', '-DHAVE_PSELECT', '-DUSE_SELECT', '-DNDEBUG', '-DPROTO_DEBUG', '../src/unix/unixPostProcess.cpp', '-c', '-o/home/xxx/norm/build/src/unix/unixPostProcess.cpp.4.o']
 -> task in 'normapp' failed with exit status 1:
        {task 139753374494304: cxx normPostProcess.cpp -> normPostProcess.cpp.4.o}
['/opt/rh/devtoolset-7/root/usr/bin/g++', '-fPIC', '-O3', '-fvisibility=hidden', '-Wno-attributes', '-Iprotolib/include', '-I../protolib/include', '-Iprotolib/include/unix', '-I../protolib/include/unix', '-I/usr/include/libxml2', '-DUNIX', '-DHAVE_DIRFD', '-DHAVE_IPV6', '-DHAVE_ASSERT', '-DHAVE_GETLOGIN', '-DLINUX', '-DHAVE_LOCKF', '-D_FILE_OFFSET_BITS=64', '-DHAVE_OLD_SIGNALHANDLER', '-DNO_SCM_RIGHTS', '-DHAVE_SCHED', '-DUSE_TIMERFD', '-DUSE_EVENTFD', '-DHAVE_PSELECT', '-DUSE_SELECT', '-DNDEBUG', '-DPROTO_DEBUG', '../src/common/normPostProcess.cpp', '-c', '-o/home/xxx/norm/build/src/common/normPostProcess.cpp.4.o']
bebopagogo commented 5 years ago

j-joshua

I have pushed an update that should address this. I tested on Linux (Ubuntu 16) and Mac OSX. One challenge is that some of the code examples (most notably the normapp) directly access NORM C++ objects instead of using the API and thus linking fails when the compiler links to the shared library where those objects are protected vs. the static library. With gcc, waf is able to properly dictate the linking, but 'clang' links to shared libraries by default. I was able to resolve that with the wscript forcing linkage to the static library for the examples. However, a number of these examples will link against the shared library so I'm not fond of this 'hack' for 'clang'. I may refine the wscript so that only examples that require the static library are relegated to this 'hack'. Thanks for your feedback.