System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

make gcc433 on hp-ux11.23ia64

 
vajava_xxx
Occasional Advisor

make gcc433 on hp-ux11.23ia64

Hi all.
I try to build gcc4.3.3 from source and get error after make:
/usr/include/sys/_inttypes.h:138: error: duplicate 'unsigned'
In file included from ../.././libiberty/regex.c:51:
/usr/include/sys/types.h:206: error: two or more data types in declaration specifiers
../.././libiberty/regex.c:130: warning: function declaration isn't a prototype
../.././libiberty/regex.c:130: warning: conflicting types for built-in function 'malloc'
../.././libiberty/regex.c:131: warning: conflicting types for built-in function 'realloc'
In file included from ../.././libiberty/regex.c:638:
../.././libiberty/regex.c: In function 'byte_regex_compile':
../.././libiberty/regex.c:2439: warning: implicit declaration of function 'free'
../.././libiberty/regex.c:2439: warning: incompatible implicit declaration of built-in function 'free'
anybody knows what itis mean, and how build this gcc? i try do it with CC=/usr/local/gcc-3.4.4/bin/gcc, --with-ld=/usr/ccs/bin/ld and other parameters...
host is HP-UX11.23 ia64.
17 REPLIES
T G Manikandan
Honored Contributor

Re: make gcc433 on hp-ux11.23ia64

Steven E. Protter
Exalted Contributor

Re: make gcc433 on hp-ux11.23ia64

Shalom,

On HP-UX make comes from the first make utility on the SHLIB_PATH variable.

The make that is listed as a dependency for gcc should be installed prior to attempting a gcc compile.

There are depot versions of make and gcc that might be simpler to use.

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
vajava_xxx
Occasional Advisor

Re: make gcc433 on hp-ux11.23ia64

