Operating System - Linux
1752815 Members
5994 Online
108789 Solutions
New Discussion юеВ

Re: script does not recognize aCC

 
SOLVED
Go to solution
sharathkv25
Frequent Advisor

script does not recognize aCC

Hi,

I got a peculiar problem. I am trying to compile all the files in a directory & if i try to do it from a script, it fails. If I do the same from command line it's working.

Here is the log:

===================================================
From script......it's giving error

v3 (admin) $ ./build.ks 192.XXX.X.XXX | tee buildlog

Compile GL module...
Sandbox file used: /home/pti1/xxx/xxxx/sandbox_GL.pj
Building single module: GL ...

make clean all install_build REMOTE=xxx LOGIN=xxx tp4ci=no

Cleaning.... please wait.
aCC +Z +DA1.0 -DSV_ENABLE_TRACE -I . -I /home/pti1/xxx/xxx/common/include -I /home/pti1/xxx/xxx/common/include/GL -o version.o -c version.cpp
sh[6]: aCC: not found.
*** Error exit c
Stop.
ode 127
*** Error exit c
Stop.
ode 1
### ERROR MAKING PROJECT 'GL' ###

================================================================

The same thing from command line......it's working fine


v3 (src) $ make clean all install_build REMOTE=xxx LOGIN=xxx tp4ci=no

Cleaning.... please wait.
aCC +Z +DA1.0 -DSV_ENABLE_TRACE -I . -I /home/pti1/xxx/xxx/common/include -I /home/pti1/xxx/xxx/common/include/GL -o version.o -c version.cpp
aCC +Z +DA1.0 -DSV_ENABLE_TRACE -I . -I /home/pti1/xxx/xxx/common/include -I /home/pti1/xxx/xxx/common/include/GL -o GL_CError.o -c GL_CError.cpp
aCC +Z +DA1.0 -DSV_ENABLE_TRACE -I . -I /home/pti1/xxx/xxx/common/include -I /home/pti1/xxx/xxx/common/include/GL -o GL_CErrorList.o -c GL_CErrorList.cpp
aCC +Z +DA1.0 -DSV_ENABLE_TRACE -I . -I /home/pti1/xxx/xxx/common/include -I /home/pti1/xxx/xxx/common/include/GL -o GL_CString.o -c GL_CString.cpp
aCC +Z +DA1.0 -DSV_ENABLE_TRACE -I . -I /home/pti1/xxx/xxx/common/include -I /home/pti1/xxx/xxx/common/include/GL -o GL_CTrace.o -c GL_CTrace.cpp
aCC +Z +DA1.0 -DSV_ENABLE_TRACE -I . -I /home/pti1/xxx/xxx/common/include -I /home/pti1/xxx/xxx/common/include/GL -o GL_Critical.o -c GL_Critical.cpp
aCC +Z +DA1.0 -DSV_ENABLE_TRACE -I . -I /home/pti1/xxx/xxx/common/include -I /home/pti1/xxx/xxx/common/include/GL -o GL_FUtilities.o -c GL_FUtilities.cpp
aCC +Z +DA1.0 -DSV_ENABLE_TRACE -I . -I /home/pti1/xxx/xxx/common/include -I /home/pti1/xxx/xxx/common/include/GL -o BaseThread.o -c BaseThread.cpp
aCC +Z +DA1.0 -DSV_ENABLE_TRACE -I . -I /home/pti1/xxx/xxx/common/include -I /home/pti1/xxx/xxx/common/include/GL -o dummy.o -c dummy.cpp
aCC +Z +DA1.0 -DSV_ENABLE_TRACE -I . -I /home/pti1/xxx/xxx/common/include -I /home/pti1/xxx/xxx/common/include/GL version.o GL_CError.o GL_CErrorList.o GL_CString.o G
L_CTrace.o GL_Critical.o GL_FUtilities.o BaseThread.o -o dummy dummy.o -Wl,-B,immediate -L . -
L /opt/osmf/lib -L /home/pti1/xxx/xxx/lib
aCC +DA1.0 -b -o ../lib/libOT_GL.sl version.o GL_CError.o GL_CErrorList.o GL_CString.o
GL_CTrace.o GL_Critical.o GL_FUtilities.o BaseThread.o
/opt/SV/bin/sv_rmake_dir tpdev3 xxxx 775 xxxx other /opt/build_depot_osmfmv_4.0
Create directory '/opt/build_depot_osmfmv_4.0' on local host ...
Change path permission to 775 ...
Change file ownership to xxxx ...
Change file group-name to other ...
/opt/SV/bin/sv_rmake_dir tpdev3 xxx 755 xxxx other /opt/build_depot_osmfmv_4.0/lib
Create directory '/opt/build_depot_osmfmv_4.0/lib' on local host ...
Change path permission to 755 ...
Change file ownership to xxx ...
Change file group-name to other ...
/opt/SV/bin/sv_install_test xxx xxx /opt/build_depot_osmfmv_4.0/lib 555 xxx other ../lib/libOT_GL.sl
Remove file 'libOT_GL.sl' from local host 'xxx@xxx:/opt/build_depot_osmfmv_4.0/lib' ...
Copy file '../lib/libOT_GL.sl' to remote host 'xxx@xxx:/opt/build_depot_osmfmv_4.0/lib' ...
Change file permission to 555 ...
Change file ownership to xxx ...
Change file group-name to other ...


