Current source on the main branch is failing to compile on RHEL5: I'm at latest revision 322 (3 months old as of today).
[dev@devbox trunk]$ make
make all-am
make[1]: Entering directory `/apps/torrent/dtorrent/dtorrent/trunk'
if g++ -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT bencode.o -MD -MP -MF ".deps/bencode.Tpo" -c -o bencode.o bencode.cpp; \
then mv -f ".deps/bencode.Tpo" ".deps/bencode.Po"; else rm -f ".deps/bencode.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT bitfield.o -MD -MP -MF ".deps/bitfield.Tpo" -c -o bitfield.o bitfield.cpp; \
then mv -f ".deps/bitfield.Tpo" ".deps/bitfield.Po"; else rm -f ".deps/bitfield.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT btconfig.o -MD -MP -MF ".deps/btconfig.Tpo" -c -o btconfig.o btconfig.cpp; \
then mv -f ".deps/btconfig.Tpo" ".deps/btconfig.Po"; else rm -f ".deps/btconfig.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT btcontent.o -MD -MP -MF ".deps/btcontent.Tpo" -c -o btcontent.o btcontent.cpp; \
then mv -f ".deps/btcontent.Tpo" ".deps/btcontent.Po"; else rm -f ".deps/btcontent.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT btfiles.o -MD -MP -MF ".deps/btfiles.Tpo" -c -o btfiles.o btfiles.cpp; \
then mv -f ".deps/btfiles.Tpo" ".deps/btfiles.Po"; else rm -f ".deps/btfiles.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT btrequest.o -MD -MP -MF ".deps/btrequest.Tpo" -c -o btrequest.o btrequest.cpp; \
then mv -f ".deps/btrequest.Tpo" ".deps/btrequest.Po"; else rm -f ".deps/btrequest.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT btstream.o -MD -MP -MF ".deps/btstream.Tpo" -c -o btstream.o btstream.cpp; \
then mv -f ".deps/btstream.Tpo" ".deps/btstream.Po"; else rm -f ".deps/btstream.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT bufio.o -MD -MP -MF ".deps/bufio.Tpo" -c -o bufio.o bufio.cpp; \
then mv -f ".deps/bufio.Tpo" ".deps/bufio.Po"; else rm -f ".deps/bufio.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT compat.o -MD -MP -MF ".deps/compat.Tpo" -c -o compat.o compat.c; \
then mv -f ".deps/compat.Tpo" ".deps/compat.Po"; else rm -f ".deps/compat.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT connect_nonb.o -MD -MP -MF ".deps/connect_nonb.Tpo" -c -o connect_nonb.o connect_nonb.cpp; \
then mv -f ".deps/connect_nonb.Tpo" ".deps/connect_nonb.Po"; else rm -f ".deps/connect_nonb.Tpo"; exit 1; fi
if g++ -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -MT console.o -MD -MP -MF ".deps/console.Tpo" -c -o console.o console.cpp; \
then mv -f ".deps/console.Tpo" ".deps/console.Po"; else rm -f ".deps/console.Tpo"; exit 1; fi
console.cpp: In member function ‘void Console::Error(int, const char*, __va_list_tag*)’:
console.cpp:1773: error: no matching function for call to ‘ConChannel::Output(const char [3], char [80])’
console.h:239: note: candidates are: int ConChannel::Output(const char*, __va_list_tag*)
console.cpp:1776: error: no matching function for call to ‘ConChannel::Output(const char [3], char [80])’
console.h:239: note: candidates are: int ConChannel::Output(const char*, __va_list_tag*)
make[1]: *** [console.o] Error 1
make[1]: Leaving directory `/apps/torrent/dtorrent/dtorrent/trunk'
make: *** [all] Error 2
----------------------------
[dev@devbox trunk]$ gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)
----------------------------
I've commented out the offending FNs in console.cpp as follows:
[dev@devbox trunk]$ svn diff console.cpp
Index: console.cpp
===================================================================
--- console.cpp (revision 322)
+++ console.cpp (working copy)
@@ -511,11 +511,13 @@
va_list ap;
va_start(ap, message);
+/* HACKHACK
if( g_console_ready ) CONSOLE.Error(sev, message, ap);
else{
vfprintf(stderr, message, ap);
fflush(stderr);
}
+*/
va_end(ap);
}
@@ -1767,6 +1769,7 @@
}
+/* HACKHACK
void Console::Error(int sev, const char *message, va_list ap)
{
vsnprintf(m_buffer, sizeof(m_buffer), message, ap);
@@ -1778,8 +1781,8 @@
m_warnings.AddMessage(sev, m_buffer);
if( sev && *cfg_ctcs ) CTCS.Send_Info(sev, m_buffer);
}
+*/
-
void Console::Debug(const char *message, ...)
{
if( !*cfg_verbose ) return;
----------------------------
Not a hack I'm particularly proud of, but about the best I'll manage at this hour of the morning while trying to check out mainline in the hopes it would solve some of the crashing problems I've had of late with ctorrent.
Hacked up console.cpp to build on RHEL5
See attached console.cpp file for specific hacked up change to build on RHEL5.