Compiling mozart on OpenBSD/zaurus
Julian Fondren
ayrnieu at gmail.com
Sat Feb 3 10:55:42 CET 2007
'zaurus' in the subject refers to the Sharp Zaurus that OpenBSD
targets as a platform, which you can read about here:
http://www.openbsd.org/zaurus.html
After nearly three days with mozart-1.3.2.20060615,
I have this patch:
*** share/bin/ozplatform Wed May 3 21:17:13 2006
--- share/bin/ozplatform Sat Feb 3 06:15:00 2007
***************
*** 67,70 ****
--- 67,72 ----
*i386*OpenBSD*) OZARCH=openbsd-i486
;;
+ *zaurus*OpenBSD*) OZARCH=openbsd-zaurus
+ ;;
*i386*NetBSD*) OZARCH=netbsd-i486
;;
this invocation of configure:
CXXFLAGS="-DOPENBSD -I/usr/local/include -L/usr/local/lib"
CFLAGS="-DOPENBSD -I/usr/local/include -L/usr/local/lib -pipe"
./configure --disable-fastreg --disable-regopt
--with-lib-dir=/usr/local/lib --with-inc-dir=/usr/local/include
--with-tkinclude=/usr/local/include/tk8.4 --with-cxx="g++ -DOPENBSD
-I/usr/local/include -L/usr/Local/lib"
some of that is obvious desperation -- but I did quite a bit of
useless firefighting with issues that only arise when configure
silently allows that it is building on the platform
'unknown-unknown'.
and my build gets this far ('try4' is inaccurate):
/usr/torrent/try4/mozart-1.3.2.20060615/share/lib/boot-ozc.sh -z 9
-DSITE_PROPERTY -l
Base=/usr/torrent/try4/mozart-1.3.2.20060615/share/lib/Base.ozf -b
/usr/torrent/try4/mozart-1.3.2.20060615/share/lib/ -c compiler/Core.oz
-o Core.ozf
/usr/torrent/try4/mozart-1.3.2.20060615/share/lib/boot-ozc.sh -z 9
-DSITE_PROPERTY -l
Base=/usr/torrent/try4/mozart-1.3.2.20060615/share/lib/Base.ozf -b
/usr/torrent/try4/mozart-1.3.2.20060615/share/lib/ -c
compiler/StaticAnalysis.oz -o StaticAnalysis.ozf
gmake[4]: *** [StaticAnalysis.ozf] Killed
gmake[4]: Leaving directory `/usr/torrent/try4/mozart-1.3.2.20060615/share/lib'
gmake[3]: *** [boot-all] Error 2
gmake[3]: Leaving directory `/usr/torrent/try4/mozart-1.3.2.20060615/share/lib'
gmake[2]: *** [bootstrap] Error 2
gmake[2]: Leaving directory `/usr/torrent/try4/mozart-1.3.2.20060615/share/lib'
gmake[1]: *** [bootstrap] Error 1
gmake[1]: Leaving directory `/usr/torrent/try4/mozart-1.3.2.20060615/share'
gmake: *** [bootstrap] Error 1
the kill happens because I explicitly kill it -- I do this as
that last invocation of boot-ozc.sh will happily continue for
600 minutes (and forever after) in its tight loop of:
31766 emulator.exe PSIG SIGSEGV caught handler=0x677ac mask=0x0
addr=0x0 trapno=47
31766 emulator.exe CALL sigprocmask(0x3,0xffffbffc)
31766 emulator.exe RET sigprocmask 1024/0x400
31766 emulator.exe CALL sigprocmask(0x3,0)
31766 emulator.exe RET sigprocmask -82180/0xfffebefc
31766 emulator.exe CALL sigreturn(0xbffcaa68)
31766 emulator.exe RET sigreturn JUSTRETURN
31766 emulator.exe PSIG SIGSEGV caught handler=0x677ac mask=0x0
addr=0x0 trapno=47
31766 emulator.exe CALL sigprocmask(0x3,0xffffbffc)
31766 emulator.exe RET sigprocmask 1024/0x400
31766 emulator.exe CALL sigprocmask(0x3,0)
31766 emulator.exe RET sigprocmask -82180/0xfffebefc
31766 emulator.exe CALL sigreturn(0xbffcaa68)
31766 emulator.exe RET sigreturn JUSTRETURN
31766 emulator.exe PSIG SIGSEGV caught handler=0x677ac mask=0x0
addr=0x0 trapno=47
it does this in all of the default of a malloc heap (all heap
tests fail), with a mmap heap, and also with a sbrk heap.
I am determined to get Mozart/Oz running on this machine, so
I am not done yet: my next step will be to recompile again with
fewer configure arguments, now that I have the ozplatform
patch, and thereafter to try again with CVS, and thereafter
to turn all warnings on, investigate every defined(__arch__)
switch in the source, and so on.
I am determined to get Mozart/Oz running on this machine,
but please help :-) When it gets to the point that I spend
more time poking through C source than waiting for the build
to finish, I will have to suspend my determination.
Thanks, Julian
attached: platform/emulator/config.log
-------------- next part --------------
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
configure:591: checking for SRCTOP
configure:625: checking for BUILDTOP
configure:684: checking host system type
configure:781: checking for GNU make
configure:787: checking whether gmake sets ${MAKE}
configure:847: checking for a BSD compatible install
configure:906: checking for --with-global-oz
configure:940: checking for mkinstalldirs
configure:984: checking for oz version
configure:1062: checking for ozplatform
configure:1143: checking for oztool
configure:1189: checking for --with-inc-dir
configure:1231: checking for --with-lib-dir
configure:1275: checking for build date
configure:1289: checking for OZLOADSEP
configure:1309: checking for OZLOADWIN
configure:1347: checking for --enable-denys-events
configure:1368: checking for --enable-site-property
configure:1391: checking build system type
configure:1417: checking for as
configure:1449: checking for dlltool
configure:1481: checking for dllwrap
configure:1532: checking for --with-sunpro
configure:1611: checking for g++
configure:1643: checking whether the C++ compiler (g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -DOPENBSD -I/usr/local/include -L/usr/local/lib -L/usr/local/lib) works
configure:1659: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -DOPENBSD -I/usr/local/include -L/usr/local/lib -I/usr/local/include -L/usr/local/lib conftest.C 1>&5
configure:1685: checking whether the C++ compiler (g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -DOPENBSD -I/usr/local/include -L/usr/local/lib -L/usr/local/lib) is a cross-compiler
configure:1690: checking whether we are using GNU C++
configure:1699: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -E conftest.C
configure:1718: checking whether g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib accepts -g
configure:1756: checking g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib version is at least 2.95.3
configure:1920: checking how to run the C++ preprocessor
configure:1938: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -E -I/usr/local/include conftest.C >/dev/null 2>conftest.out
configure:1999: checking for gcc
configure:2112: checking whether the C compiler (gcc -DOPENBSD -I/usr/local/include -L/usr/local/lib -pipe -L/usr/local/lib) works
configure:2128: gcc -o conftest -DOPENBSD -I/usr/local/include -L/usr/local/lib -pipe -I/usr/local/include -L/usr/local/lib conftest.c 1>&5
configure:2154: checking whether the C compiler (gcc -DOPENBSD -I/usr/local/include -L/usr/local/lib -pipe -L/usr/local/lib) is a cross-compiler
configure:2159: checking whether we are using GNU C
configure:2168: gcc -E conftest.c
configure:2187: checking whether gcc accepts -g
configure:2225: checking gcc version is at least 2.95.3
configure:2389: checking how to run the C preprocessor
configure:2410: gcc -E -I/usr/local/include conftest.c >/dev/null 2>conftest.out
configure:2511: checking for flex
configure:2545: checking for yywrap in -lfl
configure:2567: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -DOPENBSD -I/usr/local/include -L/usr/local/lib -I/usr/local/include -L/usr/local/lib conftest.C -lfl 1>&5
configure:2601: checking flex version is at least 2.5.3
configure:2743: checking for bison
configure:2786: checking bison -y version is at least 1.25
configure:2918: checking whether ln -s works
configure:3014: checking for GNU make
configure:3020: checking whether gmake sets ${MAKE}
configure:3049: checking for ranlib
configure:3082: checking for gm4
configure:3119: checking for perl
configure:3252: checking for gnused
configure:3252: checking for sed
configure:3288: checking for gar
configure:3288: checking for ar
configure:3323: checking for makedepend
configure:3422: checking c++ compiler option -fno-exceptions
configure:3457: checking c++ compiler option -fno-implicit-templates
configure:3484: checking for --enable-warnings
configure:3496: checking for --enable-errors
configure:3711: checking whether linker understands --export-dynamic
configure:3733: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -Wl,--export-dynamic -I/usr/local/include -L/usr/local/lib conftest.C 1>&5
configure:3784: checking whether gm4 understands -E option
configure:3784: checking whether gm4 -E understands -B10000 option
configure:3868: checking for --enable-link-static
configure:3891: checking for ANSI C header files
configure:3904: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -E -I/usr/local/include conftest.C >/dev/null 2>conftest.out
configure:3974: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C 1>&5
configure:3998: checking for key_t
configure:4037: checking for dlfcn.h
configure:4047: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -E -I/usr/local/include conftest.C >/dev/null 2>conftest.out
configure:4077: checking for stdint.h
configure:4087: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -E -I/usr/local/include conftest.C >/dev/null 2>conftest.out
configure:4414: checking for gethostbyaddr in -lnsl
configure:4436: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lnsl 1>&5
/usr/bin/ld: cannot find -lnsl
collect2: ld returned 1 exit status
configure: failed program was:
#line 4422 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char gethostbyaddr();
int main() {
gethostbyaddr()
; return 0; }
configure:4463: checking for gethostbyaddr in -lc
configure:4485: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lc 1>&5
configure:4516: checking for gethostbyaddr
configure:4547: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lc 1>&5
configure:4573: checking for socket in -lsocket
configure:4595: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lsocket -lc 1>&5
/usr/bin/ld: cannot find -lsocket
collect2: ld returned 1 exit status
configure: failed program was:
#line 4581 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char socket();
int main() {
socket()
; return 0; }
configure:4624: checking for socket
configure:4655: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lc 1>&5
configure:4681: checking for fabs in -lm
configure:4703: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lm -lc 1>&5
configure:4732: checking for fabs
configure:4763: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lm -lc 1>&5
configure:4789: checking for dlopen in -ldl
configure:4811: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -ldl -lm -lc 1>&5
/usr/bin/ld: cannot find -ldl
collect2: ld returned 1 exit status
configure: failed program was:
#line 4797 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char dlopen();
int main() {
dlopen()
; return 0; }
configure:4844: checking for setpgid
configure:4875: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lm -lc 1>&5
configure:4909: checking for dlopen
configure:4940: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lm -lc 1>&5
configure:4966: checking whether we could allocate Oz heap with malloc ...
configure:5002: checking for malloc
configure:5033: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lm -lc 1>&5
configure:5062: checking ... with a test program
configure:5177: gcc -o conftest -DOPENBSD -I/usr/local/include -L/usr/local/lib -pipe -I/usr/local/include -L/usr/local/lib conftest.c -lm -lc 1>&5
configure: failed program was:
#line 5076 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <signal.h>
#include <setjmp.h>
// Check whether setting an malloc threshold can be called at all,
// and that it does really work:
// - large pages become allocated outside bss
// - criterium: none of the large pages gets trapped between
// small ones
// We DID check whether large pages are reasonably adjacent (modulo
// MALLOC_OVERHEAD). The rationale: there should be no strange gaps
// between pages that could lead to fragmentation. We did exactly as
// described until Marc-Antoine Parent pointed out that on Mac OS X
// 10.3 (Panther) pages are not that arranged like that, but rather,
// when allocating .5mb large pages, there is 1.5mb gap. Peculiar but
// probably not illegal (as long as the system can eventually use the
// gaps too), got to admit. Now, the test is modified so that:
// - the size of a gap between large pages must be such that the gap
// can accommodate a number of large pages (usually none), and the
// remainder must be smaller than MALLOC_OVERHEAD.
// - freed chunks are really returned to OS
// Note also that we allow (i.e. do not disallow) large pages to be
// allocated on different sides of bss: it's peculiar but why not?
// Also we do not check whether the pages overlap.. it's not about
// whether malloc is broken or not.
#define L_BLOCKSIZE (512 * 1024)
#define S_BLOCKSIZE (512)
#define L_MARGIN (L_BLOCKSIZE - 1)
#define MALLOC_OVERHEAD (L_BLOCKSIZE / 100)
jmp_buf env;
static
void sh(int sig)
{
longjmp(env, SIGSEGV);
}
main()
{
void *s1, *s2, *l1, *l2;
// struct mallinfo mi = mallinfo();
#if defined(M_MMAP_THRESHOLD)
int ret = mallopt(M_MMAP_THRESHOLD, L_MARGIN);
#else
// still try it even if there is no M_MMAP_THRESHOLD;
#endif
s1 = malloc(S_BLOCKSIZE);
l1 = malloc(L_BLOCKSIZE);
s2 = malloc(S_BLOCKSIZE);
l2 = malloc(L_BLOCKSIZE);
if (s1 == 0 || l1 == 0 || s2 == 0 || l2 == 0)
return (1);
// conceivably possible..
if (s1 > s2) {
void *tmp = s1;
s1 = s2;
s2 = tmp;
}
if (l1 > l2) {
void *tmp = l1;
l1 = l2;
l2 = tmp;
}
// Now there are 6 cases, of which in 3 the small pages "trap" one
// or both large pages between them.
if (s1 < l1 && l1 < s2)
return (2);
if (s1 < l2 && l2 < s2)
return (3); // the third case is cover by both;
// Now, adjacency of large pages:
// Also covers the case as in Mac OS X:
// (int&) l2 = ((int) l2) + 3*L_BLOCKSIZE;
// But barks if e.g.:
// (int&) l2 = ((int) l2) + 3*L_BLOCKSIZE + MALLOC_OVERHEAD;
if ((((int) l2 - (int) l1) % L_BLOCKSIZE) > MALLOC_OVERHEAD) {
return (4);
}
// freeing up memory..
if (setjmp(env) != 0)
return (0);
(void) signal(SIGSEGV, sh);
free(l1);
*((int *) l1) = 0;
return (5);
}
configure:5208: checking whether we can allocate Oz heap via mmap...
configure:5216: checking for mmap
configure:5247: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lm -lc 1>&5
configure:5274: checking ... with a test program
configure:5370: gcc -o conftest -DOPENBSD -I/usr/local/include -L/usr/local/lib -pipe -I/usr/local/include -L/usr/local/lib conftest.c -lm -lc 1>&5
configure: failed program was:
#line 5288 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <unistd.h>
#include <sys/mman.h>
#include <signal.h>
#include <setjmp.h>
// Test whether:
// - mmap is working
// - subsequent mmap"s allocate contiguous memory (no fragmentation)
// - munmap really returns memory
#if defined(MAP_ANON) && !defined(MAP_ANONYMOUS)
#define MAP_ANONYMOUS MAP_ANON
#elif defined(MAP_ANONYMOUS) && !defined(MAP_ANON)
#define MAP_ANON MAP_ANONYMOUS
#endif
#if !defined(MAP_ANONYMOUS)
#include <sys/stat.h>
#include <fcntl.h>
#endif
#define BLOCKSIZE (512 * 1024)
jmp_buf env;
static
void sh(int sig)
{
longjmp(env, SIGSEGV);
}
main()
{
#if defined(_POSIX_MAPPED_FILES) || defined(_MMAP_DECLARED)
void *loc1, *loc2;
#ifdef MAP_ANONYMOUS
loc1 = mmap((void *) 0x0, (size_t) BLOCKSIZE, (PROT_READ|PROT_WRITE),
(MAP_PRIVATE|MAP_ANONYMOUS), -1, (off_t) 0x0);
loc2 = mmap((void *) 0x0, (size_t) BLOCKSIZE, (PROT_READ|PROT_WRITE),
(MAP_PRIVATE|MAP_ANONYMOUS), -1, (off_t) 0x0);
#else
int zeroFD = open("/dev/zero", O_RDWR);
if (zeroFD < 0)
return (2);
loc1 = mmap((caddr_t) 0x0, (size_t) BLOCKSIZE, (PROT_READ|PROT_WRITE),
(MAP_PRIVATE), zeroFD, 0x0);
loc2 = mmap((caddr_t) 0x0, (size_t) BLOCKSIZE, (PROT_READ|PROT_WRITE),
(MAP_PRIVATE), zeroFD, (off_t) 0x0);
#endif
if (loc1 == MAP_FAILED || loc2 == MAP_FAILED)
return (3);
// On Solaris, regions are NOT adjacent - but so what?
// if (loc2 > loc1) {
// if ((char *) loc2 != ((char *) loc1) + BLOCKSIZE)
// return (4);
// } else {
// // conceivable possible..
// if ((char *) loc1 != ((char *) loc2) + BLOCKSIZE)
// return (4);
// }
if (setjmp(env) != 0)
return (0);
(void) signal(SIGSEGV, sh);
if (munmap((caddr_t) loc1, BLOCKSIZE))
return (5);
*((int *) loc1) = 0;
return (6);
#else // _POSIX_MAPPED_FILES
exit(-1);
#endif
}
configure:5401: checking whether we could allocate Oz heap via sbrk ...
configure:5409: checking for sbrk
configure:5440: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lm -lc 1>&5
configure:5467: checking ... with a test program
configure:5583: gcc -o conftest -DOPENBSD -I/usr/local/include -L/usr/local/lib -pipe -I/usr/local/include -L/usr/local/lib conftest.c -lm -lc 1>&5
configure: failed program was:
#line 5481 "configure"
#include "confdefs.h"
#include <unistd.h>
#include <stdlib.h>
#include <signal.h>
#include <setjmp.h>
// Test whether:
// - both brk() and sbrk() are working, i.e. yielding some memory
// - malloc does not interfere with brk"ed memory fragments
// - malloc works before and after brk()
// - malloc"ed memory allocated before brk() retains its content
// - malloc"ed memory can be deallocated
// - sbrk can return memory back to the OS
#define BLOCKSIZE (512 * 1024)
#define STRUCTSIZE (256)
jmp_buf env;
static
void sh(int sig)
{
longjmp(env, SIGSEGV);
}
main()
{
void *start;
void *s1, *s2;
void *end;
char *mar1, *mar2;
int i;
start = sbrk(0);
if (start == (void *) -1)
return (1);
mar1 = (char *) malloc(STRUCTSIZE);
if (mar1 == (char *) NULL)
return (2);
for (i = 0; i < STRUCTSIZE; i++)
mar1[i] = (char) i;
s1 = sbrk(BLOCKSIZE);
if (s1 == (void *) -1)
return (3);
if ((char *) sbrk(0) != ((char *) s1) + BLOCKSIZE)
return (4);
for (i = 0; i < STRUCTSIZE; i++) {
if (mar1[i] != (char) i)
return (5);
}
mar2 = (char *) malloc(STRUCTSIZE);
if (mar2 == (char *) NULL)
return (6);
for (i = 0; i < STRUCTSIZE; i++)
mar2[i] = (char) i;
s2 = sbrk(0);
if (sbrk == (void *) -1)
return (7);
if (brk((void *) (((char *) s2) + BLOCKSIZE)) != 0)
return (8);
if ((char *) sbrk(0) != ((char *) s2) + BLOCKSIZE)
return (9);
for (i = 0; i < STRUCTSIZE; i++) {
if (mar1[i] != (char) i)
return (10);
if (mar2[i] != (char) i)
return (11);
}
if (brk(s2) != 0 || sbrk(0) != s2)
return (12);
if (setjmp(env) == 0) {
(void) signal(SIGSEGV, sh);
*((int *) s2) = 0;
return (13);
}
mar1 = (char *) malloc(STRUCTSIZE);
mar2 = (char *) malloc(STRUCTSIZE);
if (mar1 == (char *) NULL || mar2 == (char *) NULL)
return (2);
for (i = 0; i < STRUCTSIZE; i++) {
mar1[i] = (char) i;
mar2[i] = (char) i;
}
free(mar1);
free(mar2);
return (0);
}
configure:5615: checking for --enable-malloc-heap
configure:5629: checking for --enable-mmap-heap
configure:5647: checking for --enable-sbrk-heap
configure:5709: checking for strdup
configure:5740: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lm -lc 1>&5
configure:5770: checking whether dlopen needs leading underscore
configure:5845: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -c -fno-exceptions -fno-implicit-templates -I/usr/local/include conftest.C 1>&5
configure:5884: checking for little-endianness
configure:5913: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lm -lc 1>&5
configure:5938: checking for big-wordianness
configure:5967: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lm -lc 1>&5
configure: failed program was:
#line 5946 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit(int);
#endif
class DoubleConv {
public:
union {
unsigned char c[sizeof(double)];
int i[sizeof(double)/sizeof(int)];
double d;
} u;
};
int main() {
DoubleConv dc;
dc.u.d = 123e-57;
return (dc.u.i[0]==152689723);
}
configure:6006: checking whether the times/sysconf(_SC_CLK_TCK) bug is present
configure:6105: checking for --with-gmp
configure:6134: checking for gmp.h
configure:6150: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -E -I/usr/local/include -I/usr/local/include conftest.C >/dev/null 2>conftest.out
configure:6325: checking for __gmpz_init in -lgmp (default)
configure:6341: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lm -lc 1>&5
/tmp//ccg14822.o(.text+0xc): In function `main':
: undefined reference to `__gmpz_init'
collect2: ld returned 1 exit status
configure: failed program was:
#line 6330 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C"
#endif
char __gmpz_init();
int main() {
__gmpz_init()
; return 0; }
configure:6540: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lgmp -lm -lc 1>&5
/usr/local/lib/libgmp.so.6.3: warning: vsprintf() is often misused, please use vsnprintf()
/usr/local/lib/libgmp.so.6.3: warning: strcpy() is almost always misused, please use strlcpy()
configure:7509: checking gmp version is at least 2
configure:7639: checking for --with-zlib
configure:7667: checking for zlib.h
configure:7683: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -E -I/usr/local/include -I/usr/local/include conftest.C >/dev/null 2>conftest.out
configure:7775: checking for zlibVersion in -lz (default)
configure:7791: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lgmp -lm -lc 1>&5
/usr/local/lib/libgmp.so.6.3: warning: vsprintf() is often misused, please use vsnprintf()
/usr/local/lib/libgmp.so.6.3: warning: strcpy() is almost always misused, please use strlcpy()
/tmp//ccdq8644.o(.text+0xc): In function `main':
: undefined reference to `zlibVersion'
collect2: ld returned 1 exit status
configure: failed program was:
#line 7780 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C"
#endif
char zlibVersion();
int main() {
zlibVersion()
; return 0; }
configure:7990: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lz -lgmp -lm -lc 1>&5
/usr/local/lib/libgmp.so.6.3: warning: vsprintf() is often misused, please use vsnprintf()
/usr/local/lib/libgmp.so.6.3: warning: strcpy() is almost always misused, please use strlcpy()
configure:8575: checking for --with-ccmalloc
configure:8640: checking for --enable-opt
configure:8817: checking for --enable-threaded
configure:8842: checking for --enable-fastreg
configure:8867: checking for --enable-fasterreg
configure:8892: checking for --enable-fastarith
configure:8917: checking for --enable-modules-static
configure:8972: checking c++ compiler option -fpic
configure:9059: checking cc compiler option -fpic
configure:9133: checking for --with-malloc
configure:9157: checking whether socklen_t is declared...
configure:9205: checking whether we can do virtual sites...
configure:9212: checking for sys/types.h
configure:9222: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -E -I/usr/local/include conftest.C >/dev/null 2>conftest.out
configure:9246: checking for unistd.h
configure:9256: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -E -I/usr/local/include conftest.C >/dev/null 2>conftest.out
configure:9280: checking for sys/ipc.h
configure:9290: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -E -I/usr/local/include conftest.C >/dev/null 2>conftest.out
configure:9314: checking for sys/shm.h
configure:9324: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -E -I/usr/local/include conftest.C >/dev/null 2>conftest.out
configure:9349: checking for shmget
configure:9380: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lz -lgmp -lm -lc 1>&5
/usr/local/lib/libgmp.so.6.3: warning: vsprintf() is often misused, please use vsnprintf()
/usr/local/lib/libgmp.so.6.3: warning: strcpy() is almost always misused, please use strlcpy()
configure:9408: checking for shmat
configure:9439: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lz -lgmp -lm -lc 1>&5
/usr/local/lib/libgmp.so.6.3: warning: vsprintf() is often misused, please use vsnprintf()
/usr/local/lib/libgmp.so.6.3: warning: strcpy() is almost always misused, please use strlcpy()
configure:9467: checking for shmdt
configure:9498: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lz -lgmp -lm -lc 1>&5
/usr/local/lib/libgmp.so.6.3: warning: vsprintf() is often misused, please use vsnprintf()
/usr/local/lib/libgmp.so.6.3: warning: strcpy() is almost always misused, please use strlcpy()
configure:9526: checking for shmctl
configure:9557: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lz -lgmp -lm -lc 1>&5
/usr/local/lib/libgmp.so.6.3: warning: vsprintf() is often misused, please use vsnprintf()
/usr/local/lib/libgmp.so.6.3: warning: strcpy() is almost always misused, please use strlcpy()
configure:9584: checking shared memory with a test program
configure:9711: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lz -lgmp -lm -lc 1>&5
configure:9624: error: syntax error before `THE'
configure:9631: error: `idOffset' was not declared in this scope
configure:9632: error: syntax error before `return'
configure: failed program was:
#line 9590 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit(int);
#endif
#include <sys/types.h>
#include <unistd.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <errno.h>
#define VS_KEYTYPE_SIZE 4
#define VS_SEQ_SIZE 12
#define VS_PID_MASK 0xffff
#define SEQ_NUM 0x5
#define VS_MSGBUFFER_KEY 0x1
#define SHMSIZE (1024*1024)
#define PERMS 0666
#define SHM_OPT 0
typedef unsigned int Value;
#if defined(sparc)
#define ASM_SWAP(cell, value) ({ Value out; __asm__ __volatile__ ("swap %3,%0" : "=r" (out), "=m" (cell) /* output */ : "0" (value), "m" (cell)); /* input */ out; })
;
#elif defined(i386)
#define ASM_SWAP(cell, value) ({ Value out; __asm__ __volatile__ ("xchgl %3,%0" :"=r" (out), "=m" (cell) :"0" (value), "m" (cell)); out; })
;
#else
DO NOT COMPILE THE CRAP!
#endif
key_t vsTypeToKey(int type)
{
int idOffset = sizeof(key_t)*8 - VS_KEYTYPE_SIZE;
int seqOffset = idOffset - VS_SEQ_SIZE;
return ((key_t) ((type << idOffset) |
(SEQ_NUM << seqOffset) |
(getpid() & VS_PID_MASK)));
}
int volatile global;
main()
{
int shmkey;
int shmid;
void *shm;
struct shmid_ds ds;
shmkey = vsTypeToKey(VS_MSGBUFFER_KEY);
if ((shmid = shmget(shmkey, SHMSIZE, (PERMS|IPC_CREAT))) < 0)
exit(-1);
if ((shm = (void *) shmat(shmid, 0, SHM_OPT)) == (void *) -1)
exit(-2);
for (char *addr = (char *) shm; addr < ((char *) shm) + SHMSIZE; addr++)
*addr = (char) 0;
if (shmdt((char *) shm) < 0)
exit(-3);
if ((shm = (void *) shmat(shmid, 0, SHM_OPT)) == (void *) -1)
exit(-4);
for (char *addr = (char *) shm; addr < ((char *) shm) + SHMSIZE; addr++)
if (*addr != (char) 0)
exit(-5);
if (shmdt((char *) shm) < 0)
exit(-6);
if ((shm = (void *) shmat(shmid, 0, SHM_OPT)) == (void *) -1)
exit(-7);
for (char *addr = (char *) shm; addr < ((char *) shm) + SHMSIZE; addr++)
*addr = (char) 0x4f;
if (shmdt((char *) shm) < 0)
exit(-8);
if ((shm = (void *) shmat(shmid, 0, SHM_OPT)) == (void *) -1)
exit(-9);
for (char *addr = (char *) shm; addr < ((char *) shm) + SHMSIZE; addr++)
if (*addr != (char) 0x4f)
exit(-10);
if (shmdt((char *) shm) < 0)
exit(-11);
if (shmctl(shmid, IPC_RMID, (struct shmid_ds *) 0) < 0)
exit(-12);
if (shmctl(shmid, IPC_RMID, (struct shmid_ds *) 0) == 0)
exit(-13);
if (errno != EIDRM && errno != EINVAL)
exit(-14);
int local = 0;
global = 1;
local = ASM_SWAP(global, local);
if (global != 0 || local != 1) exit(-15);
exit(0);
}
configure:9737: checking for --enable-virtualsites
configure:9763: checking for --enable-miscbuiltins
configure:9788: checking whether .align is multiple
configure:9851: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lz -lgmp -lm -lc 1>&5
/usr/local/lib/libgmp.so.6.3: warning: vsprintf() is often misused, please use vsnprintf()
/usr/local/lib/libgmp.so.6.3: warning: strcpy() is almost always misused, please use strlcpy()
configure: failed program was:
#line 9793 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit(int);
#endif
#ifdef __GNUC__
#include <stdio.h>
static int nonsense(int);
int main(void) {
int j;
goto leave;
start:
asm volatile(".align 16");
la1:
asm volatile(".long 1");
asm volatile(".align 16");
la2:
j=nonsense(42);
goto leave;
asm volatile(".align 16");
lb1:
asm volatile(".long 2");
asm volatile(".align 16");
lb2:
j=nonsense(4711);
goto leave;
leave:
static void * fake[] = {
&& start, && la1, && la2,
&& lb1, && lb2, && leave};
if (((((char *) && lb2) - ((char *) && lb1)) == 16) &&
((((char *) && la2) - ((char *) && la1)) == 16) &&
(*((int *) && la1)==1) &&
(*((int *) && lb1)==2)) {
return 0;
}
return -1;
}
static int nonsense(int i) {
return i*i;
}
#else
BOOOOOOOM
#endif
configure:9870: checking whether .align is power of 2
configure:9933: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lz -lgmp -lm -lc 1>&5
/usr/local/lib/libgmp.so.6.3: warning: vsprintf() is often misused, please use vsnprintf()
/usr/local/lib/libgmp.so.6.3: warning: strcpy() is almost always misused, please use strlcpy()
configure: failed program was:
#line 9875 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit(int);
#endif
#ifdef __GNUC__
#include <stdio.h>
static int nonsense(int);
int main(void) {
int j;
goto leave;
start:
asm volatile(".align 4");
la1:
asm volatile(".long 1");
asm volatile(".align 4");
la2:
j=nonsense(42);
goto leave;
asm volatile(".align 4");
lb1:
asm volatile(".long 2");
asm volatile(".align 4");
lb2:
j=nonsense(4711);
goto leave;
leave:
static void * fake[] = {
&& start, && la1, && la2,
&& lb1, && lb2, && leave};
if (((((char *) && lb2) - ((char *) && lb1)) == 16) &&
((((char *) && la2) - ((char *) && la1)) == 16) &&
(*((int *) && la1)==1) &&
(*((int *) && lb1)==2)) {
return 0;
}
return -1;
}
static int nonsense(int i) {
return i*i;
}
#else
BOOOOOOOM
#endif
configure:9952: checking alignment of secondary tag for const terms
configure:9977: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lz -lgmp -lm -lc 1>&5
/usr/local/lib/libgmp.so.6.3: warning: vsprintf() is often misused, please use vsnprintf()
/usr/local/lib/libgmp.so.6.3: warning: strcpy() is almost always misused, please use strlcpy()
configure:9992: checking if alignment of secondary tags for extensions needs padding
configure:10025: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lz -lgmp -lm -lc 1>&5
/usr/local/lib/libgmp.so.6.3: warning: vsprintf() is often misused, please use vsnprintf()
/usr/local/lib/libgmp.so.6.3: warning: strcpy() is almost always misused, please use strlcpy()
configure: failed program was:
#line 9998 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit(int);
#endif
class Tag {
public:
unsigned int tag;
};
class Ext : public Tag {
public:
void* ptr;
virtual void foo() {}
};
class User : public Ext {
public:
void* uptr;
public:
virtual void baz(){}
};
int main()
{
User u;
return (((((char*)(void*)(Tag*)&u) - ((char*)(void*)&u)) % 8) == 0)?0:-1;
}
configure:10044: checking if padding works
configure:10080: g++ -DOPENBSD -I/usr/local/include -L/usr/Local/lib -o conftest -fno-exceptions -fno-implicit-templates -I/usr/local/include -L/usr/local/lib conftest.C -lz -lgmp -lm -lc 1>&5
/usr/local/lib/libgmp.so.6.3: warning: vsprintf() is often misused, please use vsnprintf()
/usr/local/lib/libgmp.so.6.3: warning: strcpy() is almost always misused, please use strlcpy()
More information about the mozart-users
mailing list