Operating System - HP-UX
1752600 Members
4273 Online
108788 Solutions
New Discussion юеВ

Re: 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 17
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'
Dennis Handly
Acclaimed Contributor

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

Dennis Handly
Acclaimed Contributor

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")?