Mailing List Archive

ebuild update for Xorg-x11
I've found that the Xorg-x11 build on alpha a bit unstable..

That is until I made a very minor modification to the ebuild file.

I added an entry for alpha systems and ALLOWEDFLAGS to include -fPIC -DPIC

> alpha) ALLOWED_FLAGS="${ALLOWED_FLAGS} -mtune -fPIC -DPIC" ;;

--
Brian Parkhurst
23721 101st PL W
Edmonds, WA 98020
206-533-1861
Re: ebuild update for Xorg-x11 [ In reply to ]
What is that "-mtune" without an argument? It should
have something like "-mtune=ev56" or "-mtune=ev6"
after it, depending on your machine. Though, we are
talking about Gentoo here, so "-mcpu=<machine type>"
is probably the better option to use. In any case, I
am surprised gcc didn't complain about the existing
flags.

--- "Brian C. Parkhurst" <brianp@spamcop.net> wrote:

>
> I've found that the Xorg-x11 build on alpha a bit
> unstable..
>
> That is until I made a very minor modification to
> the ebuild file.
>
> I added an entry for alpha systems and ALLOWEDFLAGS
> to include -fPIC -DPIC
>
> > alpha) ALLOWED_FLAGS="${ALLOWED_FLAGS}
> -mtune -fPIC -DPIC" ;;
>




__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo

--
gentoo-alpha@gentoo.org mailing list
Re: ebuild update for Xorg-x11 [ In reply to ]
Brian C. Parkhurst wrote:[Tue Oct 26 2004, 01:20:34PM EDT]
> I've found that the Xorg-x11 build on alpha a bit unstable..
> That is until I made a very minor modification to the ebuild file.
> I added an entry for alpha systems and ALLOWEDFLAGS to include -fPIC -DPIC
>
> > alpha) ALLOWED_FLAGS="${ALLOWED_FLAGS} -mtune -fPIC -DPIC" ;;

I don't get it... This just changes what you're allowed to pass in via
your own CFLAGS variable. If xorg-x11 is unstable on alpha due to PIC
issues, then we need to fix the Makefiles to include -fPIC where
necessary.

OTOH, usually lacking -fPIC results in a build failure, not run-time
failures. Are you sure this is what made the difference for you?

Regards,
Aron

--
Aron Griffis
Gentoo Linux Developer
Re: ebuild update for Xorg-x11 [ In reply to ]
Jeff Donsbach wrote:[Tue Oct 26 2004, 04:15:08PM EDT]
> What is that "-mtune" without an argument? It should have something
> like "-mtune=ev56" or "-mtune=ev6" after it, depending on your
> machine. Though, we are talking about Gentoo here, so
> "-mcpu=<machine type>" is probably the better option to use. In any
> case, I am surprised gcc didn't complain about the existing flags.

ALLOWED_FLAGS is a variable used by strip-flags in
flag-o-matic.eclass. strip-flags understands -flag=* stuff.

http://www.gentoo.org/cgi-bin/viewcvs.cgi/eclass/flag-o-matic.eclass?rev=HEAD&content-type=text/vnd.viewcvs-markup

Regards,
Aron

--
Aron Griffis
Gentoo Linux Developer
Re: ebuild update for Xorg-x11 [ In reply to ]
--- Aron Griffis <agriffis@gentoo.org> wrote:
>
> ALLOWED_FLAGS is a variable used by strip-flags in
> flag-o-matic.eclass. strip-flags understands
> -flag=* stuff.
>
>
http://www.gentoo.org/cgi-bin/viewcvs.cgi/eclass/flag-o-matic.eclass?rev=HEAD&content-type=text/vnd.viewcvs-markup
>

Oh.... right.... I knew that..... duh... never mind..





__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail

--
gentoo-alpha@gentoo.org mailing list
Re: ebuild update for Xorg-x11 [ In reply to ]
Alright I stripped my processor type, sorry.

The -fPIC -DPIC definitely made a difference. I've been running Gentoo
since January on this particular alpha but have yet (Xfree or Xorg) to
get X to run locally. Always server core exit on run.
I was also getting lots of:

Elf_RelocateEntry() Unsupported relocation type 10

Which googling pointed to PIC problems with the compilation.

Xorg -configure always worked okay. Last problem I was having was xfs
giving a floating point exception on startup.

I modded my local ebuild file to allow -fPIC -DPIC from my CFLAGS to get
passed through.

