Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#478 closed defect (fixed)

Compile error due to glibc & libdvdread incompatibility in FC4

Reported by: agforsyth@… Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: mythtv Version:
Severity: medium Keywords:
Cc: Ticket locked: no

Description

I was upgrading from r7466 (I did "make clean" as well, so that's not the problem).

mythtv warnings: mythuiimage.cpp:189: warning: unused parameter 'clipRect' mythuitext.cpp:114: warning: unused parameter 'clipRect' themedmenu.cpp:2299: warning: unused parameter 'clipRect'

backendsettings.h:0: Warning: No relevant classes found. No output generated.

mythplugins warnings: mythcontrols.cpp:307: warning: unused parameter 'item' mythcontrols.cpp:315: warning: unused parameter 'item' mythcontrols.cpp:351: warning: unused parameter 'context'

mythplugins error: In file included from /usr/include/dvdread/ifo_read.h:24,

from dvdinfo.h:17, from dvdripbox.h:22, from dvdripbox.cpp:19:

/usr/include/dvdread/ifo_types.h:32:2: error: #error "Must include <inttypes.h> or <stdint.h> before any libdvdread header." make[2]: * [dvdripbox.o] Error 1 make[1]: * [sub-mythdvd] Error 2 make: * [sub-mythdvd] Error 2

Attachments (2)

mythdvd.patch (811 bytes) - added by dasher 14 years ago.
patch against r7526 mythplugins
mythplugins.configure.patch (1.2 KB) - added by Anduin Withers <awithers@…> 14 years ago.

Download all attachments as: .zip

Change History (22)

comment:1 Changed 14 years ago by anonymous

Priority: minormajor

comment:2 Changed 14 years ago by anonymous

Priority: majorminor

comment:3 Changed 14 years ago by danielk

Resolution: fixed
Status: newclosed

(In [7511]) Fixes #478 by adding "stdint.h" header to dvdinfo.h

comment:4 Changed 14 years ago by anonymous

Resolution: fixed
Status: closedreopened

I still can't compile mythdvd. I did make distclean, redid configure, and checked the source to make sure I got the change. I still get the same error.

comment:5 Changed 14 years ago by danielk

Can go to the mythdvd directory and attach the full "sh make 1>/dev/null" output after a "make clean"?

comment:6 Changed 14 years ago by david.asher@…

The problem is that w/gcc4 stdint.h doesn't define the macros required by libdvdread unless \_\_STDC_LIMIT_MACROS and \_\_STDC_CONSTANT_MACROS (without the /'s -- double underscore did odd things to the formatting) are defined, but they are not.

Maybe if configure put them on the command-line?

comment:7 Changed 14 years ago by danielk

Summary: compile error & warmings on r7486 / gcc4compile error & warmings due to a broken version of glibc

Ok, so this is a broken glibc problem and not a gcc 4.x problem then?

Do you know what version of glibc this is?

I'd like to look at its stdint.h...

comment:8 Changed 14 years ago by danielk

Resolution: fixed
Status: reopenedclosed

(In [7525]) Fixes #478, by wrapping dvd headers in extern "C" macros.

This appears to be due to systems that update to glibc 2.3.5 without putting using dvdread headers that have put the inttypes.h include of ifo_types.h inside a extern "C" wrapper.

This is really a distribution problem with the dvdread package, but it looks like it is easy enough to work around this bug.

comment:9 Changed 14 years ago by dasher

Resolution: fixed
Status: closedreopened

nope, that didn't fix it. I think stdint.h gets include'd earlier than dvdinfo.h and then the header protection prevents the reinclude...

Do you need anything else? I can attach the preprocessor output and the stdint.h file if you still want it.

David.

comment:10 Changed 14 years ago by danielk

Actually, just add the distribution and the version to the ticket, plus any pertinent packages you installed from a source external to the distribution.

Then someone that is running that can see this ticket and fix it...

I've installed glibc 2.3.5 and gcc 4.0.2 and I still can't reproduce this.

comment:11 Changed 14 years ago by dasher

I'm running latest and greatest Fedora Core 4

glibc-devel-2.3.5-10.3 glibc-kernheaders-2.4-9.1.94 glibc-2.3.5-10.3 glibc-common-2.3.5-10.3 glibc-headers-2.3.5-10.3

libdvdread-devel-0.9.4-8cvs.2.fc4 libdvdread-0.9.4-8cvs.2.fc4

kernel-smp-devel-2.6.13-1.1526_FC4 kernel-smp-2.6.13-1.1526_FC4

Any other packages needed?

David.

comment:12 Changed 14 years ago by dasher

attached a patch which fixes this. not sure this is the best way to go about it, however. It just adds the define's required for stdint.h to do its work correctly to the mtd.pro and mythdvd.pro files.

David.

Changed 14 years ago by dasher

Attachment: mythdvd.patch added

patch against r7526 mythplugins

comment:13 Changed 14 years ago by Isaac Richards

Myth should _not_ be defining internal glibc stuff.

comment:14 Changed 14 years ago by anonymous

I have no problem building SVN HEAD of mythplugins with gcc 3.3.6 and glibc 2.3.5.

comment:15 Changed 14 years ago by dasher

interesting -- so its probably gcc 4.0.1-4 that ends up being the problem...

the real fix seems like it has to come from the libdvdread folks.

$ rpm -qa '*gcc*' gcc-gfortran-4.0.1-4.fc4 gcc-java-4.0.1-4.fc4 gcc-4.0.1-4.fc4 gcc-c++-4.0.1-4.fc4 libgcc-4.0.1-4.fc4

comment:16 Changed 14 years ago by danielk

Resolution: wontfix
Status: reopenedclosed
Summary: compile error & warmings due to a broken version of glibcCompile error due to glibc & libdvdread incompatibility in FC4

Since it appears this is fixed in the latest Fedora Core 4, I'm closing this ticket.

comment:17 Changed 14 years ago by Anduin Withers <awithers@…>

Resolution: wontfix
Status: closedreopened

It isn't "internal glibc stuff" it is standard C99 stuff.

From ISO 9899:

<quote> 217) C++ implementations should define these macros only when STDC_LIMIT_MACROS is defined before <stdint.h> is included. </quote>

The issue is that libdvdread removed the include of inttypes.h and included an inferior header check based on "special" defines (special if you are using a C++ compiler). This change only appears immediately after the 0.9.4 release (so we can expect it in future releases and from repositories that track CVS, unless the Ogle folks decide to change things (this changed more than two years ago so I wouldn't wait for them)).

http://cvs.berlios.de/cgi-bin/viewcvs.cgi/ogle/libdvdread/dvdread/ifo_types.h?graph=1 look at 1.11 then 1.12.

Builds still fail on a fully updated FC4 system.

I'm attaching another patch that adds the define as part of configure, though only because I made it before finding this bug.

Changed 14 years ago by Anduin Withers <awithers@…>

Attachment: mythplugins.configure.patch added

comment:18 Changed 14 years ago by cythrault@…

This patch works for me. I’m running a not-really-up-to-date FC4.

comment:19 Changed 14 years ago by Isaac Richards

Resolution: fixed
Status: reopenedclosed

(In [8173]) Close #478 by applying patch.

comment:20 Changed 14 years ago by Isaac Richards

(In [8195]) Fix #478 again.

Note: See TracTickets for help on using tickets.