tensor5 / arch-atom

Repository of Atom and Electron binary packages for Arch Linux
48 stars 5 forks source link

Heads up: libvpx 1.6.0 in staging causes Electron build to fail #23

Closed fusion809 closed 8 years ago

fusion809 commented 8 years ago

Hi,

Just thought I'd mention that libvpx 1.6.0, which is in the [staging] repo causes the build of Electron 1.2.8 to fail, with the error:

9/screenshare_layers.cc -o obj/third_party/webrtc/modules/video_coding/codecs/vp9/webrtc_vp9.screenshare_layers.o
In file included from ../../third_party/webrtc/modules/video_coding/codecs/vp9/screenshare_layers.cc:11:
In file included from ../../third_party/webrtc/modules/video_coding/codecs/vp9/screenshare_layers.h:13:
../../third_party/webrtc/modules/video_coding/codecs/vp9/vp9_impl.h:21:10: fatal error: 'vpx/svc_context.h' file not found
#include "vpx/svc_context.h"
         ^
1 error generated.
[3999/13074] CXX obj/v8/src/v8_base.counters.o
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "/home/fusion809/GitHub/mine/packaging/arch-atom/electron/src/electron/vendor/brightray/vendor/libchromiumcontent/script/build", line 52, in <module>
    sys.exit(main())
  File "/home/fusion809/GitHub/mine/packaging/arch-atom/electron/src/electron/vendor/brightray/vendor/libchromiumcontent/script/build", line 38, in main
    subprocess.check_call([NINJA, '-C', config_dir, target])
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja', '-C', 'vendor/chromium/src/out/Release', 'chromiumcontent_all']' returned non-zero exit status 1
None
Traceback (most recent call last):
  File "/home/fusion809/GitHub/mine/packaging/arch-atom/electron/src/electron/script/build-libchromiumcontent.py", line 51, in <module>
    sys.exit(main())
  File "/home/fusion809/GitHub/mine/packaging/arch-atom/electron/src/electron/script/build-libchromiumcontent.py", line 34, in main
    execute_stdout([sys.executable, build, '-R', '-t', args.target_arch])
  File "/home/fusion809/GitHub/mine/packaging/arch-atom/electron/src/electron/script/lib/util.py", line 177, in execute_stdout
    raise e
subprocess.CalledProcessError: Command '['/home/fusion809/GitHub/mine/packaging/arch-atom/electron/src/python2-path/python', '/home/fusion809/GitHub/mine/packaging/arch-atom/electron/src/electron/vendor/brightray/vendor/libchromiumcontent/script/build', '-R', '-t', 'x64']' returned non-zero exit status 1
None
Traceback (most recent call last):
  File "script/bootstrap.py", line 260, in <module>
    sys.exit(main())
  File "script/bootstrap.py", line 45, in main
    build_libchromiumcontent(args.verbose, args.target_arch, defines)
  File "script/bootstrap.py", line 202, in build_libchromiumcontent
    execute_stdout(args + ['--target_arch', target_arch])
  File "/home/fusion809/GitHub/mine/packaging/arch-atom/electron/src/electron/script/lib/util.py", line 177, in execute_stdout
    raise e
subprocess.CalledProcessError: Command '['/home/fusion809/GitHub/mine/packaging/arch-atom/electron/src/python2-path/python', '/home/fusion809/GitHub/mine/packaging/arch-atom/electron/src/electron/script/build-libchromiumcontent.py', '-v', '--defines', ' make_clang_dir=/usr clang_use_chrome_plugins=0', '--target_arch', 'x64']' returned non-zero exit status 1
==> ERROR: A failure occurred in build().
    Aborting...

With the version in the [extra] repo (i.e., 1.5.0) it builds fine, so I thought you should be made aware so ya can prepare your Electron PKGBUILD for when libvpx 1.6.0 enters the [extra] repo.

Thanks for your time, Brenton

tensor5 commented 8 years ago

Thanks for the heads up. I checked now and also the upcoming electron 1.3, which uses chromium 52, requires the old header.

fusion809 commented 8 years ago