I try make and gmake both. and now I fresh gmake to GNU Make 3.81.but errors still remain:
../.././libiberty/regex.c: In function 'xregerror':
../.././libiberty/regex.c:8078: warning: incompatible implicit declaration of built-in function 'abort'
../.././libiberty/regex.c: In function 'xregfree':
../.././libiberty/regex.c:8112: warning: incompatible implicit declaration of built-in function 'free'
gmake[3]: *** [regex.o] Error 1
gmake[3]: Leaving directory `/home/gcc/gcc-4.3.3/host-ia64-hp-hpux11.23/libiberty'

Re: make gcc433 on hp-ux11.23ia64

>I fresh gmake to GNU Make 3.81.but errors still remain: ...
gmake[3]: *** [regex.o] Error 1

I just see warnings and that gmake error.
Are there any gcc errors before that?

You should fix your regex.c source such that you include the appropriate headers for free and abort:
#include

>SEP: On HP-UX make comes from the first make utility on the SHLIB_PATH variable.

That's PATH, not SHLIB_PATH.
Steven Schweda
Honored Contributor

Re: make gcc433 on hp-ux11.23ia64

> I try to build gcc4.3.3 from source [...]

How, exactly?

> [...] and other parameters...

That opens a rather large door.

> ../.././libiberty/regex.c:130: warning: function declaration isn't a prototype

All I have is GCC 4.3.2 (on HP-UX 11.31), but
it looks to me as if your configuration is
badly damaged. My libiberty/regex.c says:

[...]
# if defined STDC_HEADERS || defined _LIBC
# include
# else
char *malloc (); [<--- Line 130.]
char *realloc ();
# endif
[...]

I'd expect STDC_HEADERS to be defined, and,
hence, to be included, but you're
in the "else" block, which, I'd say, probably
means that you're doomed.

> CC=/usr/local/gcc-3.4.4/bin/gcc [...]

That seems to be rather old. I don't know if
it should work or not. What _I_ did was to
download a binary kit (4.2.2 was current at
the time) from:
http://hpux.connect.org.uk/hppd/hpux/Gnu/

and then use that to build the latest source
kit. My notes are a bit vague, but I suspect
that all I did for 4.3.2 was:

mkdir gcc-4.3.2_obj
cd gcc-4.3.2_obj
../gcc-4.3.2/configure
gmake bootstrap-lean
gmake install


> I fresh gmake to GNU Make 3.81.but errors
> still remain: ...

GNU "make" should help, but it can't solve
your worst problem(s).

> You should fix your regex.c source [...]

I claim that regex.c itself is delightful,
but the configuration is a complete mess. I
know which one I'd be playing with, and it's
_not_ the GCC source code.
vajava_xxx
Occasional Advisor

Re: make gcc433 on hp-ux11.23ia64

okay, that's my all param:
./configure --host=ia64-hp-hpux11.23
--target=ia64-hp-hpux11.23
--build=ia64-hp-hpux11.23
--prefix=/usr/local/gcc433
--with-gnu-as
--with-ld=/usr/ccs/bin/ld
--enable-threads=posix
--enable-languages=c,c++
--enable-bootstrap
--with-gmp=/usr/local/lib/gmp-4.2.4
--with-mpfr=/usr/local/lib/mpfr-2.4.1
--with-gmp-include=/usr/local/lib/gmp-4.2.4/include
--with-mpfr-include=/usr/local/lib/mpfr-2.4.1/include
--with-mpfr-lib=/usr/local/lib/mpfr-2.4.1/lib
--with-gmp-lib=/usr/local/lib/gmp-4.2.4/lib

CC=/usr/local/gcc-3.4.4/bin/gcc
SHLIB_PATH=/usr/local/bin/:/usr/local/lib/mpfr-2.4.1:/usr/local/lib/gmp-4.2.4:/usr/lib:/usr/libexec:/usr/local/lib
LD_LIBRARY_PATH=/usr/local/lib/mpfr-2.4.1:/usr/local/lib/gmp-4.2.4:/usr/lib:/usr/libexec

and it lead to gmake error:
...
In file included from /usr/include/sys/types.h:10,
from ../.././libiberty/regex.c:51:
/usr/include/sys/_inttypes.h:138: error: duplicate 'unsigned'
In file included from ../.././libiberty/regex.c:51:
/usr/include/sys/types.h:206: error: two or more data types in declaration specifiers
../.././libiberty/regex.c:130: warning: function declaration isn't a prototype
../.././libiberty/regex.c:130: warning: conflicting types for built-in function 'malloc'
../.././libiberty/regex.c:131: warning: function declaration isn't a prototype
../.././libiberty/regex.c:131: warning: conflicting types for built-in function 'realloc'
In file included from ../.././libiberty/regex.c:638:
../.././libiberty/regex.c: In function 'byte_regex_compile':
../.././libiberty/regex.c:2439: warning: implicit declaration of function 'free'
../.././libiberty/regex.c:2439: warning: incompatible implicit declaration of built-in function 'free'
../.././libiberty/regex.c:2500: warning: incompatible implicit declaration of built-in function 'free'
../.././libiberty/regex.c:2533: warning: incompatible implicit declaration of built-in function 'free'
../.././libiberty/regex.c:2640: warning: incompatible implicit declaration of built-in function 'free'
../.././libiberty/regex.c:3643: warning: incompatible implicit declaration of built-in function 'free'
../.././libiberty/regex.c:4150: warning: incompatible implicit declaration of built-in function 'free'
../.././libiberty/regex.c: In function 'byte_re_compile_fastmap':
../.././libiberty/regex.c:4835: warning: implicit declaration of function 'abort'
../.././libiberty/regex.c:4835: warning: incompatible implicit declaration of built-in function 'abort'
../.././libiberty/regex.c: In function 'byte_re_match_2_internal':
../.././libiberty/regex.c:7421: warning: incompatible implicit declaration of built-in function 'abort'
../.././libiberty/regex.c: In function 'xregcomp':
../.././libiberty/regex.c:7975: warning: incompatible implicit declaration of built-in function 'free'
../.././libiberty/regex.c: In function 'xregexec':
../.././libiberty/regex.c:8050: warning: incompatible implicit declaration of built-in function 'free'
../.././libiberty/regex.c: In function 'xregerror':
../.././libiberty/regex.c:8078: warning: incompatible implicit declaration of built-in function 'abort'
../.././libiberty/regex.c: In function 'xregfree':
../.././libiberty/regex.c:8112: warning: incompatible implicit declaration of built-in function 'free'
gmake[3]: *** [regex.o] Error 1
gmake[3]: Leaving directory `/home/vvoronko/gcc/gcc-4.3.3/host-ia64-hp-hpux11.23/libiberty'
gmake[2]: *** [all-stage2-libiberty] Error 2
gmake[2]: Leaving directory `/home/vvoronko/gcc/gcc-4.3.3'
gmake[1]: *** [stage2-bubble] Error 2
gmake[1]: Leaving directory `/home/vvoronko/gcc/gcc-4.3.3'
gmake: *** [all] Error 2

