threads / discuss / 23995

Installing on AIX fails

Subject: Installing on AIX fails

## tl;dr

18 messages between Jun 3, 2010 and Jun 6, 2010.

replies: 17people: 5as markdown or json

Dario Rodriguez· Jun 3, 2010, 15:32 UTC · lore
Hi all,

I was trying to install git in a development and testing server we have. The first problem was that AIX 'make' tool does NOT support conditionals in makefiles, and display errors such...

[...] "Makefile", line 1003: make: Dependency line needs colon or double colon operator. "Makefile", line 1007: make: Dependency line needs colon or double colon operator. "Makefile", line 1009: make: Dependency line needs colon or double colon operator. "Makefile", line 1011: make: Dependency line needs colon or double colon operator. [...]

... until I get stucked. Well, I solved this by just using GNU make, then I compile:

$ /usr/linux/bin/make prefix=$HOME/apps/ NO_OPENSSL=1 NO_TCLTK=1 NO_EXPAT=1 PYTHON_PATH=/usr/local/bin/python

and it all works, with angels singing and everything... a testing repo works fine for a test drive without installing, excepting 'git log' that just don't display anything. Now, when I feel good to install it...

$ /usr/linux/bin/make prefix=$HOME/apps/ NO_OPENSSL=1 NO_TCLTK=1 NO_EXPAT=1 PYTHON_PATH=/usr/local/bin/python install

[...]
install -d -m 755 '/myhomedir/apps/bin'
getopt: illegal option -- d
Usage: install [-c dira] [-f dirb] [-i] [-m] [-M mode] [-O owner]
               [-G group] [-S] [-n dirc] [-o] [-s] file [dirx ...]
make: *** [install] Error 2

Now the installing process fails because of the AIX 'install' tool and I wonder, can I patch/configure the installing process for AIX? May be a set of utils for building in such systems would help some people.

PD: If you don't understand me please let me know it and I will try
again : )  My english could be horrible since I'm Argentinian.
PD2: I don't know if AIX python path is always /usr/local/bin/python,
but I've seen that git Makefiles set /usr/local/bin/python for FreeBSD
only:
git_remote_helpers/Makefile:
ifndef PYTHON_PATH
        ifeq ($(uname_S),FreeBSD)
                PYTHON_PATH = /usr/local/bin/python
        else
                PYTHON_PATH = /usr/bin/python
        endif
endif
I think 'test' the file is a good way for auto-configuration.

Cheers, Dario

Ævar Arnfjörð Bjarmason· Jun 3, 2010, 15:41 UTC · re: Dario Rodriguez · lore

Re: Installing on AIX fails

On Thu, Jun 3, 2010 at 15:32, Dario Rodriguez <soft.d4rio@gmail.com> wrote:
> and it all works, with angels singing and everything... a testing repo
> works fine for a test drive without installing, excepting 'git log'
> that just don't display anything.

How about PAGER=/bin/cat git log? If that works what's your pager, and do other git commands that use the pager (like git show) work or fail?

Show 13 quoted lines
> $ /usr/linux/bin/make prefix=$HOME/apps/ NO_OPENSSL=1 NO_TCLTK=1
> NO_EXPAT=1 PYTHON_PATH=/usr/local/bin/python install
>
> [...]
> install -d -m 755 '/myhomedir/apps/bin'
> getopt: illegal option -- d
> Usage: install [-c dira] [-f dirb] [-i] [-m] [-M mode] [-O owner]
>               [-G group] [-S] [-n dirc] [-o] [-s] file [dirx ...]
> make: *** [install] Error 2
>
> Now the installing process fails because of the AIX 'install' tool and
> I wonder, can I patch/configure the installing process for AIX? May be
> a set of utils for building in such systems would help some people.

Does AIX's install have something equivalent to GNU install's -d? The -c and -f options look likely from that synopsis.

Show 12 quoted lines
> PD2: I don't know if AIX python path is always /usr/local/bin/python,
> but I've seen that git Makefiles set /usr/local/bin/python for FreeBSD
> only:
>
> git_remote_helpers/Makefile:
> ifndef PYTHON_PATH
>        ifeq ($(uname_S),FreeBSD)
>                PYTHON_PATH = /usr/local/bin/python
>        else
>                PYTHON_PATH = /usr/bin/python
>        endif
> endif

That's presumably because Python is most likely installed via the ports system on FreeBSD which drops it in /usr/local. How did you install Python on AIX? Is it from some IBM package or another method that's the most common & standard way to do it on AIX?.

If so the Makefile needs a test for AIX similar to the FreeBSD one.
Michael J Gruber· Jun 3, 2010, 16:12 UTC · re: Dario Rodriguez · lore

Re: Installing on AIX fails

Dario Rodriguez venit, vidit, dixit 03.06.2010 17:32:
Show 48 quoted lines
> Hi all,
> 
> I was trying to install git in a development and testing server we
> have. The first problem was that AIX 'make' tool does NOT support
> conditionals in makefiles, and display errors such...
> 
> 
> [...]
> "Makefile", line 1003: make: Dependency line needs colon or double
> colon operator.
> "Makefile", line 1007: make: Dependency line needs colon or double
> colon operator.
> "Makefile", line 1009: make: Dependency line needs colon or double
> colon operator.
> "Makefile", line 1011: make: Dependency line needs colon or double
> colon operator.
> [...]
> 
> 
> ... until I get stucked. Well, I solved this by just using GNU make,
> then I compile:
> 
> 
> $ /usr/linux/bin/make prefix=$HOME/apps/ NO_OPENSSL=1 NO_TCLTK=1
> NO_EXPAT=1 PYTHON_PATH=/usr/local/bin/python
> 
> 
> and it all works, with angels singing and everything... a testing repo
> works fine for a test drive without installing, excepting 'git log'
> that just don't display anything.
> Now, when I feel good to install it...
> 
> 
> $ /usr/linux/bin/make prefix=$HOME/apps/ NO_OPENSSL=1 NO_TCLTK=1
> NO_EXPAT=1 PYTHON_PATH=/usr/local/bin/python install
> 
> [...]
> install -d -m 755 '/myhomedir/apps/bin'
> getopt: illegal option -- d
> Usage: install [-c dira] [-f dirb] [-i] [-m] [-M mode] [-O owner]
>                [-G group] [-S] [-n dirc] [-o] [-s] file [dirx ...]
> make: *** [install] Error 2
> 
> 
> 
> Now the installing process fails because of the AIX 'install' tool and
> I wonder, can I patch/configure the installing process for AIX? May be
> a set of utils for building in such systems would help some people.

