Обсуждение: Mac OS X 10.1 build bug - paths with spaces

Поиск
Список
Период
Сортировка

Mac OS X 10.1 build bug - paths with spaces

От
Murray Todd Williams
Дата:
Operating System: Mac OS X 10.1.1 (Build 5M28)
PostgreSQL Version: CVS checkout as of Nov 17, 2001
Problem Category: Building

After running ./configure and then "make all" the build stopped with the
message

cc -traditional-cpp -g -O2 -Wall -Wmissing-prototypes
-Wmissing-declarations -I../../../src/include   -c -o analyze.o analyze.c
analyze.c:23: parser/parse.h: No such file or directory

I looked at the part of the build messages where parse.h is supposed to
get built and I didn't see any problems:

make -C parser parse.h
bison -y -d  gram.y
mv -f y.tab.c ./gram.c
mv -f y.tab.h ./parse.h
prereqdir=`cd parser/ >/dev/null && pwd` && \
   cd ../../src/include/parser/ && rm -f parse.h && \
   ln -s $prereqdir/parse.h .

with no error messages.

The base directory of my build was /Volumes/SCSI Volume/devel/pgsql. I
had a wild hunch that the space in the "SCSI Volume" part of my path was
to blame, so I unpacked a clean copy of the source material to
/usr/local/src/pgsql (no spaces in path name), redid the ./configure and
make phase and all built fine.

Obviously this is hampering my development, but I figured I'd pass it
along since you never know who's going to get hit unawares with this.
(Especially those pesky Mac people who like spaces in their folder
names.)

Cheers!

Murray Todd Williams

Re: Mac OS X 10.1 build bug - paths with spaces

От
Tom Lane
Дата:
Murray Todd Williams <MurrayTodd@mac.com> writes:
> The base directory of my build was /Volumes/SCSI Volume/devel/pgsql. I
> had a wild hunch that the space in the "SCSI Volume" part of my path was
> to blame, so I unpacked a clean copy of the source material to
> /usr/local/src/pgsql (no spaces in path name), redid the ./configure and
> make phase and all built fine.

Looks like we need some double quotes in that there ln -s command.

I'll try this here to see if there are any other places with the
same problem.

            regards, tom lane

Re: Mac OS X 10.1 build bug - paths with spaces

От
Tom Lane
Дата:
I said:
> Looks like we need some double quotes in that there ln -s command.

Sure enough, you can build in a directory whose path contains spaces
after addition of double quotes to src/backend/Makefile's ln -s
command for parse.h.

However, I found that a lot of things blow up if you try to specify
an installation prefix that contains spaces in the pathname.
configure itself failed to cope with "--prefix=/path/with/spaces",
for reasons that aren't very clear to me.  I gave up when I found that
initdb couldn't deal with spaces in $PATH.  There might be other
problems further downstream.

Cleaning this up might be a project for some future hacker, but I
haven't got time for it now...

            regards, tom lane