uos-20sp1 Loongson system compiles version 51 Firefox browser, the company does not support after the npapi plugin version 52

2020-04-22 13:48:14

The regular Loongson system needs the following dependencies for reference

1. Download the source code from the Loongson official website: git clone  git: //cgit.loongnix.org/browser/mozilla-esr52.git

2.安装以下编译依赖库 yum install zbar-gtk-devel dbus-devel dbug-glib-devel bzip zip hunspell alsa-lib-devel wireless-tools-devel libXt-devel mesa-libGL-devel startup-notification-devel openssl openssl-devel pulseaudio-libs pulseaudio-libs-devel pulseaudio-libs-glib2 pulseaudio libevent-devel libcurl-devel autoconf213 gstreamer-devel gstreamer gstreamer-plugins-base gstreamer-plugins-base-devel

3. Compile into the Firefox directory: autoconf-2.13 ./mach configure; ./mach build

If the following command reports an error and cannot be manually played, it may be a coding problem.

The source code is compiled under uos. It is recommended to use a better document editor to view

The author is using qt creator in the application store. You can install and open a new project with the command line, and import the existing project to view the file as an editor.

 

 The installation steps are as follows:

载火狐浏览器源码

wget  https://ftp.mozilla.org/pub/firefox/releases/51.0/source/firefox-51.0.source.tar.xz
不要用归档管理器解压 uz -d firefox-51.0.source.tar.xz (为什么这个破系统太卡有时会直接卡死) 进入文件夹没有权限添加权限 
chmod 755  ./

 

 
  

Compile command:

There will be a bunch of errors when compiling the command. Most of them are missing dependent packages 

make -f client.mk build

 

Different system versions require different dependencies, friends can install the following dependencies according to the error,

The author's dependencies are as follows:

apt-get install g ++ g ++ is a c ++ compiler can also install build-essential (collection compilation package) The following will prompt you to install 
apt
- get install libgtk- 3 -dev libgtk2 when installing the alsa driver, 0 - dev Please install this thing with caution, If there is a problem, there will be no interface to check whether the installation is successful from the newly installed system pkg -config --modversion gtk + -3.0 apt - get install libgconf2- dev apt - get install libdbus-glib- 1 - dev apt - get install libncurses-dev

 

Autoconf compilation: 
HTTP wget: // ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz 
tar -xvzf autoconf- 2.13 .tar.gz 
cd autoconf - 2.13 / 
. / --program the configure-suffix = 2.13          -program- suffix = SUFFIX specifies the suffix to be added to the name of the installed program. 
make 
make install

 

The author of alsa's compilation refers to  https://zhidao.baidu.com/question/1988026317702934907.html

Before installing the alsa driver, you must first install the necessary tool components to compile the kernel, as follows: # / etc / init.d / alsa- utils stop Turn off the sound card


It is recommended to download the compilation package first, and install the bread 
if there is a lack of dependencies #apt - get install build-essential ncurses- dev gettext xmlto 
#apt - get   install linux-headers-`uname -r` libncursesw5- dev 

apt - get install libpulse- dev 

apt - get install libxt- dev 

wget ftp: // ftp.alsa-project.org/pub/lib/alsa-lib-1.2.2.tar.bz2 

#wget ftp: // ftp.alsa-project.org/pub /utils/alsa-utils-1.2.2.tar.bz2 does not need to be compiled and recorded
#wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.25.tar.bz2 No need to compile and record

takes xjf
alsa-lib-1.2.2.tar.bz2 

Enter each folder to compile the trilogy. / configure make make install

alsa
-driver- 1.0 . 25 .tar.bz2 This file may be compiled with problems.

alsa -driver- 1.0 . 25 .tar.bz2 The author failed to compile in the end, and reported that there is a built-in driver. The author is not willing to uninstall the original driver, and there may be problems with reinstalling the sound card.
The author did not compile successfully, and successfully compiled this step

 