AIX tools are a pain in the back end. If you want to compile & install anything GNU there you need better tools. In case of install, there's often something in /usr/ucb or /usr/ccs.

Are you using gcc or xlc btw?
> 
> PD: If you don't understand me please let me know it and I will try
> again : )  My english could be horrible since I'm Argentinian.
It's certainly good enough!
Show 14 quoted lines
> PD2: I don't know if AIX python path is always /usr/local/bin/python,
> but I've seen that git Makefiles set /usr/local/bin/python for FreeBSD
> only:
> 
> git_remote_helpers/Makefile:
> ifndef PYTHON_PATH
>         ifeq ($(uname_S),FreeBSD)
>                 PYTHON_PATH = /usr/local/bin/python
>         else
>                 PYTHON_PATH = /usr/bin/python
>         endif
> endif
> 
> I think 'test' the file is a good way for auto-configuration.

You don't need to worry about python for git right now. It's set up for a few things which are yet to come.

Cheers, Michael

Tor Arntsen· Jun 4, 2010, 09:13 UTC · re: Dario Rodriguez · lore

Re: Installing on AIX fails

Re. building on AIX.

For AIX I've found that it's just better to always rely on the freeware toolkit stuff, which comes on a separate toolkit CD and in any case can be downloaded from ftp://ftp.software.ibm.com:/aix/freeSoftware/aixtoolbox/RPMS/ppc These are RPMs that you install via RPM which comes pre-installed on AIX (or anyway is part of the standard AIX CDs).

On my own build the make, install, tar (gtar), grep, come from the toolkit CD (the /usr/freeware/bin/ path). At least the first two seems definitely mandatory. Oh, and AIX /bin/sh is not particularly good - it's simpler to rely on bash from the toolkit.

Depending on your AIX and compiler versions you may need some additional changes. Gary Vaughan have posted patches which include updates that will improve the AIX experience. In addition to that, if you have the old XlC 5.0 compiler you will probably be better off at this point to use gcc from the toolkit. Otherwise you'll need those patches, and also one I posted which removes some C++ comments (I should probably re-post that one because it's not against the latest git repo version anymore).

All that been said, I build on AIX as follows, using configure (which takes care of some other issues at the moment).

SHELL_PATH=/opt/freeware/bin/bash PERL_PATH=/usr/local/special/bin/perl ./configure CC=cc CFLAGS=-Dinline="" and make SHELL_PATH=/opt/freeware/bin/bash PERL_PATH=/usr/local/special/bin/perl followed by the same, with 'install'

That's with the old compiler and patches applied. Without patches you'll either have to rely on GCC (and remove those CC and CFLAGS lines, or change CC to gcc), or, with a newer (say, v10) IBM compiler), the -Dinline="" may not be needed.

The only problem now is that some stuff (git rebase --interactive IIRC) will still not work, if you're on an AIX version with Perl 5.6 (some things in git needs 5.8). AIX 6.1 has Perl 5.8, but some customers will downgrade to 5.6 because of bad performance problems with 5.8 on AIX.

-Tor
Tor Arntsen· Jun 4, 2010, 09:17 UTC · re: Tor Arntsen · lore

Re: Installing on AIX fails

On Fri, Jun 4, 2010 at 11:13, Tor Arntsen <tor@spacetec.no> wrote:
> The only problem now is that some stuff (git rebase --interactive
> IIRC) will still not work, if you're on an AIX version with Perl 5.6
> (some things in git needs 5.8).
Thinking harder I now believe it was 'git add --patch' which needs Perl >= 5.8.
-Tor
Dario Rodriguez· Jun 4, 2010, 14:22 UTC · re: Tor Arntsen · lore

Re: Installing on AIX fails

On Fri, Jun 4, 2010 at 6:13 AM, Tor Arntsen <tor@spacetec.no> wrote:
Show 15 quoted lines
> Re. building on AIX.
>
> For AIX I've found that it's just better to always rely on the
> freeware toolkit stuff, which comes on a separate toolkit CD and in
> any case can be downloaded from
> ftp://ftp.software.ibm.com:/aix/freeSoftware/aixtoolbox/RPMS/ppc
> These are RPMs that you install via RPM which comes pre-installed on
> AIX (or anyway is part of the standard AIX CDs).
>
> On my own build the make, install, tar (gtar), grep, come from the
> toolkit CD (the /usr/freeware/bin/ path). At least the first two seems
> definitely mandatory.
> Oh, and AIX /bin/sh is not particularly good - it's simpler to rely on
> bash from the toolkit.
>

