public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Gcc 3.4.6 Build error
@ 2006-06-27 19:20 Mcgovern, Matthew  CIV NAVAIR 521420E
  2006-06-28  8:34 ` Bob Proulx
  0 siblings, 1 reply; 6+ messages in thread
From: Mcgovern, Matthew  CIV NAVAIR 521420E @ 2006-06-27 19:20 UTC (permalink / raw)
  To: gcc-help


I am attempting to install a native gcc 3.4.6 on an HP-UX 10.20 OS.
I've successfully run configure.  The srcdir is separate from objdir.
When I try to build the system I get the following error:

Cpp:  libgnuintl.h line 301 error 4065 Recursion in macro
"libintl_set_relocation_prefix"

Any suggestions on how to solve this and continue with the build?

VR,
Matt

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Gcc 3.4.6 Build error
  2006-06-27 19:20 Gcc 3.4.6 Build error Mcgovern, Matthew  CIV NAVAIR 521420E
@ 2006-06-28  8:34 ` Bob Proulx
  2006-06-28 15:19   ` Mcgovern, Matthew  CIV NAVAIR 521420E
  0 siblings, 1 reply; 6+ messages in thread
From: Bob Proulx @ 2006-06-28  8:34 UTC (permalink / raw)
  To: Mcgovern, Matthew  CIV NAVAIR 521420E; +Cc: gcc-help

Mcgovern, Matthew  CIV NAVAIR 521420E wrote:
> I am attempting to install a native gcc 3.4.6 on an HP-UX 10.20 OS.
> I've successfully run configure.  The srcdir is separate from objdir.
> When I try to build the system I get the following error:
> 
> Cpp:  libgnuintl.h line 301 error 4065 Recursion in macro
> "libintl_set_relocation_prefix"

Exactly what were the options to configure?  Are you using the native
HP C compiler?  Is this the bundled K&R compiler or the optionally
installed ANSI C compiler?

> Any suggestions on how to solve this and continue with the build?

Depending upon the above answer you may need to bootstrap yourself
using a previously compiled binary version of gcc.

Bob

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Gcc 3.4.6 Build error
  2006-06-28  8:34 ` Bob Proulx
@ 2006-06-28 15:19   ` Mcgovern, Matthew  CIV NAVAIR 521420E
  2006-06-28 17:14     ` Bob Proulx
  0 siblings, 1 reply; 6+ messages in thread
From: Mcgovern, Matthew  CIV NAVAIR 521420E @ 2006-06-28 15:19 UTC (permalink / raw)
  To: Bob Proulx; +Cc: gcc-help

The only option to configure was:  --prefix=/usr/local/gccbuild.  I did
a mkdir of "gccbuild", but the object directory is /usr/local/gccobj.  I
used the "gccbuild" directory because of the recommendation that the
object directory not be in the same path as the build directory, or vice
versa.  The source directory is in a totally different path.  

I don't know if I'm using the native HP C compiler.  I don't think it is
installed on this system.  I'm trying to install gcc so that I can
upgrade/install Apache web server (httpd 2.0).  The Apache is not
building and I think it's because I don't have any compilers installed
on the system.  The OS load was conducted using a proprietary set of
tapes with proprietary software, not by installing from a factory
released build, so I think they didn't install any compilers on the
system.
 
I don' t know what the bundled K&R compiler or the ANSI C compiler are.

As you can tell I'm not as knowledgeable as I should be, but I need to
upgrade my web server for security reasons.

VR,
Matt

-----Original Message-----
From: Bob Proulx [mailto:bob@proulx.com] 
Sent: Wednesday, June 28, 2006 1:34
To: Mcgovern, Matthew CIV NAVAIR 521420E
Cc: gcc-help@gcc.gnu.org
Subject: Re: Gcc 3.4.6 Build error

Mcgovern, Matthew  CIV NAVAIR 521420E wrote:
> I am attempting to install a native gcc 3.4.6 on an HP-UX 10.20 OS.
> I've successfully run configure.  The srcdir is separate from objdir.
> When I try to build the system I get the following error:
> 
> Cpp:  libgnuintl.h line 301 error 4065 Recursion in macro 
> "libintl_set_relocation_prefix"

Exactly what were the options to configure?  Are you using the native HP
C compiler?  Is this the bundled K&R compiler or the optionally
installed ANSI C compiler?

> Any suggestions on how to solve this and continue with the build?

Depending upon the above answer you may need to bootstrap yourself using
a previously compiled binary version of gcc.

