public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* problem compiling binutils 2.10
@ 2000-06-27 22:30 Heiko Nardmann
  2000-06-27 22:43 ` Alan Modra
  0 siblings, 1 reply; 11+ messages in thread
From: Heiko Nardmann @ 2000-06-27 22:30 UTC (permalink / raw)
  To: BinUtils

Hi!

I experienced the following problem compiling binutils 2.10.

For configure I used the following command line:
./configure --prefix=/opt/binutils-2.10 --exec-prefix=/opt/binutils-2.10
--enable-shared --enable-static
--enable-64-bit-bfd --enable-targets=all --enable-commonbfdlib
--target=hppa1.1-hp

The local host is a Linux x86pc with glibc 2.1 (SuSE 6.2).

I am using gcc-2.95.2.

This is the error message:

make[3]: Entering directory
`/home/nardmann/CompilationTmp/Linux-i86pc/cross-hp-ux-11/binutils-2.10/binutils'

/bin/sh ./libtool --mode=link gcc  -g -O2 -W -Wall  -o size  size.o
bucomm.o version.o filemode.o ../bfd/libbfd.la ../libiberty/libiberty.a
gcc -g -O2 -W -Wall -o size size.o bucomm.o version.o filemode.o
../bfd/.libs/libbfd.a ../libiberty/libiberty.a
../bfd/.libs/libbfd.a(targets.o): In function `find_target':
/home/nardmann/CompilationTmp/Linux-i86pc/cross-hp-ux-11/binutils-2.10/bfd/./targets.c:961:
undefined reference to `som_vec'
/home/nardmann/CompilationTmp/Linux-i86pc/cross-hp-ux-11/binutils-2.10/bfd/./targets.c:961:
undefined reference to `som_vec'
collect2: ld returned 1 exit status
make[3]: *** [size] Error 1

--
Heiko Nardmann (Dipl.-Ing.), h.nardmann@secunet.de, Software Development

secunet Security Networks AG - Sicherheit in Netzwerken
(www.secunet.de),
Weidenauer Str. 223-225, D-57076 Siegen
Tel. : +49 271 48950-13, Fax  : +49 271 48950-50


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

* Re: problem compiling binutils 2.10
  2000-06-27 22:30 problem compiling binutils 2.10 Heiko Nardmann
@ 2000-06-27 22:43 ` Alan Modra
  2000-06-27 23:07   ` Heiko Nardmann
  0 siblings, 1 reply; 11+ messages in thread
From: Alan Modra @ 2000-06-27 22:43 UTC (permalink / raw)
  To: Heiko Nardmann; +Cc: BinUtils

On Wed, 28 Jun 2000, Heiko Nardmann wrote:

> /bin/sh ./libtool --mode=link gcc  -g -O2 -W -Wall  -o size  size.o
> bucomm.o version.o filemode.o ../bfd/libbfd.la ../libiberty/libiberty.a
> gcc -g -O2 -W -Wall -o size size.o bucomm.o version.o filemode.o
> ../bfd/.libs/libbfd.a ../libiberty/libiberty.a
> ../bfd/.libs/libbfd.a(targets.o): In function `find_target':
> /home/nardmann/CompilationTmp/Linux-i86pc/cross-hp-ux-11/binutils-2.10/bfd/./targets.c:961:
> undefined reference to `som_vec'
> /home/nardmann/CompilationTmp/Linux-i86pc/cross-hp-ux-11/binutils-2.10/bfd/./targets.c:961:
> undefined reference to `som_vec'

SOM targets can only be compiled on a native HP system, as they
unfortunately make use of system header files.

-- 
Linuxcare.  Support for the Revolution.

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

* Re: problem compiling binutils 2.10
  2000-06-27 22:43 ` Alan Modra
@ 2000-06-27 23:07   ` Heiko Nardmann
  2000-06-27 23:28     ` Alan Modra
  0 siblings, 1 reply; 11+ messages in thread
From: Heiko Nardmann @ 2000-06-27 23:07 UTC (permalink / raw)
  To: Alan Modra; +Cc: BinUtils

Which header files are needed?
I have access to the HP-UX 11 machine so tell me what to get from it.

Alan Modra wrote:

> On Wed, 28 Jun 2000, Heiko Nardmann wrote:
>
> > /bin/sh ./libtool --mode=link gcc  -g -O2 -W -Wall  -o size  size.o
> > bucomm.o version.o filemode.o ../bfd/libbfd.la ../libiberty/libiberty.a
> > gcc -g -O2 -W -Wall -o size size.o bucomm.o version.o filemode.o
> > ../bfd/.libs/libbfd.a ../libiberty/libiberty.a
> > ../bfd/.libs/libbfd.a(targets.o): In function `find_target':
> > /home/nardmann/CompilationTmp/Linux-i86pc/cross-hp-ux-11/binutils-2.10/bfd/./targets.c:961:
> > undefined reference to `som_vec'
> > /home/nardmann/CompilationTmp/Linux-i86pc/cross-hp-ux-11/binutils-2.10/bfd/./targets.c:961:
> > undefined reference to `som_vec'
>
> SOM targets can only be compiled on a native HP system, as they
> unfortunately make use of system header files.
>
> --
> Linuxcare.  Support for the Revolution.

