Page 1 of 1

libfpx compile error with GCC 6.1.1

Posted: 2016-06-25T20:55:07-07:00
by kwash
I'm getting the following compile error when trying to compile libfpx 1.3.1-6 in linux x86_64 with GCC 6.1.1:

Code: Select all

configuring Digital Imaging Group FlashPIX 1.3.1-6
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking whether build environment is sane... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '1000' is supported by ustar format... yes
checking whether GID '1000' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... none needed
checking for gcc option to accept ISO Standard C... (cached) none needed
checking how to run the C preprocessor... gcc -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking how to print strings... printf
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether make sets $(MAKE)... (cached) yes
checking whether ln -s works... yes
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking whether byte ordering is bigendian... no
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking sys/statfs.h usability... yes
checking sys/statfs.h presence... yes
checking for sys/statfs.h... yes
checking sys/statvfs.h usability... yes
checking sys/statvfs.h presence... yes
checking for sys/statvfs.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for sys/mount.h... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... (cached) GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating basics/Makefile
config.status: creating fpx/Makefile
config.status: creating jpeg/Makefile
config.status: creating ole/Makefile
config.status: creating ri_image/Makefile
config.status: creating oless/Makefile
config.status: creating fpxlib-config.h
config.status: fpxlib-config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
make  all-recursive
make[1]: Entering directory '/storage/linux/abs/libfpx/src/libfpx-1.3.1-6'
Making all in oless
make[2]: Entering directory '/storage/linux/abs/libfpx/src/libfpx-1.3.1-6/oless'
depbase=`echo ascii.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..  -I../oless -I../oless/h -D_UNIX -D_FORTIFY_SOURCE=2  -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -MT ascii.lo -MD -MP -MF $depbase.Tpo -c -o ascii.lo ascii.cxx &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I../oless -I../oless/h -D_UNIX -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -MT ascii.lo -MD -MP -MF .deps/ascii.Tpo -c ascii.cxx  -fPIC -DPIC -o .libs/ascii.o
In file included from h/vect.hxx:17:0,
                 from h/fat.hxx:21,
                 from h/msf.hxx:130,
                 from exphead.cxx:23,
                 from ascii.cxx:18:
h/page.hxx: In member function ‘CMSFPage* CMSFPageTable::GetNewPage()’:
h/page.hxx:511:55: error: exception cleanup for this placement new selects non-placement operator delete [-fpermissive]
     return new((size_t)_cbSector) CMSFPage(_pmpCurrent);
                                                       ^
In file included from /usr/include/c++/6.1.1/ext/new_allocator.h:33:0,
                 from /usr/include/c++/6.1.1/x86_64-pc-linux-gnu/bits/c++allocator.h:33,
                 from /usr/include/c++/6.1.1/bits/allocator.h:46,
                 from /usr/include/c++/6.1.1/string:41,
                 from h/owchar.h:29,
                 from h/tchar.h:15,
                 from h/storage.h:23,
                 from h/ref.hxx:138,
                 from exphead.cxx:21,
                 from ascii.cxx:18:
/usr/include/c++/6.1.1/new:125:6: note: ‘void operator delete(void*, std::size_t)’ is a usual (non-placement) deallocation function in C++14 (or with -fsized-deallocation)
 void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT
      ^~~~~~~~
make[2]: *** [Makefile:654: ascii.lo] Error 1
make[2]: Leaving directory '/storage/linux/abs/libfpx/src/libfpx-1.3.1-6/oless'
make[1]: *** [Makefile:681: all-recursive] Error 1
make[1]: Leaving directory '/storage/linux/abs/libfpx/src/libfpx-1.3.1-6'
make: *** [Makefile:521: all] Error 2
I've not compiled it lately because the version hasn't changed in quite some time, but as far as I can remember, it was compiling perfectly with GCC 5.x.
The 'AUTHORS' file in source tarball says that this package is maintained by the ImageMagick Studio, http:://www.imagemagick.org/, so I'm reporting here.

Commands used:

Code: Select all

./configure \
     --prefix=/usr \
     --enable-static=no \
     --enable-shared=yes
make
glibc version used: 2.23

Re: libfpx compile error with GCC 6.1.1

Posted: 2016-06-26T05:26:17-07:00
by magick
The extent of our support of libfpx is to accept patches from contributors and build a new point release. If you or another user submits a patch for this compile problem, post it here and we'll apply it and build a new distribution.

Re: libfpx compile error with GCC 6.1.1

Posted: 2016-06-26T09:07:03-07:00
by kwash
Thanks for the reply.

I can now confirm that this is a GCC 6.1.1 issue. I downgraded my GCC to version 5.3.0 and libfpx compiled perfectly.
Unfortunately I don't have the skills to fix this problem. Waiting for someone on the community to submit a patch.

I also can confirm that libfpx compiled with GCC 5 works with GCC 6 libraries, so it's safe to revert back to GCC 6 after compiling.

Re: libfpx compile error with GCC 6.1.1

Posted: 2017-04-24T15:27:07-07:00
by PLevine
I posted a patch for this for Gentoo Bug #594094.
It just needs testing.

libfpx-1.3.1-c++11-define-placement-delete.patch