As I'm not the sysadmin, and git is not the project's tool, and the server is in other city... I cannot install things from the CD :(

Another thing is that RPM utility is there... but I think I will not have enough permissions to install software in such way. Development teams compile utilities when needed (or not) and install in $HOME/bin.

I will need 'install's sources or an alternate way to install GIT...

Anyway, the 'make test' begun yesterday with a lot of failures... so, I don't know if I'ill be able to use GIT on AIX soon, but may be I can help to make it work.

> Depending on your AIX and compiler versions you may need some additional changes.
AIX is 5.2(.0.0), PERL is 5.8.0, IBM(R) XL C/C++ Enterprise Edition V7.0
Show 31 quoted lines
> Gary Vaughan have posted patches which include
> updates that will improve the AIX experience. In addition to that, if
> you have the old XlC 5.0 compiler you will probably be better off at
> this point to use gcc from the toolkit. Otherwise you'll need those
> patches, and also one I posted which removes some C++ comments (I
> should probably re-post that one because it's not against the latest
> git repo version anymore).
>
> All that been said, I build on AIX as follows, using configure (which
> takes care of some other issues at the moment).
>
> SHELL_PATH=/opt/freeware/bin/bash
> PERL_PATH=/usr/local/special/bin/perl ./configure CC=cc
> CFLAGS=-Dinline=""
> and
> make SHELL_PATH=/opt/freeware/bin/bash PERL_PATH=/usr/local/special/bin/perl
> followed by the same, with 'install'
>
> That's with the old compiler and patches applied. Without patches
> you'll either have to rely on GCC (and remove those CC and CFLAGS
> lines, or change CC to gcc), or, with a newer (say, v10) IBM
> compiler), the -Dinline="" may not be needed.
>
> The only problem now is that some stuff (git rebase --interactive
> IIRC) will still not work, if you're on an AIX version with Perl 5.6
> (some things in git needs 5.8). AIX 6.1 has Perl 5.8, but some
> customers will downgrade to 5.6 because of bad performance problems
> with 5.8 on AIX.
>
> -Tor
>
I'ill try compiling 'install' (i don't know where the sources are)

Thank'u man, Dario

Tor Arntsen· Jun 4, 2010, 14:38 UTC · re: Dario Rodriguez · lore

Re: Installing on AIX fails

On Fri, Jun 4, 2010 at 16:22, Dario Rodriguez <soft.d4rio@gmail.com> wrote:
> AIX is 5.2(.0.0), PERL is 5.8.0, IBM(R) XL C/C++ Enterprise Edition V7.0

I think that compiler is reasonably OK to use, it'll probably not choke on anything in particular. Perl OK too.

> I'ill try compiling 'install' (i don't know where the sources are)
It's in 'coreutils' these days, but that package includes a lot of stuff.

Maybe you could get away with just using the script-version of install which comes with coreutils itself (because it'll need an install tool to use before 'install' itself is installed..).

I'm attaching a copy. To use it it should be sufficient to use INSTALL=path-to/install-sh make install or something like that.

-Tor
Dario Rodriguez· Jun 4, 2010, 17:21 UTC · re: Tor Arntsen · lore

Re: Installing on AIX fails

On Fri, Jun 4, 2010 at 11:38 AM, Tor Arntsen <tor@spacetec.no> wrote:
Show 21 quoted lines
> On Fri, Jun 4, 2010 at 16:22, Dario Rodriguez <soft.d4rio@gmail.com> wrote:
>
>> AIX is 5.2(.0.0), PERL is 5.8.0, IBM(R) XL C/C++ Enterprise Edition V7.0
>
> I think that compiler is reasonably OK to use, it'll probably not
> choke on anything in particular. Perl OK too.
>
>> I'ill try compiling 'install' (i don't know where the sources are)
>
> It's in 'coreutils' these days, but that package includes a lot of stuff.
>
> Maybe you could get away with just using the script-version of install
> which comes with coreutils itself (because it'll need an install tool
> to use before 'install' itself is installed..).
>
> I'm attaching a copy. To use it it should be sufficient to use
> INSTALL=path-to/install-sh make install
> or something like that.
>
> -Tor
>

Hmm... I will check makefiles today, but there is something wrong here, take a look:

$ INSTALL=$HOME/bin/install-sh /usr/linux/bin/make
prefix=$HOME/.gitbin NO_OPENSSL=1 NO_TCLTK=1 NO_EXPAT=1
PYTHON_PATH=/usr/local/bin/python install
    SUBDIR perl
    SUBDIR git_remote_helpers
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
    SUBDIR templates
install -d -m 755 '/aplicaciones/D0/imei/usuarios/tximeid0/.gitbin/bin'
getopt: illegal option -- d
Usage: install [-c dira] [-f dirb] [-i] [-m] [-M mode] [-O owner]
               [-G group] [-S] [-n dirc] [-o] [-s] file [dirx ...]
make: *** [install] Error 2

It's not using install-sh since it supports -d ... and lets take a quick look at Makefiles:

$ find . -name Makefile -exec grep install {} \; | grep -v "^#" | grep INSTALL
INSTALL?=install
INSTALL_INFO=install-info
INSTALL = install
        INSTALL = ginstall
        INSTALL = ginstall
        INSTALL = /usr/ucb/install
        INSTALL = /bin/install
        $(INSTALL) $(install_bindir_programs) '$(DESTDIR_SQ)$(bindir_SQ)'
INSTALL ?= install
        INSTALL = install
INSTALL ?= install
INSTALL ?= install

It seems as if it's looking for /bin/install ... even when I wrote 'INSTALL=$HOME/bin/install-sh'

I have no more time, and will access the server next monday... but I'm going home and may be i'ill take a look at this to know how to do it, thanks 4 the script ; )

Cheers, Dario

Ævar Arnfjörð Bjarmason· Jun 4, 2010, 17:44 UTC · re: Dario Rodriguez · lore

Re: Installing on AIX fails

On Fri, Jun 4, 2010 at 17:21, Dario Rodriguez <soft.d4rio@gmail.com> wrote:
Show 16 quoted lines
> Hmm... I will check makefiles today, but there is something wrong
> here, take a look:
>
> $ INSTALL=$HOME/bin/install-sh /usr/linux/bin/make
> prefix=$HOME/.gitbin NO_OPENSSL=1 NO_TCLTK=1 NO_EXPAT=1
> PYTHON_PATH=/usr/local/bin/python install
>    SUBDIR perl
>    SUBDIR git_remote_helpers
> Could not find platform dependent libraries <exec_prefix>
> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
>    SUBDIR templates
> install -d -m 755 '/aplicaciones/D0/imei/usuarios/tximeid0/.gitbin/bin'
> getopt: illegal option -- d
> Usage: install [-c dira] [-f dirb] [-i] [-m] [-M mode] [-O owner]
>               [-G group] [-S] [-n dirc] [-o] [-s] file [dirx ...]
> make: *** [install] Error 2
It's make INSTALL=.., not INSTALL=.. make
Dario Rodriguez· Jun 4, 2010, 21:03 UTC · re: Ævar Arnfjörð Bjarmason · lore