My current mostly innocuous CFLAGS are:

CFLAGS="-mcpu=ev56 -O3 -pipe -fPIC -DPIC"

The build took 12 hours and I am still getting the ELF errors but it
looks as the X continues to run and doesn't server exit. (I'm not
actually at the console at the moment to see the X though).

BTW, this alpha server 800 with an add-on ATI RagePro3D+TV (Mach 64
derivative)

I disabled the onboard S3 VGA as it wasn't supported except as a VGA.

my lspci output:

0000:00:05.0 SCSI storage controller: QLogic Corp. ISP1020 Fast-wide
SCSI (rev 05)
0000:00:07.0 Non-VGA unclassified device: Intel Corp. 82375EB/SB PCI to
EISA Bridge (rev 15)
0000:00:0b.0 VGA compatible controller: ATI Technologies Inc 3D Rage II+
215GTB [Mach64 GTB] (rev 9a)
0000:00:0c.0 SCSI storage controller: QLogic Corp. ISP1020 Fast-wide
SCSI (rev 05)
0000:00:0d.0 PCI bridge: Digital Equipment Corporation DECchip 21152
(rev 02)
0000:00:0e.0 RAID bus controller: Mylex Corporation DAC960P (rev 02)
0000:01:04.0 Ethernet controller: Digital Equipment Corporation DECchip
21140 [FasterNet] (rev 22)
0000:01:05.0 Ethernet controller: Digital Equipment Corporation DECchip
21140 [FasterNet] (rev 22)
0000:01:06.0 Ethernet controller: Digital Equipment Corporation DECchip
21140 [FasterNet] (rev 22)
0000:01:07.0 Ethernet controller: Digital Equipment Corporation DECchip
21140 [FasterNet] (rev 22)

Brian Parkhurst
brianp@spamcop.net
Re: ebuild update for Xorg-x11 [ In reply to ]
Brian C. Parkhurst wrote:[Tue Oct 26 2004, 06:36:52PM EDT]
> The -fPIC -DPIC definitely made a difference. I've been running Gentoo
> since January on this particular alpha but have yet (Xfree or Xorg) to
> get X to run locally. Always server core exit on run.

I'm running xorg-x11-6.8 on XP1000 with no problems without needing to
explicitly specify -fPIC

> I was also getting lots of:
>
> Elf_RelocateEntry() Unsupported relocation type 10
>
> Which googling pointed to PIC problems with the compilation.

Oh, really? I wasn't aware of that. Could you point to the pages?

> Xorg -configure always worked okay. Last problem I was having was xfs
> giving a floating point exception on startup.

This isn't related to -fPIC. I include -mieee in CFLAGS on alpha
which would probably fix that problem for you. (I'd like it if
everybody would include -mieee in CFLAGS on alpha... there's almost no
code out there that's written to work with the non-ieee behavior, so
it's just asking for trouble to build without it)

> The build took 12 hours and I am still getting the ELF errors but it
> looks as the X continues to run and doesn't server exit.
> (I'm not actually at the console at the moment to see the X though).
> BTW, this alpha server 800 with an add-on ATI RagePro3D+TV (Mach 64
> derivative)
> I disabled the onboard S3 VGA as it wasn't supported except as a VGA.

Good to hear it's working... I don't have an ATI adapter on alpha to
test at the moment. My daily workstation has an Elsa GLoria.

Regards,
Aron

--
Aron Griffis
Gentoo Linux Developer
RE: ebuild update for Xorg-x11 [ In reply to ]
I've seen the issues with mieee I'll add to my default CFLAGS, might want to
add that to the Alpha Handbook Documentation. I've seen the ieee problem
mostly with the native compaq compiler though, both on Alpha-linux and
Tru64.

I'll see if I can find the pages referencing the PIC problems again, took me
a while to find it.
1) http://lists.debian.org/debian-x/2003/02/msg00005.html
2)
http://groups.google.com/groups?q=Elf_RelocateEntry()+Unsupported+relocation
+type+10&hl=en&lr=&ie=UTF-8&selm=1sKRQ-2iH-1531%40gated-at.bofh.it&rnum=1
3) http://archives.neohapsis.com/archives/linux/axp/2002-q1/0397.html

Hmm, can't find the reference to PIC again but did find the above references
to a patch for the ELF relocate problem for the Xserver module loader on the
Alpha platform..

Brian..



