Re: build fails on hppa (gcc 3.X problem?)
On 25 Mar 2002, Grzegorz Prokopski wrote:
> W li¶cie z pon, 25-03-2002, godz. 17:31, Philip Blundell pisze:
> > You need to find out where that "-Wl,-b" is coming from. It needs to
> > either be followed by a valid BFD name, or omitted altogether.
-Wl,-b is hard-coded in the configure script (and in configure.in) and
seems to only affect *hppa*|*hpux*. In other words, this is probably only
needed for HP-UX, but isn't a narrow enough pattern to NOT do this on
hppa*-linux. FYI, -b on HP-UX tells the linker to create a shared library
rather than a normal executable, which appears appropriate for that
OS/platform in context. Unfortunately, GNU ld expects -b to be followed
by a BFD target name for the input file.
> Questions are steps of thinking...
> Q1: WTF is BDF (lirycs?) ?
It's BFD: Binary Format Descriptor, IIRC (been awhile since I actually
looked this up). See the binutils-doc package ('info bfd').
> I configured gcc/g++ 3.0 on my machine, exported CC and CXX variables
> to point them, recompiled the package and:
> - it compiled w/o errors
> - there were NO "-Wl,-b" string anywhere.
-Wl,-b won't show up on any arch other than hppa-based platforms. I can
probably patch this, but it will have to wait a bit (I'm swamped with my
own package issues). Others can probably do this as well (any
interested? If so, see line 464 in configure.in and start fixing :-P).
> - above, at the end of another string it is appended "-Wl,-E" but
> it passes this stage, of course at my i386 w/ gcc/g++ 3.0 it
> didn't appeared ;-?
GNU ld's '-E' argument tells ld to add all symbols to the dynamic symbol
table of the generated file.
> Q2: How then is hppa differently configured if adds such strings
> "just like that" ?
It's in the configure.in file, so it's not "just like that" at all...it's
being told to do so on *hppa*|*hpux* targets, so it's doing what it's
told. I don't think the upstream author expected this to be compiled on
hppa-linux, which isn't accounted for in that conditional (in other words,
according to upstream, all parisc-based machines will be running HP-UX
with NO exceptions).
> Q3: I'd want to look at the Makefile on hppa after I ./configure
> (and environment variables too), but I am not DD (yet) and I don't
> have access to any other machine than my old AMD300.
> - is there any possibility to an account on any hppa machine w/ debian?
> - could anyone apt-get source xnc on hppa box and send me Makefile
> after ./configure ?
There's no point. It's a one-liner fix that you could probably easily
accomplish despite having no access to an hppa box :-) Expected strings
on hppas running linux are either hppa-linux or hppa64-linux, fyi.
Upstream can probably solve this even faster since they apparently know
something of HP-UX to have the condition in there to begin with.
> Q4: Why is this STRIPPING set else on hppa than on my i386 box ?
> -Wl seems to have sth to do with warning's handling, but -b... :
> -b machine
> The argument machine specifies the target machine for compilation.
> This is useful when you have installed GCC as a cross-compiler.
> The value to use for machine is the same as was specified as the machine
> type when configuring GCC as a cross-compiler. For example, if a
> cross-compiler was configured with configure i386v, meaning to compile
> for an 80386 running SystemV, then you would specify -b i386v to run
> that cross compiler.When you do not specify -b, it normally means to
> compile for the same type of machine that you are using.
From ld(1) on HP-UX 11.00:
-b Create a shared library rather than a normal
executable file. Object files processed with this
option must contain position-independent code
(PIC). See the discussion of PIC in cc(1), CC(1)
(part of the optional C++ compiler documentation),
f77(1), pc(1), as(1), and Linker and Libraries
Online User Guide.
A quick hint: never expect GNU ld to have the same option meanings as
proprietary linkers, like Sun's or HP's. Many times, GNU ld will have
similar options that sometimes share the same '-whatever' option flag, but
more often than not, GNU ld's options are just not the same.
> I didn't mean to crosscompile. Or maybe Debian desn't have hppa box
> and it does cross-compilation and it causes the problem here ????????
Nonsense...Debian does have hppa-linux machines (see
http://db.debian.org/machines.cgi ...I have one at home as
well) and I can assure you that this problem shows up in a native
To UNSUBSCRIBE, email to firstname.lastname@example.org
with a subject of "unsubscribe". Trouble? Contact email@example.com