Compile error on Ubuntu Intrepid

View: New views
2 Messages — Rating Filter:   Alert me  

Compile error on Ubuntu Intrepid

by Brian DeVries :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Howdy all,

I am compiling Yap 5.1.3 from source under Ubuntu Intrepid Ibex / 8.10. I have encountered a compiler error that appears to be new with this version of Ubuntu (e.g., https://bugs.launchpad.net/ubuntu/+source/hdf5/+bug/286565) based on the use of open() with the O_CREAT attribute. It seems you must also provide permission attributes for the creation of the file; if open() is called with 2 arguments, and the second argument includes O_CREAT, then a compiler error is raised.

I have included the gcc --version output, as well as the output from the runs of configure and make for completeness.

At the end of the email, I have included a patch that seems to fix the problem. The main things I'm not sure of regarding the patch are:

1) I am not sure whether the #include <sys/stat.h> at the top is platform-independent, or whether it should be inside a #ifdef of some sort
2) I am not sure whether the flags S_IRUSR and S_IWUSR are totally appropriate; the program runs after making these changes, and the file being created is a temporary file, so I would assume so.
3) Even among Unixes, I am not sure whether these flags are platform-independent, or whether they should be inside another #ifdef or something.

As I said, Yap compiles and runs on my machine after making this modification (I did not do any extensive tests, simply started the program and tried asserting a few things to the database and running a few queries).

Hope this helps! Thanks,
~Brian W. DeVries


=== GCC Version Output ===

.../Yap-5.1.3/arch % gcc --version
gcc (Ubuntu 4.3.2-1ubuntu11) 4.3.2
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


=== configure Output ===

