Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

master branch does not build #61

Open
nh2 opened this issue Dec 15, 2013 · 3 comments
Open

master branch does not build #61

nh2 opened this issue Dec 15, 2013 · 3 comments

Comments

@nh2
Copy link

nh2 commented Dec 15, 2013

Hi,

the develop branch works fine, but in master, there are 3 easy-fix issues:

  • -Werror with unused typedef
make[1]: Entering directory `/home/niklas/openni/master/OpenNI2/Source/Drivers/PSLink'
g++ -MD -MP -MT "./../../../Bin/Intermediate/x64-Release/libPSLink.so/XnLinkControlEndpoint.d ../../../Bin/Intermediate/x64-Release/libPSLink.so/XnLinkControlEndpoint.o" -c -msse3 -Wall -O2 -DNDEBUG -I../../../Include -I../../../ThirdParty/PSCommon/XnLib/Include -I. -IProtocols/XnLinkProto -ILinkProtoLib  -fPIC -fvisibility=hidden -Werror -o ../../../Bin/Intermediate/x64-Release/libPSLink.so/XnLinkControlEndpoint.o LinkProtoLib/XnLinkControlEndpoint.cpp
In file included from LinkProtoLib/XnLinkMsgEncoder.h:6:0,
                 from LinkProtoLib/XnLinkControlEndpoint.h:5,
                 from LinkProtoLib/XnLinkControlEndpoint.cpp:1:
LinkProtoLib/XnLinkControlEndpoint.cpp: In member function ‘XnStatus xn::LinkControlEndpoint::EnumerateStreams(xnl::Array<XnFwStreamInfo>&)’:
LinkProtoLib/XnLinkProtoUtils.h:18:43: error: typedef ‘compileAssert’ locally defined but not used [-Werror=unused-local-typedefs]
 #define XN_COMPILER_ASSERT(x) typedef int compileAssert[x ? 1 : -1]
                                           ^
LinkProtoLib/XnLinkControlEndpoint.cpp:1174:3: note: in expansion of macro ‘XN_COMPILER_ASSERT’
   XN_COMPILER_ASSERT(sizeof(aStreamInfos[i].creationInfo) >= sizeof(pEnumerateNodesResponse->m_streamInfos[i].m_strCreationInfo));
   ^
cc1plus: all warnings being treated as errors
  • Another -Werror with unused typedef
make[1]: Entering directory `/home/niklas/openni/master/OpenNI2/Source/Drivers/PSLink/PSLinkConsole'
g++ -MD -MP -MT "./../../../../Bin/Intermediate/x64-Release/PSLinkConsole/XnLinkControlEndpoint.d ../../../../Bin/Intermediate/x64-Release/PSLinkConsole/XnLinkControlEndpoint.o" -c -msse3 -Wall -O2 -DNDEBUG -I../../../../Include -I../../../../ThirdParty/PSCommon/XnLib/Include -I../ -I../Protocols/XnLinkProto -I../LinkProtoLib  -fPIC -fvisibility=hidden -Werror -o ../../../../Bin/Intermediate/x64-Release/PSLinkConsole/XnLinkControlEndpoint.o ../LinkProtoLib/XnLinkControlEndpoint.cpp
In file included from ../LinkProtoLib/XnLinkMsgEncoder.h:6:0,
                 from ../LinkProtoLib/XnLinkControlEndpoint.h:5,
                 from ../LinkProtoLib/XnLinkControlEndpoint.cpp:1:
../LinkProtoLib/XnLinkControlEndpoint.cpp: In member function ‘XnStatus xn::LinkControlEndpoint::EnumerateStreams(xnl::Array<XnFwStreamInfo>&)’:
../LinkProtoLib/XnLinkProtoUtils.h:18:43: error: typedef ‘compileAssert’ locally defined but not used [-Werror=unused-local-typedefs]
 #define XN_COMPILER_ASSERT(x) typedef int compileAssert[x ? 1 : -1]
                                           ^
../LinkProtoLib/XnLinkControlEndpoint.cpp:1174:3: note: in expansion of macro ‘XN_COMPILER_ASSERT’
   XN_COMPILER_ASSERT(sizeof(aStreamInfos[i].creationInfo) >= sizeof(pEnumerateNodesResponse->m_streamInfos[i].m_strCreationInfo));
   ^
cc1plus: all warnings being treated as errors
  • Linker error because -lpthread is missing
make[1]: Entering directory `/home/niklas/openni/master/OpenNI2/Source/Tools/NiViewer'
g++ -o ../../../Bin/x64-Release/NiViewer ./../../../Bin/Intermediate/x64-Release/NiViewer/Device.o ./../../../Bin/Intermediate/x64-Release/NiViewer/Draw.o ./../../../Bin/Intermediate/x64-Release/NiViewer/Keyboard.o ./../../../Bin/Intermediate/x64-Release/NiViewer/Menu.o ./../../../Bin/Intermediate/x64-Release/NiViewer/MouseInput.o ./../../../Bin/Intermediate/x64-Release/NiViewer/NiViewer.o ./../../../Bin/Intermediate/x64-Release/NiViewer/Capture.o -L../../../ThirdParty/PSCommon/XnLib/Bin/x64-Release -L../../../Bin/x64-Release -lglut -lGL -lOpenNI2 -lXnLib -Wl,-rpath ./
/usr/bin/ld: ../../../ThirdParty/PSCommon/XnLib/Bin/x64-Release/libXnLib.a(XnLinuxMutex.o): undefined reference to symbol 'pthread_mutexattr_settype@@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

Thanks!

@dankegel
Copy link

I'm building 5b88c95 on ubuntu 14.04.
I use a commandline like
make ALLOW_WARNINGS=1
to work around the first two issues, and a patch like

--- OpenNI2-2.2.0.30/ThirdParty/PSCommon/BuildSystem/CommonCppMakefile.old  2014-03-28 19:09:11.572263107 -0700
+++ OpenNI2-2.2.0.30/ThirdParty/PSCommon/BuildSystem/CommonCppMakefile  2014-03-28 19:09:55.600261937 -0700
@@ -95,6 +95,9 @@
    OUTPUT_NAME = $(EXE_NAME)
    # We want the executables to look for the .so's locally first:
    LDFLAGS += -Wl,-rpath ./
+   ifneq ("$(OSTYPE)","Darwin")
+       LDFLAGS += -lpthread
+   endif
    OUTPUT_COMMAND = $(CXX) -o $(OUTPUT_FILE) $(OBJ_FILES) $(LDFLAGS)
 endif
 ifneq "$(SLIB_NAME)" ""

for the second.

@dankegel
Copy link

Last one is a dup of issue #47

@ghost
Copy link

ghost commented Apr 3, 2014

You can see this #46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants