Port-sparc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Firefox52

I would say Netsurf is the one of best browers for 32bit Sparcs at this point.

Years back I ran it on my SS5 and contacted the developers after noticing that some of the colors were not getting mapped correctly and they gladly patched up the issue real nice guys!

It isn't super fancy but it is fast enough unlike Firefox would be, and is general a bit more capable than dillo.

Perhaps the Rust issue will get rectified once GCC gets thier rust implementation working *shrugs*.


On Sunday, May 30, 2021, 12:36:52 AM EDT, Aaron <aranderson%gmail.com@localhost> wrote:

Greetings! New to the list and to NetBSD, but a long-time SPARC owner
and *nix admin.

I recently pulled my old SS20 out of the closet, got it up and running
after an NVRAM chip replacement and PS re-cap, and decided to install
NetBSD 9.2. After getting it booting, reasonably well configured, and
into X11, I noticed that the available binaries for 32-bit sparc are
significantly fewer than for other, newer platforms.

That sent me down a distfiles and pkgsrc rabbit hole, but before long
I was successfully building some of the missing packages I wanted
(e.g., xv, htop, etc.). On the strength of those small successes, I
(incorrectly) assumed most / all of the missing binaries were simply
the result of lack of demand or resources to compile them, and started
looking to fill in some more substantial gaps, beginning with Firefox.

After learning that versions from the past few years aren't possible
to build owing to a lack of platform support within Rust, I settled on
this Firefox52, which this blog post  and the package deps led me to
believe should be possible to build:

  - https://blog.netbsd.org/tnf/entry/firefox_51_on_sparc64_we
  - https://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/www/firefox52/README.html

Except after compiling for the better part of a day (and my SS20 has 2
x Ross HyperSPARC 150s!), it failed with the following error:

  > /usr/pkgsrc/work/www/firefox52/work/build/dist/include/google/protobuf/stubs/once.h:
In function 'void
void (*)())':
  > /usr/pkgsrc/work/www/firefox52/work/build/dist/include/google/protobuf/stubs/once.h:125:34:
error: invalid conversion from 'google::protobuf::ProtobufOnceType*
{aka long int*}' to 'const volatile Atomic32* {aka const volatile
int*}' [-fpermissive]

After poking around in the code and on the Firefox forums, I
discovered the culprit: An errant copy/paste error to one particular
instance of the atomicops.h file that was committed a few years ago.
If anyone's interested, the following patch corrects the problem by
adding an ifdef for NetBSD that casts AtomicWord as an int32 vs. an

  --- toolkit/components/protobuf/src/google/protobuf/stubs/atomicops.h
  2021-05-29 21:57:30.851502479 -0600
  +++ toolkit/components/protobuf/src/google/protobuf/stubs/atomicops.h
  2021-05-29 21:57:47.921125479 -0600
  @@ -76,6 +76,11 @@

  +#if defined(__NetBSD__)
  +// NetBSD/arm uses long for intptr_t, which fails -fpermissive checks. So
  +// explicitly use int32 here instead.
  +typedef int32 AtomicWord;
    // Use AtomicWord for a machine-sized pointer.  It will use the Atomic32 or
    // Atomic64 routines below, depending on your architecture.
    #if defined(__OpenBSD__) && !defined(GOOGLE_PROTOBUF_ARCH_64_BIT)
  @@ -83,6 +88,7 @@
    typedef intptr_t AtomicWord;

    // Atomically execute:
    //      result = *ptr;

It then took another day and a half to finish compiling, but it works
(albeit slowly)! Anyway, I'm probably the only person on the planet
who cares about running a modern-ish web browser on this platform, but
figured I'd share for posterity's sake.

Kind Regards,

- Aaron Anderson

Home | Main Index | Thread Index | Old Index