--
Heiko Nardmann (Dipl.-Ing.), h.nardmann@secunet.de, Software Development
secunet Security Networks AG - Sicherheit in Netzwerken (www.secunet.de),
Weidenauer Str. 223-225, D-57076 Siegen
Tel. : +49 271 48950-13, Fax  : +49 271 48950-50


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

* Re: problem compiling binutils 2.10
  2000-06-27 23:07   ` Heiko Nardmann
@ 2000-06-27 23:28     ` Alan Modra
  2000-06-28  0:37       ` Heiko Nardmann
  0 siblings, 1 reply; 11+ messages in thread
From: Alan Modra @ 2000-06-27 23:28 UTC (permalink / raw)
  To: Heiko Nardmann; +Cc: BinUtils

On Wed, 28 Jun 2000, Heiko Nardmann wrote:

> Which header files are needed?

"grep -l HOST_HPPA bfd/*" will tell you the files that include HP-UX
system headers.

-- 
Linuxcare.  Support for the Revolution.

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

* Re: problem compiling binutils 2.10
  2000-06-27 23:28     ` Alan Modra
@ 2000-06-28  0:37       ` Heiko Nardmann
  2000-06-28  0:50         ` Alan Modra
  0 siblings, 1 reply; 11+ messages in thread
From: Heiko Nardmann @ 2000-06-28  0:37 UTC (permalink / raw)
  To: Alan Modra; +Cc: BinUtils

Done "grep -l HOST_HPPA *.c *.h".
This command gives me the following list:

hppabsd-core.c
hpux-core.c
som.c
som.h
targets.c
targmatch.h

Now I am not sure which header files are needed.
As far as I understand it this thing is only targeted for native HPPA
systems, isn't it?
Why are some format definitions part of binutils and some not?

Do I have to define HAVE_som_vec somehow? Or do I have to copy the whole
/usr/include
tree of the HP-UX 11 machine to some place and give the path to
configure somehow?

Alan Modra wrote:

> On Wed, 28 Jun 2000, Heiko Nardmann wrote:
>
> > Which header files are needed?
>
> "grep -l HOST_HPPA bfd/*" will tell you the files that include HP-UX
> system headers.
>
> --
> Linuxcare.  Support for the Revolution.

--
Heiko Nardmann (Dipl.-Ing.), h.nardmann@secunet.de, Software Development

secunet Security Networks AG - Sicherheit in Netzwerken
(www.secunet.de),
Weidenauer Str. 223-225, D-57076 Siegen
Tel. : +49 271 48950-13, Fax  : +49 271 48950-50


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

* Re: problem compiling binutils 2.10
  2000-06-28  0:37       ` Heiko Nardmann
@ 2000-06-28  0:50         ` Alan Modra
  2000-06-28  1:20           ` Heiko Nardmann
  2000-06-28  9:03           ` Jeffrey A Law
  0 siblings, 2 replies; 11+ messages in thread
From: Alan Modra @ 2000-06-28  0:50 UTC (permalink / raw)
  To: Heiko Nardmann; +Cc: BinUtils

On Wed, 28 Jun 2000, Heiko Nardmann wrote:

> Now I am not sure which header files are needed.
> As far as I understand it this thing is only targeted for native HPPA
> systems, isn't it?

Yes.  One way to find out which header files are needed is to compile with
-DHOST_HPPAHPUX added to CFLAGS and see what breaks.  I haven't tried this
sort of this myself, so you'll probably need to do a little work.

> Why are some format definitions part of binutils and some not?

I don't know the history behind this, sorry.

-- 
Linuxcare.  Support for the Revolution.

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

* Re: problem compiling binutils 2.10
  2000-06-28  0:50         ` Alan Modra
@ 2000-06-28  1:20           ` Heiko Nardmann
  2000-06-28  2:12             ` Alan Modra
  2000-06-28  9:03           ` Jeffrey A Law
  1 sibling, 1 reply; 11+ messages in thread
From: Heiko Nardmann @ 2000-06-28  1:20 UTC (permalink / raw)
  To: Alan Modra; +Cc: BinUtils

Now I have defined HOST_HPPAHPUX and saw that the following files were
missing:
lst.h
machine/reg.h

So I created bfd/hppa-hpux-include, copied lst.h, created machine, copied
reg.h and added the include path.
Now this is the result of make:

make[2]: Entering directory
`/home/nardmann/CompilationTmp/Linux-i86pc/cross-hp-ux-11/binutils-2.10/bfd'
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.
-D_GNU_SOURCE     -I. -I. -I./../include -Ihppa-hpux-include
-I./../intl -I../intl    -g -O2 -W -Wall -DHOST_HPPAHPUX -c som.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I./../include
-Ihppa-hpux-include -I./../intl -I../intl -g -O2 -W -Wall-DHOST_HPPAHPUX -c
som.c -o som.o
In file included from som.c:31:
som.h:116: parse error before `COMPUNIT'
som.h:116: warning: no semicolon at end of struct or union
som.h:132: parse error before `}'
som.h:136: field `a' has incomplete type
som.c:201: warning: `struct symbol_dictionary_record' declared inside
parameter list
som.c:201: warning: its scope is only this definition or declaration, which is
probably not what you want.
som.c:243: parse error before `COMPUNIT'
som.c:250: warning: `struct lst_header' declared inside parameter list
som.c:253: warning: `struct lst_header' declared inside parameter list
som.c:265: warning: `struct lst_header' declared inside parameter list
som.c:265: warning: parameter has incomplete type
som.c:391: warning: missing braces around initializer
som.c:391: warning: (near initialization for `som_fixup_formats[0]')
som.c:792: `R_NO_RELOCATION' undeclared here (not in a function)
som.c:792: initializer element is not constant

and so on ...

COMPUNIT is a define in /usr/include/compunit.h:

struct compilation_unit {
        union name_pt    name;
        union name_pt    language_name;
        union name_pt    product_id;
        union name_pt    version_id;
        unsigned int     reserved   : 31;
        unsigned int     chunk_flag :  1;
        struct sys_clock compile_time;
        struct sys_clock source_time;
};

#define COMPUNIT struct compilation_unit
#define COMPUNITSZ sizeof(COMPUNIT)

So do I have to insert a include statement somewhere? If yes where is it best?

Alan Modra wrote:

> On Wed, 28 Jun 2000, Heiko Nardmann wrote:
>
> > Now I am not sure which header files are needed.
> > As far as I understand it this thing is only targeted for native HPPA
> > systems, isn't it?
>
> Yes.  One way to find out which header files are needed is to compile with
> -DHOST_HPPAHPUX added to CFLAGS and see what breaks.  I haven't tried this
> sort of this myself, so you'll probably need to do a little work.
>
> > Why are some format definitions part of binutils and some not?
>
> I don't know the history behind this, sorry.
>
> --
> Linuxcare.  Support for the Revolution.

--
Heiko Nardmann (Dipl.-Ing.), h.nardmann@secunet.de, Software Development
secunet Security Networks AG - Sicherheit in Netzwerken (www.secunet.de),
Weidenauer Str. 223-225, D-57076 Siegen
Tel. : +49 271 48950-13, Fax  : +49 271 48950-50


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

* Re: problem compiling binutils 2.10
  2000-06-28  1:20           ` Heiko Nardmann
@ 2000-06-28  2:12             ` Alan Modra
  2000-06-28  7:03               ` Joel Sherrill
  0 siblings, 1 reply; 11+ messages in thread
From: Alan Modra @ 2000-06-28  2:12 UTC (permalink / raw)
  To: Heiko Nardmann; +Cc: binutils

On Wed, 28 Jun 2000, Heiko Nardmann wrote:

> COMPUNIT is a define in /usr/include/compunit.h:
> So do I have to insert a include statement somewhere? If yes where is it best?

No.  HPUX:/usr/include/compunit.h is probably included from one of the
other HPUX:/usr/include/*.h files, and you are quite likely to need that
one too.  The trouble is going to be that even if you figure out exactly
which header files must be pulled in from HP-UX, it's likely that at least
some of them will clash with header files on your native system.  I wish
you luck!

Alan Modra

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

* Re: problem compiling binutils 2.10
  2000-06-28  2:12             ` Alan Modra
@ 2000-06-28  7:03               ` Joel Sherrill
  2000-06-28  8:30                 ` Jeffrey A Law
  0 siblings, 1 reply; 11+ messages in thread
From: Joel Sherrill @ 2000-06-28  7:03 UTC (permalink / raw)
  To: Alan Modra; +Cc: Heiko Nardmann, binutils

Alan Modra wrote:
> 
> On Wed, 28 Jun 2000, Heiko Nardmann wrote:
> 
> > COMPUNIT is a define in /usr/include/compunit.h:
> > So do I have to insert a include statement somewhere? If yes where is it best?
> 
> No.  HPUX:/usr/include/compunit.h is probably included from one of the
> other HPUX:/usr/include/*.h files, and you are quite likely to need that
> one too.  The trouble is going to be that even if you figure out exactly
> which header files must be pulled in from HP-UX, it's likely that at least
> some of them will clash with header files on your native system.  I wish
> you luck!

If you want to fix this long term, why not create the files and
add them to binutils.  Start by creating empty versions of all
the missing files.  Then see what types/structures/defines the
code really needs.  Add them to your empty files until it compiles.
Don't add anything that is not needed.

Someone else will have to speak about keeping the new files
clean enough to make them suitable for inclusion in binutils.
 
> Alan Modra

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985

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

* Re: problem compiling binutils 2.10
  2000-06-28  7:03               ` Joel Sherrill
@ 2000-06-28  8:30                 ` Jeffrey A Law
  0 siblings, 0 replies; 11+ messages in thread
From: Jeffrey A Law @ 2000-06-28  8:30 UTC (permalink / raw)
  To: joel.sherrill; +Cc: Alan Modra, Heiko Nardmann, binutils

  In message < 395A0529.61CA902C@OARcorp.com >you write:
  > Alan Modra wrote:
  > > 
  > > On Wed, 28 Jun 2000, Heiko Nardmann wrote:
  > > 
  > > > COMPUNIT is a define in /usr/include/compunit.h:
  > > > So do I have to insert a include statement somewhere? If yes where is i
  > t best?
  > > 
  > > No.  HPUX:/usr/include/compunit.h is probably included from one of the
  > > other HPUX:/usr/include/*.h files, and you are quite likely to need that
  > > one too.  The trouble is going to be that even if you figure out exactly
  > > which header files must be pulled in from HP-UX, it's likely that at leas
  > t
  > > some of them will clash with header files on your native system.  I wish
  > > you luck!
  > 
  > If you want to fix this long term, why not create the files and
  > add them to binutils.  Start by creating empty versions of all
  > the missing files.  Then see what types/structures/defines the
  > code really needs.  Add them to your empty files until it compiles.
  > Don't add anything that is not needed.
  > 
  > Someone else will have to speak about keeping the new files
  > clean enough to make them suitable for inclusion in binutils.
Right.  It's certainly do-able.

Given that you have to be source-compatible with the hpux header files
you're limited in how many different ways you can do things, but so long
as you don't actually copy the hpux header files you should be OK.

So, how do you get the information you need about types and sizes of
structures?  There's actually a manual on HP's web site which describes
all the gory bits in the SOM header files.

jeff

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

* Re: problem compiling binutils 2.10
  2000-06-28  0:50         ` Alan Modra
  2000-06-28  1:20           ` Heiko Nardmann
@ 2000-06-28  9:03           ` Jeffrey A Law
  1 sibling, 0 replies; 11+ messages in thread
From: Jeffrey A Law @ 2000-06-28  9:03 UTC (permalink / raw)
  To: Alan Modra; +Cc: Heiko Nardmann, BinUtils

  In message < Pine.LNX.4.21.0006281741090.27908-100000@front.linuxcare.com.au >y
ou write:
  > On Wed, 28 Jun 2000, Heiko Nardmann wrote:
  > 
  > > Now I am not sure which header files are needed.
  > > As far as I understand it this thing is only targeted for native HPPA
  > > systems, isn't it?
  > 
  > Yes.  One way to find out which header files are needed is to compile with
  > -DHOST_HPPAHPUX added to CFLAGS and see what breaks.  I haven't tried this
  > sort of this myself, so you'll probably need to do a little work.
It can be done (I've done it in the past to build cross assemblers and such
for SOM tools.

  > > Why are some format definitions part of binutils and some not?
  > 
  > I don't know the history behind this, sorry.
Because nobody's felt it important enough to rewrite the necessary header
files so that they could be included in the binutils distribution without
violating the HP copyrights on their headerfiles.

Not a lot of folks care about cross-assemblers and such for SOM.

jeff

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

end of thread, other threads:[~2000-06-28  9:03 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-27 22:30 problem compiling binutils 2.10 Heiko Nardmann
2000-06-27 22:43 ` Alan Modra
2000-06-27 23:07   ` Heiko Nardmann
2000-06-27 23:28     ` Alan Modra
2000-06-28  0:37       ` Heiko Nardmann
2000-06-28  0:50         ` Alan Modra
2000-06-28  1:20           ` Heiko Nardmann
2000-06-28  2:12             ` Alan Modra
2000-06-28  7:03               ` Joel Sherrill
2000-06-28  8:30                 ` Jeffrey A Law
2000-06-28  9:03           ` Jeffrey A Law

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).