clbr / fifth

Fifth is a Linux-exclusive browser that carries the best features from Opera, as well as a few unique features that are likely to please Linux power users. It's based on a custom Webkit port to FLTK and comes licensed under the GPLv3.
GNU General Public License v3.0
106 stars 7 forks source link

Building Fifth Browser for Noobs #26

Open cawoodm opened 6 years ago

cawoodm commented 6 years ago

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:

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).

lanodan commented 6 years ago

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.

clbr commented 6 years ago

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.

cawoodm commented 6 years ago

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

clbr commented 6 years ago

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

cawoodm commented 6 years ago

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

clbr commented 6 years ago

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

cawoodm commented 6 years ago

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.

clbr commented 6 years ago

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?

cawoodm commented 6 years ago

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?

clbr commented 6 years ago

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.

noalternative67 commented 4 years ago

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?

clbr commented 4 years ago

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.

noalternative67 commented 4 years ago

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 commented 4 years ago

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.

clbr commented 4 years ago

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.

noalternative67 commented 4 years ago

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 commented 4 years ago

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.

clbr commented 4 years ago

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

noalternative67 commented 4 years ago

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?

clbr commented 4 years ago

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.