Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#4 Build failed on SunOS 5.10 sparc

open
nobody
None
5
2008-07-22
2008-07-22
No

Following is output when i try to make mstone 4.9.4.

% setenv CC /opt/SUNWspro/bin/cc
% setenv CXX /opt/SUNWspro/bin/CC
% /usr/local/bin/cmake CMakeLists.txt
-- Check for working C compiler: /opt/SUNWspro/bin/cc
-- Check for working C compiler: /opt/SUNWspro/bin/cc -- works
-- Check size of void*
-- Check size of void* - done
-- Check for working CXX compiler: /opt/SUNWspro/bin/CC
-- Check for working CXX compiler: /opt/SUNWspro/bin/CC -- works
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Looking for thr_create in thread
-- Looking for thr_create in thread - found
-- os_arch is SunOS5.10_sparc
-- Looking for wait.h
-- Looking for wait.h - found
-- Looking for lrand48
-- Looking for lrand48 - found
-- Configuring done
-- Generating done
-- Build files have been written to: /export/tyam/mstone/original/mstone-4.9.4
% make
Scanning dependencies of target getdist
[ 3%] Building C object src/CMakeFiles/getdist.dir/getdist.o
[ 6%] Building C object src/CMakeFiles/getdist.dir/idle.o
[ 10%] Building C object src/CMakeFiles/getdist.dir/xalloc.o
Linking C executable getdist
[ 10%] Built target getdist
Scanning dependencies of target mailclient
[ 13%] Building C object src/CMakeFiles/mailclient.dir/bench.o
[ 17%] Building C object src/CMakeFiles/mailclient.dir/client.o
[ 20%] Building C object src/CMakeFiles/mailclient.dir/errexit.o
[ 24%] Building C object src/CMakeFiles/mailclient.dir/main.o
[ 27%] Building C object src/CMakeFiles/mailclient.dir/parse.o
"/export/tyam/mstone/original/mstone-4.9.4/src/parse.c", line 196: warning: pointer to void or function used in arithmetic
"/export/tyam/mstone/original/mstone-4.9.4/src/parse.c", line 294: warning: pointer to void or function used in arithmetic
[ 31%] Building C object src/CMakeFiles/mailclient.dir/sysdep.o
[ 34%] Building C object src/CMakeFiles/mailclient.dir/timefunc.o
[ 37%] Building C object src/CMakeFiles/mailclient.dir/http-util.o
[ 41%] Building C object src/CMakeFiles/mailclient.dir/http.o
[ 44%] Building C object src/CMakeFiles/mailclient.dir/imap4.o
[ 48%] Building C object src/CMakeFiles/mailclient.dir/pop3.o
[ 51%] Building C object src/CMakeFiles/mailclient.dir/smtp.o
"/export/tyam/mstone/original/mstone-4.9.4/src/smtp.c", line 887: warning: end-of-loop code not reached
"/export/tyam/mstone/original/mstone-4.9.4/src/smtp.c", line 889: warning: statement not reached
[ 55%] Building C object src/CMakeFiles/mailclient.dir/wmap.o
[ 58%] Building C object src/CMakeFiles/mailclient.dir/idle.o
[ 62%] Building C object src/CMakeFiles/mailclient.dir/generate.o
[ 65%] Building C object src/CMakeFiles/mailclient.dir/socket.o
[ 68%] Building C object src/CMakeFiles/mailclient.dir/multipop.o
[ 72%] Building C object src/CMakeFiles/mailclient.dir/webmail.o
[ 75%] Building C object src/CMakeFiles/mailclient.dir/xalloc.o
[ 79%] Building C object src/CMakeFiles/mailclient.dir/sb.o
"/export/tyam/mstone/original/mstone-4.9.4/src/sb.c", line 127: warning: statement not reached
"/export/tyam/mstone/original/mstone-4.9.4/src/sb.c", line 171: warning: statement not reached
[ 82%] Building C object src/CMakeFiles/mailclient.dir/words.o
[ 86%] Building C object src/CMakeFiles/mailclient.dir/files.o
"/export/tyam/mstone/original/mstone-4.9.4/src/files.c", line 61: warning: implicit function declaration: alloca
"/export/tyam/mstone/original/mstone-4.9.4/src/files.c", line 61: warning: improper pointer/integer combination: op "="
"/export/tyam/mstone/original/mstone-4.9.4/src/files.c", line 99: warning: improper pointer/integer combination: op "="
"/export/tyam/mstone/original/mstone-4.9.4/src/files.c", line 106: warning: improper pointer/integer combination: op "="
"/export/tyam/mstone/original/mstone-4.9.4/src/files.c", line 160: warning: improper pointer/integer combination: op "="
"/export/tyam/mstone/original/mstone-4.9.4/src/files.c", line 177: undefined struct/union member: d_type
"/export/tyam/mstone/original/mstone-4.9.4/src/files.c", line 177: undefined symbol: DT_DIR
cc: acomp failed for /export/tyam/mstone/original/mstone-4.9.4/src/files.c
*** Error code 2
The following command caused the error:
/opt/SUNWspro/bin/cc -DUSE_PTHREADS -DHAVE_SELECT_H -DHAVE_WAIT_H -DUSE_LRAND48 -D__SOLARIS__ -DXP_UNIX -D_REENTRANT -DUSE_GETHOSTBYNAME_R -DUSE_GETPROTOBYNAME_R -mt -xstrconst -v -O -DAUTOGEN -DIMAP_RAMPDOWN -DSOCK_LINESPEED -DGEN_CHECKSUM -o src/CMakeFiles/mailclient.dir/files.o -c /export/tyam/mstone/original/mstone-4.9.4/src/files.c
make: Fatal error: Command failed for target `src/CMakeFiles/mailclient.dir/files.o'
Current working directory /export/tyam/mstone/original/mstone-4.9.4
*** Error code 1
The following command caused the error:
make -f src/CMakeFiles/mailclient.dir/build.make src/CMakeFiles/mailclient.dir/build
make: Fatal error: Command failed for target `src/CMakeFiles/mailclient.dir/all'
Current working directory /export/tyam/mstone/original/mstone-4.9.4
*** Error code 1
The following command caused the error:
make -f CMakeFiles/Makefile2 all
make: Fatal error: Command failed for target `all'

Solaris doesn't define dtype member fot dirent structure. I have to make new function and make a bit change nuke_dir_subdir() function.

diff mstone-4.9.4/src/files.c original/mstone-4.9.4/src/files.c
42,44d41
< #ifdef __SOLARIS__
< #include <alloca.h>
< #endif
82,115d78
< #ifdef __SOLARIS__
< static int
< stat_dir_file(const char *dirpath, const char *file, struct stat *restrictbuf)
< {
< int dlen, nlen;
< char *path;
< int ret;
<
< if (!dirpath || !*dirpath) {
< return -1;
< }
< if (!file) {
< file = "";
< }
< if (!restrictbuf) {
< return -1;
< }
< dlen = strlen(dirpath);
< nlen = strlen(file);
< path = alloca(dlen + nlen + 2);
< strcpy (path, dirpath);
< if (*file) {
< char *cp = path + dlen;
< *cp++ = '/';
< strcpy (cp, file);
< }
< ret = stat(path, restrictbuf);
< if (ret < 0) {
< D_PRINTF(stderr, "Error Getting file stat '%s'\n", path);
< }
< return ret;
< }
< #endif
<
188,190d150
< #ifdef __SOLARIS__
< struct stat statbuf;
< #endif
217,222d176
< #ifdef __SOLARIS__
< if (stat_dir_file(path, de->d_name, &statbuf) == -1 ) {
< break;
< }
< if (S_ISDIR(statbuf.st_mode)) {
< #else
224d177
< #endif

Discussion