Netsurf 3.1

IRIX/Nekoware development, porting and related topics.
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
User avatar
Raion-Fox
Donor
Donor
Posts: 1126
Joined: Thu Jan 30, 2014 5:01 pm
Location: near King George, Virginia
Contact:

Netsurf 3.1

Unread postby Raion-Fox » Fri Aug 01, 2014 9:50 pm

So here I am trying to build Netsurf 3.1 for IRIX - and failing miserably.

I have ensured my toolchain ( MIPSPro 7.4 ) is installed and working with all front ends.

So I untar the source from the NetSurf site and give it a try:

Code: Select all

 % cd  netsurf-all-3.1
% cd netsurf
%make
ERROR:make:file `Makefile` line 39:Syntax error

So, I though... its one of those ganoo makefiles.

Code: Select all

%gmake
gtk/Makefile.target:24: ** Unable to find library for : PNG (libpng). Stop.


Well then. Doesn't appear to be GCC dependent thus far, but it can't detect libpng. Anyone else want to give me a hand please?
:O3x02L: R16000 700Mhz 8GB RAM kanna
:Octane:
:Indy: (Acclaim) R4600 133MHz 32MB RAM
:Indy: (Challenge S) R4600 133MHz (MIPS III Build Server)
:O2: R12000SC 300MHz 192MB RAM 15k 147GB HDD suzuha
Thinkpad W530 i7 3940XM 3GHz, 32GB, K1000M FreeBSD 11/Windows 7 rin
Acer Aspire 5157 (headless) 4GB, FreeBSD 11 kuran
Thinkpad R40 Pentium M 1.7GHz 2GB RAM kasha

diegel
Donor
Donor
Posts: 343
Joined: Tue Nov 17, 2009 2:08 am
Location: Hamburg, Germany

Re: Netsurf 3.1

Unread postby diegel » Sat Aug 02, 2014 3:10 am

I had a brief look at netsurf some time ago. For me it looked quite complicated to build. You have to download some more libraries to build it and if you want to have javascript you need a mozilla js library - this also means js will not be faster than firefox.

If you plan to port anything to Irix, please read the documentation and README files of the package carefully. It is also helpful to look at the release notes of a comparable existing nekoware package, you have to build your environment very carefully before you run configure or gmake. In the first step you should build it as small as possible and if it runs you can add more features like js.
:Tezro: :Fuel: :Octane2: :Octane: :Onyx2: :O2+: :O2: :Indy: :Indigo: :Cube:

User avatar
Raion-Fox
Donor
Donor
Posts: 1126
Joined: Thu Jan 30, 2014 5:01 pm
Location: near King George, Virginia
Contact:

Re: Netsurf 3.1

Unread postby Raion-Fox » Sat Aug 02, 2014 9:18 am

I see. Not that I cared about JS on Netsurf, I was more interested in getting an up to date HTML renderer going and remote X11 seems to work OK but is buggy
:O3x02L: R16000 700Mhz 8GB RAM kanna
:Octane:
:Indy: (Acclaim) R4600 133MHz 32MB RAM
:Indy: (Challenge S) R4600 133MHz (MIPS III Build Server)
:O2: R12000SC 300MHz 192MB RAM 15k 147GB HDD suzuha
Thinkpad W530 i7 3940XM 3GHz, 32GB, K1000M FreeBSD 11/Windows 7 rin
Acer Aspire 5157 (headless) 4GB, FreeBSD 11 kuran
Thinkpad R40 Pentium M 1.7GHz 2GB RAM kasha

User avatar
vishnu
Donor
Donor
Posts: 3000
Joined: Sun Mar 18, 2007 3:25 pm
Location: Minneapolis, Minnesota USA

Re: Netsurf 3.1

Unread postby vishnu » Sat Aug 02, 2014 10:38 am

If you do `make dist` from the top of the source tree it should rebuild the whole package into a cross platform tar.gz and excise all the GNU-isms from the makefiles. I say "should" because not everyone uses the auto tools the way they're intended... :|
Project:
Temporarily lost at sea...
Plan:
World domination! Or something...

:Tezro: :Octane2:

jpstewart
Donor
Donor
Posts: 415
Joined: Tue Sep 21, 2010 3:31 pm
Location: Southwestern Ontario, Canada

Re: Netsurf 3.1

