Bug 261428 - multimedia/pipewire: Fails to build
Summary: multimedia/pipewire: Fails to build
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Gleb Popov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-24 13:46 UTC by iron.udjin
Modified: 2022-02-13 18:06 UTC (History)
1 user (show)

See Also:
arrowd: maintainer-feedback+


Attachments
build log (151.50 KB, text/plain)
2022-01-24 13:46 UTC, iron.udjin
no flags Details
Patch (364 bytes, patch)
2022-01-26 08:18 UTC, Gleb Popov
no flags Details | Diff
Patch (364 bytes, patch)
2022-01-26 08:45 UTC, Gleb Popov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description iron.udjin 2022-01-24 13:46:05 UTC
Created attachment 231271 [details]
build log

OS: FreeBSD 13-STABLE stable/13-n249132-70201cc45dc7

Options        :
	GSTREAMER      : on
	MANPAGES       : off
	MEDIASESSION   : on
	PULSEAUDIO     : on
	SDL            : on
	VULKAN         : on

After update pipewire to 0.3.43 it fails to build:

[ 31% 184/589] cc -Ispa/tests/spa-stress-ringbuffer.p -Ispa/tests -I../spa/tests -Ispa/include -I../spa/include -I/usr/local/include -fno-color-diagnostics -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=gnu99 -O3 -fvisibility=hidden -Wsign-compare -Wpointer-arith -Wpointer-sign -Wformat -Wformat-security -Wimplicit-fallthrough -Wmissing-braces -Wtype-limits -Wvariadic-macros -Wno-missing-field-initializers -Wno-unused-parameter -Wno-pedantic -Wunused-result -D_GNU_SOURCE -DFASTPATH -O2 -pipe -O2 -march=native -mtune=native -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -fPIE -pthread -MD -MQ spa/tests/spa-stress-ringbuffer.p/stress-ringbuffer.c.o -MF spa/tests/spa-stress-ringbuffer.p/stress-ringbuffer.c.o.d -o spa/tests/spa-stress-ringbuffer.p/stress-ringbuffer.c.o -c ../spa/tests/stress-ringbuffer.c
FAILED: spa/tests/spa-stress-ringbuffer.p/stress-ringbuffer.c.o 
cc -Ispa/tests/spa-stress-ringbuffer.p -Ispa/tests -I../spa/tests -Ispa/include -I../spa/include -I/usr/local/include -fno-color-diagnostics -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=gnu99 -O3 -fvisibility=hidden -Wsign-compare -Wpointer-arith -Wpointer-sign -Wformat -Wformat-security -Wimplicit-fallthrough -Wmissing-braces -Wtype-limits -Wvariadic-macros -Wno-missing-field-initializers -Wno-unused-parameter -Wno-pedantic -Wunused-result -D_GNU_SOURCE -DFASTPATH -O2 -pipe -O2 -march=native -mtune=native -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -fPIE -pthread -MD -MQ spa/tests/spa-stress-ringbuffer.p/stress-ringbuffer.c.o -MF spa/tests/spa-stress-ringbuffer.p/stress-ringbuffer.c.o.d -o spa/tests/spa-stress-ringbuffer.p/stress-ringbuffer.c.o -c ../spa/tests/stress-ringbuffer.c
../spa/tests/stress-ringbuffer.c:17:12: error: static declaration of 'sched_getcpu' follows non-static declaration
static int sched_getcpu(void) { return -1; };
           ^
/usr/include/sched.h:45:5: note: previous declaration is here
int sched_getcpu(void);
    ^
1 error generated.
ninja: build stopped: subcommand failed.
*** Error code 1
Comment 1 Gleb Popov freebsd_committer 2022-01-26 08:18:32 UTC
Created attachment 231348 [details]
Patch

Can you please test if this patch fixes the issue for you?

Drop it into multimedia/pipewire/files directory and run `make clean build`.
Comment 2 iron.udjin 2022-01-26 08:25:34 UTC
(In reply to Gleb Popov from comment #1)

Doesn't work, the same error message:

../spa/tests/stress-ringbuffer.c:17:12: error: static declaration of 'sched_getcpu' follows non-static declaration
Comment 3 Gleb Popov freebsd_committer 2022-01-26 08:45:00 UTC
Created attachment 231349 [details]
Patch

What about this?
Comment 4 iron.udjin 2022-01-26 09:34:56 UTC
(In reply to Gleb Popov from comment #3)

This patch fixes the problem, build successful.
Comment 5 commit-hook freebsd_committer 2022-01-26 11:26:59 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f29517ee35ea13f839933f0cbcb8943395ae6db9

commit f29517ee35ea13f839933f0cbcb8943395ae6db9
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2022-01-26 11:25:17 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2022-01-26 11:26:03 +0000

    multimedia/pipewire: Unbreak build on recent 13-STABLE.

    PR:             261428
    MFH:            2022Q1

 .../pipewire/files/patch-spa_tests_stress-ringbuffer.c (new) | 12 ++++++++++++
 1 file changed, 12 insertions(+)
Comment 6 Jack 2022-02-10 10:07:34 UTC
Now getting this

  1% 8/403] cc  -o spa/tests/spa-stress-ringbuffer spa/tests/spa-stress-ringbuffer.p/stress-ringbuffer.c.o -L/usr/local/lib -I/usr/local/include -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -pie -Wl,-rpath=/usr/local/lib -fstack-protector-strong -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -Wl,--start-group -ldl -pthread -lm -Wl,--end-group
FAILED: spa/tests/spa-stress-ringbuffer 
cc  -o spa/tests/spa-stress-ringbuffer spa/tests/spa-stress-ringbuffer.p/stress-ringbuffer.c.o -L/usr/local/lib -I/usr/local/include -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -pie -Wl,-rpath=/usr/local/lib -fstack-protector-strong -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -Wl,--start-group -ldl -pthread -lm -Wl,--end-group
ld: error: undefined symbol: sched_getcpu
>>> referenced by stress-ringbuffer.c
>>>               spa/tests/spa-stress-ringbuffer.p/stress-ringbuffer.c.o:(reader_start)
>>> referenced by stress-ringbuffer.c
>>>               spa/tests/spa-stress-ringbuffer.p/stress-ringbuffer.c.o:(writer_start)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
*** Error code 1

FreeBSD jack.musirc.com 13.0-STABLE FreeBSD 13.0-STABLE #0 stable/13-n248731-0fc6eebbf763: Tue Dec 28 12:49:10 PST 2021     jack@jack.musirc.com:/usr/obj/d2/src/amd64.amd64/sys/JACK  amd64
Comment 7 commit-hook freebsd_committer 2022-02-13 18:05:17 UTC
A commit in branch 2022Q1 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9db3c8c3e0f5fc8de6883e1fa916f9383226238b

commit 9db3c8c3e0f5fc8de6883e1fa916f9383226238b
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2022-01-26 11:25:17 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2022-02-13 18:04:51 +0000

    multimedia/pipewire: Unbreak build on recent 13-STABLE.

    PR:             261428
    MFH:            2022Q1
    (cherry picked from commit f29517ee35ea13f839933f0cbcb8943395ae6db9)

 .../pipewire/files/patch-spa_tests_stress-ringbuffer.c (new) | 12 ++++++++++++
 1 file changed, 12 insertions(+)
Comment 8 Gleb Popov freebsd_committer 2022-02-13 18:06:34 UTC
(In reply to Jack from comment #6)
You probably have too old STABLE. Try updating the world.