axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] Re: GCL on an AMD64 Linux system?


From: M. Edward (Ed) Borasky
Subject: Re: [Axiom-developer] Re: GCL on an AMD64 Linux system?
Date: Sat, 15 Sep 2007 22:40:10 -0700
User-agent: Thunderbird 2.0.0.6 (X11/20070905)

M. Edward (Ed) Borasky wrote:
> root wrote:
>> root wrote:
>>>>> Ah -- I'll try that. Meanwhile, the Axiom build with gcl-2.6.7 completed
>>>>> fine on the AMD64, so I guess 2.6.8pre2 is broken. One minor hitch:
>>>>> apparently when you do a "make install", it's not doing a "mkdir -p":
>>>>>
>>>>> address@hidden /home/axiom/silver $ sudo make install
>>>>> 78 installing Axiom in /usr/local/axiom
>>>>> /bin/sh: /usr/local/axiom/mnt//bin/axiom: No such file or directory
>>>>> make: *** [install] Error 1
>>>>>
>>>>> This is easy to work around, though:
>>>>>
>>>>> address@hidden /home/axiom/silver $ sudo mkdir -p
>>>>> /usr/local/axiom/mnt//bin
>>>>> address@hidden /home/axiom/silver $ sudo make install
>>>>> 78 installing Axiom in /usr/local/axiom
>>>>> 79 Axiom installation finished.
>>>> The first line of the install stanza reads:
>>>>   @mkdir -p ${DESTDIR}
>>>> so I'm not sure what might have failed.
>>>>
>>>> Note that your DESTDIR appears to have two // 
>>>> although my test here shows that this works and does the right thing.
>>>>
>>>> Can you post your command line?
>>>>
>>>> Tim
>>>>
>>> Let me do some digging ... but ...
>>>
>>> 1. The // was copied and pasted. The "sudo make install" (first time)
>>> responded with
>>>
>>> /bin/sh: /usr/local/axiom/mnt//bin/axiom: No such file or directory
>>>
>>> Note the double slashes.
>>>
>>> 2. Yes, in most cases a double slash "does the right thing", meaning it
>>> behaves like a single slash. I don't even know if it's deprecated. I
>>> don't do it deliberately, and when I spot one accidental, I fix it.
>>>
>>> 3. In the top level Makefile:
>>>
>>> DESTDIR=/usr/local/axiom
>>>
>>>
>>> So ... mkdir -p /usr/local/axiom
>>>
>>> Here's the "install" code:
>>>
>>> install:
>>>  @echo 78 installing Axiom in ${DESTDIR}
>>>  @mkdir -p ${DESTDIR}
>>>  @cp -pr ${MNT} ${DESTDIR}
>>>  @echo '#!/bin/sh -' >${COMMAND}
>>>  @echo AXIOM=${DESTDIR}/mnt/${SYS} >>${COMMAND}
>>>  @echo export AXIOM >>${COMMAND}
>>>  @echo PATH='$${AXIOM}/bin':'$${PATH}' >>${COMMAND}
>>>  @echo export PATH >>${COMMAND}
>>>  @cat ${INT}/sman/axiom >>${COMMAND}
>>>  @chmod +x ${COMMAND}
>>>  @echo 79 Axiom installation finished.
>>>  @echo
>>>  @echo Please add $(shell dirname ${COMMAND}) to your PATH variable
>>>  @echo Start Axiom with the command $(shell basename ${COMMAND})
>>>  @echo
>>>
>>> So ... it did the "mkdir -p". It must have crashed somewhere below that.
>>>
>>> So ... I removed the installed Axiom and did the "sudo make install"
>>> over. It did the "mkdir -p" and the "cp -pr" -- I can see the outputs in
>>> /usr/local/axiom. The next line starts building the file COMMAND.
>>>
>>> So what's COMMAND?
>>>
>>> COMMAND=${DESTDIR}/mnt/${SYS}/bin/axiom
>>>
>>> Somehow ${SYS}, which should be "linux", got erased? That's where the
>>> double slashes came from.
>>>
>>> Edit the Makefile:
>>> #SYS=$(notdir $(AXIOM))
>>> SYS=linux
>>>
>>> Success!!
>>> address@hidden /home/axiom/silver $ sudo make install
>>> 78 installing Axiom in /usr/local/axiom
>>> 79 Axiom installation finished.
>>>
>>> Please add /usr/local/axiom/mnt/linux/bin to your PATH variable
>>> Start Axiom with the command axiom
>>>
>>> So ... what does all that say?
>>>
>> The build echos all of the known variables that get passed in the
>> ENV environment. One of those variables should be SYS.
>>
>> The SYS variable is the last symbol of the AXIOM shell variable as in:
>>
>>   export AXIOM=`pwd`/mnt/linux
>>
>>    ==>
>>
>>   SYS=linux
>>
>> so potentially you did a 'make' in a shell that had the AXIOM variable set
>> and then did 'make install' in a new shell without the AXIOM variable set.
>>
>> The sudo almost certainly did not copy your AXIOM shell variable.
>>
>> I'll have to give this some thought.
>>
>> Tim
>>
> That should be easy to test, though -- do the whole build as root and
> all the environment variables will be set all the way through. It won't
> take me long to check it -- it's less than an hour on an Athlon64 X2
> 5200+ :).
> 
> 
> _______________________________________________
> Axiom-developer mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/axiom-developer
> 

So ... log in as "root", set the environment variables, remove the
install, do another "make install":
DreamScape ~ # cd /home/axiom/silver/
DreamScape silver # rm -fr /usr/local/axiom/
DreamScape silver # export AXIOM=/home/axiom/silver/mnt/linux
DreamScape silver # export PATH=$AXIOM/bin:$PATH
DreamScape silver # make install
78 installing Axiom in /usr/local/axiom
79 Axiom installation finished.

Please add /usr/local/axiom/mnt/linux/bin to your PATH variable
Start Axiom with the command axiom

So that works ... worst case is you have to do the whole build as "root"
or reset the environment variables between a non-root make and a root
make install.

But sudo needs another excuse for not knowing ${SYS} = linux:

address@hidden /home/axiom/silver $ sudo rm -fr /usr/local/axiom/
address@hidden /home/axiom/silver $ export
AXIOM=/home/axiom/silver/mnt/linux
address@hidden /home/axiom/silver $ export PATH=$AXIOM/bin:$PATH
address@hidden /home/axiom/silver $ sudo echo $AXIOM
/home/axiom/silver/mnt/linux
address@hidden /home/axiom/silver $ sudo echo $PATH
/home/axiom/silver/mnt/linux/bin:/home/axiom/silver/mnt/linux/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/axiom/mnt/linux/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.2.0:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/kde/3.5/bin:/usr/qt/3/bin
address@hidden /home/axiom/silver $ sudo make install
78 installing Axiom in /usr/local/axiom
/bin/sh: /usr/local/axiom/mnt//bin/axiom: No such file or directory
make: *** [install] Error 1

It's seeing AXIOM and PATH as exported, which is the way I believe it's
supposed to behave.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]