Unread postby jpstewart » Sat Aug 02, 2014 11:10 am

vishnu wrote:If you do `make dist` from the top of the source tree it should rebuild the whole package into a cross platform tar.gz and excise all the GNU-isms from the makefiles. I say "should" because not everyone uses the auto tools the way they're intended

It would appear that Netsurf doesn't use autotools at all. They've got their own build system, AFAICT.

I had a quick look at it and its instructions. It doesn't look like Netsurf's QUICK-START instructions will work. That method relies heavily on their custom env.sh script which doesn't look good for IRIX. The Netsurf BUILDING-GTK instructions, however, do look viable. I'll keep working on it over the weekend and see how far I get. (Unless somebody else beats me to the finish line!)

So far I've seen some minor annoyances, but nothing terrible. It seems to assume GNU make and GNU install, for example. Their build system doesn't know about MIPS Pro (nor would I expect it to, really). Those shouldn't be show stoppers, though. (But who knows what lurks in the depths!)
:Indigo2IMP: :Octane: :Indigo: :O3x0:
Sun SPARCstation 20, Blade 2500, T5240
HP C8000

User avatar
vishnu
Donor
Donor
Posts: 3000
Joined: Sun Mar 18, 2007 3:25 pm
Location: Minneapolis, Minnesota USA

Re: Netsurf 3.1

Unread postby vishnu » Sat Aug 02, 2014 2:47 pm

jpstewart wrote:It would appear that Netsurf doesn't use autotools at all. They've got their own build system,
Ha ha, I should have looked! :|
jpstewart wrote:It seems to assume GNU make and GNU install, for example.
Hence the makefile errors, GNU only thinks "embrace and extend" is evil when Micro$oft does it... :shock:
Project:
Temporarily lost at sea...
Plan:
World domination! Or something...

:Tezro: :Octane2:

User avatar
commodorejohn
Posts: 561
Joined: Tue Oct 02, 2012 1:22 pm
Contact:

Re: Netsurf 3.1

Unread postby commodorejohn » Sat Aug 02, 2014 3:16 pm

vishnu wrote:Hence the makefile errors, GNU only thinks "embrace and extend" is evil when Micro$oft does it... :shock:

Well, naturally! GNU is Righteousness and Purity - independent projects should welcome absorption into the Collective!
Computers: Amiga 1200, DEC VAXStation 4000/60, DEC MicroPDP-11/73
Synthesizers: Roland JX-10/SH-09/HS-80/MT-32/D-50, Yamaha DX7-II/V50/TX7/TG33/FB-01, Korg MS-20 Mini/ARP Odyssey/DW-8000/M1, Ensoniq SQ-80, E-mu Emax HD/Proteus-2, Casio CZ-5000, Moog Satellite, Sequential Circuits Prophet-600

User avatar
Raion-Fox
Donor
Donor
Posts: 1126
Joined: Thu Jan 30, 2014 5:01 pm
Location: near King George, Virginia
Contact:

Re: Netsurf 3.1

Unread postby Raion-Fox » Sat Aug 02, 2014 4:06 pm

I give up. Looks harder than I initially thought. Good on someone else if they can do it.
:O3x02L: R16000 700Mhz 8GB RAM kanna
:Octane:
:Indy: (Acclaim) R4600 133MHz 32MB RAM
:Indy: (Challenge S) R4600 133MHz (MIPS III Build Server)
:O2: R12000SC 300MHz 192MB RAM 15k 147GB HDD suzuha
Thinkpad W530 i7 3940XM 3GHz, 32GB, K1000M FreeBSD 11/Windows 7 rin
Acer Aspire 5157 (headless) 4GB, FreeBSD 11 kuran
Thinkpad R40 Pentium M 1.7GHz 2GB RAM kasha

User avatar
zahal
Posts: 828
Joined: Fri May 27, 2005 11:43 am

Re: Netsurf 3.1

Unread postby zahal » Sun Aug 03, 2014 6:59 pm

I had a working NetSurf some time ago. When the number of lib dependencies grew, somewhere along the line the binary core dumped.
I don't have the O2 with me here now, but I can look it up next time I fire the Blue Demon up and check which was the last working version.
Sitting in a room.....thinkin' shit up. :evil:

