Forum OpenACS Q&A: PostgreSQL 7.2.x on Mac OSX 10.2.x?

Collapse
Posted by Tom Lazar on
I'm trying to install PostgreSQL in order to run OpenACS on my TiBook (so I can develop sites while riding the train or sitting in the park 😉

The problem seems to stem from that OACS doesn't work (yet) with PostgreSQL 7.3.x but needs 7.2.x instead. And it seems that 7.2.x just won't run under Jaguar.

When installing Marc Lyanage's package everything goes fine until I actually attempt to connect to the database, i.e. when calling createdb or psql:

/usr/local/bin/psql
dyld: /usr/local/bin/psql Undefined symbols:
/usr/local/bin/psql undefined reference to _BC expected to be defined in /usr/lib/libSystem.B.dylib
/usr/local/bin/psql undefined reference to _PC expected to be defined in /usr/lib/libSystem.B.dylib
/usr/local/bin/psql undefined reference to _UP expected to be defined in /usr/lib/libSystem.B.dylib
Trace/BPT trap

of course I also have tried to build 7.2.4 from the sources, but the make process breaks:

../../../../src/include/access/heapam.h:188: parse error before "Size"
heaptuple.c:37: parse error before "ComputeDataSize"
heaptuple.c:40: warning: return type defaults to `int'
heaptuple.c: In function `DataFill':
heaptuple.c:124: warning: implicit declaration of function `memcpy'
heaptuple.c:131: `size_t' undeclared (first use in this function)
heaptuple.c:131: (Each undeclared identifier is reported only once
heaptuple.c:131: for each function it appears in.)
heaptuple.c: In function `heap_formtuple':
heaptuple.c:610: parse error before "_len"
heaptuple.c:610: `_len' undeclared (first use in this function)
heaptuple.c:610: warning: implicit declaration of function `memset'
heaptuple.c: In function `heap_modifytuple':
heaptuple.c:705: warning: implicit declaration of function `memmove'
heaptuple.c: At top level:
heaptuple.c:745: parse error before "Size"
heaptuple.c:747: warning: no previous prototype for `heap_addheader'
heaptuple.c: In function `heap_addheader':
heaptuple.c:750: parse error before "len"
heaptuple.c:757: `len' undeclared (first use in this function)
heaptuple.c:757: `structlen' undeclared (first use in this function)
heaptuple.c:767: parse error before "_len"
heaptuple.c:767: `_len' undeclared (first use in this function)
heaptuple.c:770: `natts' undeclared (first use in this function)
heaptuple.c:773: `structure' undeclared (first use in this function)
make[4]: *** [heaptuple.o] Error 1
make[3]: *** [common-recursive] Error 2
make[2]: *** [access-recursive] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2

Does anyone here know, if it is possible *at all* to run 7.2.x under Jaguar? I have checked the threads here on OACS and MacOSX but they all seem to refer to 10.0.x and 10.1.x

Any help would be appreciated,

thanks!

Kind regards,

Tom Lazar

Collapse
Posted by Walter McGinnis on
See http://borkware.com/rants/openacs/ for a more up-to-date guide.
Collapse
Posted by Tom Lazar on
thanks for the pointer Walter,

however, even when following the updated instructions there I can't manage to build postgresql 7.2.x (I tried the 7.2.4 and then the 7.2.1 versions) under 10.2.4 (with the Dec2002 DevTools).

I did send a report to MarkD, though, perhaps he can shed some light onto the issue. In the meantime, for your entertainment 😉 the output of make, when I attempt to build postgresql:

