From: Dennis Clarke on

> Dennis Clarke:
>>
>> I attempted to build from sources and was stopped by an odd error :
>>
>> /opt/csw/gcc4/bin/gcc -DDEF_COMMAND_DIR="/usr/local/sbin"
>
> That is not what the INSTALL instructions tell you to do.
>
> Wietse

:-O

oh .. let me look closely ...

4.4 - Overriding built-in parameter default settings

All Postfix configuration parameters can be changed by editing a Postfix
configuration file, except for one: the parameter that specifies the
location of Postfix configuration files. In order to build Postfix with a
configuration directory other than /etc/postfix, use:

% make makefiles CCARGS='-DDEF_CONFIG_DIR=\"/some/where\"'
% make

IMPORTANT: Be sure to get the quotes right. These details matter a lot.

Parameters whose defaults can be specified in this way are:

________________________________________________________
|Macro name |default value for|typical default |
|_________________|_________________|____________________|
|DEF_COMMAND_DIR |command_directory|/usr/sbin |
|_________________|_________________|____________________|
|DEF_CONFIG_DIR |config_directory |/etc/postfix |
|_________________|_________________|____________________|
|DEF_DAEMON_DIR |daemon_directory |/usr/libexec/postfix|
|_________________|_________________|____________________|
|DEF_DATA_DIR |data_directory |/var/lib/postfix |
|_________________|_________________|____________________|
|DEF_MAILQ_PATH |mailq_path |/usr/bin/mailq |
|_________________|_________________|____________________|
|DEF_HTML_DIR |html_directory |no |
|_________________|_________________|____________________|
|DEF_MANPAGE_DIR |manpage_directory|/usr/local/man |
|_________________|_________________|____________________|
|DEF_NEWALIAS_PATH|newaliases_path |/usr/bin/newaliases |
|_________________|_________________|____________________|
|DEF_QUEUE_DIR |queue_directory |/var/spool/postfix |
|_________________|_________________|____________________|
|DEF_README_DIR |readme_directory |no |
|_________________|_________________|____________________|
|DEF_SENDMAIL_PATH|sendmail_path |/usr/sbin/sendmail |
|_________________|_________________|____________________|


Let's see what I did wrong :

make makefiles CCARGS="-DDEF_COMMAND_DIR=\"/usr/local/sbin\"
-DDEF_DAEMON_DIR=\"/usr/local/libexec/postfix\"
-DDEF_DATA_DIR=\"/var/lib/postfix\"
-DDEF_MAILQ_PATH=\"/usr/local/bin/mailq\"
-DDEF_NEWALIAS_PATH=\"/usr/local/bin/newaliases\" -DHAS_DB -DHAS_PCRE
-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -DUSE_TLS -DHAS_MYSQL
-I/usr/local/include -I/usr/local/ssl/include
-I/opt/csw/mysql51/include/mysql"
AUXLIBS="-R/usr/local/lib:/usr/local/ssl/lib:/opt/csw/mysql51/lib/i386/mysql
-L/usr/local/lib:/usr/local/ssl/lib:/opt/csw/mysql51/lib/i386/mysql -ldb
-lpcre -lsasl2 -lssl -lcrypto -lmysqlclient -lz -lm"
make -f Makefile.in MAKELEVEL= Makefiles

I see a missing single quote at the beginning , perhaps this should be :

make makefiles CCARGS='-DDEF_COMMAND_DIR=\"/usr/local/sbin\"
-DDEF_DAEMON_DIR=\"/usr/local/libexec/postfix\"
-DDEF_DATA_DIR=\"/var/lib/postfix\"
-DDEF_MAILQ_PATH=\"/usr/local/bin/mailq\"
-DDEF_NEWALIAS_PATH=\"/usr/local/bin/newaliases\" -DHAS_DB -DHAS_PCRE
-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -DUSE_TLS -DHAS_MYSQL
-I/usr/local/include -I/usr/local/ssl/include
-I/opt/csw/mysql51/include/mysql'
AUXLIBS='-R/usr/local/lib:/usr/local/ssl/lib:/opt/csw/mysql51/lib/i386/mysql
-L/usr/local/lib:/usr/local/ssl/lib:/opt/csw/mysql51/lib/i386/mysql -ldb
-lpcre -lsasl2 -lssl -lcrypto -lmysqlclient -lz -lm'

okay ... now I get a *different* error message so that may be a good thing :

