Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#13049 closed Bug Report - General (fixed)

error: redefinition of 'double bswap_dbl(double)' on ppc64

Reported by: hobbes1069@… Owned by: Stuart Auchterlonie
Priority: minor Milestone: 0.28.2
Component: MythTV - General Version: 0.28.1
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Build error on RPM Fusion for PPC 64 build:

In file included from recorders/NuppelVideoRecorder.cpp:40:0:
../libmythbase/bswap.h: In function 'double bswap_dbl(double)':
../libmythbase/bswap.h:30:26: error: redefinition of 'double bswap_dbl(double)'
 static __inline__ double bswap_dbl(double x)
                          ^~~~~~~~~
In file included from ../../external/FFmpeg/libavutil/intreadwrite.h:25:0,
                 from ../../external/FFmpeg/libavcodec/get_bits.h:32,
                 from mpeg/H264Parser.h:48,
                 from recorders/dtvrecorder.h:21,
                 from recorders/v4lrecorder.h:5,
                 from recorders/NuppelVideoRecorder.h:33,
                 from recorders/NuppelVideoRecorder.cpp:25:
../../external/FFmpeg/libavutil/bswap.h:80:22: note: 'double bswap_dbl(double)' previously defined here
 static inline double bswap_dbl(double x)
                      ^~~~~~~~~

Full log: http://koji.rpmfusion.org/kojifiles/work/tasks/7660/127660/build.log

Attachments (2)

ticket13049-bswap-guard.diff (450 bytes) - added by Stuart Auchterlonie 2 years ago.
ticket13049-remove-ffmpeg-bswap-change.diff (649 bytes) - added by Stuart Auchterlonie 2 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 Changed 2 years ago by Stuart Auchterlonie

Milestone: unknown29.0

comment:2 Changed 2 years ago by hobbes1069@…

Is there any plan to provide a patch before 0.29? This effectively stops all builds/updates on RPM Fusion.

Changed 2 years ago by Stuart Auchterlonie

comment:3 Changed 2 years ago by Stuart Auchterlonie

Status: newinfoneeded_new

Can you please try the attached patch and see if this works for you?

Regards Stuart

comment:4 Changed 2 years ago by Stuart Auchterlonie

Owner: set to Stuart Auchterlonie

comment:5 Changed 2 years ago by hobbes1069@…

Nope, that's a no go... same error.

In file included from recorders/NuppelVideoRecorder.cpp:40:0:
../libmythbase/bswap.h: In function 'double bswap_dbl(double)':
../libmythbase/bswap.h:30:26: error: redefinition of 'double bswap_dbl(double)'
 static __inline__ double bswap_dbl(double x)
                          ^~~~~~~~~
In file included from ../../external/FFmpeg/libavutil/intreadwrite.h:25:0,
                 from ../../external/FFmpeg/libavcodec/get_bits.h:32,
                 from mpeg/H264Parser.h:48,
                 from recorders/dtvrecorder.h:21,
                 from recorders/v4lrecorder.h:5,
                 from recorders/NuppelVideoRecorder.h:33,
                 from recorders/NuppelVideoRecorder.cpp:25:
../../external/FFmpeg/libavutil/bswap.h:80:22: note: 'double bswap_dbl(double)' previously defined here
 static inline double bswap_dbl(double x)
                      ^~~~~~~~~

I verified the patch did get applied:

Patch #1 (ticket13049-bswap-guard.diff):
+ echo 'Patch #1 (ticket13049-bswap-guard.diff):'
+ /usr/bin/patch --no-backup-if-mismatch -p1 --fuzz=0
patching file mythtv/libs/libmythbase/bswap.h

comment:6 Changed 2 years ago by Stuart Auchterlonie

Okay, instead can you try the patch avoid_bswap_conflict.patch from #12634 ??

Regards Stuart

Changed 2 years ago by Stuart Auchterlonie

comment:7 Changed 2 years ago by Stuart Auchterlonie

Actually, can you try this patch ticket13049-remove-ffmpeg-bswap-change.diff​ which i've attached to this ticket.

We have been carrying a custom patch for FFmpeg which adds bswap_dbl to the ffmpeg codebase, yet it's not used within ffmpeg, and we also have the same definition in libs/libmythbase/bswap.h

Rather than carrying an unneeded ffmpeg customization around lets just remove that customization.

The longer todo would be as documented in libs/libmythbase/bswap.h:29 which asks why didn't we just use bswap_64 instead.

Regards Stuart

comment:8 Changed 2 years ago by hobbes1069@…

I'm still waiting on the arm builds but both ppc64le and ppc64 builds completed. Thanks!

Not sure if you currently test for it but Fedora Rawhide (future 27 release) is currently on GCC 7 so that's good.

http://koji.rpmfusion.org/koji/taskinfo?taskID=128817

comment:9 Changed 2 years ago by Stuart Auchterlonie

We do have a f26 beta buildslave now, and that also has GCC 7

comment:10 Changed 2 years ago by Stuart Auchterlonie

Milestone: 29.00.28.2

comment:11 Changed 2 years ago by Stuart Auchterlonie <stuarta@…>

Resolution: fixed
Status: infoneeded_newclosed

In 517216c725bedcff47db908e161abae1dd18e7a3/mythtv:

Remove a custom FFmpeg patch for bswap_dbl

We have been carrying a custom patch for FFmpeg which
adds bswap_dbl to the ffmpeg codebase, yet it's not
used within ffmpeg, and we also have the same definition
in libs/libmythbase/bswap.h:29

This was causing duplicate function definition errors
building on some platforms.

Rather than carrying an unneeded ffmpeg customization
around lets just remove that customization.

Fixes #13049
Refs #12634 <- no longer requires avoid_bswap_conflict.patch

comment:12 Changed 2 years ago by Stuart Auchterlonie <stuarta@…>

In b3480d043721848bda06d841eca09a6a2149c7e1/mythtv:

Remove a custom FFmpeg patch for bswap_dbl

We have been carrying a custom patch for FFmpeg which
adds bswap_dbl to the ffmpeg codebase, yet it's not
used within ffmpeg, and we also have the same definition
in libs/libmythbase/bswap.h:29

This was causing duplicate function definition errors
building on some platforms.

Rather than carrying an unneeded ffmpeg customization
around lets just remove that customization.

Fixes #13049
Refs #12634 <- no longer requires avoid_bswap_conflict.patch

(cherry picked from commit 517216c725bedcff47db908e161abae1dd18e7a3)

Note: See TracTickets for help on using tickets.