-----Original Message-----
From: Aron Griffis [mailto:agriffis@gentoo.org]
Sent: Tuesday, October 26, 2004 4:04 PM
To: gentoo-alpha@lists.gentoo.org
Subject: Re: [gentoo-alpha] ebuild update for Xorg-x11

Brian C. Parkhurst wrote:[Tue Oct 26 2004, 06:36:52PM EDT]
> The -fPIC -DPIC definitely made a difference. I've been running Gentoo
> since January on this particular alpha but have yet (Xfree or Xorg) to
> get X to run locally. Always server core exit on run.

I'm running xorg-x11-6.8 on XP1000 with no problems without needing to
explicitly specify -fPIC

> I was also getting lots of:
>
> Elf_RelocateEntry() Unsupported relocation type 10
>
> Which googling pointed to PIC problems with the compilation.

Oh, really? I wasn't aware of that. Could you point to the pages?

> Xorg -configure always worked okay. Last problem I was having was xfs
> giving a floating point exception on startup.

This isn't related to -fPIC. I include -mieee in CFLAGS on alpha
which would probably fix that problem for you. (I'd like it if
everybody would include -mieee in CFLAGS on alpha... there's almost no
code out there that's written to work with the non-ieee behavior, so
it's just asking for trouble to build without it)

> The build took 12 hours and I am still getting the ELF errors but it
> looks as the X continues to run and doesn't server exit.
> (I'm not actually at the console at the moment to see the X though).
> BTW, this alpha server 800 with an add-on ATI RagePro3D+TV (Mach 64
> derivative)
> I disabled the onboard S3 VGA as it wasn't supported except as a VGA.

Good to hear it's working... I don't have an ATI adapter on alpha to
test at the moment. My daily workstation has an Elsa GLoria.

Regards,
Aron

--
Aron Griffis
Gentoo Linux Developer



--
gentoo-alpha@gentoo.org mailing list
Re: ebuild update for Xorg-x11 [ In reply to ]
Just to clear up any possible confusion regarding both -mieee and PIC code.

Alpha processors prior to ev6 require a little help from libc / the kernel to be IEEE compatible. Most code require this as Aron already mentioned. You need to add -mieee to CFLAGS and it's cousin CXXFLAGS as well as enable floating point completion in the kernel for this to work. Stuff like opengl will probably break without this support.

Regarding the possible PIC issues: shared libraries should be compiled -fPIC (or -fpic) or you'll get linking errors on some archs. x86 is mostly unaffected by this but you'll find that alpha complains loudly if you'll try to link PIC and non-PIC code. Usually this results in errors during the compilation aborting your emerge. Xfree and xorg-x11 is a little different as it loads the driver modules dynamically at run-time using it's own elf loader. This is also the reason that you'll see 'unsupported elf relocation type' errors - the built-in elf loader doesn't support all the relocation types that binutils does.

There's basically two ways to solve this:
1. Patch the X elf loader to support all relocation types. There's some patches floating around already that does this - at least to some extent.
2. Use dlload() instead of the built-in elf loader. You can turn on this behaviour using USE="dlloader" and remerging xfree / xorg-x11. Beware that this hasn't received as much testing yet as the built-in elf loader but it's used by the Gentoo hardened project at least.

Hope this clears up the confusion (if any).

Regards,
Bryan Østergaard
Gentoo/Alpha developer

--
gentoo-alpha@gentoo.org mailing list
Re: ebuild update for Xorg-x11 [ In reply to ]
Thanks for the clarification. Some of the information floating around out
there is a bit vague and piecing together an answer has been somewhat of a
challenge. You did it in about 2 paragraphs.

This really answers most of the questions I've been trying to figure out for
the last many months. I new it had to be possible as X was running on this
machine (Compaq RH 7.3 distro), prior to my building out the Gentoo.

Things to do on my part:

1. Check my kernel build to confirm the floating point completion is
enabled in kernel
2. Add mieee to my CFLAGS (my CXXFLAGS pick-up my CFLAGS)
3. Try the USE="dlloader" flag
3a. alternatively try patching the Xorg elf-loader

Brian Parkhurst.


----- Original Message -----
From: <kloeri@gentoo.org>
To: <gentoo-alpha@lists.gentoo.org>
Sent: Tuesday, October 26, 2004 7:36 PM
Subject: Re: [gentoo-alpha] ebuild update for Xorg-x11


> Just to clear up any possible confusion regarding both -mieee and PIC
code.
>
> Alpha processors prior to ev6 require a little help from libc / the kernel
to be IEEE compatible. Most code require this as Aron already mentioned. You
need to add -mieee to CFLAGS and it's cousin CXXFLAGS as well as enable
floating point completion in the kernel for this to work. Stuff like opengl
will probably break without this support.
>
> Regarding the possible PIC issues: shared libraries should be
compiled -fPIC (or -fpic) or you'll get linking errors on some archs. x86 is
mostly unaffected by this but you'll find that alpha complains loudly if
you'll try to link PIC and non-PIC code. Usually this results in errors
during the compilation aborting your emerge. Xfree and xorg-x11 is a little
different as it loads the driver modules dynamically at run-time using it's
own elf loader. This is also the reason that you'll see 'unsupported elf
relocation type' errors - the built-in elf loader doesn't support all the
relocation types that binutils does.
>
> There's basically two ways to solve this:
> 1. Patch the X elf loader to support all relocation types. There's some
patches floating around already that does this - at least to some extent.
> 2. Use dlload() instead of the built-in elf loader. You can turn on this
behaviour using USE="dlloader" and remerging xfree / xorg-x11. Beware that
this hasn't received as much testing yet as the built-in elf loader but it's
used by the Gentoo hardened project at least.
>
> Hope this clears up the confusion (if any).
>
> Regards,
> Bryan Ã~stergaard
> Gentoo/Alpha developer
>
> --
> gentoo-alpha@gentoo.org mailing list
>
>


--
gentoo-alpha@gentoo.org mailing list
Re: ebuild update for Xorg-x11 [ In reply to ]
--- Aron Griffis <agriffis@gentoo.org> wrote:
> I include -mieee in
> CFLAGS on alpha
> which would probably fix that problem for you. (I'd
> like it if
> everybody would include -mieee in CFLAGS on alpha...
> there's almost no
> code out there that's written to work with the
> non-ieee behavior, so
> it's just asking for trouble to build without it)

True. But you don't notice much (if any) of a
performance hit because of it on an EV6. Some of us
aren't so lucky. ;-)

I haven't explicity added it on my system. So far so
good.

Jeff






_______________________________
Do you Yahoo!?
Express yourself with Y! Messenger! Free. Download now.
http://messenger.yahoo.com

--
gentoo-alpha@gentoo.org mailing list
RE: ebuild update for Xorg-x11 [ In reply to ]
--- Brian Parkhurst <brianp@spamcop.net> wrote:

> I've seen the issues with mieee I'll add to my
> default CFLAGS, might want to
> add that to the Alpha Handbook Documentation. I've
> seen the ieee problem
> mostly with the native compaq compiler though, both
> on Alpha-linux and
> Tru64.

In my experience, the problem is not the compiler so
much as broken apps. Most of the crashes that I have
ever seen and fixed that crashed due to floating point
exceptions on Alpha were caused by uninitialized
floating point variables.

Jeff D




__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail

--
gentoo-alpha@gentoo.org mailing list
Re: ebuild update for Xorg-x11 [ In reply to ]
Jeff Donsbach wrote:[Wed Oct 27 2004, 12:47:07AM EDT]
> In my experience, the problem is not the compiler so much as broken
> apps. Most of the crashes that I have ever seen and fixed that
> crashed due to floating point exceptions on Alpha were caused by
> uninitialized floating point variables.

Most of them that I've seen are divide-by-zero which is not a fatal
exception according to ieee rules.

Regards,
Aron

--
Aron Griffis
Gentoo Linux Developer
Re: ebuild update for Xorg-x11 [ In reply to ]
--- Aron Griffis <agriffis@gentoo.org> wrote:

>
> Most of them that I've seen are divide-by-zero which
> is not a fatal
> exception according to ieee rules.
>

True. I have seen a few of those too, but not as many
as the uninitialized floats. But if you then go look
at the code, most of the time the authors never
intended that divide by zero to happen to begin with
anyway and the zero denominator is usually traced back
to a lurking bug.
That being said, there are certain classes of apps
that depend on ieee conformance. But those apps 99.9%
of the time know why they need such conformance and
why they need to use the "-mieee" option.
Unfortunately (for us), most apps that use it are only
using it to work around crashes that happen without
it, and no one really knows why for sure.

Jeff D




__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail

--
gentoo-alpha@gentoo.org mailing list