Bob

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Gcc 3.4.6 Build error
  2006-06-28 15:19   ` Mcgovern, Matthew  CIV NAVAIR 521420E
@ 2006-06-28 17:14     ` Bob Proulx
  2006-06-28 19:19       ` Mcgovern, Matthew  CIV NAVAIR 521420E
  0 siblings, 1 reply; 6+ messages in thread
From: Bob Proulx @ 2006-06-28 17:14 UTC (permalink / raw)
  To: Mcgovern, Matthew  CIV NAVAIR 521420E; +Cc: gcc-help

Mcgovern, Matthew  CIV NAVAIR 521420E wrote:
> The only option to configure was:  --prefix=/usr/local/gccbuild.

The prefix sets the root of the tree for the *installation* of the
resulting program.  By setting prefix to /usr/local/gccbuild you are
saying that you want the 'make install' (which comes much later) to
install the resulting files into the /usr/local/gccbuild directory.

Reading your message I don't think that is what you intended.  I think
you were intending the build files to be put there.  You need to do
that in a different way.

> I did a mkdir of "gccbuild", but the object directory is
> /usr/local/gccobj.  I used the "gccbuild" directory because of the
> recommendation that the object directory not be in the same path as
> the build directory, or vice versa.  The source directory is in a
> totally different path.

I think what you are talking about here is what is known as "VPATH"
builds where the source directory is not modified, could even be
read-only, and the build happens outside of it in another directory.
That can be useful but is not required.  This is not the --prefix
option.  Instead call configure from the build directory.  Here is a
stylized example.

  tar xzvf gcc-X.Y.Z.tar.gz
  mkdir gcc-build
  cd gcc-build
  ../gcc-X.Y.Z/configure --other-options-...
  make
  ...other.stuff...

Because configure is called using the path to the source it will know
that it is setting up the build in the current directory.  The build
files will be there and the source will be untouched.  Many people
favor this build method.  (I actually don't because I build from
pristine source (tar xvf ...) every time and so don't care if the
source is the build directory too.)

> I don't know if I'm using the native HP C compiler.  I don't think
> it is installed on this system.

Normally every HP-UX system would have a C compiler.  PATH would
include /usr/ccs/bin and /usr/ccs/bin/cc would be a symlink pointing
to cc_bundled.  That is the old K&R compiler from before 1989.  The
c89 and later compiler is in /usr/bin/cc as a symlink to
/opt/ansi/bin/cc but that is an optional product and would need to be
installed separately.

I will assume that you are using the bundled compiler.  You can test
this by listing the directories.  PATH should be set in /etc/profile
to include /usr/ccs/bin and (hopefully) nothing is removing that
particular path.  It should be after /usr/bin.

  ls -ld /usr/bin/cc
  ls -ld /usr/ccs/bin/cc

> I'm trying to install gcc so that I can upgrade/install Apache web
> server (httpd 2.0).  The Apache is not building and I think it's
> because I don't have any compilers installed on the system.  The OS
> load was conducted using a proprietary set of tapes with proprietary
> software, not by installing from a factory released build, so I
> think they didn't install any compilers on the system.

That would make it difficult.  But if you don't have *any* compilers
installed then you would not be able to compile gcc either.  A
bootstrapping chicken-or-the-egg issue.

For now I would assume that apache requires a modern c89 or c99 or
later compiler and only the old K&R one is available.  I believe gcc
can still bootstrap itself from the K&R compiler.  I am sure someone
on the mailing list will correct me if that is not the case.  I have
not tried it for years.

> I don' t know what the bundled K&R compiler or the ANSI C compiler are.

At one time all Unix machines included a C compiler as standard on the
system.  As time went by vendors make the ANSI standard compiler
optional and charged an extra charge for it.  But they still needed
something to configure the operating system kernel.  That is, they
needed something themselves.  The K&R compiler from pre-1989 days
could be used to link the kernel and was enough basic functionality to
do some things on the system (e.g. such as unshar uudecode
compilation) but not sufficient for most things and so customers would
then buy the ANSI compiler.  Well actually most people installed gcc
instead.

My notes show me doing this on HP-UX to configure gcc for building.
(This is mostly for the email archive.)

  # The first time around without gcc available use these:
  #   CC=cc CFLAGS="-O" LIBCXXFLAGS="-g -O2 -fno-implicit-templates"
  # The second and later times with gcc available use these:
  #   LIBCXXFLAGS="-g -O2 -fno-implicit-templates"

  LIBCFLAGS="-O2" LIBCXXFLAGS="-O2 -fno-implicit-templates" \
    ./configure \
    --prefix=/usr \
    --mandir=\${prefix}/share/man \
    --infodir=\${prefix}/share/info \
    --program-suffix=-3.3 \
    --with-as=/usr/bin/gas \
    --with-gnu-as \
    --enable-version-specific-runtime-libs \
    --enable-languages=c,c++ \
    --enable-cxx-flags='-fPIC'

  make -j2 bootstrap

> As you can tell I'm not as knowledgeable as I should be, but I need to
> upgrade my web server for security reasons.

Well...  You are basically putting yourself in the role of software
distribution developer.  And that means you would need to either have
or develop some of those basic skills.  It is not really very hard but
you have to have the mind-set that you are going to need to figure out
a lot of software development issues and to develop the tool-chain to
support doing this.  If you were using a GNU/Linux distribution then
this would be done for you by the distro vendor.  But you are not and
so on HP-UX you have to build the tools to build the tools to build
the tools yourself.  After the whole machine gets built up and moving
things work pretty well.  But bootstrapping yourself up from first
principles can be tedious and time consuming.

What I would recommend is to search the web for precompiled gcc
binaries.  Looking for "HP-UX porting center" should google hit to a
few places with precompiled binaries.  I think one of those would meet
your needs and avoid a lot of time and effort learning how to build up
gcc on your platform.  In fact I think from the hp.com website there
are pointers to precompiled versions of gcc.  But I have not looked
for a while so I may be out of date.  But using one of the versions
recommended by hp would be reasonable.

Because before building gcc you actually need to build up a tool chain
to support the build which includes the GNU assembler (binutils) too.
Both of those need GNU sed to configure.  And GNU m4 may also be
required, not sure.  Additionally to do a good job of it you need
libiconv, gettext, and texinfo.  Whew!  Lots of stuff.  Probably more
that I forgot about.

I think you would be much better off getting a precompiled binary.  At
the very least you could use it to bootstrap yourself.  The prebuild
gcc could be used to build the new gcc.  And binutils and so on.  Look
on the hp.com web site for a pointer to precompiled gcc binaries.  I
found these just a moment ago:

  http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,547,00.html
  http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,7663,00.html

You might be able to find a prebuild apache2 for hpux as well.

One issue about prebuild binaries is that everyone decides to install
them in different places.  Which means that almost certainly none will
install where you want it to install.  Oh well.

Bob

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: Gcc 3.4.6 Build error
  2006-06-28 17:14     ` Bob Proulx
