View Issue Details

IDProjectCategoryView StatusLast Update
0009649ardourbugspublic2024-03-06 00:43
Reportereschwartz Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
PlatformGNUOSLinuxOS Version(any)
Product Version8.4 
Summary0009649: Build failure with -flto: ODR violations
Description```
19:42:17 runner ['x86_64-pc-linux-gnu-gcc', '-I/var/tmp/portage/media-sound/ardour-8.4/work/Ardour-8.4.0', '-march=native', '-fstack-protector-all', '-O2', '-pipe', '-fdiagnostics-color=always', '-frecord-gcc-switches', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=3', '-fstack-clash-protection', '-Wformat', '-Werror=format-security', '-flto', '-Werror=odr', '-Werror=lto-type-mismatch', '-Werror=strict-aliasing', '-Werror=implicit-function-declaration', '-Werror=implicit-int', '-Werror=int-conversion', '-Werror=incompatible-pointer-types', '-lboost_system', '-DHAVE_RF64_RIFF', '-DCOMPILER_INT128_SUPPORT', '-DWAF_BUILD', '-DNDEBUG', '-fshow-column', '-pipe', '-DARCH_X86', '-mmmx', '-msse', '-mfpmath=sse', '-DUSE_XMMINTRIN', '-DBUILD_SSE_OPTIMIZATIONS', '-DLXVST_64BIT', '-Wall', '-Wpointer-arith', '-Wcast-qual', '-Wcast-align', '-Wno-unused-parameter', '-DBOOST_SYSTEM_NO_DEPRECATED', '-DBOOST_BIND_GLOBAL_PLACEHOLDERS', '-D_ISOC9X_SOURCE', '-D_LARGEFILE64_SOURCE', '-D_FILE_OFFSET_BITS=64', '-DPROGRAM_NAME="Ardour"', '-DPROGRAM_VERSION="8"', '-Wstrict-prototypes', '-Wmissing-prototypes', '-fPIC', '-fPIC', '-fPIC', '-Ilibs/tk/ztk', '-I../libs/tk/ztk', '-Ilibs/tk', '-I../libs/tk', '-Ilibs/tk/ztk/ztk', '-I../libs/tk/ztk/ztk', '-Ilibs/tk/ztk/ztk/atk', '-I../libs/tk/ztk/ztk/atk', '-I/usr/include/glib-2.0', '-I/usr/lib64/glib-2.0/include', '-I/usr/lib64/libffi/include', '-I/var/tmp/portage/media-sound/ardour-8.4/work/Ardour-8.4.0/build', '-DINTERNAL_SHARED_LIBS=1', '-DYTK=1', '-DHAVE_SUIL=1', '-DHAVE_ALSA=1', '-DHAVE_PULSEAUDIO=1', '-DHAVE_GLIB=1', '-DHAVE_GTHREAD=1', '-DHAVE_GLIBMM=1', '-DHAVE_SNDFILE=1', '-DHAVE_GIOMM=1', '-DHAVE_CURL=1', '-DHAVE_ARCHIVE=1', '-DHAVE_LO=1', '-DHAVE_TAGLIB=1', '-DHAVE_VAMPSDK=1', '-DHAVE_VAMPHOSTSDK=1', '-DHAVE_RUBBERBAND=1', '-DHAVE_USB=1', '-DHAVE_RUBBERBAND_3_0_0=1', '-DEXPORT_VISIBILITY_HIDDEN=0', '-DENABLE_NLS=1', '-DLXVST_SUPPORT=1', '-DVST3_SUPPORT=1', '-DUSE_FUTEX_SEMAPHORE=1', '-DFPU_AVX512F_SUPPORT=1', '-DFPU_AVX_FMA_SUPPORT=1', '-DCONFIG_ARCH="x86_64"', '-DHAVE_TOOLS_SANITY_CHECK=1', '-DHAVE_FFTW3F=1', '-DHAVE_UDEV=1', '-DHAVE_HIDAPI=1', '-DHAVE_AUBIO=1', '-DHAVE_AUBIO4=1', '-DHAVE_GOBJECT=1', '-DHAVE_GIO=1', '-DHAVE_LIBPNG=1', '-DHAVE_PANGO=1', '-DHAVE_CAIRO=1', '-DHAVE_PANGOCAIRO=1', '-DHAVE_GIO_UNIX=1', '-DHAVE_RANDR=1', '-DHAVE_RANDR15=1', '-DHAVE_GMODULE=1', '-DHAVE_X11=1', '-DHAVE_XEXT=1', '-DHAVE_SIGCPP=1', '-DHAVE_CAIROMM=1', '-DHAVE_PANGOMM=1', '-DHAVE_LV2_1_16_0=1', '-DHAVE_XML=1', '-DHAVE_EXECINFO=1', '-DHAVE_POSIX_MEMALIGN=1', '-DHAVE_GETMNTENT=1', '-DHAVE_LOCALTIME_R=1', '-DHAVE_CONTROL_PROTOCOL=1', '-DHAVE_MIDI_SURFACE=1', '-DHAVE_WEBSOCKETS=1', '-DHAVE_LRDF=1', '-DHAVE_SAMPLERATE=1', '-DHAVE_LV2=1', '-DHAVE_LV2_1_10_0=1', '-DHAVE_LV2_1_17_2=1', '-DHAVE_LV2_1_18_6=1', '-DHAVE_SERD=1', '-DHAVE_SORD=1', '-DHAVE_SRATOM=1', '-DHAVE_LILV=1', '-DLV2_SUPPORT=1', '-DLV2_EXTENDED=1', '-DHAVE_OGG=1', '-DHAVE_FLAC=1', '-DHAVE_FFTW35F=1', '-DUSE_RUBBERBAND=1', '-DCURRENT_SESSION_FILE_VERSION=7003', '-DHAVE_SYS_VFS_H=1', '-DHAVE_SYS_STATVFS_H=1', '-DHAVE_UNISTD=1', '-DHAVE_BOOST_SCOPED_PTR_HPP=1', '-DHAVE_BOOST_PTR_CONTAINER_PTR_LIST_HPP=1', '-DHAVE_BOOST_SHARED_PTR_HPP=1', '-DHAVE_BOOST_FORMAT_HPP=1', '-DHAVE_LV2_1_0_0=1', '-DHAVE_PANGOFT2=1', '-DHAVE_FONTCONFIG=1', '-DHAVE_READLINE=1', '-DHAVE_DBUS=1', '-DHAVE_CONFIG_H', '-D_LARGEFILE64_SOURCE', '-D_REENTRANT', '-DG_LOG_DOMAIN="Gdk"', '-DATK_COMPILATION', '-D_FILE_OFFSET_BITS=64', '-DG_DISABLE_SINGLE_INCLUDES', '-DATK_DISABLE_SINGLE_INCLUDES', '-DG_DISABLE_DEPRECATED', '-DATK_DISABLE_DEPRECATED', '-DATK_LOCALEDIR=""', '../libs/tk/ztk/atknoopobject.c', '-c', '-o/var/tmp/portage/media-sound/ardour-8.4/work/Ardour-8.4.0/build/libs/tk/ztk/atknoopobject.c.1.o']
../libs/pbd/pbd/file_archive.h:35:18: error: type ‘struct FileArchive’ violates the C++ One Definition Rule [-Werror=odr]
   35 | class LIBPBD_API FileArchive
      | ^
../libs/pbd/pbd/file_archive.h:35:18: note: a different type is defined in another translation unit
   35 | class LIBPBD_API FileArchive
      | ^
../libs/pbd/pbd/file_archive.h:167:39: note: the first difference of corresponding definitions is field ‘_current_entry’
  167 | struct archive_entry* _current_entry;
      | ^
../libs/pbd/pbd/file_archive.h:167:39: note: a field of same name but different type is defined in another translation unit
  167 | struct archive_entry* _current_entry;
      | ^
/usr/include/archive.h:186:8: note: type name ‘archive_entry’ should match type name ‘PBD::archive_entry’
  186 | struct archive_entry;
      | ^
../libs/pbd/pbd/file_archive.h:167:24: note: the incompatible type is defined here
  167 | struct archive_entry* _current_entry;
      | ^
lto1: some warnings being treated as errors
lto-wrapper: fatal error: x86_64-pc-linux-gnu-g++ returned 1 exit status
compilation terminated.
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
```
Steps To ReproduceCFLAGS="-march=native -fstack-protector-all -O2 -pipe -fdiagnostics-color=always -frecord-gcc-switches -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-clash-protection -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wformat -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Werror=int-conversion -Werror=incompatible-pointer-types"
CXXFLAGS="-march=native -fstack-protector-all -O2 -pipe -fdiagnostics-color=always -frecord-gcc-switches -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-clash-protection -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wformat -Werror=format-security"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -flto=4 -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing -Wl,--defsym=__gentoo_check_ldflags__=0"