:O2: 400MHz R12k - :320: Dual 600MHz PIII - HP Alphaserver DS15 - Digital DECstation5000/133 - HP Z400 - Dell T3500 - Apple G4 Cube dual 500MHz/GF6200 - Newton Messagepad 2100 - Apple PowerBook 2400c/G3@240 - Apple PowerMacintosh 6100/66 - Apple PowerMacintosh 6500/G3@500MHz - Apple Workgroup Server 9150/120 G3@280 - Apple Macintosh IIfx - Apple Macintosh LC475 (OC Full 040 33MHz) - Apple Macintosh Color Classic (Full 040 40Mhz Mystic upgrade) - Sun Cobalt Cube 3 - EBOX 3300A-JSK - Tadpole RDI UltraBook IIi - Compaq Armada 4120 - Digital HiNote Ultra II - HP OmniBook 425 - HP 200LX

jpstewart
Donor
Donor
Posts: 415
Joined: Tue Sep 21, 2010 3:31 pm
Location: Southwestern Ontario, Canada

Re: Netsurf 3.1

Unread postby jpstewart » Mon Aug 04, 2014 8:22 am

With only a minor tweak to the Makefiles, I've built most of the included libraries with GCC on IRIX. I'm not 100% sure yet, but I think the ones that didn't build aren't strictly necessary anyway. I'm planning to work on the NetSurf core later today.

Building with MIPS Pro will be a different story. Their custom build system looks (at first glance) to be fairly portable. But then the Makefiles for the individual libraries go and add GCC-specific options to the compiler command line. Depending on how it goes with GCC, I may or may not attempt to build with MIPS Pro.

Details (and patches) to follow.
:Indigo2IMP: :Octane: :Indigo: :O3x0:
Sun SPARCstation 20, Blade 2500, T5240
HP C8000

jpstewart
Donor
Donor
Posts: 415
Joined: Tue Sep 21, 2010 3:31 pm
Location: Southwestern Ontario, Canada

Re: Netsurf 3.1

Unread postby jpstewart » Mon Aug 04, 2014 4:31 pm

