> On Jan 9, 2017, at 12:09 PM, Stuart Henderson <[email protected]> wrote:
>
> On 2017/01/09 10:31, Karel Gardas wrote:
>> Passing -llibobs.so.0 to linker means that linker will try to link
>> liblibobps.so.0.so IMHO. Please give a try to -lobs
>
> You can't modify what cmake passes to the linker in such a direct manner.
>
> Jordon wrote:
>>> Part 2: Leaning that OpenBSD does not have a wrapper for sys info.h. In
>>> digging into this, I found that it is only used to get the amount of
>>> physical RAM to dump to a log. That’s it. I just commented it out for now
>>> with an intent to come back later and figure out the OpenBSD way to do this.
>
> I think the figure they're after is sysctl hw.physmem. I agree with your
> approach here.
>
>>> Also, when I got the error, I noticed that if I immediately did
>>> a ‘make build’ again, it would build a few more (as in, in the [x/y]
>>> counter, the y would be a bit smaller). Doing this over and over would
>>> slowly decrement the number of remaining files to a point at which it
>>> stopped decrementing. This makes the build seem… nondeterministic? Is
>>> this just a function of a parallel build system that stops whenever it
>>> sees an error?
>
> Builds done using ninja (which is default for cmake ports) are non-
> deterministic. (It's sort-of useful during development, but a complete
> pain as far as bulk builds are concerned, and makes it hard to find
> differences between working and non-working builds). Anyway don't
> worry about this for now, it's not going to have much effect on this
> port.
>
>>> /usr/bin/ld: cannot find -llibobs.so.0
>
> Set SHARED_LIBS=obs 0.0, clean and rebuild.
>
> While you're there, you might as well also set the others and save
> yourself some extra rebuilds -
>
> SHARED_LIBS= obs 0.0 \
> obs-frontend-api 0.0 \
> obs-opengl 0.0 \
> obsglad 0.0
>
> BTW if you want to submit this, make sure it gets a build on a -current
> machine with up-to-date packages and ports tree; Qt5 has been reorgnasied
> recently and Qt5X11Extras moved from the main Qt5 package to
> x11/qt5/qt5extras.
>
> I suggest skipping the v4l2 plugin for now, webcam input is available
> via an ffmpeg source of /dev/video0 (format "video4linux2") anyway,
> and that one will be tricky.
>
>>> So the ‘cannon find’ file is right where it should be. Can any of
>>> you experienced porters see what rookie mistake I am making?
>
> It's not a rookie mistake, you hit a fiddly area of the cmake ports
> infrastructure. Some parts of the build require that the generated
> libraries are defined in SHARED_LIBS, however you don't know what they
> are until you've attempted build. (Sometimes it fails during build,
> sometimes it "succeeds" but doesn't install things correctly).
>
Thank you for this replay.
I am making this on a laptop running snapshot, and i update it about 2 or 3
times per week.
I also keep the installed packages up to date as well.
With this help, I was actually able to get it to build and run!
Unfortunately, it is unusably slow, probably due to that fact that I am running
it on a
Skylake-based system. I think I am just going to put this on hold until
Skylake support
drops.
If anyone is interested, the Makefile I cobbled together is pasted in below.
Thanks again! I learned a lot from this and hope to be able to contribute more
in the future.
Jordon
# $OpenBSD: Makefile.template,v 1.75 2016/03/20 17:19:49 naddy Exp $
#
# Replace ??? with appropriate values
# Remove extraneous comments before commit
# Use /usr/ports/infrastructure/bin/portcheck
# Reasons why the port/package shouldn't be built
#
ONLY_FOR_ARCHS = amd64
#NOT_FOR_ARCHS = ???
#COMES_WITH = ???
#BROKEN = reason
#
# Very short description of the package, 60 chars max
# |----------------------------------------------------------|
COMMENT = Open Broadcaster Software
# COMMENT-foo = ??? for multi packages
#
# What port/package will be created
#
V = 17.0.0
DISTNAME = obs-studio-$(V)
PKGNAME = obs-studio-$(V)
#PKGNAME-foo = ??? for multi packages
#
# For github: traditional tarballs in /releases/download are normally
# preferred if available; use them with DISTNAME/MASTER_SITES lines as
# normal. For projects using auto-generated tarballs, set GH_ACCOUNT,
# GH_PROJECT, and *one* of GH_TAGNAME or GH_COMMIT. For GH_COMMIT, also
# set DISTNAME. For GH_TAGNAME, set DISTNAME if the default is no good.
#
GH_ACCOUNT = jp9000
GH_PROJECT = obs-studio
GH_TAGNAME = $(V)
#GH_COMMIT = abab123456789abacafeabab123123b1e4ble4bl
# for any port that creates shared libraries.
# both libtool and cmake automatically set filenames based on this variable.
# for libtool- or cmake-based ports, have a look at WRKBUILD/shared_libs.log
SHARED_LIBS = obs 0.0 \
obsglad 0.0 \
obs-frontend-api 0.0 \
obs-opengl 0.0
# the category used in the directory name, /usr/ports/<category>/portname,
# must be included and listed first.
CATEGORIES = multimedia
HOMEPAGE = https://obsproject.com
# person who is responsible for the port. Use a complete email address with
# a real name, e.g., "MAINTAINER = John Doe <[email protected]>".
# If you maintain several ports, use the same line each time.
# If you no longer use the port, or are unwilling/unable to handle issues
# in a timely manner, *leave the field blank*.
# Default value is [email protected], no need to fill in
MAINTAINER = Jordon
# Licensing: This determines what we can distribute.
# When you determine the license type, make sure to look at ALL distfiles.
# Every distfile can have a different license. The PERMIT_* values are
# determined by the most restrictive license. If you have two licenses
# that are in conflict, set PERMIT_* based on the most restrictive one.
# Make SURE you get these values right.
# Put a comment there to state what's going on.
# Can be as brief as `BSD' or `GPLv2+', but it'd better be easy to check,
# if someone wants to double-check licensing.
# For GPL, the applicable versions must be included (e.g. v2+, v2 only, v3+).
# If all PERMIT_* are Yes, just setting 'PERMIT_PACKAGE_CDROM=Yes' is enough.
# GPL-2.0 according to the github site
PERMIT_PACKAGE_CDROM = Yes
#PERMIT_PACKAGE_FTP = Yes | Reason if No
#PERMIT_DISTFILES_FTP = Yes | Reason if No
# "make port-lib-depends-check" can help
WANTLIB = Qt5Widgets Qt5X11Extras
# where the source files and patches can be fetched
#
#MASTER_SITES = https://github.com/jp9000/obs-studio/archive/
#MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=subdir/}
#MASTER_SITES = ${MASTER_SITE_foo:=subdir/}
# if more master sites are needed...
#MASTER_SITES0 =
# ...
#DISTFILES = ???
#EXTRACT_ONLY = ???
#EXTRACT_SUFX = .tar.bz2
#DIST_SUBDIR = ???
# PATCHFILES are also retrieved from MASTER_SITES*
#PATCHFILES = ???
#PATCH_DIST_STRIP = -p0
# Dependencies
#
MODULES = devel/cmake x11/qt5
BUILD_DEPENDS = graphics/ffmpeg
#RUN_DEPENDS = ???
LIB_DEPENDS = x11/qt5/qtx11extras
#TEST_DEPENDS = ???
#MAKE_FLAGS = ???
#MAKE_ENV = ???
#FAKE_FLAGS = ???
#TEST_FLAGS = ???
# build/configuration variables
#
#SEPARATE_BUILD = concurrent
#SEPARATE_BUILD = Yes (build in a directory other than WRKSRC)
#SEPARATE_BUILD = flavored (distinct flavors may share a common WRKSRC)
#USE_GMAKE = Yes
#USE_GROFF = Yes
# Programs that require GNU libtool to build instead of the OpenBSD one
# should use this option. Add a comment explaining why. Don't use this if
# a port requires libtool's .m4 files but otherwise can use OpenBSD libtool,
# in that case use "BUILD_DEPENDS=devel/libtool" instead.
#USE_LIBTOOL= gnu
# Set CONFIGURE_STYLE to value corresponding to some standard configuration
# perl [modbuild]: perl's MakeMaker Makefile.PL (modbuild: perl's
# Module::Build Build.PL)
# gnu [autoconf] [old] [dest]: gnu style configure (old: no
# sysconfdir), (dest: add DESTDIR, does not handle it),
# (autoconf: needed by port, implies gnu)
# XXX: cygnus products do NOT use autoconf for making the main
# configure from configure.in
# imake [noman]: port uses imake for configuration.
# (noman: no man page installation)
# simple: port has its own configure script
#CONFIGURE_STYLE =
#CONFIGURE_SCRIPT = ??? (if other than configure)
#CONFIGURE_ARGS = ???
#CONFIGURE_ENV = ???
# for gnu stuff
#AUTOCONF_VERSION = ??? (defaults to 2.13)
#AUTOMAKE_VERSION = ??? (defaults to 1.4)
# config.guess and others are copied here
#MODGNU_CONFIG_GUESS_DIRS = ??? (defaults to ${WRKSRC})
# Is the build automagic or is it interactive
#
#IS_INTERACTIVE = Yes
#TEST_IS_INTERACTIVE = Yes
# Assume you have one multiple choice flavor: 1 2 3 and switches a b.
# You would write
#
#FLAVORS = 1 2 3 a b
#FLAVOR ?=
# grab multiple choice value
#CHOICE = ${FLAVOR:Na:Nb}
# check that CHOICE is 1 OR 2 OR 3, or error out
#.if ${CHOICE} == "1"
# code for 1
#.elif ${CHOICE} == "2"
# code for 2
#.elif ${CHOICE} == "3"
# code for 3
#.else
#ERRORS += "Fatal: Conflicting flavor: ${FLAVOR}"
#.endif
# check for switches
#.if ${FLAVOR:Ma}
# code for a
#.endif
#.if ${FLAVOR:Mb}
# code for b
#.endif
# Things that we don't want to do for this port/package
# Generally, DON'T set anything to No if it's not needed.
# The time gained is not worth it.
#
#NO_BUILD = Yes
#NO_TEST = Yes
# Overrides for default values
#
#CFLAGS = ???
#LDFLAGS = ???
#MAKE_FILE = ???
#PKG_ARCH = ??? (* for arch-independent packages)
#WRKDIST = ??? if other than ${WRKDIR}/${DISTNAME}
#WRKSRC = ??? if other than ${WRKDIST}
#WRKBUILD = ??? if other than ${WRKSRC}
#WRKCONF = ??? if other than ${WRKBUILD}
#ALL_TARGET = ???
#INSTALL_TARGET = ???
#TEST_TARGET = ???
.include <bsd.port.mk>