libcdio-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libcdio-devel] Can't compile CVS HEAD


From: R. Bernstein
Subject: Re: [Libcdio-devel] Can't compile CVS HEAD
Date: Sun, 15 Apr 2007 10:20:48 -0400

Okay, I'm often wrong. The next thing thing is to unconditionally add

#include sys/types.h

inside cd-eject.c if that works, then one needs to figure out why
HAVE_SYS_TYPES is not defined. I have this in my include/cdio/cdio_config.h:

/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1

(which will also imply that it is in config.h since that's where it
comes from.)

And along those lines, to figure out what the C preprocessor is doing
when you compile cd-eject.c start with the command invocation that is
shown when make is run and add the options "-dD -E" and change the -o
to a more appropriatedly-named file.

$ cd libcdio/example
$ rm cdio-eject.o
$ make cdio-eject.o
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib/driver -I../include/    -g 
-O2 -Wall -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations 
-Wunused -Wpointer-arith -Wwrite-strings -Wnested-externs -Wno-sign-compare -MT 
cdio-eject.o -MD -MP -MF ".deps/cdio-eject.Tpo" -c -o cdio-eject.o 
cdio-eject.c; \
then mv -f ".deps/cdio-eject.Tpo" ".deps/cdio-eject.Po"; else rm -f 
".deps/cdio-eject.Tpo"; exit 1; fi

$ gcc -dD -E -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib/driver -I../include/    
-g -O2 -Wall -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations 
-Wunused -Wpointer-arith -Wwrite-strings -Wnested-externs -Wno-sign-compare -MT 
cdio-eject.o -MD -MP -MF ".deps/cdio-eject.Tpo" -c -o cdio-eject.i cdio-eject.c

Now look at cdio-eject.i and search for off_t. 

...
# 135 "/usr/include/bits/types.h" 2 3 4
...
__extension__ typedef long int __off_t;
...
typedef __off_t off_t;


However having written all of this. That particular program
cdio-eject.c is after all just an *example* program. It's not all that
relevant say to patching the cdparanoia interface.


Jason Voegele writes:
 > On Sunday 15 April 2007 12:48, R. Bernstein wrote:
 > > I think gcc is trying to say that the types off_t and ssize_t are not
 > > defined. These you get when unistd.h or stdlib.h are included. I use
 > > ubuntu and don't get these problems. Possibly you don't have the headers
 > > installed such as from libc6-dev?
 > 
 > I have verified that I do have the libc6-dev package installed and that the 
 > requisite headers are present.
 > 
 > > When you run configure check the output. 
 > 
 > ./configure gives the following:
 > 
 > checking for ANSI C header files... yes
 > checking for sys/types.h... yes
 > checking for sys/stat.h... yes
 > checking for stdlib.h... yes
 > checking for string.h... yes
 > checking for memory.h... yes
 > checking for strings.h... yes
 > checking for inttypes.h... yes
 > checking for stdint.h... yes
 > checking for unistd.h... yes
 > 
 > Furthermore, I have also tried putting the following in read.h (as you 
 > suggested in another message in this thread), but that did not work either.
 > 
 > #ifdef HAVE_SYS_TYPES_H
 > #include <sys/types.h>
 > #endif
 > 
 > -- 
 > Jason Voegele
 > vuja de:
 >      The feeling that you've *never*, *ever* been in this situation before.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]