Thread: make install fails due to "/bin/mkdir: missing operand"

make install fails due to "/bin/mkdir: missing operand"

From
Kenichiro Tanaka
Date:
Hello.

This is my first mail to "pgsql-hackers@postgresql.org".
When I install PostgreSQL,I get an error.
So I'd like to send a report
.

PostgreSQL version: postgresql-9.0beta1
Operating system: CentOS release 5.4 (Final)

Reproduce case:
#prefix and with-pgport are not important
./configure --enable-nls='UFT_JP' --prefix=/home/p900/posgrehome
--with-pgport=1900
make && make install

make install
log---------------------------------------------------------------
:
:
make[3]: Leaving directory `/home/p900/postgresql-9.0beta1/src/timezone'
/bin/mkdir: missing operand
Try `/bin/mkdir --help' for more information.
make[2]: *** [installdirs-po] Error 1
make[2]: Leaving directory `/home/p900/postgresql-9.0beta1/src/backend'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/home/p900/postgresql-9.0beta1/src'
make: *** [install] Error 2
--------------------------------------------------------------------------

First of all,I have a mistake.
"enable-nls" allows only 'de es fr ja pt_BR tr'.
I can work around to fix this.

But we can install PostgreSQL with the configure command
in 8.3.10 or before version.


We get an error following line of the Makefile.
--------------------------------------------------------------------------
postgresql-9.0beta1/src/nls-global.mk

74 installdirs-po:
75 $(MKDIR_P) $(foreach lang, $(LANGUAGES),
'$(DESTDIR)$(localedir)'/$(lang)/LC_MESSAGES)
--------------------------------------------------------------------------

In 8.3.10 or before version, we use "mkinstalldirs" and this allow "miss
operand"

--------------------------------------------------------------------------
##mkinstalldirs test
[p8310@postgres01 config]$ ./mkinstalldirs
[p8310@postgres01 config]$ echo $?
0

##MKDIR_P test
[p900@postgres01 src]$ mkdir -p
mkdir: missing operand
[p900@postgres01 src]$ echo $?
1

# I also checked following archives
# http://archives.postgresql.org/pgsql-committers/2009-08/msg00277.php
--------------------------------------------------------------------------
In the first place,I must fix my configure option.
But I also think that configure command have to check wrong config
parameter,
because I could not install postgresql-9.0beta1 for some days.
We can work around to make mkinstalldirs, but I feel it is not good
becasuse it casts away the change of
"pgsql-committers/2009-08/msg00277.php".


Thank you for reading.

================================================
Kenichiro Tanaka
K.K.Ashisuto
http://www.ashisuto.co.jp/english/index.html
================================================


Re: make install fails due to "/bin/mkdir: missing operand"

From
Alvaro Herrera
Date:
Excerpts from Kenichiro Tanaka's message of lun may 10 07:07:27 -0400 2010:

> Reproduce case:
> #prefix and with-pgport are not important
> ./configure --enable-nls='UFT_JP' --prefix=/home/p900/posgrehome
> --with-pgport=1900
> make && make install

I think this is pilot error, in the sense that it doesn't fail if you
don't pass an invalid language name.  Maybe the bug is that we allow
--enable-nls to pass down junk down to the install Makefile, instead of
erroring out right there.

The failure was introduced in this patch:
http://git.postgresql.org/gitweb?p=postgresql.git;a=commit;h=2b30e0ad2f198505c584792e0694a65e10cabe39
-- 


Re: make install fails due to "/bin/mkdir: missing operand"

From
Tom Lane
Date:
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> Excerpts from Kenichiro Tanaka's message of lun may 10 07:07:27 -0400 2010:
>> ./configure --enable-nls='UFT_JP' --prefix=/home/p900/posgrehome

> I think this is pilot error, in the sense that it doesn't fail if you
> don't pass an invalid language name.  Maybe the bug is that we allow
> --enable-nls to pass down junk down to the install Makefile, instead of
> erroring out right there.

Yeah, I don't think this is the makefile's fault.  If we wanted to do
something to make it more user-friendly, we'd try to validate the value
of --enable-nls at configure time.
        regards, tom lane


Re: make install fails due to "/bin/mkdir: missing operand"

From
Peter Eisentraut
Date:
On mån, 2010-05-10 at 20:07 +0900, Kenichiro Tanaka wrote:
> Reproduce case:
> #prefix and with-pgport are not important
> ./configure --enable-nls='UFT_JP' --prefix=/home/p900/posgrehome
> --with-pgport=1900
> make && make install
> 
> make install
> log---------------------------------------------------------------
> :
> :
> make[3]: Leaving directory `/home/p900/postgresql-9.0beta1/src/timezone'
> /bin/mkdir: missing operand
> Try `/bin/mkdir --help' for more information.
> make[2]: *** [installdirs-po] Error 1
> make[2]: Leaving directory `/home/p900/postgresql-9.0beta1/src/backend'
> make[1]: *** [install] Error 2
> make[1]: Leaving directory `/home/p900/postgresql-9.0beta1/src'
> make: *** [install] Error 2
> --------------------------------------------------------------------------
> 

Fixed.




Re: make install fails due to "/bin/mkdir: missing operand"

From
Peter Eisentraut
Date:
On mån, 2010-05-10 at 11:40 -0400, Alvaro Herrera wrote:
> Excerpts from Kenichiro Tanaka's message of lun may 10 07:07:27 -0400 2010:
> 
> > Reproduce case:
> > #prefix and with-pgport are not important
> > ./configure --enable-nls='UFT_JP' --prefix=/home/p900/posgrehome
> > --with-pgport=1900
> > make && make install
> 
> I think this is pilot error, in the sense that it doesn't fail if you
> don't pass an invalid language name.  Maybe the bug is that we allow
> --enable-nls to pass down junk down to the install Makefile, instead of
> erroring out right there.

The language name in his example is obviously wrong, but in general this
case if valid.  Even if you use something "correct" like
--enable-nls='de es fr', but one subdirectory doesn't have any of those,
the mkdir call would fail.