I finally got this to work, below is the absolute minimal list of steps I need to compile cfengine v3.1.2 on Solaris 10. The last time I tried this was on v3.0.2, the biggest change from last time is the addition of --disable-shared to avoid the dynamic linking to /usr/local/lib/libpromises.so.1 (which created all kinds of problems upgrading the clients). I first tried --enable-static, but found that --disable-shared did the trick.
IMO this should be documented somewhere in the official docs - if it is, I haven't found it; if not, I think all people trying to compile on Solaris following [1] will get into trouble. - Erlend [1]: http://www.cfengine.org/manuals/cf3-tutorial.html#Installation Steps to compile cfengine 3.1.2 on Solaris 10 1 - Install a Solaris server with cluster SUNWCall (=entire distribution) 2 - Install libgcc, db and pcre from sunfreeware.com 3 - Use correct path: PATH=/usr/sbin:/usr/bin:/usr/sfw/bin:/usr/local/bin:/usr/ccs/bin 4 - Unpack cfengine-3.1.2.tar.gz 5 - Get rid of -pthread in ./configure: perl -pi -e 's/-pthread/-pthreads/' ./configure 6 - Configure with Solaris 10 openssl and static linking: ./configure --with-openssl=/usr/sfw --disable-shared 7 - Build and install: make; make install On 20 December 2010 09:55, Erlend Leganger <erlend.legan...@gmail.com> wrote: > Here are the steps I use: > - Install a fresh server with the complete Solaris 10 package cluster > (SUNWCall) > - Install the required dependencies to compile cfengine (gcc, flex, > bison, ...) on this server > - Then the following: > > tar xvfz cfengine-3.1.2.tar.gz > cd cfengine-3.1.2 > automake --add-missing > autoreconf > perl -pi -e 's/-pthread/-pthreads/' ./configure > ./configure --prefix=/usr/local --exec-prefix=/usr/local --without-sql > --with-openssl=/usr/sfw --with-workdir=/var/cfengine > make > > Make fails on the very first compile with this error: > > Making all in pub > make[1]: Entering directory `/export/src/cfengine-3.1.2/pub' > /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. > -I../src -I/usr/local/BerkeleyDB.4.2/include -I/usr/sfw/include > -D_REENTRANT -pthreads -I/usr/local/include -D_REENTRANT -pthreads -g > -O2 -I/usr/local/BerkeleyDB.4.2/include -D_LARGEFILE_SOURCE > -D_FILE_OFFSET_BITS=64 -g -Wreturn-type -Wmissing-prototypes > -Wuninitialized -fPIC -DPIC -D_REENTRANT -pthreads -g -O2 > -I/usr/local/BerkeleyDB.4.2/include -D_LARGEFILE_SOURCE > -D_FILE_OFFSET_BITS=64 -MT getopt.lo -MD -MP -MF .deps/getopt.Tpo -c > -o getopt.lo getopt.c > mv -f .deps/getopt.Tpo .deps/getopt.Plo > mv: cannot access .deps/getopt.Tpo > make[1]: *** [getopt.lo] Error 2 > make[1]: Leaving directory `/export/src/cfengine-3.1.2/pub' > make: *** [all-recursive] Error 1 > > Any ideas? > > - Erlend > > The complete output from the commands above: > > ------------------------------------------------------------------------ > Useless use of /d modifier in transliteration operator at > /usr/local/share/automake-1.11/Automake/Wrap.pm line 58. > aclocal.m4:16: warning: this file was generated for autoconf 2.65. > You have another version of autoconf. It may work, but is not guaranteed to. > If you have problems, you may need to regenerate the build system entirely. > To do so, use the procedure documented by the package, typically `autoreconf'. > configure.ac:19: version mismatch. This is Automake 1.11, > configure.ac:19: but the definition used by this AM_INIT_AUTOMAKE > configure.ac:19: comes from Automake 1.11.1. You should recreate > configure.ac:19: aclocal.m4 with aclocal and run automake again. > docs/Makefile.am:29: `%'-style pattern rules are a GNU make extension > docs/Makefile.am:32: `%'-style pattern rules are a GNU make extension > docs/Makefile.am:35: `%'-style pattern rules are a GNU make extension > docs/Makefile.am:38: `%'-style pattern rules are a GNU make extension > ------------------------------------------------------------------------ > autoheader: WARNING: Using auxiliary files such as `acconfig.h', > `config.h.bot' > autoheader: WARNING: and `config.h.top', to define templates for `config.h.in' > autoheader: WARNING: is deprecated and discouraged. > autoheader: > autoheader: WARNING: Using the third argument of `AC_DEFINE' and > autoheader: WARNING: `AC_DEFINE_UNQUOTED' allows one to define a > template without > autoheader: WARNING: `acconfig.h': > autoheader: > autoheader: WARNING: AC_DEFINE([NEED_FUNC_MAIN], 1, > autoheader: [Define if a function `main' is needed.]) > autoheader: > autoheader: WARNING: More sophisticated templates can also be produced, see > the > autoheader: WARNING: documentation. > Useless use of /d modifier in transliteration operator at > /usr/local/share/automake-1.11/Automake/Wrap.pm line 58. > docs/Makefile.am:29: `%'-style pattern rules are a GNU make extension > docs/Makefile.am:32: `%'-style pattern rules are a GNU make extension > docs/Makefile.am:35: `%'-style pattern rules are a GNU make extension > docs/Makefile.am:38: `%'-style pattern rules are a GNU make extension > ------------------------------------------------------------------------ > ------------------------------------------------------------------------ > checking build system type... sparc-sun-solaris2.10 > checking host system type... sparc-sun-solaris2.10 > checking target system type... sparc-sun-solaris2.10 > checking for a BSD-compatible install... ./install-sh -c > checking whether build environment is sane... yes > checking for a thread-safe mkdir -p... ./install-sh -c -d > checking for gawk... no > checking for mawk... no > checking for nawk... nawk > checking whether make sets $(MAKE)... yes > checking for style of include used by make... GNU > checking for gcc... gcc > checking for C compiler default output file name... a.out > checking whether the C compiler works... yes > checking whether we are cross compiling... no > checking for suffix of executables... > checking for suffix of object files... o > checking whether we are using the GNU C compiler... yes > checking whether gcc accepts -g... yes > checking for gcc option to accept ISO C89... none needed > checking dependency style of gcc... gcc3 > checking whether pthreads work with -pthreads... yes > checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE > checking if more special flags are required for pthreads... -D_REENTRANT > checking for cc_r... gcc > checking for gcc... (cached) gcc > checking whether we are using the GNU C compiler... (cached) yes > checking whether gcc accepts -g... (cached) yes > checking for gcc option to accept ISO C89... (cached) none needed > checking dependency style of gcc... (cached) gcc3 > checking for flex... flex > checking lex output file root... lex.yy > checking lex library... -lfl > checking whether yytext is a pointer... yes > checking for bison... bison -y > checking for ranlib... ranlib > checking how to print strings... printf > checking for a sed that does not truncate output... /usr/bin/sed > checking for grep that handles long lines and -e... /usr/xpg4/bin/grep > checking for egrep... /usr/xpg4/bin/grep -E > checking for fgrep... /usr/xpg4/bin/grep -F > checking for ld used by gcc... /usr/ccs/bin/ld > checking if the linker (/usr/ccs/bin/ld) is GNU ld... no > checking for BSD- or MS-compatible name lister (nm)... /usr/ccs/bin/nm -p > checking the name lister (/usr/ccs/bin/nm -p) interface... BSD nm > checking whether ln -s works... yes > checking the maximum length of command line arguments... 786240 > checking whether the shell understands some XSI constructs... yes > checking whether the shell understands "+="... no > checking how to convert sparc-sun-solaris2.10 file names to > sparc-sun-solaris2.10 format... func_convert_file_noop > checking how to convert sparc-sun-solaris2.10 file names to toolchain > format... func_convert_file_noop > checking for /usr/ccs/bin/ld option to reload object files... -r > checking for objdump... no > checking how to recognize dependent libraries... pass_all > checking for dlltool... no > checking how to associate runtime and link libraries... printf %s\n > checking for ar... ar > checking for archiver @FILE support... no > checking for strip... strip > checking for ranlib... (cached) ranlib > checking command to parse /usr/ccs/bin/nm -p output from gcc object... ok > checking for sysroot... no > checking for mt... mt > checking if mt is a manifest tool... no > checking how to run the C preprocessor... gcc -E > checking for ANSI C header files... yes > checking for sys/types.h... yes > checking for sys/stat.h... yes > checking for stdlib.h... yes > checking for string.h... yes > checking for memory.h... yes > checking for strings.h... yes > checking for inttypes.h... yes > checking for stdint.h... yes > checking for unistd.h... yes > checking for dlfcn.h... yes > checking for objdir... .libs > checking if gcc supports -fno-rtti -fno-exceptions... no > checking for gcc option to produce PIC... -fPIC -DPIC > checking if gcc PIC flag -fPIC -DPIC works... yes > checking if gcc static flag -static works... no > checking if gcc supports -c -o file.o... yes > checking if gcc supports -c -o file.o... (cached) yes > checking whether the gcc linker (/usr/ccs/bin/ld) supports shared > libraries... yes > checking whether -lc should be explicitly linked in... yes > checking dynamic linker characteristics... solaris2.10 ld.so > checking how to hardcode library paths into programs... immediate > checking whether stripping libraries is possible... no > checking if libtool supports shared libraries... yes > checking whether to build shared libraries... yes > checking whether to build static libraries... no > checking for getloadavg... yes > checking for pstat_getdynamic... no > checking for kstat_open in -lkstat... yes > checking for getloadavg... yes > checking whether getloadavg requires setgid... no > checking for getconf... /usr/bin/getconf > checking for main in -lm... yes > checking for main in -lcfnova... no > checking for door_create... no > checking for setsockopt... no > checking for setsockopt in -lsocket... yes > checking for gethostent... no > checking for gethostent in -lnsl... yes > checking for getaddrinfo... yes > checking for library containing socket... none required > checking for BerkeleyDB location in default... /usr/local/BerkeleyDB.4.2 > checking Berkeley DB API... 4.2.52 OK > checking for db_create in -ldb... yes > checking for OpenSSL location... /usr/sfw > checking OpenSSL Version... OK > checking for main in -lcrypto... yes > checking pcre... /usr/local > checking pcre.h usability... yes > checking pcre.h presence... yes > checking for pcre.h... yes > checking pcre/pcre.h usability... no > checking pcre/pcre.h presence... no > checking for pcre/pcre.h... no > checking for main in -lpcre... yes > checking for main in -lrt... yes > checking for unistd.h... (cached) yes > checking for stdlib.h... (cached) yes > checking sys/loadavg.h usability... yes > checking sys/loadavg.h presence... yes > checking for sys/loadavg.h... yes > checking sys/mount.h usability... yes > checking sys/mount.h presence... yes > checking for sys/mount.h... yes > checking utime.h usability... yes > checking utime.h presence... yes > checking for utime.h... yes > checking time.h usability... yes > checking time.h presence... yes > checking for time.h... yes > checking sys/time.h usability... yes > checking sys/time.h presence... yes > checking for sys/time.h... yes > checking malloc.h usability... yes > checking malloc.h presence... yes > checking for malloc.h... yes > checking sys/malloc.h usability... no > checking sys/malloc.h presence... no > checking for sys/malloc.h... no > checking vfs.h usability... no > checking vfs.h presence... no > checking for vfs.h... no > checking sys/vfs.h usability... yes > checking sys/vfs.h presence... yes > checking for sys/vfs.h... yes > checking sys/sockio.h usability... yes > checking sys/sockio.h presence... yes > checking for sys/sockio.h... yes > checking sys/statvfs.h usability... yes > checking sys/statvfs.h presence... yes > checking for sys/statvfs.h... yes > checking sys/statfs.h usability... yes > checking sys/statfs.h presence... yes > checking for sys/statfs.h... yes > checking sys/param.h usability... yes > checking sys/param.h presence... yes > checking for sys/param.h... yes > checking fcntl.h usability... yes > checking fcntl.h presence... yes > checking for fcntl.h... yes > checking sys/filesys.h usability... no > checking sys/filesys.h presence... no > checking for sys/filesys.h... no > checking dustat.h usability... no > checking dustat.h presence... no > checking for dustat.h... no > checking sys/systeminfo.h usability... yes > checking sys/systeminfo.h presence... yes > checking for sys/systeminfo.h... yes > checking sys/acl.h usability... yes > checking sys/acl.h presence... yes > checking for sys/acl.h... yes > checking winsock2.h usability... no > checking winsock2.h presence... no > checking for winsock2.h... no > checking zone.h usability... yes > checking zone.h presence... yes > checking for zone.h... yes > checking for ANSI C header files... (cached) yes > checking whether time.h and sys/time.h may both be included... yes > checking for sys/wait.h that is POSIX.1 compatible... yes > checking for dirent.h that defines DIR... yes > checking for library containing opendir... none required > checking for mode_t... yes > checking for size_t... yes > checking for uid_t in sys/types.h... yes > checking for pid_t... yes > checking for clockid_t... yes > checking for an ANSI C-conforming const... yes > checking for getcwd... yes > checking for getnetgrent... yes > checking for waitpid... yes > checking for seteuid... yes > checking for setegid... yes > checking for setreuid... yes > checking for setregid... yes > checking for uname... yes > checking for gethostname... yes > checking for realpath... yes > checking for chflags... no > checking for strstr... yes > checking for strsep... no > checking for putenv... yes > checking for drand48... yes > checking for srand48... yes > checking for getaddrinfo... (cached) yes > checking for bcopy... yes > checking for mkfifo... yes > checking for statfs... yes > checking for statvfs... yes > checking for door... no > checking for sysinfo... yes > checking for setsid... yes > checking for strdup... yes > checking for strrchr... yes > checking for strerror... yes > checking for snprintf... yes > checking for sysconf... yes > checking for getzoneid... yes > ./configure: line 15758: getzonenamebyid: command not found > checking for struct sockaddr.sa_len... no > checking for either struct rtentry or struct ortentry... rtentry > checking whether to compile with large file support... yes > checking for main in -lpthread... yes > checking pthread.h usability... yes > checking pthread.h presence... yes > checking for pthread.h... yes > checking sched.h usability... yes > checking sched.h presence... yes > checking for sched.h... yes > checking for lchown... yes > checking for pthread_attr_setstacksize... yes > checking for pthread_sigmask... yes > checking 8-bit support in Flex... 8-bit support added > checking Checking for GCC Specific compile flags... yes > checking for hostname... /usr/bin/hostname > checking Checking for Xen cpuid-based HVM detection... no > > Summary of options... > -> Configured with PCRE libraries > -> No SQL library support for knowledge map > -> No Graphviz libraries included > -> No LDAP libraries included > -> Will look for BerkeleyDB in /usr/local/BerkeleyDB.4.2 > -> No libvirt support included > -> No libmongoc support included > > configure: creating ./config.status > config.status: creating Makefile > config.status: creating pub/Makefile > config.status: creating src/Makefile > config.status: creating src/cf3lex.l > config.status: creating docs/Makefile > config.status: creating tests/Makefile > config.status: creating tests/file_masters/Makefile > config.status: creating tests/file_operands/Makefile > config.status: creating tests/units/Makefile > config.status: creating inputs/Makefile > config.status: creating src/conf.h > config.status: executing depfiles commands > config.status: executing libtool commands > DONE: Configuration done. Run make/gmake to build cfengine. > ------------------------------------------------------------------------ > Making all in pub > make[1]: Entering directory `/export/src/cfengine-3.1.2/pub' > /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. > -I../src -I/usr/local/BerkeleyDB.4.2/include -I/usr/sfw/include > -D_REENTRANT -pthreads -I/usr/local/include -D_REENTRANT -pthreads -g > -O2 -I/usr/local/BerkeleyDB.4.2/include -D_LARGEFILE_SOURCE > -D_FILE_OFFSET_BITS=64 -g -Wreturn-type -Wmissing-prototypes > -Wuninitialized -fPIC -DPIC -D_REENTRANT -pthreads -g -O2 > -I/usr/local/BerkeleyDB.4.2/include -D_LARGEFILE_SOURCE > -D_FILE_OFFSET_BITS=64 -MT getopt.lo -MD -MP -MF .deps/getopt.Tpo -c > -o getopt.lo getopt.c > mv -f .deps/getopt.Tpo .deps/getopt.Plo > mv: cannot access .deps/getopt.Tpo > make[1]: *** [getopt.lo] Error 2 > make[1]: Leaving directory `/export/src/cfengine-3.1.2/pub' > make: *** [all-recursive] Error 1 > ------------------------------------------------------------------------ > bash-3.00# > _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine