Comments (29)
I am getting an error when trying to compile on Ubuntu 14.04:
vilsol@skynet:~/Software/obs-studio/obs-studio$ make
[ 1%] Built target glad
[ 8%] Built target jansson
Linking C shared library libobs.so
/usr/bin/ld: /usr/local/lib/libavcodec.a(avpacket.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libavcodec.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [libobs/libobs.so.0] Error 1
make[1]: *** [libobs/CMakeFiles/libobs.dir/all] Error 2
make: *** [all] Error 2
I have the latest ffmpeg drivers, and I already tried changing the CMakeList.txt to add -fPIC
but nothing changed.
from obs-studio.
That issue is complaining about ffmpeg itself not being built to support shared linking, recompile ffmpeg (or find a prebuilt) with --enable-shared
from obs-studio.
sudo apt-get install libpulse-dev qtbase5-dev libqt5x11extras5-dev libavcodec-dev libavformat-dev libswscale-dev libx264-dev libswresample-dev libfdk-aac-dev libxinerama-dev libxcomposite-dev libxrandr-dev
cmake CMakeLists.txt
make
sudo make install
Just to help anyone who finds this while looking for Linux build instructions.
from obs-studio.
Similarly for Arch I needed
sudo pacman -S cmake libpulse qt5-base qt5-x11extras ffmpeg libfdk-aac libxinerama libxcomposite libxrandr
cmake CMakeLists.txt
make
sudo make install
Note: I didn't have cmake, and ffmpeg covers the variety of video libraries but may not be the best option (I couldn't find equivalents for all the variety of video libraries)
from obs-studio.
Actually, Arch has AUR package for obs-studio
You can find it here https://aur.archlinux.org/packages/obs-studio-git/
from obs-studio.
I can't get cmake to work. I keep getting this error:
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
Could NOT find CXX11 (missing: CXX11_FLAGS)
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
cmake/Modules/FindCXX11.cmake:67 (find_package_handle_standard_args)
CMakeLists.txt:24 (find_package)
from obs-studio.
@mcat95: do you have a working C++11 compiler (such as gcc/g++) installed?
from obs-studio.
I have gcc installed in it's lastest version, which says that supost C++11 but it's not enabled by default
from obs-studio.
I recently updated (doing a in-place update) to LM17 so I can no longer test this script in respect to QT5, but for semi-automating ffmpeg and making launching scripts that include LD_LIBRARY_PATH and such its very useful still (or at least as a reference)
https://gist.github.com/admalledd/22096af58ee1eaa301d7
For ffmpeg this follows (mostly) https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu with the needed changes for a custom compile/install path
For QT5 I found the minimum .tar.gz files needed to get it working (since I could not find any way to automate the normal installer, ugh)
Also at least tells you what the CMAKE environment vars/options are for changing install and build paths.
Includes in-line launcher script that helps by setting the needed LD_LIBRARY_PATH if you use a custom install path like I prefer to use.
@iirelu what linux exactly is the apt-get for? (I assume something ubuntu 14.04 based with PPAs?) Its important to include such information, eg 13.10 doesn't have libqt5x11extras5-dev (more accurately it has a very broken qt5) and IIRC on almost all *buntu (debian?) based distros by default ship with libav instead of ffmpeg (using the same package names of course, to make it more painful).
from obs-studio.
@iirelu's commands worked for me on Ubuntu 14.04 with Severinsson's ffmpeg ppa
from obs-studio.
@Jacob-Mischka thanks, just wanting to make sure we get all the relevant info in here.
What kind of details should we be looking for in the INSTALL instructions? Do we just want a temporary update for the current state of compiling and operating on linux (basically post the info apt-get info here and the ffmpeg PPA)? From what I read (partially from commit messages/closed issues and others from reading between the lines) it seems likely that some implementation details on how linux compiles might be changing a bit in the future (@jp9000 talked about libav compatibility shims for debian users, slightly different GL code for mesa users, and others). Just wondering if we want a INSTALL/COMPILING file that will likely be broken again quickly due to how fast things are still evolving (although things a little more stable so far) or wait a bit longer.
Personally I vote for including the info we have collected here with 14.04 being the target compile OS using a custom ffmpeg of some sort. Reason being that although very new still it is a LTS release so we should have decent compatibility and stability going forward for quite a while until the dust settles on how new this project still is.
(side note: anyone know anything about setting up our own PPA for obs in the near future?)
from obs-studio.
@BtbN created one that I've been using for a while and works fine.
It also requires the ffmpeg ppa I mentioned in my previous comment, by the way.
from obs-studio.
@admalledd The instructions are for 14.04, yes. Building it on 13.10 is difficult at best, thanks to the mentioned Qt5 issues.
I got that list of packages from the buildlog of ppa:btbn/obs-studio, which is done on Ubuntu 14.04 with ppa:jon-severinsson/ffmpeg.
from obs-studio.
The main issue with Ubuntu is libav, before 14.04 the version they used is so outdated that it's impossible to make obs compatible without huge changes. 14.04 finally uses a version that can be replaced with ffmpeg in compatibility mode.
from obs-studio.
Libav does not have swresample, you need ffmpeg from the semi-official ppa.
Also, your cmake is simply too old, you need 2.8.12.
from obs-studio.
I've up to date 2.8.12 cmake and Jon Severinsson but still missing Libswresample, any idea? Im on Ubuntu 14.04
from obs-studio.
I annoyingly followed the second comment in here to see if the github was more up to date than the PPA and that by itself is dangerous it turned my entire /usr/local to root only so be warned.
from obs-studio.
It does not "turn /usr/local" into root. It just installs obs-studio with that prefix.
Never do make install except with a DESTDIR, and especialy never do it as root.
cmake does not have make uninstall, so you'll have to manualy remove all files it installed.
The ppa is automaticaly updated once a day by Jenkins.
from obs-studio.
That's my point though for anyone blindly coming into here and running those commands, they aren't safe by themselves. The second comment didn't have a destdir and said do it as root.
from obs-studio.
You're either not on amd64 or x86, which are the only archs launchpad supports publicly, or you did not propperly add the ppa.
Use add-apt-repository ppa:btbn/obs-studio
from obs-studio.
Launchpad manages itself, it just push to code there and it does the rest.
It works fine on my test machine, so you must be doing something wrong.
from obs-studio.
is it possible to update the INSTALL file with the procedure you want new users to follow in order to install obs-studio in linux? Maybe instructions for Arch and Ubuntu? Those seem to be the most popular. Just a thought.
from obs-studio.
Compiled from source with --enable-shared, didn't fix it.
from obs-studio.
Just use the PPA to get ffmpeg. It's what the launchpad builds also does it and works fine.
from obs-studio.
I will update the manual build instructions for people who want a development environment, though it'll have to wait until after I restructure the repo.
from obs-studio.
Hi.
Im trying build this on my Linux Mageia 4 x64 but I have small issue.
[x@localhost obs-studio (master)]$ cmake CMakeLists.txt
-- Jansson >=2.5 not found, building bundled version
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
Could NOT find Libswscale (missing: SWSCALE_LIB FFMPEG_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
cmake/Modules/FindLibswscale.cmake:37 (find_package_handle_standard_args)
libobs/CMakeLists.txt:3 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/x/obs-studio/CMakeFiles/CMakeOutput.log".
See also "/home/x/obs-studio/CMakeFiles/CMakeError.log".
[x@localhost obs-studio (master)]$
I have installed latest ffmpeg 2.3.1 and this libswscaler2 and lib64swscaler2... but still not working.
Any know how fix this?
from obs-studio.
Everyone* okay with the new linux build instructions? Because each distribution has different names for specific sets of packages, there's no "one size fits all" set of instructions that can really work for linux.
from obs-studio.
Having instructions for one or two major distros is fine, as users of obscure ones can usually figure the rest by themselves.
from obs-studio.
Valid point.
from obs-studio.
Related Issues (20)
- Errors and no video with PipeWire Camera Portal HOT 4
- NVENC settings show "CQ Level" option while setting CQP HOT 2
- Crash in Image slikeshow mk2 if randomize with zero files
- Can't build project by using tutorial HOT 3
- OBS wont boot Normal, Safe mode works, Full reset does nothing HOT 1
- AMD HW AV1 cannot use P010 colour format with QVBR, HQVBR, HQCBR rate control, OBS does not provide any useful errors why recording fails HOT 10
- Could not find the Qt platform plugin "xcb" HOT 1
- Display Capture captured second screen only on both of the display option HOT 1
- Chroma Key for Mac OS window capture broken
- Stopping and Starting the replay buffer can sometimes misleadingly say "Start Replay Buffer" highlighted in Blue - when the buffer is not actually running
- OBS Studio 30.1.0-beta1 FTBFS on NixOS due to a sign-compare warning in QSV_Encoder_Internal.cpp HOT 11
- Obs window width changes and exceeds my screen when pressing the "start streaming button" HOT 1
- [macOS] Replay buffer hangs on stopping, `interleaved packets` never sent. HOT 1
- Software crash upon trying to enter settings menu HOT 4
- Crash when deleting scene item HOT 1
- Black screen, no video only sound (CreateForMonitor) HOT 15
- Start Virtual Camera text is cut off in the UI
- AV1 Video Decode with Media Source does not use HW Decode on AMD Windows HOT 12
- Ask Discord developers how they make window capture HOT 1
- Video Capture Device (V4L2) stays active on scene switch
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from obs-studio.