Bug 282178 - graphics/libheif: error installing libheif-1.18.2 ninja: error: rebuilding 'build.ninja': subcommand failed
Summary: graphics/libheif: error installing libheif-1.18.2 ninja: error: rebuilding 'b...
Status: Closed DUPLICATE of bug 279692
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Max Brazhnikov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-18 14:58 UTC by bagas
Modified: 2024-10-23 20:09 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (makc)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bagas 2024-10-18 14:58:33 UTC
Hello.
Error installing libheif-1.18.2.

My system FreeBSD 14.1-RELEASE-p5 amd64.

# pkg version -v | grep 'ninja'
ninja-1.11.1,4                     =   up-to-date with index


root@test_site_ru:/usr/ports/graphics/libheif # make MAKE_JOBS_UNSAFE=yes install clean
===>  Building for libheif-1.18.2_1
[  0% 1/1] /usr/local/bin/cmake --regenerate-during-build -S/usr/ports/graphics/libheif/work/libheif-1.18.2 -B/usr/ports/graphics/libheif/work/.build
/bin/sh: /usr/local/bin/cmake: not found
FAILED: build.ninja 
/usr/local/bin/cmake --regenerate-during-build -S/usr/ports/graphics/libheif/work/libheif-1.18.2 -B/usr/ports/graphics/libheif/work/.build
ninja: error: rebuilding 'build.ninja': subcommand failed
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/graphics/libheif
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/libheif
root@test_site_ru:/usr/ports/graphics/libheif # 


How to fix?
Comment 1 bagas 2024-10-18 15:17:27 UTC
My /etc/make.conf 
CPUTYPE?=nocona
MAKE_JOBS_NUMBER=6