And another update for anyone still following along: NetSurf 3.1 builds with GCC on IRIX once you tweak a few defines in the Makefiles and set up your environment (especially PKG_CONFIG_PATH) correctly. Note that I said "builds". Not "runs". :(

If anyone wants to try debugging it, let me know and I'll post instructions and a patch for building it yourself. Otherwise, I'll try to debug it myself over the course of the coming week (although I'll probably only be able to work on it in the evenings).

Today was a holiday around here, and I'd been wanting an excuse to spend some quality time with my Octane. :D This project fit the bill quite nicely!
:Indigo2IMP: :Octane: :Indigo: :O3x0:
Sun SPARCstation 20, Blade 2500, T5240
HP C8000

diegel
Donor
Donor
Posts: 343
Joined: Tue Nov 17, 2009 2:08 am
Location: Hamburg, Germany

Re: Netsurf 3.1

Unread postby diegel » Tue Aug 05, 2014 3:17 pm

I like to help debugging. I think the best way is to post your environment and patches in this thread.
:Tezro: :Fuel: :Octane2: :Octane: :Onyx2: :O2+: :O2: :Indy: :Indigo: :Cube:

jpstewart
Donor
Donor
Posts: 415
Joined: Tue Sep 21, 2010 3:31 pm
Location: Southwestern Ontario, Canada

Re: Netsurf 3.1

Unread postby jpstewart » Wed Aug 06, 2014 8:13 am

You will need all of the following libraries installed:
  • neko_gtk+-2.12.12
  • neko_curl-7.19.7
  • neko_libpng-1.2.47
  • neko_libjpg-1.2.1
  • neko_librsvg-2.18.2
  • neko_libiconv-1.14
(See also my note about librsvg if you have trouble with it.)

You will need the following utilities to get through the build process:
  • neko_make-3.82
  • neko_pkgconfig-0.23
  • neko_fileutils-4.1
  • neko_gperf-3.0.4
  • neko_perl-5.8.9
  • neko_perl_html_parser-3.55
  • neko_expat-2.1.0
  • neko_tar-1.26

You'll also need GCC. I used a self-compiled GCC, but neko_gcc47-4.7.1 should also work.

Make sure that /usr/nekoware/bin is first in your path. You'll need install (from neko_fileutils), perl, and tar from Nekoware to come before the standard IRIX ones which won't work with the NetSurf build system.

Download and extract the netsurf-all-3.1.tar.gz source code. In the resulting netsurf-all-3.1 directory, do as recommended by the NetSurf docs (assuming you extracted it into ${HOME} -- adjust to suit your own path):

Code: Select all

mkdir workspace
mkdir workspace/inst

export PREFIX=${HOME}/netsurf-all-3.1/workspace/inst
export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig::

Note the two colons at the end of PKG_CONFIG_PATH. That's not a typo.

Then to build with GCC:

Code: Select all

export CC=gcc
export CFLAGS="-mabi=n32 -mips4"
export CXX=g++
export CXXFLAGS="-mabi=n32 -mips4"
export CPPFLAGS="-I/usr/nekoware/include"
export LDFLAGS="-L/usr/nekoware/lib -Wl,-rpath -Wl,/usr/nekoware/lib"


Apply the attached patch (with "patch -p1 <../netsurf-irix.patch" from within the netsurf-all-3.1 directory). It mainly changes "-std=c99" to "-std=gnu99" in the options passed to GCC. (The IRIX headers disable all extensions in ANSI c99 mode but enable them in gnu99 mode.) The patch also adds a couple of missing includes in places, creates two configuration files, and makes one small change to work with the GTK version in Nekoware. (Note that NetSurf says it works with GTK 2.12+ but some features seem to be from 2.16 and 2.18. They produce warnings when I try to start up NetSurf.)

Then for each of the following subdirectories (in order), "cd" into it and run "gmake install". (I've ignored the top-level Makefile for now.)
  • buildsystem
  • libparseutils
  • libwapcaplet
  • libhubub
  • libcss
  • libnsgif
  • libnsbmp
  • librosprite
  • libdom
  • netsurf

You should have a netsurf binary in ${PREFIX}/bin. Check with ldd to make sure it's linked against the right Nekoware libraries. (NetSurf's own libraries were statically linked if you followed my process.) Try running it with "./netsurf -v" (assuming you're in ${PREFIX}/bin). On my system the NetSurf window opens and in the console there are a whole lot of harmless-looking Gtk-WARNING messages, a couple of GLib-GObject messages that worry me, and NetSurf's own very detailed log messages stop after it logs calling "gtk/window.c gui_window_set_icon". Then it just sits there eating 100% CPU.

That's as far as i got over the weekend. Thanks, diegel, for offering to help debug this. If anyone else wants to pitch in, I hope the above instructions are sufficiently detailed. And if we get it built and working with GCC, I'll look into buiding it with MIPS Pro.
:Indigo2IMP: :Octane: :Indigo: :O3x0:
Sun SPARCstation 20, Blade 2500, T5240
HP C8000

jpstewart
Donor
Donor
Posts: 415
Joined: Tue Sep 21, 2010 3:31 pm
Location: Southwestern Ontario, Canada

Re: Netsurf 3.1

Unread postby jpstewart » Wed Aug 06, 2014 8:29 am

And here's the patch that I forgot to attach to the previous post. Oops! :oops:
Attachments
netsurf-irix.patch
(9.69 KiB) Downloaded 51 times
:Indigo2IMP: :Octane: :Indigo: :O3x0:
Sun SPARCstation 20, Blade 2500, T5240
HP C8000

jpstewart
Donor
Donor
Posts: 415
Joined: Tue Sep 21, 2010 3:31 pm
Location: Southwestern Ontario, Canada

Re: Netsurf 3.1

Unread postby jpstewart » Wed Aug 06, 2014 3:41 pm

And yet another thing I forgot to mention earlier (and that should have been included in the patch :oops: ): watch out for '%zu' in printf statements, especially the LOG macro. IRIX printf doesn't like the z. Running NetSurf in verbose mode (i.e., with the '-v' option) will spew binary garbage. Change '%zu' to simply '%u' instead, before compiling it. The occurence in netsurf/image/png.c, line 181 in particular caused me problems. It's used a few other places, too, and they should all be removed.
:Indigo2IMP: :Octane: :Indigo: :O3x0:
Sun SPARCstation 20, Blade 2500, T5240
HP C8000


Return to “SGI: Development”

Who is online

Users browsing this forum: No registered users and 1 guest