Package: ntop
Version: 2:3.2rc1-2
Severity: serious
Tags: patch

Hi,

Your package is failing to build on some arches because
it's not using PIC code to generate a shared lib.

On alpha you get:
/usr/bin/ld: .libs/libxmldumpPlugin_la-xmldumpPlugin.o: !samegp reloc against 
symbol without .prologue: dumpXML
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status

On amd64:
/usr/bin/ld: .libs/libxmldumpPlugin_la-xmldumpPlugin.o: relocation 
R_X86_64_PC32against `dumpXML' can not be used when making a shared object; 
recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status

It is getting build with -DPIC and -fPIC, so it must be something else.

During build, it shows the following warning:
xmldumpPlugin.c:52:2: warning: #warning
xmldumpPlugin.c:53:2: warning: #warning Missing header files, disabling xmldump
 plugin
xmldumpPlugin.c:54:2: warning: #warning
xmldumpPlugin.c:55:2: warning: #warning FOR MOST USERS THIS IS NOT A PROBLEM
xmldumpPlugin.c:56:2: warning: #warning ntop will build and run just fine...
xmldumpPlugin.c:57:2: warning: #warning
xmldumpPlugin.c:58:2: warning: #warning Why?
xmldumpPlugin.c:59:2: warning: #warning
xmldumpPlugin.c:61:2: warning: #warning glibconfig.h unavailable
xmldumpPlugin.c:64:2: warning: #warning glib.h unavailable
xmldumpPlugin.c:67:2: warning: #warning gdome.h unavailable
xmldumpPlugin.c:72:2: warning: #warning
xmldumpPlugin.c:73:2: warning: #warning =======================================
====================
xmldumpPlugin.c:74:2: warning: #warning
xmldumpPlugin.c:28: warning: 'dumpXML' used but never defined

During configure:
checking glib.h usability... no
checking glib.h presence... no
checking for glib.h... no
checking glibconfig.h usability... no
checking glibconfig.h presence... no
checking for glibconfig.h... no
checking gdome.h usability... no
checking gdome.h presence... no
checking for gdome.h... no

It seems to be using the following code in that case:
#ifndef MAKE_WITH_XMLDUMP
static int dumpXML(char * url) {
    return(0);
}
#else

This problem seems to go away when using -O2, in which
case it's probably inlining it.

An other way to fix it would be not to call dumpXML() when 
MAKE_WITH_XMLDUMP isn't defined.  I've attached a patch
for it.

You could also just complete remove the dumpXML() in case
it's not defined.


Kurt

--- xmldumpPlugin.c.old 2005-10-08 16:25:07.760558536 +0200
+++ xmldumpPlugin.c     2005-10-08 16:29:19.279226640 +0200
@@ -486,8 +486,10 @@
       return;
     }
 
+#ifdef MAKE_WITH_XMLDUMP
     /* Process it */
     dumpXML(url);
+#endif
 
 #if defined(PARM_FORK_CHILD_PROCESS) && (!defined(WIN32))
     if(myGlobals.childntoppid != 0)

Reply via email to