[Opentnl-general] Problems compiling on FreeBSD
Brought to you by:
mark_frohnmayer,
s_alanet
From: Aaron D. <aa...@da...> - 2006-01-26 01:27:52
|
I am running FreeBSD5.4-RELEASE and GCC 3.4.2. I have been trying to compile the TNL library but with a number of difficulties. 1) I extracted the source and typed 'gmake.' 2) The first error I encounter is: $ gmake gmake[1]: Entering directory `/home/aaron/devscratch/tnl/tnl/tnl' g++ -g -DTNL_DEBUG -DTNL_ENABLE_LOGGING -I../libtomcrypt -c assert.cpp In file included from tnlUDP.h:35, from tnl.h:51, from assert.cpp:27: tnlVector.h: In member function `T& TNL::Vector<T>::front()': tnlVector.h:302: error: there are no arguments to `begin' that depend on a template parameter, so a declaration of `begin' must be available tnlVector.h:302: error: (if you use `-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated) tnlVector.h: In member function `const T& TNL::Vector<T>::front() const': tnlVector.h:307: error: there are no arguments to `begin' that depend on a template parameter, so a declaration of `begin' must be available tnlVector.h: In member function `T& TNL::Vector<T>::back()': tnlVector.h:312: error: there are no arguments to `end' that depend on a template parameter, so a declaration of `end' must be available tnlVector.h: In member function `const T& TNL::Vector<T>::back() const': tnlVector.h:317: error: there are no arguments to `end' that depend on a template parameter, so a declaration of `end' must be available gmake[1]: *** [assert.o] Error 1 I didn't understand this error so added the -fpermissive directive to the tnl/Makefile. 3) I now get almost to the very end but the compile halts at udp.cpp with the following (above warnings snipped): udp.cpp:105:21: wsipx.h: No such file or directory udp.cpp: At global scope: udp.cpp:158: error: `SOCKADDR' has not been declared udp.cpp:158: error: `socklen_t' has not been declared udp.cpp:159: warning: ISO C++ forbids declaration of `sockAddr' with no type udp.cpp:159: warning: ISO C++ forbids declaration of `addressSize' with no type udp.cpp: In function `void TNL::TNLToSocketAddress(const TNL::Address&, int*, int*)': udp.cpp:162: error: `SOCKADDR_IN' undeclared (first use this function) udp.cpp:162: error: (Each undeclared identifier is reported only once for each function it appears in.) udp.cpp:163: error: expected primary-expression before ')' token udp.cpp:163: error: expected `)' before "sockAddr" udp.cpp:164: error: expected primary-expression before ')' token udp.cpp:164: error: expected `)' before "sockAddr" udp.cpp:165: error: expected primary-expression before ')' token udp.cpp:165: error: expected `)' before "sockAddr" udp.cpp:171: error: `SOCKADDR_IPX' undeclared (first use this function) --HUGE SNIP-- gmake[1]: *** [udp.o] Error 1 So I now add the -DNO_IPX_SUPPORT to the tnl/Makefile (even though udp.cpp appears to define it already). 4) The compiler no longer looks for wsipx.h, but I still get all the other errors. So I now add -DTNL_OS_LINUX to the tnl/Makefile. 5) I shout for joy as the libtnl is finally linked but then frown deeply when I get the following error in the libtomcrypt directory: cc -c -I./ -Wall -Wsign-compare -W -Wno-unused -Wshadow -Werror -Os -c -o tiger.o tiger.c tiger.c:544: warning: conflicting types for built-in function 'round' gmake[1]: *** [tiger.o] Error 1 6) At this point I choose to give up and ask for assistance. The documentation and website say that FreeBSD is supported, but it doesn't appear so. I would love to add an opentnl port to the Ports tree, but I need to overcome these issues first. Any help you can offer would be greatly appreciated. Thank you for your time. -- Aaron Dalton | Super Duper Games aa...@da... | http://superdupergames.org |