fifth icon indicating copy to clipboard operation
fifth copied to clipboard

Building Fifth Browser for Noobs

Open cawoodm opened this issue 6 years ago • 20 comments

Admittedly this is the first time building software from source on Linux but the dependency train is getting a bit long (Ubuntu 17.10). It's cost me almost the whole day so I wonder if some instructions could be included in the readme or if there's a better way to install all the tools and dependencies.

In case it helps other noobs I'm writing the steps I had to do here. I had to install a whole bunch of stuff to even get ./configure to run and even then it's still failing. So for me the following had to be done:

  • Install autoconf: sudo apt-get install autoconf
  • Run autoreconf -fvi (dunno why)
  • Install fltk: sudo apt-get install libfltk1.3-dev
  • Download, build and install "liburlmatch"... ** Download the source and extract ** cd into the extracted folder ** Run make then make install
  • Install: sudo apt-get install libjpeg-dev
  • Download build and install "physfs": ** Download source and extract ** Install cmake: sudo apt install cmake ** cd into the extracted folder ** Run cmake . ** Run make ** Run sudo make install

That's as far as I get. The latest error seems to be in ./configure on line 5612:

PKG_CHECK_MODULES(DEPS, libxslt libxml-2.0 sqlite3

It seems DEPS is not defined.

checking for PHYSFS_init in -lphysfs... yes ./configure: line 5612: syntax error near unexpected token DEPS,' ./configure: line 5612: PKG_CHECK_MODULES(DEPS, libxslt libxml-2.0 sqlite3 '

Notes: It seems physfs is no longer "around" (https://icculus.org/physfs/ is dead).

cawoodm avatar Apr 15 '18 12:04 cawoodm

It looks like you forgot to build some stuff, and some are provided by ubuntu already.

Theoretically (I run gentoo, not ubuntu) the way to build it on your platform is:

mkdir build-fifth ; cd build-fifth
sudo apt-get install build-essential libtool autoconf cmake libfltk1.3-dev libjpeg-dev libphysfs-dev

wget https://github.com/clbr/urlmatch/archive/v1.0.tar.gz -O urlmatch-1.0.tar.gz
tar xvf urlmatch-1.0.tar.gz
cd urlmatch-1.0
make && sudo make install
cd ..

wget https://github.com/clbr/webkitfltk/archive/v0.5.1.tar.gz -O webkitfltk-0.5.1.tar.gz
tar xvf webkitfltk-0.5.1.tar.gz
cd webkitfltk-0.5.1
make -C Source/bmalloc/bmalloc
make -C Source/WTF/wtf
make -C Source/JavaScriptCore gen
make -C Source/JavaScriptCore
make -C Source/WebCore
make -C Source/WebKit/fltk
sudo make -C Source/WebKit/fltk install

wget https://github.com/clbr/fifth/archive/v0.5.tar.gz -O fifth-0.5.tar.gz
tar xvf fifth-0.5.tar.gz
cd fifth-0.5
./autogen.sh
./configure --prefix=/usr
make && sudo make install

Note: WebkitFLTK requires quite a lot of dependencies, you might want to look at something like https://gpo.zugaina.org/AJAX/Ebuild/31566185/View

Also, for me it looks like phyfs is quite alive, the last release being quite recent.

lanodan avatar Apr 15 '18 17:04 lanodan

The physfs link works for me. There's a list of dependencies on the Fifth web page: http://fifth-browser.sourceforge.net/downloads.html

However, if you're not intending to run git versions, your distro does not have a Fifth package, and you're running x86_64, you can download a prebuilt binary from the above link.

clbr avatar Apr 15 '18 18:04 clbr

OK, I was able to proceed down your list after installing ruby, bison and webkitfltk...

I got as far as building JavaScriptCore and ran in to what may be a C++11 compiler issue:

In file included from profiler/LegacyProfiler.h:35:0,
                 from profiler/LegacyProfiler.cpp:30:
../WTF/wtf/Stopwatch.h: In member function ‘bool WTF::Stopwatch::isActive() const’:
../WTF/wtf/Stopwatch.h:47:37: error: ‘isnan’ was not declared in this scope
     bool isActive() const { return !isnan(m_lastStartTime); }

My g++ version is 7.2.0

cawoodm avatar Apr 17 '18 11:04 cawoodm

That's been fixed in git for a while now (2016), though there may be other issues with so new compilers.

clbr avatar Apr 17 '18 12:04 clbr

Not sure what you mean: I am building the latest version of fifth downloaded from github on 14.4 What am I to do?

cawoodm avatar Apr 17 '18 16:04 cawoodm

You do not have the latest git webkitfltk, according to that message. See https://github.com/clbr/webkitfltk/blob/fltk/Source/WTF/wtf/Stopwatch.h#L47

  • the contents do not match your error message.

clbr avatar Apr 18 '18 06:04 clbr

Ah! I used the code provided above and got 0.5.1

wget https://github.com/clbr/webkitfltk/archive/v0.5.1.tar.gz

From that link, in Stopwatch.h line 47 I get:

bool isActive() const { return !isnan(m_lastStartTime); }

Which is identical to the link above.

cawoodm avatar Apr 18 '18 16:04 cawoodm

Note the "std::". lanodan's instructions above fetch the latest released versions, which are somewhat older than git - you'd use the "git clone" commands shown by github at the project's page.

You are quite in the deep end, building webkit-related things is hard - perhaps you could ask some Ubuntu volunteer for a deb package?

clbr avatar Apr 18 '18 16:04 clbr

Thanks for your patience. It is indeed my first build and I thought: here's a little browser I could build.

So I guess there's no webkit-fltk binary I can download?

cawoodm avatar Apr 18 '18 16:04 cawoodm

As mentioned above, there's a portable binary of the browser available. There are packages of the browser and webkitfltk for some distros, but using another distro's packages comes with its own set of problems.

clbr avatar Apr 19 '18 06:04 clbr

I am attempting to build a deb for lubuntu 18.04, using checkinstall. I needed to install gperf and bison to start building webkitfltk*. Anyway I got stuck on make -C Source/JavaScriptCore

Here is a link to my console output.

[https://paste.ubuntu.com/p/p36JBcY7F7/](url)

I am new to programming and just doing this to have a browser that works on a vintage laptop, w only 256mb of ram.

BTW, is there a newer version of webkit that could be used?

noalternative67 avatar Dec 14 '19 06:12 noalternative67

That error was fixed in git. Please use the git version instead of 0.5.1 (it only affects specific gcc/icu versions released after 0.5.1 was out).

The git versions are newer than the release tarballs, but indeed I haven't had much time to keep them up to date. Some current sites are broken even with the latest git.

For low-ram browsing there are a few alternatives, from Opera 12.16 to Otter to Netsurf. However Opera is proprietary and older, Netsurf doesn't have webkit's compatibility, and Otter requires more ram than Fifth and the others.

clbr avatar Dec 14 '19 07:12 clbr

Ok, I used your more recent version of webkit, and it got past javascriptcore, but this time it got stuck on, make -C Source/WebCore and I got an error relating to curl. I remembered installing curl but thought I may have been mistakin. I did it again and still got the error. Here is my longwinded console output. Might be better to scroll from the bottom. Maybe it can't find curl and I need to make entry?

https://paste.ubuntu.com/p/BjsggMCfcH/

noalternative67 avatar Dec 14 '19 22:12 noalternative67

I got the compiling process going again, by installing libcurl4-openssl-dev libssl-dev

It is taking a long time and I am not through, but don't feel like you need to respond to the last post.

noalternative67 avatar Dec 15 '19 04:12 noalternative67

Yes, webkit is a monster to build. Even on my 6-core it takes an eternity, close to an hour. That's part of why it's hard to find time to work on it, it pretty much requires an entire day dedicated to it.

clbr avatar Dec 15 '19 08:12 clbr

I am using my t400 w/4gb of ram, not the intended vintage computer. I hate to think! It has just finished. I will work on the rest tomorrow.

noalternative67 avatar Dec 15 '19 08:12 noalternative67

Ok, I moved on to compiling fifth. I didn't get far without an ssl error. Any ideas about how to get past it? Here is my console.

https://paste.ubuntu.com/p/QmyGZGddVN/

I decided against checkinstall after compiling wekitfltk.

noalternative67 avatar Dec 16 '19 05:12 noalternative67

See #30 - Fifth is currently not compatible with openssl 1.1, you'd need to use openssl 1.0.

clbr avatar Dec 16 '19 07:12 clbr

Ok I installed openssl1.0 and got the same errors. Do I need to erase and redownload webkitfltk & Fifth developerment files? Since webkitfltk has been installed are the other files I may need to remove to uninstall it?

noalternative67 avatar Dec 17 '19 03:12 noalternative67

You need to remove openssl 1.1 development files, otherwise they may conflict. Then you need to rebuild webkitfltk, as it was compiled against 1.1.

clbr avatar Dec 17 '19 08:12 clbr