~krystianch/public-inbox

4 2

Bug: obs-time-source: fails to build on several architectures

Eriberto Mota <eriberto@debian.org>
Details
Message ID
<20231107222635.9684fffa0682c9ce5bcf25f7@debian.org>
DKIM signature
missing
Download raw message
Hi Krystian,

I am the official maintainer of obs-time-source on Debian. Currently, your
plugin fails to build over several architectures. See an example for arm64:

	cd obj-aarch64-linux-gnu && LC_ALL=C.UTF-8 ninja -j4 -v
[1/2] cc -Itime-source.so.p -I. -I.. -I/usr/include/obs -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -DHAVE_OBSCONFIG_H -DSIMDE_ENABLE_OPENMP '$<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:C_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>' '$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:CXX_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>' -MD -MQ time-source.so.p/time-source.c.o -MF time-source.so.p/time-source.c.o.d -o time-source.so.p/time-source.c.o -c ../time-source.c
FAILED: time-source.so.p/time-source.c.o 
cc -Itime-source.so.p -I. -I.. -I/usr/include/obs -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -DHAVE_OBSCONFIG_H -DSIMDE_ENABLE_OPENMP '$<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:C_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>' '$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:CXX_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>' -MD -MQ time-source.so.p/time-source.c.o -MF time-source.so.p/time-source.c.o.d -o time-source.so.p/time-source.c.o -c ../time-source.c
../time-source.c: In function ‘time_source_update’:
../time-source.c:95:9: warning: ‘__builtin_strncpy’ specified bound 64 equals destination size [-Wstringop-truncation]
   95 |         strncpy(context->format, obs_data_get_string(settings, "format"),
      |         ^
cc: warning: $<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:C_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>: linker input file unused because linking not done
cc: error: $<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:C_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>: linker input file not found: No such file or directory
cc: warning: $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:CXX_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>: linker input file unused because linking not done
cc: error: $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:CXX_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>: linker input file not found: No such file or directory
ninja: build stopped: subcommand failed.
dh_auto_build: error: cd obj-aarch64-linux-gnu && LC_ALL=C.UTF-8 ninja -j4 -v returned exit code 1
make: *** [debian/rules:13: binary-arch] Error 25



There are other reports here[1]. I think the problem is something in the
build system. Could you check it for me? I am able to test any change.

[1] https://buildd.debian.org/status/package.php?p=obs-time-source

Regards, 

Eriberto
Details
Message ID
<CWTONF7L21AK.3FOETJZS0TJO0@omou>
In-Reply-To
<20231107222635.9684fffa0682c9ce5bcf25f7@debian.org> (view parent)
DKIM signature
missing
Download raw message
Hi Eriberto,

thanks for reporting this. I think the problem is the compiler warning
about strncpy in combination with the -Werror=format-security option.

I pushed a fix. Would you please test the latest commit?
Details
Message ID
<CAP+dXJeYW40C2UQNkNk2wW7LpjhNS=A7v=rry5HqtY+zTm=R=A@mail.gmail.com>
In-Reply-To
<CWTONF7L21AK.3FOETJZS0TJO0@omou> (view parent)
DKIM signature
missing
Download raw message
Hi Krystian,

Em qua., 8 de nov. de 2023 às 16:46, Krystian Chachuła
<krystian@krystianch.com> escreveu:
>
> Hi Eriberto,
>
> thanks for reporting this. I think the problem is the compiler warning
> about strncpy in combination with the -Werror=format-security option.
>
> I pushed a fix. Would you please test the latest commit?

Thanks for your quick reply.

It failed over arm64 and s390x. I didn't tested over other archs.

arm64:

Found ninja-1.11.1 at /usr/bin/ninja
  dh_auto_build
       cd obj-aarch64-linux-gnu && LC_ALL=C.UTF-8 ninja -j4 -v
[1/2] cc -Itime-source.so.p -I. -I.. -I/usr/include/obs
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/
usr/lib/aarch64-linux-gnu/glib-2.0/include -I/usr/include/harfbuzz
-I/usr/include/freetype2 -I/usr/include/l
ibpng16 -I/usr/include/libmount -I/usr/include/blkid
-I/usr/include/fribidi -I/usr/include/cairo -I/usr/incl
ude/pixman-1 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall
-Winvalid-pch -Wextra -Wpedantic -g -O2
-ffile-prefix-map=/home/eriberto/obs-time-source-0.1=.
-fstack-protector-strong -fstack-clash-protection -W
format -Werror=format-security -mbranch-protection=standard
-Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -
DHAVE_OBSCONFIG_H -DSIMDE_ENABLE_OPENMP
'$<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:C_COMPILER_SUPPORTS_OPENMP_SIM
D>>:-fopenmp-simd>'
'$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:CXX_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-sim
d>' -MD -MQ time-source.so.p/time-source.c.o -MF
time-source.so.p/time-source.c.o.d -o time-source.so.p/time
-source.c.o -c ../time-source.c
FAILED: time-source.so.p/time-source.c.o
cc -Itime-source.so.p -I. -I.. -I/usr/include/obs
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/li
b/aarch64-linux-gnu/glib-2.0/include -I/usr/include/harfbuzz
-I/usr/include/freetype2 -I/usr/include/libpng1
6 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi
-I/usr/include/cairo -I/usr/include/pi
xman-1 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall
-Winvalid-pch -Wextra -Wpedantic -g -O2 -ffil
e-prefix-map=/home/eriberto/obs-time-source-0.1=.
-fstack-protector-strong -fstack-clash-protection -Wformat
-Werror=format-security -mbranch-protection=standard -Wdate-time
-D_FORTIFY_SOURCE=2 -fPIC -pthread -DHAVE_
OBSCONFIG_H -DSIMDE_ENABLE_OPENMP
'$<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:C_COMPILER_SUPPORTS_OPENMP_SIMD>>:-f
openmp-simd>' '$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:CXX_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>'
-M
D -MQ time-source.so.p/time-source.c.o -MF
time-source.so.p/time-source.c.o.d -o time-source.so.p/time-sourc
e.c.o -c ../time-source.c
cc: warning: $<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:C_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>:
linker i
nput file unused because linking not done
cc: error: $<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:C_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>:
linker inp
ut file not found: No such file or directory
cc: warning: $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:CXX_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>:
link
er input file unused because linking not done
cc: error: $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:CXX_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>:
linker
input file not found: No such file or directory
ninja: build stopped: subcommand failed.


s390x:

Found ninja-1.11.1 at /usr/bin/ninja
  dh_auto_build
       cd obj-s390x-linux-gnu && LC_ALL=C.UTF-8 ninja -j2 -v
[1/2] cc -Itime-source.so.p -I. -I.. -I/usr/include/obs
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/
usr/lib/s390x-linux-gnu/glib-2.0/include -I/usr/include/harfbuzz
-I/usr/include/freetype2 -I/usr/include/lib
png16 -I/usr/include/libmount -I/usr/include/blkid
-I/usr/include/fribidi -I/usr/include/cairo -I/usr/includ
e/pixman-1 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall
-Winvalid-pch -Wextra -Wpedantic -g -O2 -
ffile-prefix-map=/home/eriberto/obs-time-source-0.1=.
-fstack-protector-strong -Wformat -Werror=format-secur
ity -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -DHAVE_OBSCONFIG_H
-DSIMDE_ENABLE_OPENMP '$<$<AND:$<COMPI
LE_LANGUAGE:C>,$<BOOL:C_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>'
'$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<B
OOL:CXX_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>' -MD -MQ
time-source.so.p/time-source.c.o -MF time-so
urce.so.p/time-source.c.o.d -o time-source.so.p/time-source.c.o -c
../time-source.c
FAILED: time-source.so.p/time-source.c.o
cc -Itime-source.so.p -I. -I.. -I/usr/include/obs
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/li
b/s390x-linux-gnu/glib-2.0/include -I/usr/include/harfbuzz
-I/usr/include/freetype2 -I/usr/include/libpng16
-I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi
-I/usr/include/cairo -I/usr/include/pixm
an-1 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall
-Winvalid-pch -Wextra -Wpedantic -g -O2 -ffile-
prefix-map=/home/eriberto/obs-time-source-0.1=.
-fstack-protector-strong -Wformat -Werror=format-security -W
date-time -D_FORTIFY_SOURCE=2 -fPIC -pthread -DHAVE_OBSCONFIG_H
-DSIMDE_ENABLE_OPENMP '$<$<AND:$<COMPILE_LAN
GUAGE:C>,$<BOOL:C_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>'
'$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:CX
X_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>' -MD -MQ
time-source.so.p/time-source.c.o -MF time-source.s
o.p/time-source.c.o.d -o time-source.so.p/time-source.c.o -c ../time-source.c
cc: warning: $<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:C_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>:
linker i
nput file unused because linking not done
cc: error: $<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:C_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>:
linker inp
ut file not found: No such file or directory
cc: warning: $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:CXX_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>:
link
er input file unused because linking not done
cc: error: $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:CXX_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>:
linker
input file not found: No such file or directory
ninja: build stopped: subcommand failed.


On amd64 (my machine) all is right.

Eriberto
Details
Message ID
<CWTR6T892AGO.27V008X5EO4HG@omou>
In-Reply-To
<CAP+dXJeYW40C2UQNkNk2wW7LpjhNS=A7v=rry5HqtY+zTm=R=A@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
Unfortunately, I cannot reproduce this issue. On aarch64, which is the
same as arm64, I get a successful build using instructions from the
README. Please see the log below. I'm unfamiliar with Debian packaging.
Is it possible that the problem is because the build is performed via
the dh command and not by invoking meson/ninja directly?


$ meson setup build
The Meson build system
Version: 1.2.3
Source dir: /home/krystianch/obs-time-source
Build dir: /home/krystianch/obs-time-source/build
Build type: native build
Project name: obs-time
Project version: 0.1
C compiler for the host machine: cc (gcc 13.2.1 "cc (Alpine 13.2.1_git20231014) 13.2.1 20231014")
C linker for the host machine: cc ld.bfd 2.41
Host machine cpu family: aarch64
Host machine cpu: aarch64
Found pkg-config: /usr/bin/pkg-config (2.0.3)
Run-time dependency libobs found: YES 29.1.3
Run-time dependency pangocairo found: YES 1.51.0
Build targets in project: 1

Found ninja-1.9 at /usr/bin/ninja

$ ninja -v -C build
ninja: entering directory 'build'
[1/2] cc -Itime-source.so.p -I. -I.. -I/usr/include/obs -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/cairo -I/usr/include/blkid -I/usr/include/pixman-1 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/fribidi -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -O3 -fPIC -pthread -DHAVE_OBSCONFIG_H -DSIMDE_ENABLE_OPENMP -fopenmp-simd -MD -MQ time-source.so.p/time-source.c.o -MF time-source.so.p/time-source.c.o.d -o time-source.so.p/time-source.c.o -c ../time-source.c
[2/2] cc  -o time-source.so time-source.so.p/time-source.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -shared -fPIC -Wl,--start-group -Wl,-soname,time-source.so /usr/lib/libobs.so /usr/lib/libpangocairo-1.0.so /usr/lib/libpango-1.0.so /usr/lib/libgobject-2.0.so /usr/lib/libglib-2.0.so /usr/lib/libintl.so /usr/lib/libharfbuzz.so /usr/lib/libcairo.so -Wl,--end-group
Details
Message ID
<CAP+dXJcaD9RKOSAg2nj+RMoaS4Kz5ECoPEYQZqfm-UaWAeKYCA@mail.gmail.com>
In-Reply-To
<CWTR6T892AGO.27V008X5EO4HG@omou> (view parent)
DKIM signature
missing
Download raw message
I downloaded the v0.2 and I made the same procedure as you. See below:

(sid_arm64-dchroot)eriberto@amdahl:~/obs-time-source-vanilla/obs-time-source-v0.2$
meson setup build
The Meson build system
Version: 1.2.3
Source dir: /home/eriberto/obs-time-source-vanilla/obs-time-source-v0.2
Build dir: /home/eriberto/obs-time-source-vanilla/obs-time-source-v0.2/build
Build type: native build
Project name: obs-time-source
Project version: 0.2
C compiler for the host machine: cc (gcc 13.2.0 "cc (Debian 13.2.0-6) 13.2.0")
C linker for the host machine: cc ld.bfd 2.41
Host machine cpu family: aarch64
Host machine cpu: aarch64
Found pkg-config: /usr/bin/pkg-config (1.8.1)
Run-time dependency libobs found: YES 29.1.3.1
Run-time dependency pangocairo found: YES 1.51.0
Build targets in project: 1

Found ninja-1.11.1 at /usr/bin/ninja
(sid_arm64-dchroot)eriberto@amdahl:~/obs-time-source-vanilla/obs-time-source-v0.2$
ninja -v -C build
ninja: Entering directory `build'
[1/2] cc -Itime-source.so.p -I. -I.. -I/usr/include/obs
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/
usr/lib/aarch64-linux-gnu/glib-2.0/include -I/usr/include/harfbuzz
-I/usr/include/freetype2 -I/usr/include/l
ibpng16 -I/usr/include/libmount -I/usr/include/blkid
-I/usr/include/fribidi -I/usr/include/cairo -I/usr/incl
ude/pixman-1 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall
-Winvalid-pch -Wextra -Wpedantic -O3 -f
PIC -pthread -DHAVE_OBSCONFIG_H -DSIMDE_ENABLE_OPENMP
'$<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:C_COMPILER_SUPPO
RTS_OPENMP_SIMD>>:-fopenmp-simd>'
'$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:CXX_COMPILER_SUPPORTS_OPENMP_SIMD>
>:-fopenmp-simd>' -MD -MQ time-source.so.p/time-source.c.o -MF time-source.so.p/time-source.c.o.d -o time-so
urce.so.p/time-source.c.o -c ../time-source.c
FAILED: time-source.so.p/time-source.c.o
cc -Itime-source.so.p -I. -I.. -I/usr/include/obs
-I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/li
b/aarch64-linux-gnu/glib-2.0/include -I/usr/include/harfbuzz
-I/usr/include/freetype2 -I/usr/include/libpng1
6 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi
-I/usr/include/cairo -I/usr/include/pi
xman-1 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall
-Winvalid-pch -Wextra -Wpedantic -O3 -fPIC -p
thread -DHAVE_OBSCONFIG_H -DSIMDE_ENABLE_OPENMP
'$<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:C_COMPILER_SUPPORTS_OP
ENMP_SIMD>>:-fopenmp-simd>'
'$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:CXX_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fop
enmp-simd>' -MD -MQ time-source.so.p/time-source.c.o -MF
time-source.so.p/time-source.c.o.d -o time-source.s
o.p/time-source.c.o -c ../time-source.c
cc: warning: $<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:C_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>:
linker i
nput file unused because linking not done
cc: error: $<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:C_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>:
linker inp
ut file not found: No such file or directory
cc: warning: $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:CXX_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>:
link
er input file unused because linking not done
cc: error: $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:CXX_COMPILER_SUPPORTS_OPENMP_SIMD>>:-fopenmp-simd>:
linker
input file not found: No such file or directory
ninja: build stopped: subcommand failed.


I maintain 17 OBS plugins on Debian, but 16 using cmake and your
plugin using meson. I am not familiar with meson. Could this issue be
caused by a wrong order of things in compile line?

Why my environment is generating:

 '$<$<AND:$<COMPILE_LANGUAGE:C>,$<BOOL:C_COMPILER_SUPPO
RTS_OPENMP_SIMD>>:-fopenmp-simd>'
'$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<BOOL:CXX_COMPILER_SUPPORTS_OPENMP_SIMD>
>:-fopenmp-simd>'

Is it a trash?

Thanks a lot for you help.
Reply to thread Export thread (mbox)