Re: Installing on AIX fails

On Fri, Jun 4, 2010 at 2:44 PM, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:

Show 20 quoted lines
> On Fri, Jun 4, 2010 at 17:21, Dario Rodriguez <soft.d4rio@gmail.com> wrote:
>> Hmm... I will check makefiles today, but there is something wrong
>> here, take a look:
>>
>> $ INSTALL=$HOME/bin/install-sh /usr/linux/bin/make
>> prefix=$HOME/.gitbin NO_OPENSSL=1 NO_TCLTK=1 NO_EXPAT=1
>> PYTHON_PATH=/usr/local/bin/python install
>>    SUBDIR perl
>>    SUBDIR git_remote_helpers
>> Could not find platform dependent libraries <exec_prefix>
>> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
>>    SUBDIR templates
>> install -d -m 755 '/aplicaciones/D0/imei/usuarios/tximeid0/.gitbin/bin'
>> getopt: illegal option -- d
>> Usage: install [-c dira] [-f dirb] [-i] [-m] [-M mode] [-O owner]
>>               [-G group] [-S] [-n dirc] [-o] [-s] file [dirx ...]
>> make: *** [install] Error 2
>
> It's make INSTALL=.., not INSTALL=.. make
>

touché! ... I will be testing it on AIX next Monday cause I have no access to the server from home

Cheers, Dario

Jakub Narebski· Jun 5, 2010, 11:44 UTC · re: Tor Arntsen · lore

Re: Installing on AIX fails

Tor Arntsen <tor@spacetec.no> writes:
> On Fri, Jun 4, 2010 at 16:22, Dario Rodriguez <soft.d4rio@gmail.com> wrote:
Show 11 quoted lines
> > I'ill try compiling 'install' (i don't know where the sources are)
> 
> It's in 'coreutils' these days, but that package includes a lot of stuff.
> 
> Maybe you could get away with just using the script-version of install
> which comes with coreutils itself (because it'll need an install tool
> to use before 'install' itself is installed..).
> 
> I'm attaching a copy. To use it it should be sufficient to use
> INSTALL=path-to/install-sh make install
> or something like that.

I wonder if it would be better to simply include fallback portable install-sh in git sources.

BTW. shouldn't we define and use INSTALL_D in Makefile?
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Dario Rodriguez· Jun 5, 2010, 21:59 UTC · re: Jakub Narebski · lore

Re: Installing on AIX fails

On Sat, Jun 5, 2010 at 8:44 AM, Jakub Narebski <jnareb@gmail.com> wrote:
Show 25 quoted lines
> Tor Arntsen <tor@spacetec.no> writes:
>> On Fri, Jun 4, 2010 at 16:22, Dario Rodriguez <soft.d4rio@gmail.com> wrote:
>
>> > I'ill try compiling 'install' (i don't know where the sources are)
>>
>> It's in 'coreutils' these days, but that package includes a lot of stuff.
>>
>> Maybe you could get away with just using the script-version of install
>> which comes with coreutils itself (because it'll need an install tool
>> to use before 'install' itself is installed..).
>>
>> I'm attaching a copy. To use it it should be sufficient to use
>> INSTALL=path-to/install-sh make install
>> or something like that.
>
> I wonder if it would be better to simply include fallback portable
> install-sh in git sources.
>
> BTW. shouldn't we define and use INSTALL_D in Makefile?
>
> --
> Jakub Narebski
> Poland
> ShadeHawk on #git
>

I think so about the install-sh, but about the Makefiles I wonder if it's not better to reuse current INSTALL, maybe if install-sh is used, then there is no need for using other 'install' program, excepting the case in wich the user sets INSTALL commandline.

Blessing, Dario

Jakub Narebski· Jun 6, 2010, 22:26 UTC · re: Dario Rodriguez · lore

Re: Installing on AIX fails

On Sat, 5 Jun 2010, Dario Rodriguez wrote:
Show 20 quoted lines
> On Sat, Jun 5, 2010 at 8:44 AM, Jakub Narebski <jnareb@gmail.com> wrote:
>> Tor Arntsen <tor@spacetec.no> writes:
>>>
>>> Maybe you could get away with just using the script-version of install
>>> which comes with coreutils itself (because it'll need an install tool
>>> to use before 'install' itself is installed..).
>>>
>>> I'm attaching a copy. To use it it should be sufficient to use
>>> INSTALL=path-to/install-sh make install
>>> or something like that.
>>
>> I wonder if it would be better to simply include fallback portable
>> install-sh in git sources.
>>
>> BTW. shouldn't we define and use INSTALL_D in Makefile?
> 
> I think so about the install-sh, but about the Makefiles I wonder if
> it's not better to reuse current INSTALL, maybe if install-sh is used,
> then there is no need for using other 'install' program, excepting the
> case in wich the user sets INSTALL commandline.
Well, if there were install-sh script in git sources, we could uncomment
  #AC_PROG_INSTALL          # needs install-sh or install.sh in sources

line in configure.ac, then ./configure would automatically detect and select 'install' program or script to use. The autoconf documentation (autoconf.info) says:

  This macro screens out various instances of `install' known not to
  work.  It prefers to find a C program rather than a shell script,
  for speed. [...]
  Autoconf comes with a copy of `install-sh' that you can use.  If
  you use `AC_PROG_INSTALL', you must include either `install-sh' or
  `install.sh' in your distribution, or `configure' will produce an
  error message saying it can't find them--even if the system you're
  on has a good `install' program.  This check is a safety measure
  to prevent you from accidentally leaving that file out, which
  would prevent your package from installing on systems that don't
  have a BSD-compatible `install' program.