I checked all the environment variables, it's ok. Any ideas ??
9 REPLIES 9
Sandman!
Honored Contributor

Re: script does not recognize aCC

Specify full path to the aCC compiler in your script.

# which aCC
or
# whereis aCC

...will display the complete path to your aC++ compiler.
Steven E. Protter
Exalted Contributor

Re: script does not recognize aCC

Shalom,

Apparently the PATH environment variable was not checked.

Either its not on the PATH or its not installed.

swlist -l product | more

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
A. Clay Stephenson
Acclaimed Contributor

Re: script does not recognize aCC

Since you are invoking make from an interactive shell and from a script --- and I am going to assume that the script you are running is also invoked from the same parent shell that does work interactively, the most logical explanation is that your script is changing ${PATH}. I would add the -p option to the make invocation and you will then see all the rules and variable settings. I suspect that you are going to see a difference in ${PATH} when make -p is called both ways.
If it ain't broke, I can fix that.
sharathkv25
Frequent Advisor

Re: script does not recognize aCC

Hi,

aCC is installed.

v3 (admin) $ which aCC
/opt/aCC/bin/aCC
v3 (admin) $
v3 (admin) $
v3 (admin) $ whereis aCC
aCC: /opt/aCC/bin/aCC /opt/aCC/share/man/man1.Z/aCC.1
v3 (admin) $


"/opt/aCC/bin" is also present in the PATH variable

v3 (admin) $ echo $PATH
/opt/MKSClient/IntegrityClient/bin:/usr/bin:/opt/ansic/bin:/usr/ccs/bin:/usr/contrib/bin:/opt/hparray/bin:/opt/nettladm/bin:/opt/upgrade/bin:/opt/fcms/bin:/usr/bin/X11:/usr/contrib/bin/X11:/opt/pd/bin:/opt/wbem/bin:/opt/wbem/sbin:/opt/resmon/bin:/opt/firefox:/opt/gnome/bin:/opt/mozilla:/opt/graphics
/common/bin:/opt/hpsmh/bin:/opt/perl_32/bin:/opt/perl_64/bin:/usr/sbin/diag/contrib:/opt/sfm/bin:/opt/ssh/bin:/opt/thunderbird:/opt/gwlm/bin:/opt/aCC/bin:/opt/cadvise/bin:/opt/langtools/bin:/opt/imake/bin:.:/home/pti1/pacman/bin:/usr/sbin:/usr/bin/X11:/usr/local/bin/X11:/opt/SV/bin:/opt/mks/bin:/opt/osmf/bin:/opt/osmf/utils:/opt/OV/bin:/usr/local/bin:/opt/oracle/oracle/product/10.2.0/DB/bin:/opt/java1.4/bin:/opt/oracle/oracle/product/10.2.0/DB/bin:/opt/opt/home/pti1/pacman/timepictra/bin:/opt/java1.4/bin
James R. Ferguson
Acclaimed Contributor

Re: script does not recognize aCC

Hi:

Your post appears to show two difference users --- 'src' and 'admin'. Is that in fact true? Do the permissions on all directories and on 'aCC' itself allow 'admin' to execute 'aCC'?

Regards!

...JRF...

sharathkv25
Frequent Advisor

Re: script does not recognize aCC

Hi,

They are directories not users. I am executing aCC as the same user.

Thanks
Steven Schweda
Honored Contributor

Re: script does not recognize aCC

> "/opt/aCC/bin" is also present in the PATH
> variable

It may be in your interactive shell
environment, but what do you get from:
echo $PATH
in your shell script?
A. Clay Stephenson
Acclaimed Contributor

Re: script does not recognize aCC

add the -p to the make invocation both within your script and as you invoke make from an interactive shell and there will be a definitive difference.
If it ain't broke, I can fix that.
Dennis Handly
Acclaimed Contributor
Solution

Re: script does not recognize aCC

As everyone has mentioned, you need to check PATH in your script to see if it is the same. Of course you can just give up and do what Sandman says and use the full path.

At one time there was a problem with a directory aCC somewhere in your PATH but that should be fixed by now.

>aCC +Z +DA1.0

You should NOT be using +DA1.0, that was obsoleted on 10.20. For PA, you should be using +DAportable.

With your small number of objects, you should really use +z instead of +Z.