[syslog-ng] Cross-compile problem with path in 3.2.4

Balazs Scheidler bazsi at balabit.hu
Fri Jun 24 14:04:17 CEST 2011


On Wed, 2011-06-15 at 03:45 -0400, Ulrich Prinz wrote:
> Hi!
> 
> I cross compiled syslog-ng 3.2.4 for my ARM board. I called ./configure 
> with the usual --host, --prefix and --exec-prefix options. Then I ran 
> make with DESTDIR to my cross target directory.
> I moved everything to my ARM target and syslog-ng starts up. While it 
> locates and loads the configuration files properly, there is a problem 
> with the modules:
> 
> ~ # syslog-ng
> Error opening plugin module; module='syslogformat', 
> error='//lib/syslog-ng/: cannot read file data: Is a directory'
> Error opening plugin module; module='basicfuncs', 
> error='//lib/syslog-ng/: cannot read file data: Is a directory'
> Plugin module not found in 'module-path'; module-path='/lib/syslog-ng', 
> module='afsocket'
> Error opening plugin module; module='affile', error='//lib/syslog-ng/: 
> cannot read file data: Is a directory'
> Error opening plugin module; module='afprog', error='//lib/syslog-ng/: 
> cannot read file data: Is a directory'
> Error opening plugin module; module='afuser', error='//lib/syslog-ng/: 
> cannot read file data: Is a directory'
> Error opening plugin module; module='dbparser', 
> error='//lib/syslog-ng/: cannot read file data: Is a directory'
> Error opening plugin module; module='csvparser', 
> error='//lib/syslog-ng/: cannot read file data: Is a directory'
> Error opening plugin module; module='syslogformat', 
> error='//lib/syslog-ng/: cannot read file data: Is a directory'
> Error opening plugin module; module='basicfuncs', 
> error='//lib/syslog-ng/: cannot read file data: Is a directory'
> Plugin module not found in 'module-path'; module-path='/lib/syslog-ng', 
> module='afsocket'
> Error opening plugin module; module='affile', error='//lib/syslog-ng/: 
> cannot read file data: Is a directory'
> Error opening plugin module; module='afprog', error='//lib/syslog-ng/: 
> cannot read file data: Is a directory'
> Error opening plugin module; module='afuser', error='//lib/syslog-ng/: 
> cannot read file data: Is a directory'
> Error opening plugin module; module='dbparser', 
> error='//lib/syslog-ng/: cannot read file data: Is a directory'
> Error opening plugin module; module='csvparser', 
> error='//lib/syslog-ng/: cannot read file data: Is a directory'
> Error opening plugin module; module='confgen', error='//lib/syslog-ng/: 
> cannot read file data: Is a directory'
> Error opening plugin module; module='confgen', error='//lib/syslog-ng/: 
> cannot read file data: Is a directory'
> Error parsing source, source plugin system not found in 
> /etc/syslog-ng/syslog-ng.conf at line 10, column 2:
> 
> Checking the directory shows:
> /etc2/syslog-ng # ll /lib/syslog-ng/
> drwxr-xr-x    2 root     root          1024 Jun 14 16:01 ./
> drwxr-xr-x    7 root     root          3072 Jun 14 16:01 ../
> -rw-r--r--    1 root     root        139122 Jun 14 16:01 libaffile.a
> -rwxr-xr-x    1 root     root          1289 Jun 14 16:01 libaffile.la*
> -rw-r--r--    1 root     root        110150 Jun 14 16:01 libafprog.a
> -rwxr-xr-x    1 root     root          1289 Jun 14 16:01 libafprog.la*
> -rw-r--r--    1 root     root        227144 Jun 14 16:01 
> libafsocket-notls.a
> -rwxr-xr-x    1 root     root          1313 Jun 14 16:01 
> libafsocket-notls.la*
> -rw-r--r--    1 root     root        484708 Jun 14 16:01 
> libafsocket-tls.a
> -rwxr-xr-x    1 root     root          1326 Jun 14 16:01 
> libafsocket-tls.la*
> lrwxrwxrwx    1 root     root            18 Jun 14 16:03 libafsocket.so 
> -> libafsocket-tls.so@
> -rw-r--r--    1 root     root         89662 Jun 14 16:01 libafuser.a
> -rwxr-xr-x    1 root     root          1289 Jun 14 16:01 libafuser.la*
> -rw-r--r--    1 root     root         26398 Jun 14 16:01 libbasicfuncs.a
> -rwxr-xr-x    1 root     root          1301 Jun 14 16:01 
> libbasicfuncs.la*
> -rw-r--r--    1 root     root         15366 Jun 14 16:01 libconfgen.a
> -rwxr-xr-x    1 root     root          1292 Jun 14 16:01 libconfgen.la*
> -rw-r--r--    1 root     root         18030 Jun 14 16:01 
> libconvertfuncs.a
> -rwxr-xr-x    1 root     root          1307 Jun 14 16:01 
> libconvertfuncs.la*
> -rw-r--r--    1 root     root         96416 Jun 14 16:01 libcsvparser.a
> -rwxr-xr-x    1 root     root          1298 Jun 14 16:01 
> libcsvparser.la*
> -rw-r--r--    1 root     root        265984 Jun 14 16:01 libdbparser.a
> -rwxr-xr-x    1 root     root          1314 Jun 14 16:01 libdbparser.la*
> -rw-r--r--    1 root     root         78426 Jun 14 16:01 libdummy.a
> -rwxr-xr-x    1 root     root          1286 Jun 14 16:01 libdummy.la*
> -rw-r--r--    1 root     root       1662352 Jun 14 16:01 libsyslog-ng.a
> -rwxr-xr-x    1 root     root          1265 Jun 14 16:01 
> libsyslog-ng.la*
> -rw-r--r--    1 root     root         60868 Jun 14 16:01 
> libsyslogformat.a
> -rwxr-xr-x    1 root     root          1307 Jun 14 16:01 
> libsyslogformat.la*
> 
> I tried calling syslog-ng --module-path=/lib/syslog-ng too, but I get 
> the same result,
> 
> Any idea to get around that would be appreciated :)

although I didn't get the build log, I might be able to help to diagnose
the problem.

You seem to have static libraries only, which is strange as the
configure script contains 

LT_INIT([dlopen disable-static])

e.g. static libraries are disabled by default. They probably get
reenabled, because libtool is unable to detect how to generate shared
libraries.

Then, the 2nd problem seems to be that the Glib call
g_module_build_path() returns a bogus shared library name, which doesn't
contain the basename of the module at all, instead it points to the
plugin base directory. This is strange, but this is probably a glib
compilation issue. In my ancient glib version, this function looks like:

static gchar*
_g_module_build_path (const gchar *directory,
                      const gchar *module_name)
{
  if (directory && *directory) {
    if (strncmp (module_name, "lib", 3) == 0)
      return g_strconcat (directory, "/", module_name, NULL);
    else
      return g_strconcat (directory, "/lib", module_name, "." G_MODULE_SUFFIX, NULL);
  } else if (strncmp (module_name, "lib", 3) == 0)
    return g_strdup (module_name);
  else
    return g_strconcat ("lib", module_name, "." G_MODULE_SUFFIX, NULL);
}

I don't see how this could possibly return that name that you are seeing. How did 
you set up your build environment? Did you compile glib, eventlog and others by hand?

-- 
Bazsi




More information about the syslog-ng mailing list