So I guess we should also prefer install program for speed, even if we do not use ./configure script.

-- 
Jakub Narębski
Poland
Ævar Arnfjörð Bjarmason· Jun 6, 2010, 22:29 UTC · re: Jakub Narebski · lore

Re: Installing on AIX fails

On Sun, Jun 6, 2010 at 22:26, Jakub Narebski <jnareb@gmail.com> wrote:
> So I guess we should also prefer install program for speed, even if we
> do not use ./configure script.

Is the time it takes to run install, whether it's a shell script or C program, really an issue?

Ævar Arnfjörð Bjarmason· Jun 3, 2010, 20:21 UTC · lore

Re: Installing on AIX fails

On Thu, Jun 3, 2010 at 20:01, Dario Rodriguez <soft.d4rio@gmail.com> wrote:
Show 15 quoted lines
> On Thu, Jun 3, 2010 at 12:41 PM, Ævar Arnfjörð Bjarmason
> <avarab@gmail.com> wrote:
>> On Thu, Jun 3, 2010 at 15:32, Dario Rodriguez <soft.d4rio@gmail.com> wrote:
>>> and it all works, with angels singing and everything... a testing repo
>>> works fine for a test drive without installing, excepting 'git log'
>>> that just don't display anything.
>>
>> How about PAGER=/bin/cat git log? If that works what's your pager, and
>> do other git commands that use the pager (like git show) work or fail?
>>
>
> PAGER is not set by default as I see, but... isn't there any default
> pager for git in case of PAGER being unset?
>
> Using /bin/cat or /bin/more it works (either 'log' or 'show')

What do you mean by "disappears" anyway, was it like $(echo|less), or did it just return with no output? What was the exit code?

In any case, running git's make test might reveal other problems on AIX worth fixing. Maybe do that and post the results?