.../Yap-5.1.3/arch % ../configure --prefix=/home/contingencyplan/install
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 build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking whether ln -s works... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking for indent... no
checking for ar... ar
checking for mpicc... no
checking for install-info... /usr/sbin/install-info
checking for sh... /bin/bash
checking for sin in -lm... yes
checking for socket in -lsocket... no
checking for getsockname in -lxnet... no
checking for main in -lnsl... yes
checking for tgetent in -ltermcap... no
checking for main in -lncurses... no
checking for readline in -lreadline... no
checking for main in -lgmp... no
checking how to run the C preprocessor... gcc -E
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for restartable system calls... yes
checking for dlopen in -ldl... yes
checking for main in -llam... no
checking for ANSI C header files... no
checking for sys/wait.h that is POSIX.1 compatible... (cached) yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking direct.h usability... no
checking direct.h presence... no
checking for direct.h... no
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking fenv.h usability... yes
checking fenv.h presence... yes
checking for fenv.h... yes
checking fpu_control.h usability... yes
checking fpu_control.h presence... yes
checking for fpu_control.h... yes
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
checking io.h usability... no
checking io.h presence... no
checking for io.h... no
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking memory.h usability... yes
checking memory.h presence... yes
checking for memory.h... yes
checking mpi.h usability... no
checking mpi.h presence... no
checking for mpi.h... no
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking siginfo.h usability... no
checking siginfo.h presence... no
checking for siginfo.h... no
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking string.h usability... yes
checking string.h presence... yes
checking for string.h... yes
checking stropts.h usability... yes
checking stropts.h presence... yes
checking for stropts.h... yes
checking sys/conf.h usability... no
checking sys/conf.h presence... no
checking for sys/conf.h... no
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/shm.h usability... yes
checking sys/shm.h presence... yes
checking for sys/shm.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/stat.h usability... yes
checking sys/stat.h presence... yes
checking for sys/stat.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/times.h usability... yes
checking sys/times.h presence... yes
checking for sys/times.h... yes
checking sys/types.h usability... yes
checking sys/types.h presence... yes
checking for sys/types.h... yes
checking sys/ucontext.h usability... yes
checking sys/ucontext.h presence... yes
checking for sys/ucontext.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking unistd.h usability... yes
checking unistd.h presence... yes
checking for unistd.h... yes
checking wctype.h usability... yes
checking wctype.h presence... yes
checking for wctype.h... yes
checking winsock.h usability... no
checking winsock.h presence... no
checking for winsock.h... no
checking winsock2.h usability... no
checking winsock2.h presence... no
checking for winsock2.h... no
checking mach-o/dyld.h usability... no
checking mach-o/dyld.h presence... no
checking for mach-o/dyld.h... no
checking gmp.h usability... no
checking gmp.h presence... no
checking for gmp.h... no
checking readline/readline.h usability... no
checking readline/readline.h presence... no
checking for readline/readline.h... no
checking for mpi.h... (cached) no
checking mpe.h usability... no
checking mpe.h presence... no
checking for mpe.h... no
checking for inline... inline
checking whether struct tm is in sys/time.h or time.h... time.h
checking for int *... yes
checking size of int *... 8
checking for short int... yes
checking size of short int... 2
checking for int... yes
checking size of int... 4
checking for long int... yes
checking size of long int... 8
checking for long long int... yes
checking size of long long int... 8
checking for float... yes
checking size of float... 4
checking for double... yes
checking size of double... 8
checking for type of malloc... void *
checking for gcc inline... yes
checking for gcc threaded code... yes
checking for IEEE floats... yes
checking for sigsetjmp... yes
checking for sigsegv... yes
checking for sigprof... yes
checking for siginfo... yes
checking union wait... yes
checking environ... yes
checking return type of signal handlers... void
checking for acosh... yes
checking for asinh... yes
checking for atanh... yes
checking for chdir... yes
checking for ctime... yes
checking for dlopen... yes
checking for dup2... yes
checking for fesettrapenable... no
checking for fgetpos... yes
checking for finite... yes
checking for getcwd... yes
checking for getenv... yes
checking for gethostbyname... yes
checking for gethostid... yes
checking for gethostname... yes
checking for gethrtime... no
checking for getpwnam... yes
checking for getrusage... yes
checking for gettimeofday... yes
checking for getwd... yes
checking for isatty... yes
checking for isnan... yes
checking for kill... yes
checking for labs... yes
checking for link... yes
checking for lgamma... yes
checking for localtime... yes
checking for lstat... yes
checking for mallinfo... yes
checking for memcpy... yes
checking for memmove... yes
checking for mkstemp... yes
checking for mktemp... yes
checking for nanosleep... yes
checking for mktime... yes
checking for opendir... yes
checking for putenv... yes
checking for rand... yes
checking for random... yes
checking for readlink... yes
checking for regexec... yes
checking for rename... yes
checking for rint... yes
checking for rl_set_prompt... no
checking for sbrk... yes
checking for select... yes
checking for setbuf... yes
checking for setitimer... yes
checking for setlinebuf... yes
checking for sigaction... yes
checking for siggetmask... yes
checking for siginterrupt... yes
checking for signal... yes
checking for sigprocmask... yes
checking for socket... yes
checking for stat... yes
checking for strchr... yes
checking for strerror... yes
checking for strncat... yes
checking for strncpy... yes
checking for strtod... yes
checking for time... yes
checking for times... yes
checking for tmpnam... yes
checking for usleep... yes
checking for vsnprintf... yes
checking for regexec... (cached) yes
checking for NSLinkModule... no
checking for alarm... yes
checking for mmap... yes
checking for popen... yes
checking for shmat... yes
checking for sleep... yes
checking for system... yes
checking for ttyname... yes
checking for waitpid... yes
checking for fetestexcept... yes
checking for snprintf... yes
checking for mpz_xor... no
checking if fflush(NULL) clobbers input pipes... no
no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating library/matrix/Makefile
config.status: creating library/matlab/Makefile
config.status: creating library/regex/Makefile
config.status: creating library/system/Makefile
config.status: creating library/random/Makefile
config.status: creating library/yap2swi/Makefile
config.status: creating library/mpi/Makefile
config.status: creating .depend
config.status: creating library/Makefile
config.status: creating LGPL/Makefile
config.status: creating LGPL/chr/Makefile
config.status: creating LGPL/chr/chr_swi_bootstrap.yap
config.status: creating CLPBN/Makefile
config.status: creating LGPL/clp/Makefile
config.status: creating GPL/clpqr/Makefile
config.status: creating library/lammpi/Makefile
config.status: creating library/tries/Makefile
config.status: creating library/rltree/Makefile
config.status: creating LGPL/swi_console/Makefile
config.status: creating LGPL/JPL/Makefile
config.status: creating LGPL/JPL/src/Makefile
config.status: creating LGPL/JPL/java/Makefile
config.status: creating LGPL/JPL/jpl_paths.yap
config.status: creating GPL/http/Makefile
config.status: creating GPL/Makefile
config.status: creating cplint/Makefile
config.status: creating config.h


