atlas-engineer / nyxt

Nyxt - the hacker's browser.
https://nyxt-browser.com/
9.88k stars 413 forks source link

compilation issue in Ubuntu 18.04 LTS #898

Closed HumHongeKamyaab closed 4 years ago

HumHongeKamyaab commented 4 years ago

I am getting following error while compiling latest version of Nyxt from git. I am using sbcl v 2.0.7, Makefile to compile the code. Also, I have installed quicklisp using https://beta.quicklisp.org/quicklisp.lisp on my machine.

Switching to the BALLAND2006 optimizer
WARNING:
   redefining EMACS-INSPECT (#<SB-PCL:SYSTEM-CLASS COMMON-LISP:T>) in DEFMETHOD
STYLE-WARNING:
   Generic function FSET:ITERATOR clobbers an earlier FTYPE proclamation
   (FUNCTION (T &KEY &ALLOW-OTHER-KEYS) (VALUES FUNCTION &REST T)) for the same
   name with (FUNCTION (T &KEY &ALLOW-OTHER-KEYS) *).
WARNING: redefining NYXT::DEFAULT-SEARCH-ENGINE in DEFUN
; compiling file "/home/common-lisp/nyxt/source/renderer-gtk.lisp" (written 16 AUG 2020 11:47:02 AM):
; processing (IN-PACKAGE :NYXT)
; processing (DEFCLASS-EXPORT DATA-MANAGER-PATH ...)
; processing (DEFCLASS-EXPORT GTK-BROWSER ...)
; processing (DEFMETHOD WEB-CONTEXT ...)
; processing (DEFVAR GTK-RUNNING-P ...)
; processing (DEFMETHOD FFI-INITIALIZE ...)
; processing (DEFMETHOD FFI-KILL-BROWSER ...)
; processing (DEFCLASS-EXPORT GTK-WINDOW ...)
; processing (DEFCLASS-EXPORT GTK-BUFFER ...)
; processing (DEFCLASS-EXPORT GTK-INTERNAL-BUFFER ...)
; processing (DEFUN MAKE-WEB-VIEW ...)
; processing (DEFMETHOD INITIALIZE-INSTANCE ...)
; processing (DEFMETHOD ON-SIGNAL-DESTROY ...)
; processing (DEFMETHOD FFI-WINDOW-DELETE ...)
; processing (DEFMETHOD FFI-WINDOW-FULLSCREEN ...)
; processing (DEFMETHOD FFI-WINDOW-UNFULLSCREEN ...)
; processing (DEFUN DERIVE-KEY-STRING ...)
; processing (DECLAIM (FTYPE # ...))
; processing (DEFUN TRANSLATE-MODIFIERS ...)
; processing (DEFUN KEY-EVENT-MODIFIERS ...)
; processing (DEFUN GDK-EVENT-BUTTON-STATE ...)
; processing (DEFUN BUTTON-EVENT-MODIFIERS ...)
; processing (DEFUN SCROLL-EVENT-MODIFIERS ...)
; processing (DEFMETHOD PRINTABLE-P ...)
; processing (DEFMETHOD ON-SIGNAL-KEY-PRESS-EVENT ...)
; processing (DEFMETHOD ON-SIGNAL-KEY-RELEASE-EVENT ...)
; processing (DEFMETHOD ON-SIGNAL-BUTTON-PRESS-EVENT ...)
; processing (DEFMETHOD ON-SIGNAL-SCROLL-EVENT ...); 
; caught ERROR:
;   READ error during COMPILE-FILE:
;   
;     Symbol "WEBKIT-WEBSITE-DATA-MANAGER" not found in the CL-WEBKIT2 package.
;   
;       Line: 417, Column: -1, File-Position: 17775
;   
;       Stream: #<SB-INT:FORM-TRACKING-STREAM for "file /home/common-lisp/nyxt/source/renderer-gtk.lisp" {100874F533}>

; compilation aborted after 0:00:00.140
Unhandled UIOP/LISP-BUILD:COMPILE-FILE-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING
                                                          {10008B8083}>:
  COMPILE-FILE-ERROR while compiling #<CL-SOURCE-FILE "nyxt/gtk" "renderer-gtk">

Can someone help me in this regard.

jmercouris commented 4 years ago

Hello, thank you for your interest in Nyxt! It seems that you do not have the latest version of cl-webkit, please clone it and manually place it in a place that Lisp can find it, for your setup that would be typically ~/common-lisp I believe.

HumHongeKamyaab commented 4 years ago

@jmercouris Thanks for the reply. The documentation mentions that cl-webkit and cluffer are present in the submodules of the repository.

Nyxt on GTK requires the latest version of the cl-webkit and cluffer libraries.

They are included as a submodule of this repository, so if you use the Makefile there is nothing to be done.

I am using following command to clone all the sub modules.

git clone --recurse-submodules  https://github.com/atlas-engineer/nyxt ~/common-lisp/nyxt

I don't understand why still I am getting this error while doing make all.

jmercouris commented 4 years ago

When you start SBCL and try asdf:find-system, what does it report for cl-webkit?

HumHongeKamyaab commented 4 years ago

If I run,

(asdf:find-system "cl-webkit")

I get,

Component "cl-webkit" not found

but when I run,

(asdf:find-system "cl-webkit2")

I get,

#<ASDF/SYSTEM:SYSTEM "cl-webkit2">

I have followed https://github.com/joachifm/cl-webkit link for installing cl-webkit.

jmercouris commented 4 years ago

I'm thinking of the wrong command, there is one to tell you where the item is on disk, that is the one I am thinking of... if I remember it, I will post. Sorry for the trouble.

jmercouris commented 4 years ago

The command is called (asdf:locate-system :cl-webkit2), and that shall print out the location on your system. If it is not the location that you cloned it in, that is a problem :-)

HumHongeKamyaab commented 4 years ago

@jmercouris I am getting following in sbcl REPL:

This is SBCL 2.0.7, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
* (asdf:locate-system :cl-webkit2)
T
NIL
#P"/home/common-lisp/cl-webkit/webkit2/cl-webkit2.asd"
NIL
NIL

May be issue arises because of difference in names cl-webkit2, cl-webkit.

HumHongeKamyaab commented 4 years ago

As I coudn't compile gtk version, I am trying for qt version using make all NYXT_RENDERER=qt. However, I am getting following error,

 Unable to load any of the alternatives:
   ("libwebengine.so" "libwebengine.so.1" "libwebengine.so.1.0"
    "libwebengine.so.1.0.0")

I think sbcl is unable to find libwebengine. I have followed the procedure to install cl-webengine i.e.

@jmercouris can you correct me if I am doing something wrong.

jmercouris commented 4 years ago

I highly suggest persisting with the GTK version. Please attempt loading the dependencies in the ASDF file one by one. Eventually you should be able to asdf:make :nyxt/gtk-application

HumHongeKamyaab commented 4 years ago

Finally figured it out. Make sure to remove cl-webkit from your ~/common-lisp folder and let nyxt installer to install it locally in the setup folder (~/foo/nyxt in following example) using submodules.

Steps to compile in Ubuntu:

jmercouris commented 4 years ago

Thank you for updating with installation instructions for source! Hopefully that will help some users who may have the same problem.

HumHongeKamyaab commented 4 years ago

@jmercouris The master branch compiles to Nyxt version: 1.5.0-17fc7e52 not 2.0, and despite using blocker-mode, it is unable to block ads. Also it can't play videos in youtube.com, it gives some html5 error. The download-video option is also no more available.

But still this version is much better than official next-1.5.deb provided in the repository.

jmercouris commented 4 years ago

You need to install the libgst libraries for media such as youtube. As per blocking ads, it does work. If it is not blocking some ads for you that's because they do not exist in the blocklist.

HumHongeKamyaab commented 4 years ago

@jmercouris

I have already installed following libraries as given in troubleshooting.

On Debian-based systems, you might be looking for (adapt the version numbers):

libgstreamer1.0-0
gir1.2-gst-plugins-base-1.0

Is there any way to debug this issue.

I think google adsense should be in default blocked list

jmercouris commented 4 years ago

I don't use Linux, I'm sorry I can't help you. Hopefully someone else can chime in.

jmercouris commented 4 years ago

With regards to ad blocking make sure you have blocker mode on and correctly configured.

HumHongeKamyaab commented 4 years ago

With regards to ad blocking make sure you have blocker mode on and correctly configured.

Can you tell me how to configure ad blocker. I am using blocker-mode using M-x command in Nyxt. It automatically parse https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts to make adblock list. It looks like this list doesn't contain all the links given in the url. May be one need to configure it to update this list, but nothing of that sought is given in the manual.

My NYXT/BLOCKER-MODE:*DEFAULT-HOSTLIST* variable says,

NYXT/BLOCKER-MODE:*DEFAULT-HOSTLIST*

Default hostlist for `blocker-mode'.
Current Value:

URL: "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts"
Path: "/home/.local/share/nyxt/hostlist-stevenblack.txt"
Update interval: 86400s
Hosts: ("0.0.0.0" "n2019cov.000webhostapp.com"
        "webmail-who-int.000webhostapp.com" "010sec.com" "01mspmd5yalky8.com"
        "0byv9mgbn0.com" "ns6.0pendns.org" "dns.0pengl.com" "ios.0pengl.com"
        "0x4fc271.tk" "login.yahoo.com.0x4fc271.tk" "0xf4a5.tk"
        "user-id.0xf4a5.tk" "change-password.yahoo.user-id.0xf4a5.tk"
        "login.yahoo.user-id.0xf4a5.tk" "0xf4a54cf56.tk"
        "login.yahoo.user-id.0xf4a54cf56.tk" "12724.xyz" "15438.xyz"
        "21736.xyz" "analytics.247sports.com" "www.analytics.247sports.com"
        "2no.co" "www.2no.co" "logitechlogitechglobal.112.2o7.net"
        "www.logitechlogitechglobal.112.2o7.net" "2s11.com" "30-day-change.com"
        "www.30-day-change.com" "mclean.f.360.cn" "mvconf.f.360.cn"
        "care.help.360.cn" "eul.s.360.cn" "g.s.360.cn" "p.s.360.cn"
        "aicleaner.shouji.360.cn" "ssl.360antivirus.org" "ad.360in.com"
        "mclean.lato.cloud.360safe.com" "mvconf.lato.cloud.360safe.com"
        "mclean.cloud.360safe.com" "mvconf.cloud.360safe.com"
        "mclean.uk.cloud.360safe.com" "mvconf.uk.cloud.360safe.com" "3lift.org"
        "448ff4fcfcd199a.com" "44chan.me" "4ourkidsky.com"
        "4w6ylniamu6x7e3a.onion" "546874.tk"
        "login.yahoo.com.user-id.546874.tk" "568vovhs6ekbupjo.pro"
        "5frjkvw2w3wv6dnv.onion" "5kv261gjmq04c9.com" "88chan.pw"
        "new.915yzt.cn" "tempinfo.96.lt" "aaatus.com" "abdurantom.com"
        "abtasty.net" "analytics.modul.ac.at" "acalvet.com" "acbras.com"
        "acccountsgoog1e.com" "account-mail.info" "accountapp.xyz"
        "graph.accountkit.com" "www.graph.accountkit.com" "accountsgoog1e.com"
        "whia7g.acquafufheirybveru.online" "go.ad1data.com" "metrics.adage.com"
        "adaptivecss.org" "ads30.adcolony.com" "androidads23.adcolony.com"
        "events3.adcolony.com" "events3alt.adcolony.com" "sdk.adincube.com"
        "app.adjust.com" "unconf.adkmob.com" "cdn.admitad-connect.com"
        "macro.adnami.io" "acdn.adnxs.com" "prebid.adnxs.com"
        "www.prebid.adnxs.com" "sstats.adobe.com" "adorebeauty.org"
        "feedback.adrecover.com" "adroitpmps.com" "www.ads2live.com"
        "adsflame.com" "backend-ssp.adstudio.cloud" "adtekmedia.com"
        "track.adtrue.com" "dw.adyboh.com" "wy.adyboh.com" "adzerk.com"
        "www.adzerk.com" "ark.aeriagames.us" "…")
Ambrevar commented 4 years ago

You can append host names directly to NYXT/BLOCKER-MODE:*DEFAULT-HOSTLIST*.

For more flexibility, you can even create your own blocker mode. Example:

(defvar *my-blocked-hosts*
  (nyxt/blocker-mode:make-hostlist
   :hosts '("platform.twitter.com"
            "syndication.twitter.com"
            "m.media-amazon.com")))

(define-configuration nyxt/blocker-mode:blocker-mode
  ((nyxt/blocker-mode:hostlists (append (list *my-blocked-hosts*) %slot-default))))

(define-configuration buffer
  ((default-modes (append '(my-blocker-mode) %slot-default))))