Author Topic: Why Zgcc.sh Doesn't Append Path ?  (Read 4113 times)

Blaise

  • Newbie
  • *
  • Posts: 37
    • View Profile
    • http://
Why Zgcc.sh Doesn't Append Path ?
« on: March 26, 2005, 01:30:44 am »
In order to setup zgcc, there is a script to run called zgcc.sh that appends some pathes and makes some links. When I run it (./zgcc.sh) the pathes aren't appened but the links are made. How come ?
I copied this file elsewhere and appened at the begining of the file this line :
#!/bin/sh
But it doesn't work either.

The only way I have found to have a nice zgcc setup is to type all the zgcc.sh file in a console, which takes quite a long time on the Z keyboard (!!!).

Anyone knows how I could run this file (OZ-3.5.2, OPIE-1.2, I think sh is runing and not bash). ?
Tks
This is the original zgcc.sh file delivered by ZGCC :

export GCC_EXEC_PREFIX=/mnt/card/.zgcc/lib/gcc-lib/arm-linux/2.95.2/
export COMPILER_PATH=/mnt/card/.zgcc/bin:/mnt/card/.zgcc/lib/gcc-lib/arm-linux/2.95.2/
export CPATH=/mnt/card/.include/
export LIBRARY_PATH=/mnt/card/.zgcc/lib/:/mnt/card/.zgcc/lib/gcc-lib/arm-linux/2.95.2/:/lib/:/home/QtPalmtop/lib/
export CPLUS_INCLUDE_PATH=/mnt/card/.include/g++-3/
PATH=/mnt/card/.zgcc/bin:$PATH
export PATH
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/card/.zgcc/lib
export LD_LIBRARY_PATH
TMAKEPATH="/mnt/card/.zgcc/tmake/lib/sharp-onboard/"
export TMAKEPATH
ln -sf /lib/libc.so.6 /usr/lib/libc.so
ln -sf /lib/libm.so.6 /usr/lib/libm.so
ln -sf /mnt/card/.zgcc/bin/libstdc++-3-libc6.1-2-2.10.0.so /home/QtPalmtop/lib/libstdc++-libc6.2-2.so.3

jfox

  • Newbie
  • *
  • Posts: 13
    • View Profile
    • http://FoxFrenchTranslations.com/zaurus
Why Zgcc.sh Doesn't Append Path ?
« Reply #1 on: July 01, 2005, 02:11:06 am »
Quote
In order to setup zgcc, there is a script to run called zgcc.sh that appends some pathes and makes some links. When I run it (./zgcc.sh) the pathes aren't appened but the links are made. How come ?
I copied this file elsewhere and appened at the begining of the file this line :
#!/bin/sh
But it doesn't work either.

The only way I have found to have a nice zgcc setup is to type all the zgcc.sh file in a console, which takes quite a long time on the Z keyboard (!!!).

Anyone knows how I could run this file (OZ-3.5.2, OPIE-1.2, I think sh is runing and not bash). ?
Tks
This is the original zgcc.sh file delivered by ZGCC :

export GCC_EXEC_PREFIX=/mnt/card/.zgcc/lib/gcc-lib/arm-linux/2.95.2/
export COMPILER_PATH=/mnt/card/.zgcc/bin:/mnt/card/.zgcc/lib/gcc-lib/arm-linux/2.95.2/
export CPATH=/mnt/card/.include/
export LIBRARY_PATH=/mnt/card/.zgcc/lib/:/mnt/card/.zgcc/lib/gcc-lib/arm-linux/2.95.2/:/lib/:/home/QtPalmtop/lib/
export CPLUS_INCLUDE_PATH=/mnt/card/.include/g++-3/
PATH=/mnt/card/.zgcc/bin:$PATH
export PATH
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/card/.zgcc/lib
export LD_LIBRARY_PATH
TMAKEPATH="/mnt/card/.zgcc/tmake/lib/sharp-onboard/"
export TMAKEPATH
ln -sf /lib/libc.so.6 /usr/lib/libc.so
ln -sf /lib/libm.so.6 /usr/lib/libm.so
ln -sf /mnt/card/.zgcc/bin/libstdc++-3-libc6.1-2-2.10.0.so /home/QtPalmtop/lib/libstdc++-libc6.2-2.so.3
[div align=\"right\"][a href=\"index.php?act=findpost&pid=72338\"][{POST_SNAPBACK}][/a][/div]


You are not running zgcc.sh correctly. You must execute it via:

whateverprompt> . zgcc.sh

Note the dot -- this changes the environment of the shell you are using. The way you are executing zgcc.sh, via "./zgcc.sh" or "bash zgcc.sh" or #! /bin/bash or whatever only changes a spawned environment that is then discarded. I put ". /mnt/card/bin/zgcc.sh" in my ~/.bashrc file which is in turn executed from my ~/.profile

Of course, if you type everything in from the console, you are not changing environments and the changes stay with you.

I should have made this more clear in my docs. This is a Unix subtlety that is never well explained.

Jeffrey Fox