Re: make gcc433 on hp-ux11.23ia64

>it leads to gmake error:

You should look at the gcc errors, not gmake:
/usr/include/sys/_inttypes.h:138: error: duplicate 'unsigned'
In file included from ../.././libiberty/regex.c:51:
/usr/include/sys/types.h:206: error: two or more data types in declaration specifiers
Steven Schweda
Honored Contributor

Re: make gcc433 on hp-ux11.23ia64

> SHLIB_PATH=[...]
> LD_LIBRARY_PATH=[...]

I think that you're working too hard. If you
have a working build environment (C compiler,
...), then I doubt that these things are
needed, and I fear that they are confusing
the "configure" script. (I certainly did
not define either.)

> CC=/usr/local/gcc-3.4.4/bin/gcc

Do you have any evidence that this compiler
works (properly)? I do not expect a working
compiler to complain about system header
files ("/usr/include/sys/_inttypes.h",
"/usr/include/sys/types.h", ...).

> ../.././libiberty/regex.c:130: warning: function declaration isn't a prototype

As I said before, I believe that you should
not be trying to use line 130 here. But you
are trying to use it, so I'd still say that
your configuration is bad.

> --with-gmp=[...]
> [...]

I found it much simpler to install these
things (in "/usr/local"), and let the GCC
builder find them by itself.

But I still claim that your fundamental
configuration (build environment) is bad.
vajava_xxx
Occasional Advisor

Re: make gcc433 on hp-ux11.23ia64

> CC=/usr/local/gcc-3.4.4/bin/gcc
I try others installed gcc too.
gcc4.2.3 and gcc4.3.1, and it was with same errors.

>> --with-gmp=[...]
>
>I found it much simpler to install these
>things (in "/usr/local"), and let the GCC
>builder find them by itself.
I afraid what early installed gcc or some progs not'll be work properly. because i install it in individual folders and set some variable like SHLIB_PATH and LD_LIBRARY_PATH.

> ../.././libiberty/regex.c:130: warning: function declaration isn't a prototype

>As I said before, I believe that you should
>not be trying to use line 130 here. But you
>are trying to use it
how I may don't "use line 130 here"? and not install gmp\mpfr in shared folder(in "/usr/local")?
Steven Schweda
Honored Contributor

Re: make gcc433 on hp-ux11.23ia64

> I try others installed gcc too.
> gcc4.2.3 and gcc4.3.1, and it was with same
> errors.

I don't know what you installed, or how you
installed it. All I know is that it appears
not to work properly.

> Do you have any evidence that this compiler
> works (properly)? I do not expect a working
> compiler to complain about system header
> files ("/usr/include/sys/_inttypes.h",
> "/usr/include/sys/types.h", ...).

Still waiting for an answer to that one.

> [...] and set some variable like SHLIB_PATH
> and LD_LIBRARY_PATH.

I believe that the GCC builders can figure
out what to do with these (if anything)
without your help. _With_ your help --
that's "help" -- , I don't know what will
happen. It's possible that if you specify
bad values for these variables, or if the C
compiler doesn't work for some other reason,
then the "configure" scripts will not be able
to compile and link any of their little test
programs. If that happens, the results might
look as bad as what you see.