=== make Output ===

.../Yap-5.1.3/arch % make
gcc -c -O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1 -DHAVE_CONFIG_H -I. -I../H -I../OPTYap -I../BEAM -I../MYDDAS -I../include -DYAP_VERSION=\"Yap-5.1.3\"  -DPL_SRC_DIR=\"/home/contingencyplan/install/share/Yap/pl/\" ../console/yap.c -o yap.o
../console/yap.c: In function 'do_bootfile':
../console/yap.c:205: warning: format not a string literal and no format arguments
In function 'strncat',
    inlined from 'exec_top_level' at ../console/yap.c:658,
    inlined from 'main' at ../console/yap.c:728:
/usr/include/bits/string3.h:153: warning: call to __builtin___strncat_chk might overflow destination buffer
gcc -c -O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1 -DHAVE_CONFIG_H -I. -I../H -I../OPTYap -I../BEAM -I../MYDDAS ../C/agc.c -o agc.o
gcc -c -O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1 -DHAVE_CONFIG_H -I. -I../H -I../OPTYap -I../BEAM -I../MYDDAS  ../C/absmi.c -o absmi.o
gcc -c -O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1 -DHAVE_CONFIG_H -I. -I../H -I../OPTYap -I../BEAM -I../MYDDAS ../C/adtdefs.c -o adtdefs.o
gcc -c -O3 -fomit-frame-pointer -Wall -Wstrict-prototypes -Wmissing-prototypes -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1 -DHAVE_CONFIG_H -I. -I../H -I../OPTYap -I../BEAM -I../MYDDAS ../C/alloc.c -o alloc.o
In function 'open',
    inlined from 'ExtendWorkSpace' at ../C/alloc.c:945:
/usr/include/bits/fcntl2.h:51: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT in second argument needs 3 arguments
make: *** [alloc.o] Error 1


=== Patch! ===

.../Yap-5.1.3/C % diff -U 5 alloc.c.orig alloc.c


--- alloc.c.orig    2009-01-15 01:57:11.238819242 -0600
+++ alloc.c    2009-01-15 02:01:02.358818743 -0600
@@ -39,10 +39,11 @@
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
 #include <stdlib.h>
 #include <stdio.h>
+#include <sys/stat.h>
 
 #if __simplescalar__
 #ifdef USE_MMAP
 #undef USE_MMAP
 #endif
@@ -827,11 +828,11 @@
     char file[YAP_FILENAME_MAX];
     strcpy(file,"/tmp/mapfile");
     itos(getpid(), &file[12]);
 #endif /* HAVE_TMPNAM */
 #endif /* HAVE_MKSTEMP */