[cassady:~/Desktop/tomster.org/postgresql-7.2.1] tomster% make
make -C doc all
gzip -d -c man.tar.gz | /usr/bin/tar xf -
for file in man1/*.1; do \
  mv $file $file.bak && \
  sed -e 's/\\fR(l)/\\fR(7)/' $file.bak >$file && \
  rm $file.bak || exit; \
done
/bin/sh ../config/mkinstalldirs man7
mkdir man7
for file in manl/*.l; do \
  sed -e '/^\.TH/s/"l"/"7"/'  \
              -e 's/\\fR(l)/\\fR(7)/' \
      $file >man7/`basename $file | sed 's/.l$/.7/'` || exit; \
done
make -C src all
make -C backend all
prereqdir=`cd parser/ >/dev/null && pwd` && \
  cd ../../src/include/parser/ && rm -f parse.h && \
  ln -s "$prereqdir/parse.h" .
make -C utils fmgroids.h
CPP='gcc -traditional-cpp -E' AWK='awk' /bin/sh Gen_fmgrtab.sh ../../../src/include/catalog/pg_proc.h
cd ../../src/include/utils/ && rm -f fmgroids.h && \
    ln -s ../../../src/backend/utils/fmgroids.h .
make -C access all
make -C common SUBSYS.o
gcc -traditional-cpp -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../../src/include  -c -o heaptuple.o heaptuple.c
In file included from ../../../../src/include/postgres.h:47,
                from heaptuple.c:21:
../../../../src/include/c.h:55:19: stdio.h: No such file or directory
../../../../src/include/c.h:56:20: stdlib.h: No such file or directory
../../../../src/include/c.h:57:20: string.h: No such file or directory
../../../../src/include/c.h:58:20: stddef.h: No such file or directory
../../../../src/include/c.h:73:20: locale.h: No such file or directory
In file included from ../../../../src/include/postgres.h:47,
                from heaptuple.c:21:
../../../../src/include/c.h:314: parse error before "Size"
../../../../src/include/c.h:314: warning: type defaults to `int' in declaration of `Size'
../../../../src/include/c.h:314: warning: data definition has no type or storage class
../../../../src/include/c.h:631: parse error before "size_t"
../../../../src/include/c.h:637: parse error before "size_t"
In file included from ../../../../src/include/postgres.h:49,
                from heaptuple.c:21:
../../../../src/include/utils/palloc.h:48: parse error before "Size"
../../../../src/include/utils/palloc.h:54: parse error before "Size"
In file included from ../../../../src/include/storage/shmem.h:17,
                from ../../../../src/include/storage/lock.h:19,
                from ../../../../src/include/storage/bufmgr.h:19,
                from ../../../../src/include/storage/bufpage.h:18,
                from ../../../../src/include/access/htup.h:17,
                from ../../../../src/include/access/heapam.h:17,
                from heaptuple.c:23:
../../../../src/include/utils/hsearch.h:90: warning: parameter names (without types) in function declaration
../../../../src/include/utils/hsearch.h:109: warning: parameter names (without types) in function declaration
In file included from ../../../../src/include/storage/lock.h:19,
                from ../../../../src/include/storage/bufmgr.h:19,
                from ../../../../src/include/storage/bufpage.h:18,
                from ../../../../src/include/access/htup.h:17,
                from ../../../../src/include/access/heapam.h:17,
                from heaptuple.c:23:
../../../../src/include/storage/shmem.h:66: parse error before "size"
../../../../src/include/storage/shmem.h:71: parse error before "Size"
../../../../src/include/storage/shmem.h:96: parse error before "Size"
In file included from ../../../../src/include/nodes/pg_list.h:17,
                from ../../../../src/include/access/tupdesc.h:19,
                from ../../../../src/include/utils/rel.h:18,
                from ../../../../src/include/storage/bufmgr.h:21,
                from ../../../../src/include/storage/bufpage.h:18,
                from ../../../../src/include/access/htup.h:17,
                from ../../../../src/include/access/heapam.h:17,
                from heaptuple.c:23:
../../../../src/include/nodes/nodes.h:271: parse error before "size"
In file included from ../../../../src/include/utils/rel.h:23,
                from ../../../../src/include/storage/bufmgr.h:21,
                from ../../../../src/include/storage/bufpage.h:18,
                from ../../../../src/include/access/htup.h:17,
                from ../../../../src/include/access/heapam.h:17,
                from heaptuple.c:23:
../../../../src/include/storage/fd.h:69: parse error before '*' token
../../../../src/include/storage/fd.h:69: warning: type defaults to `int' in declaration of `AllocateFile'
../../../../src/include/storage/fd.h:69: warning: data definition has no type or storage class
../../../../src/include/storage/fd.h:70: parse error before '*' token
In file included from ../../../../src/include/access/htup.h:17,
                from ../../../../src/include/access/heapam.h:17,
                from heaptuple.c:23:
../../../../src/include/storage/bufpage.h:312: parse error before "Size"
../../../../src/include/storage/bufpage.h:313: parse error before "Size"
../../../../src/include/storage/bufpage.h:315: parse error before "Size"
../../../../src/include/storage/bufpage.h:318: parse error before "PageGetFreeSpace"
../../../../src/include/storage/bufpage.h:318: warning: type defaults to `int' in declaration of `PageGetFreeSpace'
../../../../src/include/storage/bufpage.h:318: warning: data definition has no type or storage class
In file included from ../../../../src/include/access/xact.h:19,
                from ../../../../src/include/utils/tqual.h:19,
                from ../../../../src/include/access/relscan.h:17,
                from ../../../../src/include/access/heapam.h:18,
                from heaptuple.c:23:
../../../../src/include/utils/nabstime.h:17:20: limits.h: No such file or directory
../../../../src/include/utils/nabstime.h:18:18: time.h: No such file or directory
In file included from ../../../../src/include/utils/nabstime.h:21,
                from ../../../../src/include/access/xact.h:19,
                from ../../../../src/include/utils/tqual.h:19,
                from ../../../../src/include/access/relscan.h:17,
                from ../../../../src/include/access/heapam.h:18,
                from heaptuple.c:23:
../../../../src/include/utils/timestamp.h:16:18: time.h: No such file or directory
../../../../src/include/utils/timestamp.h:17:18: math.h: No such file or directory
../../../../src/include/utils/timestamp.h:18:20: limits.h: No such file or directory
In file included from ../../../../src/include/utils/nabstime.h:21,
                from ../../../../src/include/access/xact.h:19,
                from ../../../../src/include/utils/tqual.h:19,
                from ../../../../src/include/access/relscan.h:17,
                from ../../../../src/include/access/heapam.h:18,
                from heaptuple.c:23:
../../../../src/include/utils/timestamp.h:170: warning: `struct tm' declared inside parameter list
../../../../src/include/utils/timestamp.h:170: warning: its scope is only this definition or declaration, which is probably not what you want
../../../../src/include/utils/timestamp.h:172: warning: `struct tm' declared inside parameter list
../../../../src/include/utils/timestamp.h:175: warning: `struct tm' declared inside parameter list
../../../../src/include/utils/timestamp.h:176: warning: `struct tm' declared inside parameter list
../../../../src/include/utils/timestamp.h:179: warning: `struct tm' declared inside parameter list
In file included from ../../../../src/include/utils/nabstime.h:22,
                from ../../../../src/include/access/xact.h:19,
                from ../../../../src/include/utils/tqual.h:19,
                from ../../../../src/include/access/relscan.h:17,
                from ../../../../src/include/access/heapam.h:18,
                from heaptuple.c:23:
../../../../src/include/utils/datetime.h:19:18: time.h: No such file or directory
../../../../src/include/utils/datetime.h:20:18: math.h: No such file or directory
../../../../src/include/utils/datetime.h:21:20: limits.h: No such file or directory
In file included from ../../../../src/include/utils/nabstime.h:22,
                from ../../../../src/include/access/xact.h:19,
                from ../../../../src/include/utils/tqual.h:19,
                from ../../../../src/include/access/relscan.h:17,
                from ../../../../src/include/access/heapam.h:18,
                from heaptuple.c:23:
../../../../src/include/utils/datetime.h:252: warning: `struct tm' declared inside parameter list
../../../../src/include/utils/datetime.h:253: warning: `struct tm' declared inside parameter list
../../../../src/include/utils/datetime.h:262: warning: `struct tm' declared inside parameter list
../../../../src/include/utils/datetime.h:266: warning: `struct tm' declared inside parameter list
../../../../src/include/utils/datetime.h:270: warning: `struct tm' declared inside parameter list
../../../../src/include/utils/datetime.h:272: warning: `struct tm' declared inside parameter list
../../../../src/include/utils/datetime.h:274: warning: `struct tm' declared inside parameter list
../../../../src/include/utils/datetime.h:275: warning: `struct tm' declared inside parameter list
../../../../src/include/utils/datetime.h:276: warning: `struct tm' declared inside parameter list
../../../../src/include/utils/datetime.h:277: warning: `struct tm' declared inside parameter list
In file included from ../../../../src/include/access/xact.h:19,
                from ../../../../src/include/utils/tqual.h:19,
                from ../../../../src/include/access/relscan.h:17,
                from ../../../../src/include/access/heapam.h:18,
                from heaptuple.c:23:
../../../../src/include/utils/nabstime.h:161: warning: `struct tm' declared inside parameter list
In file included from ../../../../src/include/utils/tqual.h:19,
                from ../../../../src/include/access/relscan.h:17,
                from ../../../../src/include/access/heapam.h:18,
                from heaptuple.c:23:
../../../../src/include/access/xact.h:80: parse error before "time_t"
../../../../src/include/access/xact.h:80: warning: no semicolon at end of struct or union
../../../../src/include/access/xact.h:85: warning: type defaults to `int' in declaration of `xl_xact_commit'
../../../../src/include/access/xact.h:85: warning: data definition has no type or storage class
../../../../src/include/access/xact.h:91: parse error before "time_t"
../../../../src/include/access/xact.h:91: warning: no semicolon at end of struct or union
../../../../src/include/access/xact.h:92: warning: type defaults to `int' in declaration of `xl_xact_abort'
../../../../src/include/access/xact.h:92: warning: data definition has no type or storage class
In file included from ../../../../src/include/utils/memutils.h:20,
                from ../../../../src/include/access/tupmacs.h:17,
                from ../../../../src/include/access/heapam.h:19,
                from heaptuple.c:23:
../../../../src/include/nodes/memnodes.h:38: parse error before "Size"
../../../../src/include/nodes/memnodes.h:41: parse error before "Size"
In file included from ../../../../src/include/access/tupmacs.h:17,
                from ../../../../src/include/access/heapam.h:19,
                from heaptuple.c:23:
../../../../src/include/utils/memutils.h:51: parse error before "Size"
../../../../src/include/utils/memutils.h:51: warning: no semicolon at end of struct or union
../../../../src/include/utils/memutils.h:56: warning: type defaults to `int' in declaration of `StandardChunkHeader'
../../../../src/include/utils/memutils.h:56: warning: data definition has no type or storage class
../../../../src/include/utils/memutils.h:94: parse error before "Size"
../../../../src/include/utils/memutils.h:107: parse error before "Size"
In file included from heaptuple.c:23:
../../../../src/include/access/heapam.h:174: parse error before "ComputeDataSize"
../../../../src/include/access/heapam.h:174: warning: type defaults to `int' in declaration of `ComputeDataSize'
../../../../src/include/access/heapam.h:174: warning: data definition has no type or storage class
../../../../src/include/access/heapam.h:188: parse error before "Size"
heaptuple.c:37: parse error before "ComputeDataSize"
heaptuple.c:40: warning: return type defaults to `int'
heaptuple.c: In function `DataFill':
heaptuple.c:124: warning: implicit declaration of function `memcpy'
heaptuple.c:131: `size_t' undeclared (first use in this function)
heaptuple.c:131: (Each undeclared identifier is reported only once
heaptuple.c:131: for each function it appears in.)
heaptuple.c: In function `heap_formtuple':
heaptuple.c:610: parse error before "_len"
heaptuple.c:610: `_len' undeclared (first use in this function)
heaptuple.c:610: warning: implicit declaration of function `memset'
heaptuple.c: In function `heap_modifytuple':
heaptuple.c:705: warning: implicit declaration of function `memmove'
heaptuple.c: At top level:
heaptuple.c:745: parse error before "Size"
heaptuple.c:747: warning: no previous prototype for `heap_addheader'
heaptuple.c: In function `heap_addheader':
heaptuple.c:750: parse error before "len"
heaptuple.c:757: `len' undeclared (first use in this function)
heaptuple.c:757: `structlen' undeclared (first use in this function)
heaptuple.c:767: parse error before "_len"
heaptuple.c:767: `_len' undeclared (first use in this function)
heaptuple.c:770: `natts' undeclared (first use in this function)
heaptuple.c:773: `structure' undeclared (first use in this function)
make[4]: *** [heaptuple.o] Error 1
make[3]: *** [common-recursive] Error 2
make[2]: *** [access-recursive] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2

Collapse
Posted by Dis Continued on
Collapse
Posted by Tom Lazar on
michael:

yes I have... in fact, it was my first choice. however, the binary of 7.2.1 doesn't run under MacOSX 10.2.4.

I contacted Marc Liyanage on it and he answered

<blockquote> I don't support any old versions, neither of the OS nor of the package
itself, sorry... It takes enough time as it is, and it would talke a lot
more otherwise...
</blockquote>

which is a ) totally understandable, but b) not helpful...

so my question remains: anyone out there running OpenACS under MacOS 10.2.4?

Collapse
Posted by Vinod Kurup on
Hi Tom,

The first error that is reported in your log is:

../../../../src/include/c.h:55:19: stdio.h: No such file or directory

So, it's not finding the development headers. Do you have a stdio.h in /usr/include? If not, then I think you need to install the Mac OS Development tools (available on your install CDs). If it is there, then I'm not sure why it's not being found...

Collapse
Posted by Tom Lazar on
vinod,

thanks, you are so right! when installing the developer tools (ages ago) i deselected the documentation and the SDK packages to save space...)

i reinstalled them and the good news is: my make process got much further now 😉

it now breaks with an apparent error in one of those header files:

/usr/include/ppc/setjmp.h:58: conflicting types for `jmp_buf'
/usr/include/ppc/setjmp.h:57: previous declaration of `jmp_buf'
make[4]: *** [xact.o] Error 1
make[3]: *** [transam-recursive] Error 2
make[2]: *** [access-recursive] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2

again, this happens with both the 7.2.1 and 7.2.4 releases. i don't know c(++) *at all* so i'm pretty much at loss here (i did look into the file in question but couldn't connect the error message with what i saw at lines 57 and 58...)

#define _JBLEN (26 + 36 + 129 + 1)

#if defined(KERNEL)
typedef struct sigcontext jmp_buf[1];
typedef struct __sigjmp_buf {
        int __storage[_JBLEN + 1] __attribute__((aligned(8)));
        } sigjmp_buf[1];
#else
typedef int jmp_buf[_JBLEN];              <-- line num 57
typedef int sigjmp_buf[_JBLEN + 1];
#endif

sooo, my question stubbornly remains: anyone out there running OpenACS und MacOSX 10.2.4?

Collapse
Posted by Bruno Mattarollo on

Hello,

I managed to compile 7.3.2 but I have some problems compiling 7.2.4 at the moment... I have Mac OS X 10.2.4 and the latest development tools (december 2002). The error is:

gcc -traditional-cpp -g -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../../src/include   -c -o sem.o sem.c
In file included from sem.c:30:
../../../../src/include/port/darwin/sem.h:66: warning: `union semun' declared inside parameter list
../../../../src/include/port/darwin/sem.h:66: warning: its scope is only this definition or declaration, which is probably not what you want
../../../../src/include/port/darwin/sem.h:66: warning: parameter has incomplete type
sem.c:67: warning: `union semun' declared inside parameter list
sem.c:68: parameter `arg' has incomplete type
make[4]: *** [sem.o] Error 1
make[3]: *** [darwin.dir] Error 2
make[2]: *** [port-recursive] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2

So, I haven't managed to install OpenACS yet ...

Collapse
Posted by Tom Lazar on

bruno,

have you modified the sources regarding sem.h as per instructions the of markd?

also, there already is a binary of postgresql 7.3.x available, so that's not the problem. i guess we'll have to make a tradeoff: invest more effort in getting 7.2.x to run or wait for OpenACS to work with 7.3.x

any comments on that here?

Collapse
Posted by Bruno Mattarollo on

Thanks Tom for the pointer. That fixed the problem...

All of PostgreSQL successfully made. Ready to install.

is the last message I get from the compilation of PostgreSQL 7.2.4.

Maybe you should get the latest Developers Tools from Apple (december 2002)... It's a 300MB download though but it seems to work for me...

Collapse
Posted by Tom Lazar on
bruno, congratulations 😉

and now that i *know* that it's actually possible, i'll go back to trying again...

re: devtools: i do have the dec2002 tools installed, but perhaps i'm still missing something. i'll clean up my boot volume (3Gb seems too small, even after relocating the swap files to another volume... yikes...) and make a complete install of the tools. then i'll see.

and so for you it's on to aolserver, now, i guess... good luck!

tom

Collapse
Posted by Dis Continued on
Tom, you may have already fixed the problem. If not, I have found Marc Lyanage's original 7.2.2 package which I downloaded several months ago. I have just sucessfully installed on my desktop running OS 10.2.4. Let me know.
Collapse
Posted by Tom Lazar on
hi michael,

thanks for your offer: as i'm too busy right now to clean up my root partition enough to reinstall the entire developer tools, i would like to get back to your offer regarding the 7.2.2 binaries.

if it's not too much trouble for you, you can send them to me as an email attachment: i'm running my own mail server, so it won't be a problem for myself 😉

i'm glad to hear, that there are other mac users out there running openacs locally as i'm getting more and more fond of it...

kind regards from berlin,

tom