Resolve the error:

 error: ‘CarrySet’ is not a member of ‘js::jit::Assembler’
             masm.branchAdd32(Assembler::CarrySet,     ......  

CarrySet 'value of 11 is an enumeration defined in JS / the src / JIT / none / MacroAssembler- none.h Lane   
delete function. masm.branchAdd32 (Assembler :: CarrySet, ...... I have no way to solve it, only delete it. If a friend solves it, please give me a comment. Thank you.

 

No MAsmJSLoadHeap, MAsmJSStoreHeap class   mir-> barrierAfter () mir-> barrierBefore () mir-> isAtomicAccess () mir-> needsBoundsCheck ()   function error js / src / jit / MIR.h Replace the following 2 classes Refer to MWasmMemoryAccess class rewrite

class MAsmJSLoadHeap
  : public MUnaryInstruction,
    public MAsmJSMemoryAccess,
    public NoTypePolicy::Data
{
    MAsmJSLoadHeap(MDefinition* base, Scalar::Type accessType, MemoryBarrierBits barrierBefore = MembarNobits,
                   MemoryBarrierBits barrierAfter = MembarNobits)
      : MUnaryInstruction(base),
        MAsmJSMemoryAccess(accessType),
      barrierBefore_(barrierBefore),
      barrierAfter_(barrierAfter)
  //MAsmJSLoadHeap(MDefinition* base, Scalar::Type accessType) //todo yuanban
    //: MUnaryInstruction(base),
     //MAsmJSMemoryAccess(accessType)
    {
        setResultType(ScalarTypeToMIRType(accessType));
    }

  public:

    INSTRUCTION_HEADER(AsmJSLoadHeap)
    TRIVIAL_NEW_WRAPPERS

    MDefinition* base() const { return getOperand(0); }
    void replaceBase(MDefinition* newBase) { replaceOperand(0, newBase); }

    bool congruentTo(const MDefinition* ins) const override;
    AliasSet getAliasSet() const override {
        return AliasSet::Load(AliasSet::AsmJSHeap);
    }
    AliasType mightAlias(const MDefinition* def) const override;
    //  todo
    MemoryBarrierBits barrierBefore_;
    MemoryBarrierBits barrierAfter_;
    MemoryBarrierBits barrierBefore() const { return barrierBefore_; }
    MemoryBarrierBits barrierAfter() const { return barrierAfter_; }
    bool isAtomicAccess() const { return (barrierBefore_ | barrierAfter_) != MembarNobits; }
};

class MAsmJSStoreHeap
  : public MBinaryInstruction,
    public MAsmJSMemoryAccess,
    public NoTypePolicy::Data
{
    MAsmJSStoreHeap(MDefinition* base, Scalar::Type accessType, MDefinition* v, MemoryBarrierBits barrierBefore = MembarNobits,
                    MemoryBarrierBits barrierAfter = MembarNobits)
      : MBinaryInstruction(base, v),
        MAsmJSMemoryAccess(accessType),
        barrierBefore_(barrierBefore),
        barrierAfter_(barrierAfter)
    {}

  public:
    INSTRUCTION_HEADER(AsmJSStoreHeap)
    TRIVIAL_NEW_WRAPPERS

    MDefinition* base() const { return getOperand(0); }
    void replaceBase(MDefinition* newBase) { replaceOperand(0, newBase); }
    MDefinition* value() const { return getOperand(1); }

    AliasSet getAliasSet() const override {
        return AliasSet::Store(AliasSet::AsmJSHeap);
    }
    //  todo
    MemoryBarrierBits barrierBefore_;
    MemoryBarrierBits barrierAfter_;
    MemoryBarrierBits barrierBefore() const { return barrierBefore_; }
    MemoryBarrierBits barrierAfter() const { return barrierAfter_; }
    bool isAtomicAccess() const { return (barrierBefore_ | barrierAfter_) != MembarNobits; }
};

 

错误 error: ‘class js::jit::MAsmJSAtomicBinopHeap’ has no member named ‘needsBoundsCheck’; did you mean ‘isBoundsCheck’?
     if (mir->needsBoundsCheck()) {
              isBoundsCheck
Needless to say, the compiler let the compiler change it. needsBoundsCheck () is replaced with isBoundsCheck ()

 You're done. Firefox is in     obj-mips64el-unknown-linux-gnu / dist / bin .

 

Guess you like

Origin www.cnblogs.com/lijiabin-bj/p/12751654.html