git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Installing on AIX fails

From
Dario Rodriguez <soft.d4rio@gmail.com>
Date
Jun 4, 2010, 15:07 UTC
Message-ID
<AANLkTilC1AKp2meQNlU8yeISV3qbzTDrQ2B4CbooRDZT@mail.gmail.com>
In-Reply-To
<AANLkTikdfXz7lk41czdRZKnnB3xpLFannCaUzSk7tL2_@mail.gmail.com>

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.
Previous: Ævar Arnfjörð Bjarmason
Message 18 of 18 in “Installing on AIX fails”
  1. Dario RodriguezJun 3, 2010
  2. Ævar Arnfjörð BjarmasonJun 3, 2010
  3. Michael J GruberJun 3, 2010
  4. Tor ArntsenJun 4, 2010
  5. Tor ArntsenJun 4, 2010
  6. Dario RodriguezJun 4, 2010
  7. Tor ArntsenJun 4, 2010
  8. Dario RodriguezJun 4, 2010
  9. Ævar Arnfjörð BjarmasonJun 4, 2010
  10. Dario RodriguezJun 4, 2010
  11. Jakub NarebskiJun 5, 2010
  12. Dario RodriguezJun 5, 2010
  13. Jakub NarebskiJun 6, 2010
  14. Ævar Arnfjörð BjarmasonJun 6, 2010
  15. Ævar Arnfjörð BjarmasonJun 3, 2010
  16. Dario RodriguezJun 3, 2010
  17. Ævar Arnfjörð BjarmasonJun 4, 2010
  18. Dario RodriguezJun 4, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.