At 14:48 16/01/2003 +1100, you wrote:

what does your "man scandir" say?
The result is identical to "man alphasort". FYI, here is the revelant code:

#include <sys/types.h>
#include <sys/dir.h>

int scandir(dirname, namelist, select, dcomp);
char *dirname;
struct direct *(*namelist[]);
int (*select(.),(*dcomp)();

int alphasort(d1, d2);
struct direct **d1, **d2;

The rest is a typical man explaination.

I decided to stop wasting my time, and solve the damn problem. I was able to get it to compile, but adding these lines to "alias.c":

#include <sys/types.h>
#include <dirent.h>

int alphasort(d1, d2);
struct direct **d1, **d2;

HOWEVER, the compile promptly failed again:

bash-2.03# make
gcc -I. -I/var/vpopmail/include -g -O2 -c util.c
util.c:27:17: fts.h: No such file or directory
util.c: In function `get_du':
util.c:292: `FTS' undeclared (first use in this function)
util.c:292: (Each undeclared identifier is reported only once
util.c:292: for each function it appears in.)
util.c:292: `fileheir' undeclared (first use in this function)
util.c:293: `FTSENT' undeclared (first use in this function)
util.c:293: `fsentry' undeclared (first use in this function)
util.c:301: `FTS_PHYSICAL' undeclared (first use in this function)
make: *** [util.o] Error 1

This time out, util.c is looking for a "fts.h" header file. I cannot find that on this machine, nor 4 other Solaris machines (all version 8). A Google search found some results, and I located it on several Linux and BSD boxes I control. I copied that file over, and discovered another error looking for "cdefs.h", so I copied that as well. The compile failed again with this error:

bash-2.03# make
gcc -I. -I/var/vpopmail/include -g -O2 -c util.c
gcc -I. -I/var/vpopmail/include -g -O2 -c auth.c
gcc -I. -I/var/vpopmail/include -g -O2 -c template.c
gcc -I. -I/var/vpopmail/include -g -O2 -c command.c
gcc -I. -I/var/vpopmail/include -g -O2 -c show.c
gcc -I. -I/var/vpopmail/include -g -O2 -c cgi.c
gcc -I. -I/var/vpopmail/include -g -O2 -c limits.c
gcc -I. -I/var/vpopmail/include -g -O2 -c dotqmail.c
gcc -g -O2 -o qmailadmin qmailadmin.o alias.o autorespond.o forward.o mailinglist.o user.o util.o auth.o template.o command.o show.o cgi.o limits.o dotqmail.o -L/var/vpopmail/lib -lvpopmail -L/usr/local/mysql/lib/mysql/ -lmysqlclient -lz -lsocket -lnsl -lm -lcrypt
Undefined first referenced
symbol in file
fts_open util.o
alphasort alias.o
fts_close util.o
scandir alias.o
fts_read util.o
ld: fatal: Symbol referencing errors. No output written to qmailadmin
collect2: ld returned 1 exit status
make: *** [qmailadmin] Error 1

Joy. I'm pretty certain this has to do with a "gcc" compile switch (eg. -lsocket or -lmysqlclient) but I really don't have the time or energy to debug anymore. Which means I will try once more, and be a dedicated sys admin. Tried some educated guess, all failed.

Any ideas? Anyone? Anyone?

-- Steve

PS-

ps. v1.0.7  does compile ok for me under redhat
Not a surprise :)



Reply via email to