@ 2006-06-28 19:19       ` Mcgovern, Matthew  CIV NAVAIR 521420E
  2006-06-28 23:44         ` Bob Proulx
  0 siblings, 1 reply; 6+ messages in thread
From: Mcgovern, Matthew  CIV NAVAIR 521420E @ 2006-06-28 19:19 UTC (permalink / raw)
  To: Bob Proulx; +Cc: gcc-help

Thank you, for your very detailed response.  

I did look at the system and I think I have the old K&R compiler.  I
have the /usr/ccs/bin directory and the /usr/ccs/bin/cc file in that
directory.  I don't have /usr/ccs/bin/cc symlinked to any cc_bundled.
The /usr/bin/cc is symlinked to /usr/ccs/bin/cc, not /opt/ansi/bin/cc.
The /etc/profile file does include the /usr/ccs/bin after the /usr/bin
in the PATH.

 As I read your response regarding "My notes show me doing this on HP-UX
to configure gcc for building" and "..before building gcc you actually
need to build up a tool chain to support the build which includes the
GNU assembler (binutils) too", I think I'm in way over my head here.  I
didn't really understand much of what you indicated I will need to do
(I'm not familiar with the CC, CFLAGS, LIBCFLAGS, or LIBCXXFLAGS
commands).  However, I think your final suggestion, "You might be able
to find a prebuild apache2 for hpux" may be the way to go for me.  I
don't even know if installing gcc will solve my Apache installation
problem (which is what I'm mainly interested in).

I do have a prebuilt Apache upgrade that was installed on another HP-UX
10.20 system.  I thought about installing it, before I went down the
path to install gcc and Apache from scratch.  But, the prebuilt Apache
is not installed in the same location my current web server is (as you
indicated may be an issue).  So I would have to modify my current
location to get it to work.  Or modify the "httpd.conf" file to match
with my current apache directory structure.  This looks like the
simplest solution for now.

Again, thank you for your assistance on this.  If I can't get the
prebuilt Apache to work I may return to this and try it again.

VR,
Matt

-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
Behalf Of Bob Proulx
Sent: Wednesday, June 28, 2006 10:14
To: Mcgovern, Matthew CIV NAVAIR 521420E
Cc: gcc-help@gcc.gnu.org
Subject: Re: Gcc 3.4.6 Build error

Mcgovern, Matthew  CIV NAVAIR 521420E wrote:
> The only option to configure was:  --prefix=/usr/local/gccbuild.

The prefix sets the root of the tree for the *installation* of the
resulting program.  By setting prefix to /usr/local/gccbuild you are
saying that you want the 'make install' (which comes much later) to
install the resulting files into the /usr/local/gccbuild directory.

Reading your message I don't think that is what you intended.  I think
you were intending the build files to be put there.  You need to do that
in a different way.

> I did a mkdir of "gccbuild", but the object directory is 
> /usr/local/gccobj.  I used the "gccbuild" directory because of the 
> recommendation that the object directory not be in the same path as 
> the build directory, or vice versa.  The source directory is in a 
> totally different path.

I think what you are talking about here is what is known as "VPATH"
builds where the source directory is not modified, could even be
read-only, and the build happens outside of it in another directory.
That can be useful but is not required.  This is not the --prefix
option.  Instead call configure from the build directory.  Here is a
stylized example.

  tar xzvf gcc-X.Y.Z.tar.gz
  mkdir gcc-build
  cd gcc-build
  ../gcc-X.Y.Z/configure --other-options-...
  make
  ...other.stuff...

Because configure is called using the path to the source it will know
that it is setting up the build in the current directory.  The build
files will be there and the source will be untouched.  Many people favor
this build method.  (I actually don't because I build from pristine
source (tar xvf ...) every time and so don't care if the source is the
build directory too.)

> I don't know if I'm using the native HP C compiler.  I don't think it 
> is installed on this system.

Normally every HP-UX system would have a C compiler.  PATH would include
/usr/ccs/bin and /usr/ccs/bin/cc would be a symlink pointing to
cc_bundled.  That is the old K&R compiler from before 1989.  The
c89 and later compiler is in /usr/bin/cc as a symlink to
/opt/ansi/bin/cc but that is an optional product and would need to be
installed separately.

I will assume that you are using the bundled compiler.  You can test
this by listing the directories.  PATH should be set in /etc/profile to
include /usr/ccs/bin and (hopefully) nothing is removing that particular
path.  It should be after /usr/bin.

  ls -ld /usr/bin/cc
  ls -ld /usr/ccs/bin/cc

> I'm trying to install gcc so that I can upgrade/install Apache web 
> server (httpd 2.0).  The Apache is not building and I think it's 
> because I don't have any compilers installed on the system.  The OS 
> load was conducted using a proprietary set of tapes with proprietary 
> software, not by installing from a factory released build, so I think 
> they didn't install any compilers on the system.

That would make it difficult.  But if you don't have *any* compilers
installed then you would not be able to compile gcc either.  A
bootstrapping chicken-or-the-egg issue.

For now I would assume that apache requires a modern c89 or c99 or later
compiler and only the old K&R one is available.  I believe gcc can still
bootstrap itself from the K&R compiler.  I am sure someone on the
mailing list will correct me if that is not the case.  I have not tried
it for years.

> I don' t know what the bundled K&R compiler or the ANSI C compiler
are.

At one time all Unix machines included a C compiler as standard on the
system.  As time went by vendors make the ANSI standard compiler
optional and charged an extra charge for it.  But they still needed
something to configure the operating system kernel.  That is, they
needed something themselves.  The K&R compiler from pre-1989 days could
be used to link the kernel and was enough basic functionality to do some
things on the system (e.g. such as unshar uudecode
compilation) but not sufficient for most things and so customers would
then buy the ANSI compiler.  Well actually most people installed gcc
instead.

My notes show me doing this on HP-UX to configure gcc for building.
(This is mostly for the email archive.)

  # The first time around without gcc available use these:
  #   CC=cc CFLAGS="-O" LIBCXXFLAGS="-g -O2 -fno-implicit-templates"
  # The second and later times with gcc available use these:
  #   LIBCXXFLAGS="-g -O2 -fno-implicit-templates"

  LIBCFLAGS="-O2" LIBCXXFLAGS="-O2 -fno-implicit-templates" \
    ./configure \
    --prefix=/usr \
    --mandir=\${prefix}/share/man \
    --infodir=\${prefix}/share/info \
    --program-suffix=-3.3 \
    --with-as=/usr/bin/gas \
    --with-gnu-as \
    --enable-version-specific-runtime-libs \
    --enable-languages=c,c++ \
    --enable-cxx-flags='-fPIC'

  make -j2 bootstrap

> As you can tell I'm not as knowledgeable as I should be, but I need to

> upgrade my web server for security reasons.

Well...  You are basically putting yourself in the role of software
distribution developer.  And that means you would need to either have or
develop some of those basic skills.  It is not really very hard but you
have to have the mind-set that you are going to need to figure out a lot
of software development issues and to develop the tool-chain to support
doing this.  If you were using a GNU/Linux distribution then this would
be done for you by the distro vendor.  But you are not and so on HP-UX
you have to build the tools to build the tools to build the tools
yourself.  After the whole machine gets built up and moving things work
pretty well.  But bootstrapping yourself up from first principles can be
tedious and time consuming.

What I would recommend is to search the web for precompiled gcc
binaries.  Looking for "HP-UX porting center" should google hit to a few
places with precompiled binaries.  I think one of those would meet your
needs and avoid a lot of time and effort learning how to build up gcc on
your platform.  In fact I think from the hp.com website there are
pointers to precompiled versions of gcc.  But I have not looked for a
while so I may be out of date.  But using one of the versions
recommended by hp would be reasonable.

Because before building 
Both of those need GNU sed to configure.  And GNU m4 may also be
required, not sure.  Additionally to do a good job of it you need
libiconv, gettext, and texinfo.  Whew!  Lots of stuff.  Probably more
that I forgot about.

I think you would be much better off getting a precompiled binary.  At
the very least you could use it to bootstrap yourself.  The prebuild gcc
could be used to build the new gcc.  And binutils and so on.  Look on
the hp.com web site for a pointer to precompiled gcc binaries.  I found
these just a moment ago:

 
http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,17
03,547,00.html
 
http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,17
03,7663,00.html

You might be able to find a prebuild apache2 for hpux as well.

One issue about prebuild binaries is that everyone decides to install
them in different places.  Which means that almost certainly none will
install where you want it to install.  Oh well.

Bob

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Gcc 3.4.6 Build error
  2006-06-28 19:19       ` Mcgovern, Matthew  CIV NAVAIR 521420E
@ 2006-06-28 23:44         ` Bob Proulx
  0 siblings, 0 replies; 6+ messages in thread
From: Bob Proulx @ 2006-06-28 23:44 UTC (permalink / raw)
  To: Mcgovern, Matthew  CIV NAVAIR 521420E; +Cc: gcc-help

Mcgovern, Matthew  CIV NAVAIR 521420E wrote:
> However, I think your final suggestion, "You might be able to find a
> prebuild apache2 for hpux" may be the way to go for me.

That would certainly save you a bunch of time and effort.  Because gcc
is a large software project and not completely trivial to build from
scratch.  And then apache is another large software project and again
not completely trivial to build from scratch.  Doing both back to back
is a double hit of building the tools to build the tools.  Getting a
precompiled binary, even if not completely optimal, may still be best
for you.

> I don't even know if installing gcc will solve my Apache
> installation problem (which is what I'm mainly interested in).

Yep.  You need the milling machine to build the lathe to make the
crankshaft but what you really needed was simply the crankshaft.

> I do have a prebuilt Apache upgrade that was installed on another HP-UX
> 10.20 system.  I thought about installing it, before I went down the
> path to install gcc and Apache from scratch.  But, the prebuilt Apache
> is not installed in the same location my current web server is (as you
> indicated may be an issue).  So I would have to modify my current
> location to get it to work.  Or modify the "httpd.conf" file to match
> with my current apache directory structure.  This looks like the
> simplest solution for now.

Don't forget that symlinks may be able to adapt one location from one
place to another.  This is not really an apache forum.  But possibly
you could put symlinks in the filesystem to make the new installation
look like the old installation.

You have to be careful about the httpd.conf file because it will
specify dynamic libraries to load at program start.  It is usually
best to keep the httpd.conf file with the server it matches,
specifically for the shared library configuration, and instead make
the modifications that you need to make to the given file.  I don't
think I said that very well but hopefully you know what I meant
anyway.

> Again, thank you for your assistance on this.  If I can't get the
> prebuilt Apache to work I may return to this and try it again.

Good luck!

Bob

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-06-28 23:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-27 19:20 Gcc 3.4.6 Build error Mcgovern, Matthew  CIV NAVAIR 521420E
2006-06-28  8:34 ` Bob Proulx
2006-06-28 15:19   ` Mcgovern, Matthew  CIV NAVAIR 521420E
2006-06-28 17:14     ` Bob Proulx
2006-06-28 19:19       ` Mcgovern, Matthew  CIV NAVAIR 521420E
2006-06-28 23:44         ` Bob Proulx

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).