NO_GAMES=true
NO_INET6=true
NO_BLUETOOTH=true
NO_SHAREDOCS=true
OPTIONS_UNSET=DOCS X11 IPV6 BLUETOOTH GAMES SMB CUPS VULKAN GITWEB EXAMPLES
Comment 2 Max Brazhnikov freebsd_committer freebsd_triage 2024-10-18 18:27:25 UTC
(In reply to bagas from comment #0)
> [  0% 1/1] /usr/local/bin/cmake --regenerate-during-build
> -S/usr/ports/graphics/libheif/work/libheif-1.18.2
> -B/usr/ports/graphics/libheif/work/.build
> /bin/sh: /usr/local/bin/cmake: not found

Looks like the cmake package is not installed or damaged. Check your installed packages with `pkg check` and restart the build from the clean ports tree.
Comment 3 bagas 2024-10-19 05:14:38 UTC
(In reply to Max Brazhnikov from comment #2)
# pkg version -v | grep 'cmak'
cmake-core-3.30.5                  =   up-to-date with index

root@test_site_ru:/usr/ports/graphics/libheif # make install clean
===>  Building for libheif-1.18.2_1
[  1% 6/83] /usr/bin/c++ -DHAVE_JPEG_WRITE_ICC_PROFILE=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBPNG=1 -DHAVE_LIBSHARPYUV=1 -DHAVE_LIBTIFF=1 -DHAVE_UNISTD_H -DHAVE_VISIBILITY -DLIBHEIF_EXPORTS -I/usr/ports/graphics/libheif/work/.build -I/usr/ports/graphics/libheif/work/libheif-1.18.2/libheif/api -I/usr/ports/graphics/libheif/work/libheif-1.18.2/libheif -I/usr/ports/graphics/libheif/work/libheif-1.18.2/include/libheif -I/usr/ports/graphics/libheif/work/libheif-1.18.2/include -O2 -pipe -march=nocona -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -O2 -pipe -march=nocona -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include  -DNDEBUG -std=c++11 -fPIE -fvisibility=hidden -fvisibility-inlines-hidden   -Wall -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -Wno-error=unused-parameter -Wno-error=deprecated-declarations -Wno-error=tautological-compare -Wno-error=tautological-constant-out-of-range-compare -Wno-error=potentially-evaluated-expression -MD -MT examples/CMakeFiles/heif-enc.dir/benchmark.cc.o -MF examples/CMakeFiles/heif-enc.dir/benchmark.cc.o.d -o examples/CMakeFiles/heif-enc.dir/benchmark.cc.o -c /usr/ports/graphics/libheif/work/libheif-1.18.2/examples/benchmark.cc
[  2% 7/83] /usr/bin/c++ -DHAVE_JPEG_WRITE_ICC_PROFILE=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBPNG=1 -DHAVE_LIBSHARPYUV=1 -DHAVE_LIBTIFF=1 -DHAVE_UNISTD_H -DHAVE_VISIBILITY -DLIBHEIF_EXPORTS -I/usr/ports/graphics/libheif/work/.build -I/usr/ports/graphics/libheif/work/libheif-1.18.2/libheif/api -I/usr/ports/graphics/libheif/work/libheif-1.18.2/libheif -I/usr/ports/graphics/libheif/work/libheif-1.18.2/include/libheif -I/usr/ports/graphics/libheif/work/libheif-1.18.2/include -O2 -pipe -march=nocona -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -O2 -pipe -march=nocona -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include  -DNDEBUG -std=c++11 -fPIE -fvisibility=hidden -fvisibility-inlines-hidden   -Wall -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -Wno-error=unused-parameter -Wno-error=deprecated-declarations -Wno-error=tautological-compare -Wno-error=tautological-constant-out-of-range-compare -Wno-error=potentially-evaluated-expression -MD -MT examples/CMakeFiles/heif-enc.dir/encoder.cc.o -MF examples/CMakeFiles/heif-enc.dir/encoder.cc.o.d -o examples/CMakeFiles/heif-enc.dir/encoder.cc.o -c /usr/ports/graphics/libheif/work/libheif-1.18.2/examples/encoder.cc
...
...
...
/usr/include/c++/v1/csetjmp:40:6: error: "If libc++ starts defining <setjmp.h>, the __has_include check should move to libc++'s <setjmp.h>"
   40 | #    error "If libc++ starts defining <setjmp.h>, the __has_include check should move to libc++'s <setjmp.h>"
      |      ^
1 error generated.
[  7% 9/83] /usr/bin/c++ -DHAVE_JPEG_WRITE_ICC_PROFILE=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBPNG=1 -DHAVE_LIBSHARPYUV=1 -DHAVE_LIBTIFF=1 -DHAVE_UNISTD_H -DHAVE_VISIBILITY -DLIBHEIF_EXPORTS -I/usr/ports/graphics/libheif/work/.build -I/usr/ports/graphics/libheif/work/libheif-1.18.2/libheif/api -I/usr/ports/graphics/libheif/work/libheif-1.18.2/libheif -I/usr/ports/graphics/libheif/work/libheif-1.18.2/include/libheif -I/usr/ports/graphics/libheif/work/libheif-1.18.2/include -O2 -pipe -march=nocona -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -O2 -pipe -march=nocona -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include  -DNDEBUG -std=c++11 -fPIE -fvisibility=hidden -fvisibility-inlines-hidden   -Wall -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -Wno-error=unused-parameter -Wno-error=deprecated-declarations -Wno-error=tautological-compare -Wno-error=tautological-constant-out-of-range-compare -Wno-error=potentially-evaluated-expression -MD -MT examples/CMakeFiles/heif-enc.dir/decoder_y4m.cc.o -MF examples/CMakeFiles/heif-enc.dir/decoder_y4m.cc.o.d -o examples/CMakeFiles/heif-enc.dir/decoder_y4m.cc.o -c /usr/ports/graphics/libheif/work/libheif-1.18.2/examples/decoder_y4m.cc
[  8% 9/83] /usr/bin/c++ -DHAVE_JPEG_WRITE_ICC_PROFILE=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBPNG=1 -DHAVE_LIBSHARPYUV=1 -DHAVE_LIBTIFF=1 -DHAVE_UNISTD_H -DHAVE_VISIBILITY -DLIBHEIF_EXPORTS -I/usr/ports/graphics/libheif/work/.build -I/usr/ports/graphics/libheif/work/libheif-1.18.2/libheif/api -I/usr/ports/graphics/libheif/work/libheif-1.18.2/libheif -I/usr/ports/graphics/libheif/work/libheif-1.18.2/include/libheif -I/usr/ports/graphics/libheif/work/libheif-1.18.2/include -O2 -pipe -march=nocona -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -O2 -pipe -march=nocona -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include  -DNDEBUG -std=c++11 -fPIE -fvisibility=hidden -fvisibility-inlines-hidden   -Wall -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -Wno-error=unused-parameter -Wno-error=deprecated-declarations -Wno-error=tautological-compare -Wno-error=tautological-constant-out-of-range-compare -Wno-error=potentially-evaluated-expression -MD -MT examples/CMakeFiles/heif-enc.dir/common.cc.o -MF examples/CMakeFiles/heif-enc.dir/common.cc.o.d -o examples/CMakeFiles/heif-enc.dir/common.cc.o -c /usr/ports/graphics/libheif/work/libheif-1.18.2/examples/common.cc
[  9% 9/83] /usr/bin/c++ -DHAVE_JPEG_WRITE_ICC_PROFILE=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBPNG=1 -DHAVE_LIBSHARPYUV=1 -DHAVE_LIBTIFF=1 -DHAVE_UNISTD_H -DHAVE_VISIBILITY -DLIBHEIF_EXPORTS -I/usr/ports/graphics/libheif/work/.build -I/usr/ports/graphics/libheif/work/libheif-1.18.2/libheif/api -I/usr/ports/graphics/libheif/work/libheif-1.18.2/libheif -I/usr/ports/graphics/libheif/work/libheif-1.18.2/include/libheif -I/usr/ports/graphics/libheif/work/libheif-1.18.2/include -O2 -pipe -march=nocona -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -O2 -pipe -march=nocona -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include  -DNDEBUG -std=c++11 -fPIE -fvisibility=hidden -fvisibility-inlines-hidden   -Wall -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -Wno-error=unused-parameter -Wno-error=deprecated-declarations -Wno-error=tautological-compare -Wno-error=tautological-constant-out-of-range-compare -Wno-error=potentially-evaluated-expression -MD -MT examples/CMakeFiles/heif-enc.dir/decoder_png.cc.o -MF examples/CMakeFiles/heif-enc.dir/decoder_png.cc.o.d -o examples/CMakeFiles/heif-enc.dir/decoder_png.cc.o -c /usr/ports/graphics/libheif/work/libheif-1.18.2/examples/decoder_png.cc
[ 10% 9/83] /usr/bin/c++ -DHAVE_JPEG_WRITE_ICC_PROFILE=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBPNG=1 -DHAVE_LIBSHARPYUV=1 -DHAVE_LIBTIFF=1 -DHAVE_UNISTD_H -DHAVE_VISIBILITY -DLIBHEIF_EXPORTS -I/usr/ports/graphics/libheif/work/.build -I/usr/ports/graphics/libheif/work/libheif-1.18.2/libheif/api -I/usr/ports/graphics/libheif/work/libheif-1.18.2/libheif -I/usr/ports/graphics/libheif/work/libheif-1.18.2/include/libheif -I/usr/ports/graphics/libheif/work/libheif-1.18.2/include -O2 -pipe -march=nocona -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -O2 -pipe -march=nocona -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include  -DNDEBUG -std=c++11 -fPIE -fvisibility=hidden -fvisibility-inlines-hidden   -Wall -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -Wno-error=unused-parameter -Wno-error=deprecated-declarations -Wno-error=tautological-compare -Wno-error=tautological-constant-out-of-range-compare -Wno-error=potentially-evaluated-expression -MD -MT examples/CMakeFiles/heif-enc.dir/decoder_jpeg.cc.o -MF examples/CMakeFiles/heif-enc.dir/decoder_jpeg.cc.o.d -o examples/CMakeFiles/heif-enc.dir/decoder_jpeg.cc.o -c /usr/ports/graphics/libheif/work/libheif-1.18.2/examples/decoder_jpeg.cc
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

Stop.
make[1]: stopped in /usr/ports/graphics/libheif
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/libheif
root@test_site_ru:/usr/ports/graphics/libheif # 


OK, i do the installation as advised.


root@test_site_ru:/usr/ports/graphics/libheif # make MAKE_JOBS_UNSAFE=yes install clean
===>  Building for libheif-1.18.2_1
[  1% 1/76] /usr/bin/c++ -DHAVE_JPEG_WRITE_ICC_PROFILE=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBPNG=1 -DHAVE_LIBSHARPYUV=1 -DHAVE_UNISTD_H -DHAVE_VISIBILITY -DLIBHEIF_EXPORTS -I/usr/ports/graphics/libheif/work/.build -I/usr/ports/graphics/libheif/work/libheif-1.18.2/libheif/api -I/usr/ports/graphics/libheif/work/libheif-1.18.2/libheif -I/usr/ports/graphics/libheif/work/libheif-1.18.2/include/libheif -I/usr/ports/graphics/libheif/work/libheif-1.18.2/include -O2 -pipe -march=nocona -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -O2 -pipe -march=nocona -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include  -DNDEBUG -std=c++11 -fPIE -fvisibility=hidden -fvisibility-inlines-hidden   -Wall -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -Wno-error=unused-parameter -Wno-error=deprecated-declarations -Wno-error=tautological-compare -Wno-error=tautological-constant-out-of-range-compare -Wno-error=potentially-evaluated-expression -MD -MT examples/CMakeFiles/heif-dec.dir/heif_dec.cc.o -MF examples/CMakeFiles/heif-dec.dir/heif_dec.cc.o.d -o examples/CMakeFiles/heif-dec.dir/heif_dec.cc.o -c /usr/ports/graphics/libheif/work/libheif-1.18.2/examples/heif_dec.cc
FAILED: examples/CMakeFiles/heif-dec.dir/heif_dec.cc.o 
/usr/bin/c++ -DHAVE_JPEG_WRITE_ICC_PROFILE=1 -DHAVE_LIBJPEG=1 -DHAVE_LIBPNG=1 -DHAVE_LIBSHARPYUV=1 -DHAVE_UNISTD_H -DHAVE_VISIBILITY -DLIBHEIF_EXPORTS -I/usr/ports/graphics/libheif/work/.build -I/usr/ports/graphics/libheif/work/libheif-1.18.2/libheif/api -I/usr/ports/graphics/libheif/work/libheif-1.18.2/libheif -I/usr/ports/graphics/libheif/work/libheif-1.18.2/include/libheif -I/usr/ports/graphics/libheif/work/libheif-1.18.2/include -O2 -pipe -march=nocona -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -O2 -pipe -march=nocona -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include  -DNDEBUG -std=c++11 -fPIE -fvisibility=hidden -fvisibility-inlines-hidden   -Wall -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -Wno-error=unused-parameter -Wno-error=deprecated-declarations -Wno-error=tautological-compare -Wno-error=tautological-constant-out-of-range-compare -Wno-error=potentially-evaluated-expression -MD -MT examples/CMakeFiles/heif-dec.dir/heif_dec.cc.o -MF examples/CMakeFiles/heif-dec.dir/heif_dec.cc.o.d -o examples/CMakeFiles/heif-dec.dir/heif_dec.cc.o -c /usr/ports/graphics/libheif/work/libheif-1.18.2/examples/heif_dec.cc
In file included from /usr/ports/graphics/libheif/work/libheif-1.18.2/examples/heif_dec.cc:52:
In file included from /usr/ports/graphics/libheif/work/libheif-1.18.2/examples/encoder_jpeg.h:30:
/usr/include/c++/v1/csetjmp:40:6: error: "If libc++ starts defining <setjmp.h>, the __has_include check should move to libc++'s <setjmp.h>"
   40 | #    error "If libc++ starts defining <setjmp.h>, the __has_include check should move to libc++'s <setjmp.h>"
      |      ^
1 error generated.
ninja: build stopped: subcommand failed.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/graphics/libheif
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/libheif
root@test_site_ru:/usr/ports/graphics/libheif #
Comment 4 bagas 2024-10-19 05:18:13 UTC
root@test_site_ru:/usr/ports/graphics/libheif # pkg check -saq
root@test_site_ru:/usr/ports/graphics/libheif #
Comment 5 Max Brazhnikov freebsd_committer freebsd_triage 2024-10-23 11:37:34 UTC
> /usr/include/c++/v1/csetjmp:40:6: error: "If libc++ starts defining <setjmp.h>,
> the __has_include check should move to libc++'s <setjmp.h>"
>    40 | #    error "If libc++ starts defining <setjmp.h>, the __has_include
> check should move to libc++'s <setjmp.h>"

This error has nothing to do with libheif. Have you googled for it before posting build log here?

Btw, what was the problem with cmake? How did you solve it?
Comment 6 bagas 2024-10-23 16:25:25 UTC
(In reply to Max Brazhnikov from comment #5)
No, I didn't look for it on Google.


This error occurs when installing the libheif port.

In file included from /usr/ports/graphics/libheif/work/libheif-1.18.2/examples/encoder_jpeg.h:30:
/usr/include/c++/v1/csetjmp:40:6: error: "If libc++ starts defining <setjmp.h>, the __has_include check should move to libc++'s <setjmp.h>"
   40 | #    error "If libc++ starts defining <setjmp.h>, the __has_include check should move to libc++'s <setjmp.h>"



> /bin/sh: /usr/local/bin/cmake: not found
pkg autoremove
/usr/ports/graphics/libheif # make clean
And rebuilt the port libheif again.
Comment 7 Max Brazhnikov freebsd_committer freebsd_triage 2024-10-23 20:09:32 UTC
(In reply to bagas from comment #6)
I see you have found the relevant bug report already [1]. I can only repeat after Dimitry. If you build the system from sources, you can try to rebuild it before proceeding with fresh installation.

[1] https://bugs.freebsd.org/279692

*** This bug has been marked as a duplicate of bug 279692 ***