Btw APM 1.12.3 is out, so you may wish to bump APM in this repo.

tensor5 commented 8 years ago

👍

fusion809 commented 8 years ago

Electron 1.3.1 is out now. I've tried just bumping pkgver and chromium ver to the latest versions (specifically 1.3.1 and 52.0.2743.85, respectively), but building Electron 1.3.1 failed (specifically at the patching stage and yes I cleaned the source directory before building), so I'm gonna have to leave it to you, to adjust the patches. If you want my error message building Electron 1.3.1 here it is:

done.
  -> Creating working copy of gyp git repo...
Cloning into 'gyp'...
done.
  -> Creating working copy of libchromiumcontent git repo...
Cloning into 'libchromiumcontent'...
done.
  -> Creating working copy of native-mate git repo...
Cloning into 'native_mate'...
done.
  -> Creating working copy of node git repo...
Cloning into 'node'...
done.
Checking out files: 100% (19129/19129), done.
  -> Creating working copy of requests git repo...
Cloning into 'requests'...
done.
  -> Creating working copy of src git repo...
Cloning into 'google-breakpad'...
done.
==> Starting prepare()...
patching file atom/browser/ui/views/menu_bar.cc
patching file common.gypi
Hunk #1 FAILED at 19.
Hunk #2 succeeded at 107 (offset 6 lines).
Hunk #3 succeeded at 185 (offset 8 lines).
1 out of 3 hunks FAILED -- saving rejects to file common.gypi.rej
==> ERROR: A failure occurred in prepare().
    Aborting...
tensor5 commented 8 years ago

I fixed that in my local repository already. The reason why I haven't released it yet is because there is a problem launching Atom with Electron 1.3, specifically NodeGit, one of Atom's dependencies, doesn't compile. I'm trying to disable it now, following https://github.com/atom/atom/pull/12167.

fusion809 commented 8 years ago

Btw it is sufficient to create a symbolic link (with ln) in order to overcome this libvpx issue. That is:

sudo ln -sf /usr/lib/libvpx.so.4 /usr/lib/libvpx.so.3

fixes this drama. So if you're stuck as to how to fix this issue by modifying Electron source code (like using a patch you apply in its PKGBUILD) you can merely add:

ln -sf /usr/lib/libvpx.so.4 ${pkgdir}/usr/lib/libvpx.so.3

to its package() function.

tensor5 commented 8 years ago

Thanks. I'll see what other packages did.

City-busz commented 8 years ago

@fusion809 No, you should never do this, because it's likely broken at some point. And neither work if you build the packages from the sources.

It was a mistake on libvpx update. I reported it here: https://bugs.archlinux.org/task/50222 Once it gets fixed, we can use system libvpx again. But until that, you can switch back to use internal libvpx, like it was done in the chromium package: https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/chromium&id=8a9e5f56bf23a336604691418cf149db215f68a3

City-busz commented 8 years ago

It's fixed in libvpx 1.6.0-2, a simple rebuild should be enough.

tensor5 commented 8 years ago

One less thing to think about.

IkeLutra commented 8 years ago

I am encountering this error which I presume is related:

/usr/lib/electron/electron: error while loading shared libraries: libvpx.so.3: cannot open shared object file: No such file or directory

Is this something I can fix myself? Sorry pretty new to Arch. Thanks

fusion809 commented 8 years ago

Sure is. You will have to manually compile Electron against the new version of libvpx. To do so just run:

git clone https://github.com/tensor5/arch-atom # this command clones this (tensor5/arch-atom) repo
cd arch-atom/electron                          # cd into the electron subfolder of the cloned repo
makepkg -si --noconfirm                        # build the Electron package. 

beware compiling Electron manually from source can take quite some time (for me it takes >2 hours). Alternatively you can get and install my Electron binary (from the [pkgbuild-current] repository) which is built against the latest libvpx. You can get it via running:

wget -c https://github.com/fusion809/PKGBUILDs/releases/download/current/electron-1.3.2-1-x86_64.pkg.tar.xz
sudo pacman -U electron-1.3.2-1-x86_64.pkg.tar.xz --noconfirm