Summary: | app-cdr/dvd+rw-tools-7.0: compile error on growisofs.c | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Nathan W. Labadie <ab0781> |
Component: | Current packages | Assignee: | Gentoo Optical Media project <media-optical> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | askwar, cctsurf, chris, flameeyes, ian, jdaluz, jlp.bugs, kkrizka, marek, revrollic, rhill, toolchain, uberlord |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Compile error.
Build log. Adds #include <limits.h> to the files that need it |
Description
Nathan W. Labadie
2007-10-15 03:31:24 UTC
Created attachment 133493 [details]
Compile error.
Created attachment 133495 [details]
Build log.
<snip> growisofs.c: In function 'setup_fds': growisofs.c:724: error: 'INT_MAX' undeclared (first use in this function) growisofs.c:724: error: (Each undeclared identifier is reported only once growisofs.c:724: error: for each function it appears in.) In file included from growisofs_mmc.cpp:17: transport.hxx: In member function 'int Scsi_Command::is_reload_needed(int)': transport.hxx:358: error: 'INT_MAX' was not declared in this scopeIn file included from dvd+rw-format.cpp:85: transport.hxx: In member function 'int Scsi_Command::is_reload_needed(int)': transport.hxx:358: error: 'INT_MAX' was not declared in this scope In file included from dvd+rw-booktype.cpp:36: transport.hxx: In member function 'int Scsi_Command::is_reload_needed(int)': transport.hxx:358: error: 'INT_MAX' was not declared in this scope </snip> Same problem with dvd+rw-tools-6.1-r1. Shrug, downgrade your linux-headers... WFM. (In reply to comment #5) > Shrug, downgrade your linux-headers... WFM. > Yes, rebuilding after upgrading linux-headers to 2.6.23 I ran into the same issue. I successfully rebuilt this package after upgrading other elements of the toolchain (gcc 4.2.2, binutils 2.18.50.0.2) to the latest releases, the only thing different this time is linux-headers. Shouldn't this block bug #195298 which is the tracker for 2.6.23 linux-headers regressions? (In reply to comment #7) > Shouldn't this block bug #195298 which is the tracker for 2.6.23 linux-headers > regressions? No,that bug is about 2.6.23 *kernel*, not about linux-headers. Any code that uses CDSL_NONE or CDSL_CURRENT from <linux/cdrom.h> will fail unless INT_MAX is defined. Including <limits.h> should fix it. Created attachment 133927 [details, diff]
Adds #include <limits.h> to the files that need it
I'm no programmer, but I decided to have a shot at created a patch to get this working. Attached is what I came up with. I added it to an ebuild in overlay, and it compiled. I haven't had a change to actually confirm the program works once compiled. Hope this helps someone.
(In reply to comment #10) > Created an attachment (id=133927) [edit] > Adds #include <limits.h> to the files that need it > > I'm no programmer, but I decided to have a shot at created a patch to get this > working. Attached is what I came up with. I added it to an ebuild in overlay, > and it compiled. I haven't had a change to actually confirm the program works > once compiled. Hope this helps someone. It looks like it works, but in fact you only need to add #include <limits.h> to two files: growisofs.c and transport.hxx. BTW, I reported the problem on the mailing list <cdwrite@other.debian.org> but they weren't really interested and suggested filing a bug against <linux/cdrom.h> (part of linux-headers). Toolchain, do you consider this a dvd+rw bug or a linux-headers bug? Isn't there a fix that can be committed to a patch here and put in portage? It seems the temporary fix has been found. Or is it more complex than that? Does including limits.h where necessary to get this to compile under linux-headers-2.6.23 break it under other linux-headers versions. Please help, why should we maintain a broken system when a fix is evident? Thanks. James Lets not be shy about fixing this, and Sedoroxs patch looks good enough for me. Fixed! Thanks. So should i sync now? Is this also commited in the ebuild? I donno exactly how to apply the patches manually. Thanks that is not the way to fix it ... i'll back that out use linux-headers-2.6.23-r1 |