Help - Search - Members - Calendar
Full Version: Why Zgcc.sh Doesn't Append Path ?
OESF Forums > Distros, Development, and Model Specific Forums > Everything Development > OpenZaurus/Opie/Qtopia
Blaise
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
QUOTE(Blaise @ Mar 25 2005, 10:30 PM)
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
*



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
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.