make
..
..
..
/opt/csw/gcc4/bin/gcc -DDEF_COMMAND_DIR=\"/usr/local/sbin\"
-DDEF_DAEMON_DIR=\"/usr/local/libexec/postfix\"
-DDEF_DATA_DIR=\"/var/lib/postfix\"
-DDEF_MAILQ_PATH=\"/usr/local/bin/mailq\"
-DDEF_NEWALIAS_PATH=\"/usr/local/bin/newaliases\" -DHAS_DB -DHAS_PCRE
-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -DUSE_TLS -DHAS_MYSQL
-I/usr/local/include -I/usr/local/ssl/include
-I/opt/csw/mysql51/include/mysql -Dstrcasecmp=fix_strcasecmp
-Dstrncasecmp=fix_strncasecmp -g -O -I. -I../../include -DSUNOS5 -c
xsasl_server.c
/opt/csw/gcc4/bin/gcc -DDEF_COMMAND_DIR=\"/usr/local/sbin\"
-DDEF_DAEMON_DIR=\"/usr/local/libexec/postfix\"
-DDEF_DATA_DIR=\"/var/lib/postfix\"
-DDEF_MAILQ_PATH=\"/usr/local/bin/mailq\"
-DDEF_NEWALIAS_PATH=\"/usr/local/bin/newaliases\" -DHAS_DB -DHAS_PCRE
-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -DUSE_TLS -DHAS_MYSQL
-I/usr/local/include -I/usr/local/ssl/include
-I/opt/csw/mysql51/include/mysql -Dstrcasecmp=fix_strcasecmp
-Dstrncasecmp=fix_strncasecmp -g -O -I. -I../../include -DSUNOS5 -c
xsasl_cyrus_server.c
xsasl_cyrus_server.c:77:18: error: sasl.h: No such file or directory
xsasl_cyrus_server.c:78:22: error: saslutil.h: No such file or directory
xsasl_cyrus_server.c:146: error: expected specifier-qualifier-list before
'sasl_conn_t'
xsasl_cyrus_server.c:172: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'callbacks'
xsasl_cyrus_server.c: In function 'xsasl_cyrus_server_init':
..
..
..
xsasl_cyrus_server.c:604: error: 'XSASL_CYRUS_SERVER' has no member named
'username'
xsasl_cyrus_server.c:605: error: 'XSASL_CYRUS_SERVER' has no member named
'username'
xsasl_cyrus_server.c:606: error: 'XSASL_CYRUS_SERVER' has no member named
'username'
xsasl_cyrus_server.c:607: error: 'XSASL_CYRUS_SERVER' has no member named
'username'
make: *** [xsasl_cyrus_server.o] Error 1
make: *** [update] Error 1
[fortius]


I'll look closely for a sasl.h and saslutil.h :

[fortius] find /usr/local -type f -name sasl.h
/usr/local/include/sasl/sasl.h
[fortius] find /usr/local -type f -name saslutil.h
/usr/local/include/sasl/saslutil.h

I see ... now we need another -I option ... make tidy again :-)

... and fails again this time on creating an output binary for master :

/opt/csw/gcc4/bin/gcc -DDEF_COMMAND_DIR=\"/usr/local/sbin\"
-DDEF_DAEMON_DIR=\"/usr/local/libexec/postfix\"
-DDEF_DATA_DIR=\"/var/lib/postfix\"
-DDEF_MAILQ_PATH=\"/usr/local/bin/mailq\"
-DDEF_NEWALIAS_PATH=\"/usr/local/bin/newaliases\" -DHAS_DB -DHAS_PCRE
-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -DUSE_TLS -DHAS_MYSQL
-I/usr/local/include -I/usr/local/ssl/include -I/usr/local/include/sasl
-I/opt/csw/mysql51/include/mysql -Dstrcasecmp=fix_strcasecmp
-Dstrncasecmp=fix_strncasecmp -g -O -I. -I../../include -DSUNOS5 -o
master master.o master_conf.o master_ent.o master_sig.o master_avail.o
master_spawn.o master_service.o master_status.o master_listen.o
master_vars.o master_wakeup.o master_watch.o master_flow.o
.../../lib/libglobal.a ../../lib/libutil.a
-R/usr/local/lib:/usr/local/ssl/lib:/opt/csw/mysql51/lib/i386/mysql
-L/usr/local/lib:/usr/local/ssl/lib:/opt/csw/mysql51/lib/i386/mysql -ldb
-lpcre -lsasl2 -lssl -lcrypto -lmysqlclient -lz -lm -lresolv -lsocket
-lnsl
ld: fatal: library -ldb: not found
ld: fatal: library -lpcre: not found
ld: fatal: library -lsasl2: not found
ld: fatal: library -lssl: not found
ld: fatal: library -lcrypto: not found
ld: fatal: library -lmysqlclient: not found
ld: fatal: File processing errors. No output written to master
collect2: ld returned 1 exit status
make: *** [master] Error 1
make: *** [update] Error 1

Looks like one ( or more ) libs can not be found.

How odd.

I'll keep hammering at this.

Thanks for the strict correction :-)


--
Dennis