-    fd = open(file, O_CREAT|O_RDWR);
+    fd = open(file, O_CREAT|O_RDWR, S_IRUSR | S_IWUSR);
     if (fd < 0) {
       Yap_Error(FATAL_ERROR, TermNil, "mmap could not open %s", file);
       return NULL;
     }
     if (lseek(fd, s, SEEK_SET) < 0) {
@@ -940,11 +941,11 @@
      char file[YAP_FILENAME_MAX];
      strcpy(file,"/tmp/mapfile");
     itos(getpid(), &file[12]);
 #endif /* HAVE_TMPNAM */
 #endif /* HAVE_MKSTEMP */
-    fd = open(file, O_CREAT|O_RDWR);
+    fd = open(file, O_CREAT|O_RDWR, S_IRUSR | S_IWUSR);
     if (fd < 0) {
       Yap_ErrorMessage = Yap_ErrorSay;
       snprintf4(Yap_ErrorMessage, MAX_ERROR_MSG_SIZE,
         "mmap could not open %s", file);
       Yap_PrologMode = OldPrologMode;


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users

Re: Compile error on Ubuntu Intrepid

by Vitor Santos Costa-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear Brian,

Thanks! I actually use Ubuntu a lot and had stumbled into this one.
Please look at:

http://gitorious.org/projects/yap-git

for a pre-release of Yap-5.1.4.

This is only a temporary abode while I settle with git, that's why it
hasn't been as widely adverted.

Cheers

Vitor

2009/1/15 Brian DeVries <contingencyplan@...>:

> Howdy all,
>
> I am compiling Yap 5.1.3 from source under Ubuntu Intrepid Ibex / 8.10. I
> have encountered a compiler error that appears to be new with this version
> of Ubuntu (e.g., https://bugs.launchpad.net/ubuntu/+source/hdf5/+bug/286565)
> based on the use of open() with the O_CREAT attribute. It seems you must
> also provide permission attributes for the creation of the file; if open()
> is called with 2 arguments, and the second argument includes O_CREAT, then a
> compiler error is raised.
>
> I have included the gcc --version output, as well as the output from the
> runs of configure and make for completeness.
>
> At the end of the email, I have included a patch that seems to fix the
> problem. The main things I'm not sure of regarding the patch are:
>
> 1) I am not sure whether the #include <sys/stat.h> at the top is
> platform-independent, or whether it should be inside a #ifdef of some sort
> 2) I am not sure whether the flags S_IRUSR and S_IWUSR are totally
> appropriate; the program runs after making these changes, and the file being
> created is a temporary file, so I would assume so.
> 3) Even among Unixes, I am not sure whether these flags are
> platform-independent, or whether they should be inside another #ifdef or
> something.
>
> As I said, Yap compiles and runs on my machine after making this
> modification (I did not do any extensive tests, simply started the program
> and tried asserting a few things to the database and running a few queries).
>
> Hope this helps! Thanks,
> ~Brian W. DeVries
>
>
> === GCC Version Output ===
>
> .../Yap-5.1.3/arch % gcc --version
> gcc (Ubuntu 4.3.2-1ubuntu11) 4.3.2
> Copyright (C) 2008 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
>
> === configure Output ===
>
> .../Yap-5.1.3/arch % ../configure --prefix=/home/contingencyplan/install
> 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 build system type... x86_64-unknown-linux-gnu
> checking host system type... x86_64-unknown-linux-gnu
> checking target system type... x86_64-unknown-linux-gnu
> checking whether ln -s works... yes
> checking for a BSD-compatible install... /usr/bin/install -c
> checking for ranlib... ranlib
> checking for indent... no
> checking for ar... ar
> checking for mpicc... no
> checking for install-info... /usr/sbin/install-info
> checking for sh... /bin/bash
> checking for sin in -lm... yes
> checking for socket in -lsocket... no
> checking for getsockname in -lxnet... no
> checking for main in -lnsl... yes
> checking for tgetent in -ltermcap... no
> checking for main in -lncurses... no
> checking for readline in -lreadline... no
> checking for main in -lgmp... no
> checking how to run the C preprocessor... gcc -E
> checking for sys/wait.h that is POSIX.1 compatible... yes
> checking for restartable system calls... yes
> checking for dlopen in -ldl... yes
> checking for main in -llam... no
> checking for ANSI C header files... no
> checking for sys/wait.h that is POSIX.1 compatible... (cached) yes
> checking arpa/inet.h usability... yes
> checking arpa/inet.h presence... yes
> checking for arpa/inet.h... yes
> checking ctype.h usability... yes
> checking ctype.h presence... yes
> checking for ctype.h... yes
> checking direct.h usability... no
> checking direct.h presence... no
> checking for direct.h... no
> checking dirent.h usability... yes
> checking dirent.h presence... yes
> checking for dirent.h... yes
> checking dlfcn.h usability... yes
> checking dlfcn.h presence... yes
> checking for dlfcn.h... yes
> checking errno.h usability... yes
> checking errno.h presence... yes
> checking for errno.h... yes
> checking fcntl.h usability... yes
> checking fcntl.h presence... yes
> checking for fcntl.h... yes
> checking fenv.h usability... yes
> checking fenv.h presence... yes
> checking for fenv.h... yes
> checking fpu_control.h usability... yes
> checking fpu_control.h presence... yes
> checking for fpu_control.h... yes
> checking ieeefp.h usability... no
> checking ieeefp.h presence... no
> checking for ieeefp.h... no
> checking io.h usability... no
> checking io.h presence... no
> checking for io.h... no
> checking limits.h usability... yes
> checking limits.h presence... yes
> checking for limits.h... yes
> checking malloc.h usability... yes
> checking malloc.h presence... yes
> checking for malloc.h... yes
> checking math.h usability... yes
> checking math.h presence... yes
> checking for math.h... yes
> checking memory.h usability... yes
> checking memory.h presence... yes
> checking for memory.h... yes
> checking mpi.h usability... no
> checking mpi.h presence... no
> checking for mpi.h... no
> checking netdb.h usability... yes
> checking netdb.h presence... yes
> checking for netdb.h... yes
> checking netinet/in.h usability... yes
> checking netinet/in.h presence... yes
> checking for netinet/in.h... yes
> checking regex.h usability... yes
> checking regex.h presence... yes
> checking for regex.h... yes
> checking siginfo.h usability... no
> checking siginfo.h presence... no
> checking for siginfo.h... no
> checking signal.h usability... yes
> checking signal.h presence... yes
> checking for signal.h... yes
> checking stdarg.h usability... yes
> checking stdarg.h presence... yes
> checking for stdarg.h... yes
> checking string.h usability... yes
> checking string.h presence... yes
> checking for string.h... yes
> checking stropts.h usability... yes
> checking stropts.h presence... yes
> checking for stropts.h... yes
> checking sys/conf.h usability... no
> checking sys/conf.h presence... no
> checking for sys/conf.h... no
> checking sys/file.h usability... yes
> checking sys/file.h presence... yes
> checking for sys/file.h... yes
> checking sys/mman.h usability... yes
> checking sys/mman.h presence... yes
> checking for sys/mman.h... yes
> checking sys/param.h usability... yes
> checking sys/param.h presence... yes
> checking for sys/param.h... yes
> checking sys/resource.h usability... yes
> checking sys/resource.h presence... yes
> checking for sys/resource.h... yes
> checking sys/select.h usability... yes
> checking sys/select.h presence... yes
> checking for sys/select.h... yes
> checking sys/shm.h usability... yes
> checking sys/shm.h presence... yes
> checking for sys/shm.h... yes
> checking sys/socket.h usability... yes
> checking sys/socket.h presence... yes
> checking for sys/socket.h... yes
> checking sys/stat.h usability... yes
> checking sys/stat.h presence... yes
> checking for sys/stat.h... yes
> checking sys/time.h usability... yes
> checking sys/time.h presence... yes
> checking for sys/time.h... yes
> checking sys/times.h usability... yes
> checking sys/times.h presence... yes
> checking for sys/times.h... yes
> checking sys/types.h usability... yes
> checking sys/types.h presence... yes
> checking for sys/types.h... yes
> checking sys/ucontext.h usability... yes
> checking sys/ucontext.h presence... yes
> checking for sys/ucontext.h... yes
> checking sys/un.h usability... yes
> checking sys/un.h presence... yes
> checking for sys/un.h... yes
> checking time.h usability... yes
> checking time.h presence... yes
> checking for time.h... yes
> checking unistd.h usability... yes
> checking unistd.h presence... yes
> checking for unistd.h... yes
> checking wctype.h usability... yes
> checking wctype.h presence... yes
> checking for wctype.h... yes
> checking winsock.h usability... no
> checking winsock.h presence... no
> checking for winsock.h... no
> checking winsock2.h usability... no
> checking winsock2.h presence... no
> checking for winsock2.h... no
> checking mach-o/dyld.h usability... no
> checking mach-o/dyld.h presence... no
> checking for mach-o/dyld.h... no
> checking gmp.h usability... no
> checking gmp.h presence... no
> checking for gmp.h... no
> checking readline/readline.h usability... no
> checking readline/readline.h presence... no
> checking for readline/readline.h... no
> checking for mpi.h... (cached) no
> checking mpe.h usability... no
> checking mpe.h presence... no
> checking for mpe.h... no
> checking for inline... inline
> checking whether struct tm is in sys/time.h or time.h... time.h
> checking for int *... yes
> checking size of int *... 8
> checking for short int... yes
> checking size of short int... 2
> checking for int... yes
> checking size of int... 4
> checking for long int... yes
> checking size of long int... 8
> checking for long long int... yes
> checking size of long long int... 8
> checking for float... yes
> checking size of float... 4
> checking for double... yes
> checking size of double... 8
> checking for type of malloc... void *
> checking for gcc inline... yes
> checking for gcc threaded code... yes
> checking for IEEE floats... yes
> checking for sigsetjmp... yes
> checking for sigsegv... yes
> checking for sigprof... yes
> checking for siginfo... yes
> checking union wait... yes
> checking environ... yes
> checking return type of signal handlers... void
> checking for acosh... yes
> checking for asinh... yes
> checking for atanh... yes
> checking for chdir... yes
> checking for ctime... yes
> checking for dlopen... yes
> checking for dup2... yes
> checking for fesettrapenable... no
> checking for fgetpos... yes
> checking for finite... yes
> checking for getcwd... yes
> checking for getenv... yes
> checking for gethostbyname... yes
> checking for gethostid... yes
> checking for gethostname... yes
> checking for gethrtime... no
> checking for getpwnam... yes
> checking for getrusage... yes
> checking for gettimeofday... yes
> checking for getwd... yes
> checking for isatty... yes
> checking for isnan... yes
> checking for kill... yes
> checking for labs... yes
> checking for link... yes
> checking for lgamma... yes
> checking for localtime... yes
> checking for lstat... yes
> checking for mallinfo... yes
> checking for memcpy... yes
> checking for memmove... yes
> checking for mkstemp... yes
> checking for mktemp... yes
> checking for nanosleep... yes
> checking for mktime... yes
> checking for opendir... yes
> checking for putenv... yes
> checking for rand... yes
> checking for random... yes
> checking for readlink... yes
> checking for regexec... yes
> checking for rename... yes
> checking for rint... yes
> checking for rl_set_prompt... no
> checking for sbrk... yes
> checking for select... yes
> checking for setbuf... yes
> checking for setitimer... yes
> checking for setlinebuf... yes
> checking for sigaction... yes
> checking for siggetmask... yes
> checking for siginterrupt... yes
> checking for signal... yes
> checking for sigprocmask... yes
> checking for socket... yes
> checking for stat... yes
> checking for strchr... yes
> checking for strerror... yes
> checking for strncat... yes
> checking for strncpy... yes
> checking for strtod... yes
> checking for time... yes
> checking for times... yes
> checking for tmpnam... yes
> checking for usleep... yes
> checking for vsnprintf... yes
> checking for regexec... (cached) yes
> checking for NSLinkModule... no
> checking for alarm... yes
> checking for mmap... yes
> checking for popen... yes
> checking for shmat... yes
> checking for sleep... yes
> checking for system... yes
> checking for ttyname... yes
> checking for waitpid... yes
> checking for fetestexcept... yes
> checking for snprintf... yes
> checking for mpz_xor... no
> checking if fflush(NULL) clobbers input pipes... no
> no
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating library/matrix/Makefile
> config.status: creating library/matlab/Makefile
> config.status: creating library/regex/Makefile
> config.status: creating library/system/Makefile
> config.status: creating library/random/Makefile
> config.status: creating library/yap2swi/Makefile
> config.status: creating library/mpi/Makefile
> config.status: creating .depend
> config.status: creating library/Makefile
> config.status: creating LGPL/Makefile
> config.status: creating LGPL/chr/Makefile
> config.status: creating LGPL/chr/chr_swi_bootstrap.yap
> config.status: creating CLPBN/Makefile
> config.status: creating LGPL/clp/Makefile
> config.status: creating GPL/clpqr/Makefile
> config.status: creating library/lammpi/Makefile
> config.status: creating library/tries/Makefile
> config.status: creating library/rltree/Makefile
> config.status: creating LGPL/swi_console/Makefile
> config.status: creating LGPL/JPL/Makefile
> config.status: creating LGPL/JPL/src/Makefile
> config.status: creating LGPL/JPL/java/Makefile
> config.status: creating LGPL/JPL/jpl_paths.yap
> config.status: creating GPL/http/Makefile
> config.status: creating GPL/Makefile
> config.status: creating cplint/Makefile
> config.status: creating config.h
>
>
> === make Output ===
>
> .../Yap-5.1.3/arch % make
> gcc -c -O3 -fomit-frame-pointer -Wall -Wstrict-prototypes
> -Wmissing-prototypes -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1
> -DHAVE_CONFIG_H -I. -I../H -I../OPTYap -I../BEAM -I../MYDDAS -I../include
> -DYAP_VERSION=\"Yap-5.1.3\"
> -DPL_SRC_DIR=\"/home/contingencyplan/install/share/Yap/pl/\"
> ../console/yap.c -o yap.o
> ../console/yap.c: In function 'do_bootfile':
> ../console/yap.c:205: warning: format not a string literal and no format
> arguments
> In function 'strncat',
>     inlined from 'exec_top_level' at ../console/yap.c:658,
>     inlined from 'main' at ../console/yap.c:728:
> /usr/include/bits/string3.h:153: warning: call to __builtin___strncat_chk
> might overflow destination buffer
> gcc -c -O3 -fomit-frame-pointer -Wall -Wstrict-prototypes
> -Wmissing-prototypes -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1
> -DHAVE_CONFIG_H -I. -I../H -I../OPTYap -I../BEAM -I../MYDDAS ../C/agc.c -o
> agc.o
> gcc -c -O3 -fomit-frame-pointer -Wall -Wstrict-prototypes
> -Wmissing-prototypes -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1
> -DHAVE_CONFIG_H -I. -I../H -I../OPTYap -I../BEAM -I../MYDDAS  ../C/absmi.c
> -o absmi.o
> gcc -c -O3 -fomit-frame-pointer -Wall -Wstrict-prototypes
> -Wmissing-prototypes -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1
> -DHAVE_CONFIG_H -I. -I../H -I../OPTYap -I../BEAM -I../MYDDAS ../C/adtdefs.c
> -o adtdefs.o
> gcc -c -O3 -fomit-frame-pointer -Wall -Wstrict-prototypes
> -Wmissing-prototypes -DCOROUTINING=1 -DRATIONAL_TREES=1 -DDEPTH_LIMIT=1
> -DHAVE_CONFIG_H -I. -I../H -I../OPTYap -I../BEAM -I../MYDDAS ../C/alloc.c -o
> alloc.o
> In function 'open',
>     inlined from 'ExtendWorkSpace' at ../C/alloc.c:945:
> /usr/include/bits/fcntl2.h:51: error: call to '__open_missing_mode' declared
> with attribute error: open with O_CREAT in second argument needs 3 arguments
> make: *** [alloc.o] Error 1
>
>
> === Patch! ===
>
> .../Yap-5.1.3/C % diff -U 5 alloc.c.orig alloc.c
>
>
> --- alloc.c.orig    2009-01-15 01:57:11.238819242 -0600
> +++ alloc.c    2009-01-15 02:01:02.358818743 -0600
> @@ -39,10 +39,11 @@
>  #if HAVE_UNISTD_H
>  #include <unistd.h>
>  #endif
>  #include <stdlib.h>
>  #include <stdio.h>
> +#include <sys/stat.h>
>
>  #if __simplescalar__
>  #ifdef USE_MMAP
>  #undef USE_MMAP
>  #endif
> @@ -827,11 +828,11 @@
>      char file[YAP_FILENAME_MAX];
>      strcpy(file,"/tmp/mapfile");
>      itos(getpid(), &file[12]);
>  #endif /* HAVE_TMPNAM */
>  #endif /* HAVE_MKSTEMP */
> -    fd = open(file, O_CREAT|O_RDWR);
> +    fd = open(file, O_CREAT|O_RDWR, S_IRUSR | S_IWUSR);
>      if (fd < 0) {
>        Yap_Error(FATAL_ERROR, TermNil, "mmap could not open %s", file);
>        return NULL;
>      }
>      if (lseek(fd, s, SEEK_SET) < 0) {
> @@ -940,11 +941,11 @@
>       char file[YAP_FILENAME_MAX];
>       strcpy(file,"/tmp/mapfile");
>      itos(getpid(), &file[12]);
>  #endif /* HAVE_TMPNAM */
>  #endif /* HAVE_MKSTEMP */
> -    fd = open(file, O_CREAT|O_RDWR);
> +    fd = open(file, O_CREAT|O_RDWR, S_IRUSR | S_IWUSR);
>      if (fd < 0) {
>        Yap_ErrorMessage = Yap_ErrorSay;
>        snprintf4(Yap_ErrorMessage, MAX_ERROR_MSG_SIZE,
>          "mmap could not open %s", file);
>        Yap_PrologMode = OldPrologMode;
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> _______________________________________________
> Yap-users mailing list
> Yap-users@...
> https://lists.sourceforge.net/lists/listinfo/yap-users
>
>

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users