Operating System - HP-UX
1835936 Members
2023 Online
110088 Solutions
New Discussion

Re: Which compiler is used

 
SOLVED
Go to solution
Cai Nan
Advisor

Which compiler is used

Hi,all.
Because lack of Bind-9.2.0.depot, I want to configure and compile from the source.in /Bind-9.2.0, I ./configure,from the output ,no error.
But when I make,it shows me following error:
*****************************************(Bundled) cc: warning 480: The -A option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 480: The -z option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 480: The +w1 option is available only with the C/ANSI C product; ignored.
(Bundled) cc: warning 480: The +W option is available only with the C/ANSI C product; ignored.
(Bundled) cc: "../include/isc/ipv6.h", line 78: warning 5: "const" will become a keyword.
(Bundled) cc: "../include/isc/ipv6.h", line 78: error 1000: Unexpected symbol: "struct".
(Bundled) cc: "../include/isc/ipv6.h", line 79: warning 5: "const" will become a keyword.
(Bundled) cc: "../include/isc/ipv6.h", line 79: error 1000: Unexpected symbol: "struct".
(Bundled) cc: "ipv6.c", line 22: warning 5: "const" will become a keyword.
(Bundled) cc: "ipv6.c", line 22: error 1000: Unexpected symbol: "struct".
(Bundled) cc: "ipv6.c", line 23: warning 5: "const" will become a keyword.
(Bundled) cc: "ipv6.c", line 23: error 1000: Unexpected symbol: "struct".
(Bundled) cc: "ipv6.c", line 22: error 1524: Initializer is too deeply nested.
(Bundled) cc: "ipv6.c", line 23: error 1524: Initializer is too deeply nested.

Stop.
*** Error exit code 1
It seems the error is caused by using wrong C compiler , I have gcc2.95.2 in HP10.20,but the parameter"CC=gcc" should be used in ./configure or make?

Thanks!
--Frank
DAEMON
11 REPLIES 11
Steven Sim Kok Leong
Honored Contributor

Re: Which compiler is used

Hi,

What is shown when you type:

# ll /usr/bin/cc

Is it a softlink to gcc or ansi-c? You can either update the soft-link or hardcode the pathname of the compiler into the Makefile.

Hope this helps. Regards.

Steven Sim Kok Leong
Steven Sim Kok Leong
Honored Contributor

Re: Which compiler is used

Hi,

Since the compilation is expecting Ansi-C, try compiling with flags CC=cc and check that the following soft-link exists:

# ll /usr/bin/cc
lr-xr-xr-t 1 root sys 17 Mar 22 2000 /usr/bin/cc -> /opt/ansic/bin/cc

Hope this helps. Regards.

Steven Sim Kok Leong
Cai Nan
Advisor

Re: Which compiler is used

Hi,Steven.
Glad to meet you again.
when I type ll /usr/bin/cc,it shows:
lr-xr-xr-t 1 root sys 15 Apr 10 2000 /usr/bin/cc -> /usr/ccs/bin/cc.
My gcc was installed at :/opt/gcc/bin/gcc,
did you mean:ln /usr/bin/cc /opt/gcc/bin/gcc?
Or you mean make change directly in /bind-9.2.0/Makefile?

Thanks


DAEMON
Steve Steel
Honored Contributor

Re: Which compiler is used

Hi

The problem is most likely due to an incorrect path set. Here are
some commands to use to check:

# whence -v cc
cc is a tracked alias for /usr/bin/cc

# cd /usr/bin

# ll cc
lr-xr-xr-t 1 root sys 17 Mar 2 01:34 cc ->
/opt/ansic/bin/cc

# echo $PATH
/usr/sbin:/usr/bin:/opt/ansic/bin:/usr/ccs/bin:/usr/contrib/bin:
/opt/nettladm/bin:/opt/fc/bin:/opt/fcms/bin:/opt/upgrade/bin:
/opt/pd/bin:/usr/contrib/bin/X11:/usr/bin/X11:/opt/hparray/bin:
/opt/omni/bin:/opt/perf/bin:/opt/OV/bin/OpC:/opt/langtools/bin:
/opt/imake/bin:/opt/p4:/sbin:/home/root:/usr/local/bin:
/opt/OV/bin:/opt/omni/bin:/opt/omni/sbin:/opt/omni/lbin

The script was not able to find the compiler; this is usually due
to the path not being set in $PATH.


Put your compiler first in the path may be enough


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Steven Sim Kok Leong
Honored Contributor

Re: Which compiler is used

Hi,

If you don't have Ansi/C installed, no harm giving it a try. Anyway, I notice that those Ansi/C messages are just warning messages which can likely be safe ignored.

# rm /usr/bin/cc
# ln -s /opt/gcc/bin/gcc /usr/bin/cc

The default CC compiler provided by HP-UX /usr/ccs/bin/cc doesn't work with most of the source compilations out there. It is good to link anyway.

Hope this helps. Regards.

Steven Sim Kok Leong
Cai Nan
Advisor

Re: Which compiler is used

Hi,
I found in our system , it haven't ansic,could gcc be instead of ansic?
If couldn't,is HP have ansic depot file,or where could I download?

Thanks
DAEMON
Steven Sim Kok Leong
Honored Contributor

Re: Which compiler is used

Hi,

The compiler being used is very likely the primitive C compiler currently running on your system ie. /usr/ccs/bin/cc because notice the words in the warning messages:

(bundled) cc: ...

Ansi/C needs to be purchased. Anyway, GCC is good enough. Try to see if setting your PATH works (as what Steve suggested):

# export PATH=$PATH:/opt/gcc/bin

If not, then remove the softlink and create it:

# rm /usr/bin/cc
# ln -s /opt/gcc/bin/gcc /usr/bin/cc

Hope this helps. Regards.

Steven Sim Kok Leong
Steven Sim Kok Leong
Honored Contributor

Re: Which compiler is used

Hi,

When you run your ./configure, what is the output when it reaches this statement:

checking for gcc...

Is it:

checking for gcc... gcc

Hope this helps. Regards.

Steven Sim Kok Leong
Cai Nan
Advisor

Re: Which compiler is used

Hi,Steven.
./configure result:
************************
checking for gcc... cc

But this time it seems "make"a lot of thing,at end it show following:
*****************************************
cc: CDEFINES: No such file or directory
cc: =: No such file or directory
dst_api.c: In function `dst__file_addsuffix':
dst_api.c:1084: warning: implicit declaration of function `snprintf'

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

It seems also related to CC,right?

Thanks
DAEMON
Steven Sim Kok Leong
Honored Contributor
Solution

Re: Which compiler is used

Hi,

>> checking for gcc... cc

Since most of the compilation has gone through, I gather that you have already soft-linked /opt/gcc/bin/gcc to /usr/bin/cc?

With regards to this error, unless anyone in the forum knows what causes it, I would suggest that you post the compilation errors to the newsgroup for BIND (visit the website) since they have successfully tested the compilation on HP-UX 11.00.

Hope this helps. Regards.

Steven Sim Kok Leong
Cai Nan
Advisor

Re: Which compiler is used

Hi,Steven.
Thank you again for your help.
With compiler GCC, I almost sucess in building bind-9.2.0.

--Frank
DAEMON