List · Roadmap
STR #28
| Status: | 5 - New |
| Priority: | 4 - High, e.g. key functionality not working |
| Scope: | 2 - Specific to an operating system |
| Subsystem: | Unassigned |
| Summary: | newsd r162 fails to build on ubuntu 8.04 |
| Version: | 1.45 |
| Created By: | erco |
| Assigned To: | erco |
| Fix Version: | Unassigned |
| Update Notification: | |
Trouble Report Files:
Post File
Trouble Report Dialog:
Post Text
erco 09:55 Dec 30, 2009 | Did a current checkout of newsd from SVN; got the following errors on ubuntu 8.04 with a default build.
According to the CHANGES log, this is 1.50, but there's no pulldown in the bug report for this version, so I'm mentioning this here.
Here's the configure and build output:
Wed 12/30/09 09:48:38 /net/erco/src/newsd [root@tahoe] ## ROOT ## 710 # ./configure checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for library containing socket... none required checking for library containing getaddrinfo... none required checking for library containing getnameinfo... none required checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... 64 checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking pthread.h usability... yes checking pthread.h presence... yes checking for pthread.h... yes checking for pthread_create using -lpthreads... no checking for pthread_create using -lpthread... yes checking for pthread_create using -pthread... yes checking if GCC supports -fstack-protector... yes checking if GCC supports -pie... yes checking for gcc... (cached) gcc checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ISO C89... (cached) none needed checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for a BSD-compatible install... /usr/bin/install -c checking for htmldoc... no checking for mkdir... /bin/mkdir checking for mv... /bin/mv checking for pod2man... /usr/bin/pod2man checking for pod2html... /usr/bin/pod2html checking for nroff... /usr/bin/nroff checking for rm... /bin/rm checking for an ANSI C-conforming const... yes checking whether char is unsigned... no checking for ANSI C header files... (cached) yes configure: creating ./config.status config.status: creating Makefile config.status: creating newsd.sh config.status: creating newsd.conf config.status: creating newsd.list config.status: creating newsd.pod config.status: creating newsd.conf.pod config.status: creating config.h
Wed 12/30/09 09:48:50 /net/erco/src/newsd [root@tahoe] ## ROOT ## 711 # make Compiling newsd.C... In file included from newsd.C:40: Server.H: In member function 'const char* Server::GetRemoteIPStr()': Server.H:138: error: 'inet_ntoa' was not declared in this scope newsd.C: In function 'int MailGateway(const char*)': newsd.C:297: warning: declaration of 'c' shadows a previous local newsd.C:167: warning: shadowed declaration is here make: *** [newsd.o] Error 1
|
erco 10:04 Dec 30, 2009 | Hmm, fixed those, but now there's a whole slew of new warnings and errors from some other files.
What's the development status of svn current for newsd? (Maybe I should be working with an older svn rev.)
Wed 12/30/09 10:01:26 /net/erco/src/newsd [root@tahoe] ## ROOT ## 742 # make Compiling newsd.C... Compiling Array.C... Compiling Article.C... Compiling Client.C... Client.C: In function 'void AllGroups(std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, const char*)': Client.C:121: warning: unused variable 'ptr' Client.C: In member function 'int Server::CommandLoop(const char**)': Client.C:582: warning: declaration of 'reply' shadows a previous local Client.C:213: warning: shadowed declaration is here Compiling Configuration.C... Configuration.C: In member function 'void Configuration::FixNewsLogDir(const char*)': Configuration.C:422: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'uid_t' Configuration.C:422: warning: format '%s' expects type 'char*', but argument 6 has type 'gid_t' Configuration.C:422: warning: too many arguments for format Configuration.C: In member function 'int Configuration::Rotate(bool)': Configuration.C:615: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type '__uid_t' Configuration.C:615: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type '__uid_t' Configuration.C:615: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type '__uid_t' Configuration.C:615: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type '__uid_t' Configuration.C: In member function 'void Configuration::LogSelf(int)': Configuration.C:702: warning: declaration of 'loglevel' shadows a member of 'this' Configuration.C: In member function 'int Configuration::AuthLogin(const std::string&, const std::string&)': Configuration.C:780: warning: declaration of 'user' shadows a member of 'this' Compiling Group.C... Group.C: In member function 'int Group::LoadConfig(int)': Group.C:253: warning: declaration of 'end' shadows a member of 'this' Group.C: In member function 'int Group::FindArticleByMessageID(const char*, long unsigned int&)': Group.C:410: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'unsigned int' Group.C:410: warning: format '%lu' expects type 'long unsigned int', but argument 5 has type 'unsigned int' Group.C: In member function 'int Group::ParseArticle(std::string&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&)': Group.C:903: warning: declaration of 'start' shadows a member of 'this' Compiling Server.C... Server.C: In function 'void AllGroups(std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, const char*)': Server.C:121: warning: unused variable 'ptr' Server.C: In member function 'int Server::CommandLoop(const char**)': Server.C:582: warning: declaration of 'reply' shadows a previous local Server.C:213: warning: shadowed declaration is here Compiling Socket.C... Socket.C:65: warning: ignoring #pragma mark SocketAddress Socket.C:206: warning: ignoring #pragma mark SocketAddrList Socket.C:323: warning: ignoring #pragma mark SocketAddrMask Socket.C:373: warning: ignoring #pragma mark Socket Socket.C: In constructor 'SocketAddress::SocketAddress(const char*)': Socket.C:105: error: 'strlcpy' was not declared in this scope Socket.C: In member function 'char* SocketAddress::lookup(char*, size_t)': Socket.C:143: error: 'strlcpy' was not declared in this scope Socket.C: In member function 'char* SocketAddress::string(char*, size_t)': Socket.C:197: error: 'strlcpy' was not declared in this scope Socket.C: In constructor 'SocketAddrList::SocketAddrList(const char*, int)': Socket.C:253: error: 'strlcpy' was not declared in this scope make: *** [Socket.o] Error 1
|
erco 10:55 Dec 30, 2009 | Since glibc has rejected strlcpy(), I'd suggest we make our own function that does what we want (a guaranteed NULL terminated, length checked string copy that 'silently' truncates if the string is too long).
For now I'm going to tweak the strlcpy()s to use snprintf() like we do elsewhere in the code. |
erco 11:10 Dec 30, 2009 | OK, I've made a patch to get current svn to get it to build; attached here as 'patch.txt'.
Got a lot of complaints about Client.[CH], which appears to be a copy of Server.[CH] with some old Server:: references in it, so I removed it from the dependency list since it was causing build errors. I take it Client.[CH] is either a 'leftover' in SVN, or is in progress.. not sure which. Seems to prefer to build without it.
Thought I'd post the patch rather than check it in, as I'm not sure what the current state of svn current is. (Is newsd 2.0 now?) |
erco 11:12 Dec 30, 2009 | Oh, I should add, the only tweak in this patch not related to the STR is the improved error message for "no such group" errors, as that is the reason I pulled svn in the first place. (see my recent post on newsd.general) |
|