You are not logged in.

#1 2008-10-28 08:46:25

mvanier
Member
Registered: 2008-09-12
Posts: 7

very odd makepkg failure seemingly due to missing header files

Hi everyone,

I'm wrestling with a very strange compilation problem.  As an exercise I tried to compile a program I use (drscheme) using makepkg.  However, it failed early on, apparently because some header files it wanted were missing.  Specifically, stdio.h under some circumstances tries to include <stddef.h> and <stdarg.h>, neither of which are in /usr/include.  So the compile fails.  (BTW the pacman binary package of drscheme installs fine, so of course I can use that, but I like to compile my own code for certain packages.  I've successfully compiled this program myself dozens of times on other Linuxes.)

There are several weird things about this.  First off, why are these header files missing in the first place?   Why would stdio.h be requesting them if they weren't supposed to be there?

Secondly, I'm running Arch virtually using VirtualBox 2.04 on two separate machines, one of which is a Mac Pro (Intel Xeon processor) and the other of which is a MacBook Pro (Intel Core Duo processor).  As far as I know the Arch installs are identical, and yet the makepkg build works on the MacBook Pro (with the exact same missing header files) and doesn't work on the Mac Pro.  Could the hardware differences between the Mac Pro and the MacBook Pro be causing this?

Here's a snippet of the compilation output.  I can provide more if needed.  I'm starting where it starts to fail.

make foreign.o
make[7]: Entering directory `/home/mvanier/abs/drscheme/src/plt-4.1.1/src/foreign'
gcc -march=i686 -mtune=generic -pipe  -Wall -I./../mzscheme -I./../mzscheme/include -I./../mzscheme/
src -Igcc/libffi/include -c ./foreign.c -o foreign.o
In file included from ./../mzscheme/include/scheme.h:127,
                 from ./../mzscheme/src/schpriv.h:21,
                 from ./foreign.c:12:
/usr/include/stdio.h:34:21: error: stddef.h: No such file or directory
In file included from /usr/include/stdio.h:75,
                 from ./../mzscheme/include/scheme.h:127,
                 from ./../mzscheme/src/schpriv.h:21,
                 from ./foreign.c:12:
/usr/include/libio.h:53:21: error: stdarg.h: No such file or directory
In file included from /usr/include/stdio.h:75,
                 from ./../mzscheme/include/scheme.h:127,
                 from ./../mzscheme/src/schpriv.h:21,
                 from ./foreign.c:12:
/usr/include/libio.h:332: error: expected specifier-qualifier-list before 'size_t'
/usr/include/libio.h:364: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/libio.h:373: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/libio.h:489: error: expected declaration specifiers or '...' before '__gnuc_va_list'
/usr/include/libio.h:491: error: expected declaration specifiers or '...' before '__gnuc_va_list'
/usr/include/libio.h:493: error: expected '=', ',', ';', 'asm' or '__attribute__' before '_IO_sgetn'
In file included from ./../mzscheme/include/scheme.h:127,
                 from ./../mzscheme/src/schpriv.h:21,
                 from ./foreign.c:12:
/usr/include/stdio.h:312: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/stdio.h:319: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/stdio.h:347: error: expected declaration specifiers or '...' before '__gnuc_va_list'
/usr/include/stdio.h:352: error: expected declaration specifiers or '...' before '__gnuc_va_list'
/usr/include/stdio.h:355: error: expected declaration specifiers or '...' before '__gnuc_va_list'
/usr/include/stdio.h:361: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/stdio.h:363: error: format string argument not a string type
/usr/include/stdio.h:365: error: expected declaration specifiers or '...' before 'size_t'
/usr/include/stdio.h:366: error: expected declaration specifiers or '...' before '__gnuc_va_list'
/usr/include/stdio.h:367: error: format string argument not a string type
/usr/include/stdio.h:678: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fread'
/usr/include/stdio.h:684: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fwrite'
/usr/include/stdio.h:706: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fread_unlo
cked'
/usr/include/stdio.h:708: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fwrite_unl
ocked'

I've seen some other posts dealing with similar compilation problems, but I haven't seen any coherent explanation of why this happens or what to do about it.  Anybody know what's going on?

Thanks in advance,

Mike

Offline

#2 2008-10-28 19:13:21

creslin
Member
Registered: 2008-10-04
Posts: 241

Re: very odd makepkg failure seemingly due to missing header files

What does this show on each install?

$ pacman -Q gcc glibc kernel-headers

ARCH|awesome3.0 powered by Pentium M 750 | 512MB DDR2-533 | Radeon X300 M
The journey is the reward.

Offline

#3 2008-10-29 07:04:57

mvanier
Member
Registered: 2008-09-12
Posts: 7

Re: very odd makepkg failure seemingly due to missing header files

It returns this:

gcc 4.3.2-1
glibc 2.8-3
kernel-headers 2.6.26.3-1

Mike

Offline

#4 2008-10-29 07:08:37

mvanier
Member
Registered: 2008-09-12
Posts: 7

Re: very odd makepkg failure seemingly due to missing header files

Sorry, I should have added: it returns those values for both installs.

Mike

Offline

#5 2008-11-03 07:20:42

mvanier
Member
Registered: 2008-09-12
Posts: 7

Re: very odd makepkg failure seemingly due to missing header files

On further examination, this turns out to be a problem with gcc rather than with DrScheme, so I'm going to file a bug report.

Offline

Board footer

Powered by FluxBB