> how I may don't "use line 130 here"?

With a working C compiler, the GCC builders
should be defining STDC_HEADERS, so you
shouldn't need to do anything.

> [...] and not install gmp\mpfr in shared
> folder(in "/usr/local")?

I assume that all those "-with-xxx" options
should let you put your stuff wherever you
wish. I did it the easy way, and let the
GCC builders find things in the usual places.
Johannes Krackowizer
Occasional Advisor

Re: make gcc433 on hp-ux11.23ia64

Why don't you use the compiled packages from http://hpux.cs.utah.edu ? I used their site since the late 1990s to get up running tools that i used with linux on hpux 10.20 and now i use it to run the tools on hpux 11.31.

you can find your os versions gcc under this link:

http://hpux.cs.utah.edu/hppd/cgi-bin/search?package=on&description=on&term=gcc

you need to install the runtime dependencies to use the package above. but on this page you get every info you need to get the packages running.
21 is only the half truth
vajava_xxx
Occasional Advisor

Re: make gcc433 on hp-ux11.23ia64

to Krackowizer:
yes, I know this site, but I need gcc433, that ther's no yet.

to Schweda:
> Do you have any evidence that this compiler
> works (properly)? I do not expect a working
> compiler to complain about system header
> files ("/usr/include/sys/_inttypes.h",
> "/usr/include/sys/types.h", ...).
>>Still waiting for an answer to that one.
I try hp-gcc-4.3.1, which hp-ux 11.23 bundled. try with the same result. now I may prove it works properly?

the work specificity of this host is have many diferent version compilers. some of them install from package (hpux.cs.utah.edu), some builds from source -like in this case.

Johannes Krackowizer
Occasional Advisor

Re: make gcc433 on hp-ux11.23ia64

Did you install all depencies for compiling gcc? I had some years ago a similar problem compiling gcc 2.xx on hpux 10.20. I got strange error from make but they dont point to the problem, in fact the point at errors in header files from the os and things like that. Then i found a nice manual somewhere in the internet that told me to install about 30-40 packages from http://hpux.cs.utah.edu and than i was able to compile.

Perhaps you should look at the Build time dependencies on http://hpux.cs.utah.edu (even if it is for gcc 4.2.3) and install the packages you are missing and then try to compile gcc 433.
21 is only the half truth
Steven Schweda
Honored Contributor

Re: make gcc433 on hp-ux11.23ia64

> I try hp-gcc-4.3.1, which hp-ux 11.23
> bundled. try with the same result.

What, exactly, did you get where? Tried
what, exactly?

> now I may prove it works properly?

If "now" was intended to be "How", then show
that you can compile a simple test program.
Ideally, a test program which includes the
header file which gets the complaints. For
example:

dyi # cat hm.c
#include
#include

int main()
{
printf( "Hi, Mom!\n");
}

dyi # gcc -o hm hm.c

dyi # ./hm
Hi, Mom!

dyi # gcc -v
Using built-in specs.
Target: ia64-hp-hpux11.31
Configured with: ../gcc-4.3.2/configure
Thread model: posix
gcc version 4.3.2 (GCC)

dyi # type gcc
gcc is hashed (/usr/local/bin/gcc)


> [...] and set some variable like SHLIB_PATH
> and LD_LIBRARY_PATH.

Have you tried it without this stuff? After
that, I'd start by throwing away all those
other "configure" options, and bringing back
only what is needed to get the job done.
vajava_xxx
Occasional Advisor

Re: make gcc433 on hp-ux11.23ia64

