libheif icon indicating copy to clipboard operation
libheif copied to clipboard

1.12.0: code uses exceptions

Open kloczek opened this issue 3 years ago • 0 comments

Because in two places it is not possible to build by 5-10% smaller code. It would be good to libheif would not be using exceptiions

[tkloczko@barrel libheif-1.12.0]$ make -k
make  all-recursive
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libheif-1.12.0'
Making all in libheif
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libheif-1.12.0/libheif'
/bin/sh ../libtool  --tag=CXX   --mode=compile /usr/bin/g++ -DHAVE_CONFIG_H -I. -I..    -fvisibility=hidden -I/usr/include/libvmaf     -I/usr/include/rav1e  -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -fno-exceptions -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -Wno-error=unused-parameter -Wno-error=deprecated-declarations -c -o libheif_la-heif_image.lo `test -f 'heif_image.cc' || echo './'`heif_image.cc
libtool: compile:  /usr/bin/g++ -DHAVE_CONFIG_H -I. -I.. -fvisibility=hidden -I/usr/include/libvmaf -I/usr/include/rav1e -DLIBHEIF_EXPORTS -I.. -DHAVE_VISIBILITY -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -fno-exceptions -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -Wno-error=unused-parameter -Wno-error=deprecated-declarations -c heif_image.cc  -fPIC -DPIC -o .libs/libheif_la-heif_image.o
heif_image.cc: In member function ‘bool heif::HeifPixelImage::ImagePlane::alloc(int, int, int, heif_chroma)’:
heif_image.cc:224:32: error: exception handling disabled, use ‘-fexceptions’ to enable
  224 |   catch (const std::bad_alloc& excpt) {
      |                                ^~~~~
make[2]: *** [Makefile:1167: libheif_la-heif_image.lo] Error 1
make[2]: Target 'all' not remade because of errors.
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libheif-1.12.0/libheif'
Making all in examples
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libheif-1.12.0/examples'
make[2]: *** No rule to make target '../libheif/libheif.la', needed by 'heif-convert'.
/usr/bin/g++ -DHAVE_CONFIG_H -I. -I..    -I.. -I.. -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -fno-exceptions -Wall -Werror -Wsign-compare -Wconversion -Wno-sign-conversion -Wno-error=conversion -Wno-error=unused-parameter -Wno-error=deprecated-declarations -c -o heif_test-heif_test.o `test -f 'heif_test.cc' || echo './'`heif_test.cc
In file included from heif_test.cc:41:
../libheif/heif_cxx.h: In member function ‘void heif::Context::read_from_file(std::string, const heif::Context::ReadingOptions&)’:
../libheif/heif_cxx.h:490:13: error: exception handling disabled, use ‘-fexceptions’ to enable
  490 |       throw err;
      |             ^~~
heif_test.cc: In function ‘int main(int, char**)’:
heif_test.cc:168:18: error: ‘err’ was not declared in this scope
  168 |     std::cerr << err.get_message() << "\n";
      |                  ^~~
make[2]: *** [Makefile:849: heif_test-heif_test.o] Error 1
make[2]: Target 'all' not remade because of errors.
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libheif-1.12.0/examples'
Making all in extra
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libheif-1.12.0/extra'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libheif-1.12.0/extra'
Making all in fuzzing
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libheif-1.12.0/fuzzing'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libheif-1.12.0/fuzzing'
Making all in gdk-pixbuf
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libheif-1.12.0/gdk-pixbuf'
make[2]: *** No rule to make target '../libheif/libheif.la', needed by 'libpixbufloader-heif.la'.
make[2]: Target 'all' not remade because of errors.
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libheif-1.12.0/gdk-pixbuf'
Making all in gnome
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libheif-1.12.0/gnome'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libheif-1.12.0/gnome'
Making all in go
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libheif-1.12.0/go'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libheif-1.12.0/go'
Making all in scripts
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libheif-1.12.0/scripts'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libheif-1.12.0/scripts'
Making all in tests
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libheif-1.12.0/tests'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libheif-1.12.0/tests'
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/libheif-1.12.0'
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libheif-1.12.0'
make[1]: *** [Makefile:537: all-recursive] Error 1
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/libheif-1.12.0'
make: *** [Makefile:446: all] Error 2

kloczek avatar Aug 22 '21 16:08 kloczek