But in particular, see "-flto -Werror=odr".

emerge -1 =ardour-8.4
Additional InformationThis was originally reported at https://bugs.gentoo.org/917095 for ardour 7.5, but still reproduces today with ardour 8.4.
TagsNo tags attached.

Activities

eschwartz

2024-02-29 00:45

reporter  

build.log (397,239 bytes)

x42

2024-02-29 02:40

administrator   ~0028572

This is an odd one. can you check if 8.4-38-g2fe22eeab5 addresses it? Thanks.

eschwartz

2024-02-29 03:09

reporter   ~0028573

Maybe? It's somewhat awkward because I still get an error, it's just a different error.

22:03:32 runner ['x86_64-pc-linux-gnu-g++', '-I/var/tmp/portage/media-sound/ardour-9999/work/ardour-9999', '-march=native', '-fstack-protector-all', '-O2', '-pipe', '-fdiagnostics-color=always', '-frecord-gcc-switches', '-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=3', '-fstack-clash-protection', '-Wformat', '-Werror=format-security', '-flto', '-Werror=odr', '-Werror=lto-type-mismatch', '-Werror=strict-aliasing', '-std=c++11', '-lboost_system', '-DHAVE_RF64_RIFF', '-DCOMPILER_INT128_SUPPORT', '-DWAF_BUILD', '-DNDEBUG', '-fshow-column', '-pipe', '-DARCH_X86', '-mmmx', '-msse', '-mfpmath=sse', '-DUSE_XMMINTRIN', '-DBUILD_SSE_OPTIMIZATIONS', '-DLXVST_64BIT', '-Wall', '-Wpointer-arith', '-Wcast-qual', '-Wcast-align', '-Wno-unused-parameter', '-DBOOST_SYSTEM_NO_DEPRECATED', '-DBOOST_BIND_GLOBAL_PLACEHOLDERS', '-D_ISOC9X_SOURCE', '-D_LARGEFILE64_SOURCE', '-D_FILE_OFFSET_BITS=64', '-DPROGRAM_NAME="Ardour"', '-DPROGRAM_VERSION="8"', '-Woverloaded-virtual', '-Wno-unused-local-typedefs', '-D__STDC_LIMIT_MACROS', '-D__STDC_FORMAT_MACROS', '-DCANVAS_DEBUG', '-DBOOST_ERROR_CODE_HEADER_ONLY', '-fPIC', '-pthread', '-pthread', '-pthread', '-pthread', '-pthread', '-Ilibs/ardour', '-I../libs/ardour', '-Ilibs/vst3', '-I../libs/vst3', '-Ilibs/ctrl-interface/control_protocol', '-I../libs/ctrl-interface/control_protocol', '-Ilibs', '-I../libs', '-Ilibs/midi++2', '-I../libs/midi++2', '-Ilibs/evoral', '-I../libs/evoral', '-Ilibs/temporal', '-I../libs/temporal', '-Ilibs/audiographer', '-I../libs/audiographer', '-Ilibs/audiographer/src', '-I../libs/audiographer/src', '-Ilibs/ptformat', '-I../libs/ptformat', '-Ilibs/pbd', '-I../libs/pbd', '-Ilibs/lua', '-I../libs/lua', '-Ilibs/zita-resampler', '-I../libs/zita-resampler', '-Ilibs/zita-convolver', '-I../libs/zita-convolver', '-Ilibs/libltc/ltc', '-I../libs/libltc/ltc', '-Ilibs/fluidsynth/fluidsynth', '-I../libs/fluidsynth/fluidsynth', '-Ilibs/tk/suil', '-I../libs/tk/suil', '-I/usr/include/glib-2.0', '-I/usr/lib64/glib-2.0/include', '-I/usr/include/sigc++-2.0', '-I/usr/lib64/sigc++-2.0/include', '-I/usr/include/glibmm-2.4', '-I/usr/lib64/glibmm-2.4/include', '-I/usr/lib64/libffi/include', '-I/usr/include/libxml2', '-I/usr/include/libusb-1.0', '-I/usr/include/opus', '-I/usr/include/raptor2', '-I/usr/include/giomm-2.4', '-I/usr/lib64/giomm-2.4/include', '-I/usr/include/libmount', '-I/usr/include/blkid', '-I/usr/include/taglib', '-I/usr/include/serd-0', '-I/usr/include/sord-0', '-I/usr/include/lilv-0', '-I/usr/include/sratom-0', '-I/usr/include/zix-0', '-I/var/tmp/portage/media-sound/ardour-9999/work/ardour-9999/build', '-DINTERNAL_SHARED_LIBS=1', '-DYTK=1', '-DHAVE_SUIL=1', '-DHAVE_ALSA=1', '-DHAVE_PULSEAUDIO=1', '-DHAVE_GLIB=1', '-DHAVE_GTHREAD=1', '-DHAVE_GLIBMM=1', '-DHAVE_SNDFILE=1', '-DHAVE_GIOMM=1', '-DHAVE_CURL=1', '-DHAVE_ARCHIVE=1', '-DHAVE_LO=1', '-DHAVE_TAGLIB=1', '-DHAVE_VAMPSDK=1', '-DHAVE_VAMPHOSTSDK=1', '-DHAVE_RUBBERBAND=1', '-DHAVE_USB=1', '-DHAVE_RUBBERBAND_3_0_0=1', '-DEXPORT_VISIBILITY_HIDDEN=0', '-DENABLE_NLS=1', '-DLXVST_SUPPORT=1', '-DVST3_SUPPORT=1', '-DUSE_FUTEX_SEMAPHORE=1', '-DFPU_AVX512F_SUPPORT=1', '-DFPU_AVX_FMA_SUPPORT=1', '-DCONFIG_ARCH="x86_64"', '-DHAVE_TOOLS_SANITY_CHECK=1', '-DHAVE_FFTW3F=1', '-DHAVE_UDEV=1', '-DHAVE_HIDAPI=1', '-DHAVE_AUBIO=1', '-DHAVE_AUBIO4=1', '-DHAVE_GOBJECT=1', '-DHAVE_GIO=1', '-DHAVE_LIBPNG=1', '-DHAVE_PANGO=1', '-DHAVE_CAIRO=1', '-DHAVE_PANGOCAIRO=1', '-DHAVE_GIO_UNIX=1', '-DHAVE_RANDR=1', '-DHAVE_RANDR15=1', '-DHAVE_GMODULE=1', '-DHAVE_X11=1', '-DHAVE_XEXT=1', '-DHAVE_SIGCPP=1', '-DHAVE_CAIROMM=1', '-DHAVE_PANGOMM=1', '-DHAVE_LV2_1_16_0=1', '-DHAVE_XML=1', '-DHAVE_EXECINFO=1', '-DHAVE_POSIX_MEMALIGN=1', '-DHAVE_GETMNTENT=1', '-DHAVE_LOCALTIME_R=1', '-DHAVE_CONTROL_PROTOCOL=1', '-DHAVE_MIDI_SURFACE=1', '-DHAVE_WEBSOCKETS=1', '-DHAVE_LRDF=1', '-DHAVE_SAMPLERATE=1', '-DHAVE_LV2=1', '-DHAVE_LV2_1_10_0=1', '-DHAVE_LV2_1_17_2=1', '-DHAVE_LV2_1_18_6=1', '-DHAVE_SERD=1', '-DHAVE_SORD=1', '-DHAVE_SRATOM=1', '-DHAVE_LILV=1', '-DLV2_SUPPORT=1', '-DLV2_EXTENDED=1', '-DHAVE_OGG=1', '-DHAVE_FLAC=1', '-DHAVE_FFTW35F=1', '-DUSE_RUBBERBAND=1', '-DCURRENT_SESSION_FILE_VERSION=7003', '-DHAVE_SYS_VFS_H=1', '-DHAVE_SYS_STATVFS_H=1', '-DHAVE_UNISTD=1', '-DHAVE_BOOST_SCOPED_PTR_HPP=1', '-DHAVE_BOOST_PTR_CONTAINER_PTR_LIST_HPP=1', '-DHAVE_BOOST_SHARED_PTR_HPP=1', '-DHAVE_BOOST_FORMAT_HPP=1', '-DHAVE_LV2_1_0_0=1', '-DHAVE_PANGOFT2=1', '-DHAVE_FONTCONFIG=1', '-DHAVE_READLINE=1', '-DHAVE_DBUS=1', '../libs/ardour/luabindings.cc', '-c', '-o/var/tmp/portage/media-sound/ardour-9999/work/ardour-9999/build/libs/ardour/luabindings.cc.2.o']
../libs/audiographer/private/gdither/gdither.h:67:9: error: ‘gdither_new’ violates the C++ One Definition Rule [-Werror=odr]
   67 | GDither gdither_new(GDitherType type, uint32_t channels,
      | ^
../libs/audiographer/private/gdither/gdither.cc:75:1: note: ‘gdither_new’ was previously declared here
   75 | gdither_new (GDitherType type, uint32_t channels,
      | ^
lto1: some warnings being treated as errors

It's somewhat awkward to tell the full set of build errors since restarting waf appears to go back and recompile many already compiled files.

eschwartz

2024-03-06 00:43

reporter   ~0028582

Is there any more information you need from me?

Issue History

Date Modified Username Field Change
2024-02-29 00:45 eschwartz New Issue
2024-02-29 00:45 eschwartz File Added: build.log
2024-02-29 02:40 x42 Note Added: 0028572
2024-02-29 03:09 eschwartz Note Added: 0028573
2024-03-06 00:43 eschwartz Note Added: 0028582