bash-3.00$ gcc -v
Using built-in specs.
Target: ia64-hp-hpux11.23
Configured with: /tmp/gcc-4.3.1.tar.gz/gcc-4.3.1/configure --host=ia64-hp-hpux11.23 --target=ia64-hp-hpux11.23 --build=ia64-hp-hpux11.23 --prefix=/opt/hp-gcc-4.3.1 --with-gnu-as --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-threads=posix --enable-languages=c,c++ --with-gmp=/proj/opensrc/be/ia64-hp-hpux11.23 --with-mpfr=/proj/opensrc/be/ia64-hp-hpux11.23
Thread model: posix
gcc version 4.3.1 (GCC)
bash-3.00$
bash-3.00$ type gcc
gcc is hashed (/opt/hp-gcc/bin/gcc)
bash-3.00$ gcc -o hm hm.c

bash-3.00$ ./hm
Hi, Mom!
Steven Schweda
Honored Contributor

Re: make gcc433 on hp-ux11.23ia64

> bash-3.00$ gcc -v
> [...]

Ok. You seem to have a working GCC 4.3.1.
How did you get it? Then what happened?

As I said, I had no trouble building 4.3.2
on my 11.31 system. I've started building
4.3.3 in my usual way:

dyi # mkdir gcc-4.3.3_obj
dyi # cd gcc-4.3.3_obj
dyi # ../gcc-4.3.3/configure 2>&1 | tee ../gcc-4.3.3_configure.out
dyi # gmake bootstrap-lean 2>&1 | tee ../gcc-4.3.3_gmake.out

It's still cooking, but there's no sign of
trouble after a couple of hours.

If you're using a working compiler, and
you're still seeing those complaints about
system header files and that stuff in
regex.c, then I'd suggest looking into all
the config.log and config.status files you
can find.

Around here, for example:

dyi # pwd
/usr/local/gnu/gcc/gcc-4.3.3_obj
dyi # find . -name '*.h' -exec grep STDC_HEADERS {} \; -exec ls {} \;
#define STDC_HEADERS 1
./intl/config.h
#define STDC_HEADERS 1
./libiberty/config.h
#define STDC_HEADERS 1
./gcc/auto-host.h
#define STDC_HEADERS 1
./build-ia64-hp-hpux11.31/libiberty/config.h
#define STDC_HEADERS 1
./build-ia64-hp-hpux11.31/fixincludes/config.h
#define STDC_HEADERS 1
./fixincludes/config.h
#define STDC_HEADERS 1
./libcpp/config.h
#define STDC_HEADERS 1
./libdecnumber/config.h
#define STDC_HEADERS 1
./ia64-hp-hpux11.31/hpux64/libgomp/config.h
#define STDC_HEADERS 1
./ia64-hp-hpux11.31/hpux64/libstdc++-v3/include/ia64-hp-hpux11.31/bits/c++config
.h
#define STDC_HEADERS 1
./ia64-hp-hpux11.31/hpux64/libstdc++-v3/config.h
#define STDC_HEADERS 1
./ia64-hp-hpux11.31/hpux64/libiberty/config.h
#define STDC_HEADERS 1
./ia64-hp-hpux11.31/hpux64/libssp/config.h
#define STDC_HEADERS 1
./ia64-hp-hpux11.31/libgomp/config.h
#define STDC_HEADERS 1
./ia64-hp-hpux11.31/libstdc++-v3/include/ia64-hp-hpux11.31/bits/c++config.h
#define STDC_HEADERS 1
./ia64-hp-hpux11.31/libstdc++-v3/config.h
#define STDC_HEADERS 1
./ia64-hp-hpux11.31/libiberty/config.h
#define STDC_HEADERS 1
./ia64-hp-hpux11.31/libssp/config.h
#define STDC_HEADERS 1
#define STDC_HEADERS 1
./ia64-hp-hpux11.31/libgfortran/confdefs.h
dyi #


So, seeing STDC_HEADERS defined in
libiberty/config.h, I would not expect to
get those complaints about
libiberty/regex.c:130 (and its friends).
(And _I_ don't get them.)
Steven Schweda
Honored Contributor

Re: make gcc433 on hp-ux11.23ia64

Yup. Still works:

dyi # gcc -v
Using built-in specs.
Target: ia64-hp-hpux11.31
Configured with: ../gcc-4.3.3/configure
Thread model: posix
gcc version 4.3.3 (GCC)