Show 30 quoted lines
>>> $ /usr/linux/bin/make prefix=$HOME/apps/ NO_OPENSSL=1 NO_TCLTK=1
>>> NO_EXPAT=1 PYTHON_PATH=/usr/local/bin/python install
>>>
>>> [...]
>>> install -d -m 755 '/myhomedir/apps/bin'
>>> getopt: illegal option -- d
>>> Usage: install [-c dira] [-f dirb] [-i] [-m] [-M mode] [-O owner]
>>>               [-G group] [-S] [-n dirc] [-o] [-s] file [dirx ...]
>>> make: *** [install] Error 2
>>>
>>> Now the installing process fails because of the AIX 'install' tool and
>>> I wonder, can I patch/configure the installing process for AIX? May be
>>> a set of utils for building in such systems would help some people.
>>
>> Does AIX's install have something equivalent to GNU install's -d? The
>> -c and -f options look likely from that synopsis.
>>
>
> I don't know since I just use this system for development and testing
> (I'm debian user), but let me post the manpage info, for -c and -f:
>
> -c DirectoryA Installs a new command file in the DirectoryA variable only if
> that file does not already exist there. If it finds a copy of File there, it
> issues a message and exits without overwriting the file. This flag can be used
> alone or with the -s, -M, -O, -G, or -S flag.
>
> -f DirectoryB Forces installation of File in DirectoryB whether or not File
> already exists. If the file being installed does not already exist, the command
> sets the permission code and owner of the new file to 755 and bin, respectively.
> This flag can be used alone or with the -o,-s, -M, -O, -G, or -S flag.

Looks like there's no equivalent to -d. FWIW perl uses a installperl script that also works on AIX. Maybe a similar fallback or default would make sense for Git.

Show 21 quoted lines
>>> PD2: I don't know if AIX python path is always /usr/local/bin/python,
>>> but I've seen that git Makefiles set /usr/local/bin/python for FreeBSD
>>> only:
>>>
>>> git_remote_helpers/Makefile:
>>> ifndef PYTHON_PATH
>>>        ifeq ($(uname_S),FreeBSD)
>>>                PYTHON_PATH = /usr/local/bin/python
>>>        else
>>>                PYTHON_PATH = /usr/bin/python
>>>        endif
>>> endif
>>
>> That's presumably because Python is most likely installed via the
>> ports system on FreeBSD which drops it in /usr/local. How did you
>> install Python on AIX? Is it from some IBM package or another method
>> that's the most common & standard way to do it on AIX?.
>>
>
> Again, I don't know since I'm not the sysadmin. I just looked for
> python and found it's in /usr/local/bin
Does using /usr/bin/env python instead work?
    $ cat /tmp/py.py
    #!/usr/bin/env python
    print "hello"
    $ /tmp/py.py
    hello
Dario Rodriguez· Jun 3, 2010, 21:22 UTC · re: Ævar Arnfjörð Bjarmason · lore

Re: Installing on AIX fails

On Thu, Jun 3, 2010 at 5:21 PM, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:

Show 20 quoted lines
> On Thu, Jun 3, 2010 at 20:01, Dario Rodriguez <soft.d4rio@gmail.com> wrote:
>> On Thu, Jun 3, 2010 at 12:41 PM, Ævar Arnfjörð Bjarmason
>> <avarab@gmail.com> wrote:
>>> On Thu, Jun 3, 2010 at 15:32, Dario Rodriguez <soft.d4rio@gmail.com> wrote:
>>>> and it all works, with angels singing and everything... a testing repo
>>>> works fine for a test drive without installing, excepting 'git log'
>>>> that just don't display anything.
>>>
>>> How about PAGER=/bin/cat git log? If that works what's your pager, and
>>> do other git commands that use the pager (like git show) work or fail?
>>>
>>
>> PAGER is not set by default as I see, but... isn't there any default
>> pager for git in case of PAGER being unset?
>>
>> Using /bin/cat or /bin/more it works (either 'log' or 'show')
>
> What do you mean by "disappears" anyway, was it like $(echo|less), or
> did it just return with no output? What was the exit code?
>

'dissapears'? I will paste my output as is, there are 2 commits, but 'git log' simply don't show them if $PAGER is not present:

$ ../git log
$ echo $?
0
$ PAGER=/bin/cat ../git log
commit 3274a12f940680612e3bfd3d022a0eab460c0f1f
Author: usuario tuxedo ####### <tx#####@MachineName.(none)>
Date:   Thu Jun 3 20:02:23 2010 +0200
    OtherCom
commit acf110f7c878a37e4a5af8499134df28da0e8ab3
Author: usuario tuxedo ####### <tx#####@MachineName.(none)>
Date:   Thu Jun 3 20:01:37 2010 +0200
    inicial
> In any case, running git's make test might reveal other problems on
> AIX worth fixing. Maybe do that and post the results?
>

The make test execution output is fairly long... do I post it all, or attach MIME? However I'm leaving here and I cannot access the server until tomorrow...

Show 35 quoted lines
>>>> $ /usr/linux/bin/make prefix=$HOME/apps/ NO_OPENSSL=1 NO_TCLTK=1
>>>> NO_EXPAT=1 PYTHON_PATH=/usr/local/bin/python install
>>>>
>>>> [...]
>>>> install -d -m 755 '/myhomedir/apps/bin'
>>>> getopt: illegal option -- d
>>>> Usage: install [-c dira] [-f dirb] [-i] [-m] [-M mode] [-O owner]
>>>>               [-G group] [-S] [-n dirc] [-o] [-s] file [dirx ...]
>>>> make: *** [install] Error 2
>>>>
>>>> Now the installing process fails because of the AIX 'install' tool and
>>>> I wonder, can I patch/configure the installing process for AIX? May be
>>>> a set of utils for building in such systems would help some people.
>>>
>>> Does AIX's install have something equivalent to GNU install's -d? The
>>> -c and -f options look likely from that synopsis.
>>>
>>
>> I don't know since I just use this system for development and testing
>> (I'm debian user), but let me post the manpage info, for -c and -f:
>>
>> -c DirectoryA Installs a new command file in the DirectoryA variable only if
>> that file does not already exist there. If it finds a copy of File there, it
>> issues a message and exits without overwriting the file. This flag can be used
>> alone or with the -s, -M, -O, -G, or -S flag.
>>
>> -f DirectoryB Forces installation of File in DirectoryB whether or not File
>> already exists. If the file being installed does not already exist, the command
>> sets the permission code and owner of the new file to 755 and bin, respectively.
>> This flag can be used alone or with the -o,-s, -M, -O, -G, or -S flag.
>
> Looks like there's no equivalent to -d. FWIW perl uses a installperl
> script that also works on AIX. Maybe a similar fallback or default
> would make sense for Git.
>

Yes, I installed 'top' on other AIX machine today, and it uses it's own install script too... may be it's the best way for systems having a poor 'install' tool.

Show 30 quoted lines
>>>> PD2: I don't know if AIX python path is always /usr/local/bin/python,
>>>> but I've seen that git Makefiles set /usr/local/bin/python for FreeBSD
>>>> only:
>>>>
>>>> git_remote_helpers/Makefile:
>>>> ifndef PYTHON_PATH
>>>>        ifeq ($(uname_S),FreeBSD)
>>>>                PYTHON_PATH = /usr/local/bin/python
>>>>        else
>>>>                PYTHON_PATH = /usr/bin/python
>>>>        endif
>>>> endif
>>>
>>> That's presumably because Python is most likely installed via the
>>> ports system on FreeBSD which drops it in /usr/local. How did you
>>> install Python on AIX? Is it from some IBM package or another method
>>> that's the most common & standard way to do it on AIX?.
>>>
>>
>> Again, I don't know since I'm not the sysadmin. I just looked for
>> python and found it's in /usr/local/bin
>
> Does using /usr/bin/env python instead work?
>
>    $ cat /tmp/py.py
>    #!/usr/bin/env python
>    print "hello"
>    $ /tmp/py.py
>    hello
>
Yes, it works... at least the executable is found :P

$ cat temp.py #!/usr/bin/env python print "hello"

$ ./temp.py Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] hello

Cheers, Dario

Ævar Arnfjörð Bjarmason· Jun 4, 2010, 14:28 UTC · re: Dario Rodriguez · lore

Re: Installing on AIX fails

On Thu, Jun 3, 2010 at 21:22, Dario Rodriguez <soft.d4rio@gmail.com> wrote:
Show 23 quoted lines
> On Thu, Jun 3, 2010 at 5:21 PM, Ævar Arnfjörð Bjarmason
>> What do you mean by "disappears" anyway, was it like $(echo|less), or
>> did it just return with no output? What was the exit code?
>>
>
> 'dissapears'? I will paste my output as is, there are 2 commits, but
> 'git log' simply don't show them if $PAGER is not present:
>
> $ ../git log
> $ echo $?
> 0
> $ PAGER=/bin/cat ../git log
> commit 3274a12f940680612e3bfd3d022a0eab460c0f1f
> Author: usuario tuxedo ####### <tx#####@MachineName.(none)>
> Date:   Thu Jun 3 20:02:23 2010 +0200
>
>    OtherCom
>
> commit acf110f7c878a37e4a5af8499134df28da0e8ab3
> Author: usuario tuxedo ####### <tx#####@MachineName.(none)>
> Date:   Thu Jun 3 20:01:37 2010 +0200
>
>    inicial
That's interesting.
Show 7 quoted lines
>> In any case, running git's make test might reveal other problems on
>> AIX worth fixing. Maybe do that and post the results?
>>
>
> The make test execution output is fairly long... do I post it all, or
> attach MIME? However I'm leaving here and I cannot access the server
> until tomorrow...

The best thing would be to post cd t && ./$some_test -d -v for all tests that fail, I guess.

Show 81 quoted lines
>>>>> $ /usr/linux/bin/make prefix=$HOME/apps/ NO_OPENSSL=1 NO_TCLTK=1
>>>>> NO_EXPAT=1 PYTHON_PATH=/usr/local/bin/python install
>>>>>
>>>>> [...]
>>>>> install -d -m 755 '/myhomedir/apps/bin'
>>>>> getopt: illegal option -- d
>>>>> Usage: install [-c dira] [-f dirb] [-i] [-m] [-M mode] [-O owner]
>>>>>               [-G group] [-S] [-n dirc] [-o] [-s] file [dirx ...]
>>>>> make: *** [install] Error 2
>>>>>
>>>>> Now the installing process fails because of the AIX 'install' tool and
>>>>> I wonder, can I patch/configure the installing process for AIX? May be
>>>>> a set of utils for building in such systems would help some people.
>>>>
>>>> Does AIX's install have something equivalent to GNU install's -d? The
>>>> -c and -f options look likely from that synopsis.
>>>>
>>>
>>> I don't know since I just use this system for development and testing
>>> (I'm debian user), but let me post the manpage info, for -c and -f:
>>>
>>> -c DirectoryA Installs a new command file in the DirectoryA variable only if
>>> that file does not already exist there. If it finds a copy of File there, it
>>> issues a message and exits without overwriting the file. This flag can be used
>>> alone or with the -s, -M, -O, -G, or -S flag.
>>>
>>> -f DirectoryB Forces installation of File in DirectoryB whether or not File
>>> already exists. If the file being installed does not already exist, the command
>>> sets the permission code and owner of the new file to 755 and bin, respectively.
>>> This flag can be used alone or with the -o,-s, -M, -O, -G, or -S flag.
>>
>> Looks like there's no equivalent to -d. FWIW perl uses a installperl
>> script that also works on AIX. Maybe a similar fallback or default
>> would make sense for Git.
>>
>
> Yes, I installed 'top' on other AIX machine today, and it uses it's
> own install script too... may be it's the best way for systems having
> a poor 'install' tool.
>
>>>>> PD2: I don't know if AIX python path is always /usr/local/bin/python,
>>>>> but I've seen that git Makefiles set /usr/local/bin/python for FreeBSD
>>>>> only:
>>>>>
>>>>> git_remote_helpers/Makefile:
>>>>> ifndef PYTHON_PATH
>>>>>        ifeq ($(uname_S),FreeBSD)
>>>>>                PYTHON_PATH = /usr/local/bin/python
>>>>>        else
>>>>>                PYTHON_PATH = /usr/bin/python
>>>>>        endif
>>>>> endif
>>>>
>>>> That's presumably because Python is most likely installed via the
>>>> ports system on FreeBSD which drops it in /usr/local. How did you
>>>> install Python on AIX? Is it from some IBM package or another method
>>>> that's the most common & standard way to do it on AIX?.
>>>>
>>>
>>> Again, I don't know since I'm not the sysadmin. I just looked for
>>> python and found it's in /usr/local/bin
>>
>> Does using /usr/bin/env python instead work?
>>
>>    $ cat /tmp/py.py
>>    #!/usr/bin/env python
>>    print "hello"
>>    $ /tmp/py.py
>>    hello
>>
>
> Yes, it works... at least the executable is found :P
>
> $ cat temp.py
> #!/usr/bin/env python
> print "hello"
>
> $ ./temp.py
> Could not find platform dependent libraries <exec_prefix>
> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
> hello

That's one reason why I think we should just use /usr/bin/env for perl/python instead of hardcoding it to /usr/bin/{perl,python}. It's more likely to work on systems like AIX.

Dario Rodriguez· Jun 4, 2010, 15:07 UTC · re: Ævar Arnfjörð Bjarmason · lore

Re: Installing on AIX fails

On Fri, Jun 4, 2010 at 11:28 AM, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:

Show 27 quoted lines
> On Thu, Jun 3, 2010 at 21:22, Dario Rodriguez <soft.d4rio@gmail.com> wrote:
>> On Thu, Jun 3, 2010 at 5:21 PM, Ævar Arnfjörð Bjarmason
>>> What do you mean by "disappears" anyway, was it like $(echo|less), or
>>> did it just return with no output? What was the exit code?
>>>
>>
>> 'dissapears'? I will paste my output as is, there are 2 commits, but
>> 'git log' simply don't show them if $PAGER is not present:
>>
>> $ ../git log
>> $ echo $?
>> 0
>> $ PAGER=/bin/cat ../git log
>> commit 3274a12f940680612e3bfd3d022a0eab460c0f1f
>> Author: usuario tuxedo ####### <tx#####@MachineName.(none)>
>> Date:   Thu Jun 3 20:02:23 2010 +0200
>>
>>    OtherCom
>>
>> commit acf110f7c878a37e4a5af8499134df28da0e8ab3
>> Author: usuario tuxedo ####### <tx#####@MachineName.(none)>
>> Date:   Thu Jun 3 20:01:37 2010 +0200
>>
>>    inicial
>
> That's interesting.
>
Yes, I will check it better today at home.
Show 97 quoted lines
>>> In any case, running git's make test might reveal other problems on
>>> AIX worth fixing. Maybe do that and post the results?
>>>
>>
>> The make test execution output is fairly long... do I post it all, or
>> attach MIME? However I'm leaving here and I cannot access the server
>> until tomorrow...
>
> The best thing would be to post cd t && ./$some_test -d -v for all
> tests that fail, I guess.
>
>>>>>> $ /usr/linux/bin/make prefix=$HOME/apps/ NO_OPENSSL=1 NO_TCLTK=1
>>>>>> NO_EXPAT=1 PYTHON_PATH=/usr/local/bin/python install
>>>>>>
>>>>>> [...]
>>>>>> install -d -m 755 '/myhomedir/apps/bin'
>>>>>> getopt: illegal option -- d
>>>>>> Usage: install [-c dira] [-f dirb] [-i] [-m] [-M mode] [-O owner]
>>>>>>               [-G group] [-S] [-n dirc] [-o] [-s] file [dirx ...]
>>>>>> make: *** [install] Error 2
>>>>>>
>>>>>> Now the installing process fails because of the AIX 'install' tool and
>>>>>> I wonder, can I patch/configure the installing process for AIX? May be
>>>>>> a set of utils for building in such systems would help some people.
>>>>>
>>>>> Does AIX's install have something equivalent to GNU install's -d? The
>>>>> -c and -f options look likely from that synopsis.
>>>>>
>>>>
>>>> I don't know since I just use this system for development and testing
>>>> (I'm debian user), but let me post the manpage info, for -c and -f:
>>>>
>>>> -c DirectoryA Installs a new command file in the DirectoryA variable only if
>>>> that file does not already exist there. If it finds a copy of File there, it
>>>> issues a message and exits without overwriting the file. This flag can be used
>>>> alone or with the -s, -M, -O, -G, or -S flag.
>>>>
>>>> -f DirectoryB Forces installation of File in DirectoryB whether or not File
>>>> already exists. If the file being installed does not already exist, the command
>>>> sets the permission code and owner of the new file to 755 and bin, respectively.
>>>> This flag can be used alone or with the -o,-s, -M, -O, -G, or -S flag.
>>>
>>> Looks like there's no equivalent to -d. FWIW perl uses a installperl
>>> script that also works on AIX. Maybe a similar fallback or default
>>> would make sense for Git.
>>>
>>
>> Yes, I installed 'top' on other AIX machine today, and it uses it's
>> own install script too... may be it's the best way for systems having
>> a poor 'install' tool.
>>
>>>>>> PD2: I don't know if AIX python path is always /usr/local/bin/python,
>>>>>> but I've seen that git Makefiles set /usr/local/bin/python for FreeBSD
>>>>>> only:
>>>>>>
>>>>>> git_remote_helpers/Makefile:
>>>>>> ifndef PYTHON_PATH
>>>>>>        ifeq ($(uname_S),FreeBSD)
>>>>>>                PYTHON_PATH = /usr/local/bin/python
>>>>>>        else
>>>>>>                PYTHON_PATH = /usr/bin/python
>>>>>>        endif
>>>>>> endif
>>>>>
>>>>> That's presumably because Python is most likely installed via the
>>>>> ports system on FreeBSD which drops it in /usr/local. How did you
>>>>> install Python on AIX? Is it from some IBM package or another method
>>>>> that's the most common & standard way to do it on AIX?.
>>>>>
>>>>
>>>> Again, I don't know since I'm not the sysadmin. I just looked for
>>>> python and found it's in /usr/local/bin
>>>
>>> Does using /usr/bin/env python instead work?
>>>
>>>    $ cat /tmp/py.py
>>>    #!/usr/bin/env python
>>>    print "hello"
>>>    $ /tmp/py.py
>>>    hello
>>>
>>
>> Yes, it works... at least the executable is found :P
>>
>> $ cat temp.py
>> #!/usr/bin/env python
>> print "hello"
>>
>> $ ./temp.py
>> Could not find platform dependent libraries <exec_prefix>
>> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
>> hello
>
> That's one reason why I think we should just use /usr/bin/env for
> perl/python instead of hardcoding it to /usr/bin/{perl,python}. It's
> more likely to work on systems like AIX.
>

I agree... it's off topic, but something like this is what I say with 'test' for python, and I think those 2 are the only files impacted:

From e89f18c29c171207002d4718ea4b9d08c7efe1d7 Mon Sep 17 00:00:00 2001
From: Dario Rodriguez <soft.d4rio@gmail.com>
Date: Fri, 4 Jun 2010 00:28:56 -0300
Subject: [PATCH] Now Makefiles check for Python executable
Check for python executable instead of predicting based on the system
---
 Makefile                    |    9 +++++++--
 git_remote_helpers/Makefile |   12 +++++++-----
 2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
index d5d6565..29cf8ff 100644
--- a/Makefile
+++ b/Makefile
@@ -449,7 +449,13 @@ ifndef PERL_PATH
 	PERL_PATH = /usr/bin/perl
 endif
 ifndef PYTHON_PATH
-	PYTHON_PATH = /usr/bin/python
+    ifeq ($(shell test -x /usr/bin/python && echo y), y)
+        PYTHON_PATH = /usr/bin/python
+    else
+        ifeq ($(shell test -x /usr/local/bin/python && echo y), y)
+            PYTHON_PATH = /usr/local/bin/python
+        endif
+    endif
 endif

 export PERL_PATH
@@ -875,7 +881,6 @@ ifeq ($(uname_S),FreeBSD)
 		NO_UINTMAX_T = YesPlease
 		NO_STRTOUMAX = YesPlease
 	endif
-	PYTHON_PATH = /usr/local/bin/python
 	HAVE_PATHS_H = YesPlease
 endif
 ifeq ($(uname_S),OpenBSD)
diff --git a/git_remote_helpers/Makefile b/git_remote_helpers/Makefile
index 74b05dc..8b5f50c 100644
--- a/git_remote_helpers/Makefile
+++ b/git_remote_helpers/Makefile
@@ -7,11 +7,13 @@ pysetupfile:=setup.py
 DESTDIR_SQ = $(subst ','\'',$(DESTDIR))

 ifndef PYTHON_PATH
-	ifeq ($(uname_S),FreeBSD)
-		PYTHON_PATH = /usr/local/bin/python
-	else
-		PYTHON_PATH = /usr/bin/python
-	endif
+    ifeq ($(shell test -x /usr/bin/python && echo y), y)
+        PYTHON_PATH = /usr/bin/python
+    else
+        ifeq ($(shell test -x /usr/local/bin/python && echo y), y)
+            PYTHON_PATH = /usr/local/bin/python
+        endif
+    endif
 endif
 ifndef prefix
 	prefix = $(HOME)
-- 
1.7.1


Then, the path is checked if ever it's empty (after this stuff), but
the case is that no matter the system, '/usr/bin' and '/usr/local/bin'
are the most common places... I think it's totally sane the needing of
PYTHON_PATH if it's not in those commonly used dirs.

← back to recent threads