LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   FYI: dvd+rw-tools-7.1 slackware 12.1 compile error 'INT_MAX' was not declared (https://www.linuxquestions.org/questions/slackware-14/fyi-dvd-rw-tools-7-1-slackware-12-1-compile-error-int_max-was-not-declared-669949/)

coldbeer 09-14-2008 10:23 PM

FYI: dvd+rw-tools-7.1 slackware 12.1 compile error 'INT_MAX' was not declared
 
Just in case anyone else runs into this.
I was trying to install dvd+rw-tools-7.1.tar.gz when I got this:

bash-3.1$ make
gcc -O2 -D_REENTRANT -c -o growisofs.o growisofs.c
g++ -O2 -fno-exceptions -D_REENTRANT -c -o growisofs_mmc.o growisofs_mmc.cpp
In file included from growisofs_mmc.cpp:17:
transport.hxx: In member function 'int Scsi_Command::is_reload_needed(int)':
transport.hxx:366: error: 'INT_MAX' was not declared in this scope
make[1]: *** [growisofs_mmc.o] Error 1
make[1]: Leaving directory `/d/home/rick/install/dvd+rw-tools-7.1'
make: *** [all] Error 2


INT_MAX is defined inside a standard c library. Apparently in slackware 11.1 the compiler included it by some default, now in 12.1 it doesn't.

So I put:
#include <limits.h>
at the end of the includes at the top of "transport.hxx" and if compiled ok after that.

--rick

Bruce Hill 09-15-2008 12:58 AM

FYI - Slackware-12.1 comes with dvd+rw-tools-7.1-i486-1 -- no need to compile it yourself. :D

H_TeXMeX_H 09-15-2008 02:54 AM

Submit a bug report with the devs of dvd+rw-tools, but check if they haven't fixed this in newer versions.

Bruce Hill 09-15-2008 03:42 AM

That IS the newest version of dvd+rw-tools.

If you look in the source directory at Slackware, you'll find this patch:
Code:

--- ./transport.hxx.orig        2008-03-01 04:34:43.000000000 -0600
+++ ./transport.hxx    2008-04-06 23:05:58.000000000 -0500
@@ -9,6 +9,7 @@
 #if defined(__unix) || defined(__unix__)
 #include <stdio.h>
 #include <stdlib.h>
+#include <limits.h>
 #include <unistd.h>
 #include <string.h>
 #include <sys/types.h>

Actually, we've been patching that in Slackware since dvd+rw-tools-7.0
in Slackware-12.0.

To the OP -- I missed Slackware-11.1 -- :D

coldbeer 09-15-2008 02:45 PM

Quote:

Originally Posted by Bruce Hill (Post 3280628)
FYI - Slackware-12.1 comes with dvd+rw-tools-7.1-i486-1 -- no need to compile it yourself. :D


Dooogh !!! ;)


All times are GMT -5. The time now is 07:37 AM.