Bug 243955

Summary: multimedia/x265 : Fails to build on FreeBSD 12.1-RELEASE-p1 powerpc 32 bit : undefined reference to `x265_10bit::x265_api_query(int, int, int*)'
Product: Ports & Packages Reporter: canardo <canardo909>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed Not A Bug    
Severity: Affects Only Me CC: freebsd-2024, mi, powerpc
Priority: --- Flags: bugzilla: maintainer-feedback? (freebsd-2024)
Version: Latest   
Hardware: powerpc   
OS: Any   

Description canardo 2020-02-07 12:02:02 UTC
Problem found when building multimedia/x265 on FreeBSD 12.1-RELEASE-p1 r354992 GENERIC powerpc 32 bit, running on Apple Powerbook 17".


/usr/ports/multimedia/x265 # make clean
===>  Cleaning for x265-3.2.1_1
/usr/ports/multimedia/x265 # make -DBATCH install clean
===>  License GPLv2+ accepted by the user
===>   x265-3.2.1_1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by x265-3.2.1_1 for building
===>  Extracting for x265-3.2.1_1
.....
.....
[67/68] : && /usr/local/bin/g++9  -O2 -pipe  -DNDEBUG -DLINKED_10BIT -DLINKED_12BIT -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9  -Wl,-rpath=/usr/local/lib/gcc9 -O2 -pipe  -DNDEBUG -DLINKED_10BIT -DLINKED_12BIT -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9  -Wl,-rpath=/usr/local/lib/gcc9  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9 -L/usr/local/lib/gcc9   /usr/ports/multimedia/x265/work/x265_3.2.1/10bit/libx265.a /usr/ports/multimedia/x265/work/x265_3.2.1/12bit/libx265.a -Wl,-Bsymbolic,-znoexecstack CMakeFiles/cli.dir/input/input.cpp.o CMakeFiles/cli.dir/input/y4m.cpp.o CMakeFiles/cli.dir/input/yuv.cpp.o CMakeFiles/cli.dir/output/output.cpp.o CMakeFiles/cli.dir/output/raw.cpp.o CMakeFiles/cli.dir/output/reconplay.cpp.o CMakeFiles/cli.dir/output/y4m.cpp.o CMakeFiles/cli.dir/output/yuv.cpp.o CMakeFiles/cli.dir/x265.cpp.o  -o x265  -Wl,-rpath,/usr/ports/multimedia/x265/work/.build:  libx265.so.179  -lpthread  -lrt  -ldl && :
FAILED: x265 
: && /usr/local/bin/g++9  -O2 -pipe  -DNDEBUG -DLINKED_10BIT -DLINKED_12BIT -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9  -Wl,-rpath=/usr/local/lib/gcc9 -O2 -pipe  -DNDEBUG -DLINKED_10BIT -DLINKED_12BIT -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9  -Wl,-rpath=/usr/local/lib/gcc9  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc9 -L/usr/local/lib/gcc9   /usr/ports/multimedia/x265/work/x265_3.2.1/10bit/libx265.a /usr/ports/multimedia/x265/work/x265_3.2.1/12bit/libx265.a -Wl,-Bsymbolic,-znoexecstack CMakeFiles/cli.dir/input/input.cpp.o CMakeFiles/cli.dir/input/y4m.cpp.o CMakeFiles/cli.dir/input/yuv.cpp.o CMakeFiles/cli.dir/output/output.cpp.o CMakeFiles/cli.dir/output/raw.cpp.o CMakeFiles/cli.dir/output/reconplay.cpp.o CMakeFiles/cli.dir/output/y4m.cpp.o CMakeFiles/cli.dir/output/yuv.cpp.o CMakeFiles/cli.dir/x265.cpp.o  -o x265  -Wl,-rpath,/usr/ports/multimedia/x265/work/.build:  libx265.so.179  -lpthread  -lrt  -ldl && :
/usr/local/bin/ld: libx265.so.179: undefined reference to `x265_10bit::x265_api_query(int, int, int*)'
/usr/local/bin/ld: libx265.so.179: undefined reference to `x265_12bit::x265_api_query(int, int, int*)'
/usr/local/bin/ld: libx265.so.179: undefined reference to `x265_12bit::x265_api_get_179(int)'
/usr/local/bin/ld: libx265.so.179: undefined reference to `x265_10bit::x265_api_get_179(int)'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1
Comment 1 canardo 2020-02-08 08:47:28 UTC
My xé65 sources were 3 days old, and lots of fixes have been commited in the meanwhile.

Using the latest version, build is successful.

PR can be closed, sorry for inconvenience.
Comment 2 Mikhail Teterin freebsd_committer freebsd_triage 2020-02-13 21:56:54 UTC
Thanks for the confirmation. Could you e-mail me your (successful) build-log? I'm curious, whether the build detects running on PPC and uses the platform-specific optimizations (Altivec).

If not, it may benefit from some more patches...