scons doesn't find asoundlib.h

Hi,

I have asoundlib.h in

/usr/include/alsa/

but scons doesn’t seem to find it. I get:

Checking for C header file alsa/asoundlib.h… no
Checking for C header file /System/Library/Frameworks/CoreMIDI.framework/Headers/CoreMIDI.h… no
It appears you don’t have the required MIDI libraries installed.

I’m using arch linux.

Pedro Kroger

Sounds a bit like you might be missing some basic build tools. Do you have gcc, pkg-config, libc headers etc. installed?

Yes, I do. for instance:

gcc 4.1.1
pkg-config 0.20
kernel-headers 2.6.18-3

BTW, I’m using scons v0.96.92

Pedro

Forgot to mention this is with a fresh ardour2 from svn.

Pedro

Have you successfully compiled anything on your system? Do you have the development package for libc installed?

Yes, I have compiled things like emacs, snd, and csound on this system. I also have the development files for libc installed. (in arch linux its a big package for glibc with binary and header files).

Pedro

Which version of libasound do you have installed? And just to be sure: do you also have the development package for libasound installed?

Here libasound is in the alsa-lib package:

alsa-lib 1.0.13-1
-> /usr/lib/libasound.so.2.0.0

and I also have the header files in /usr/include/alsa

Thanks for helping me,

Pedro

Does the config.log file in the build directory give any hints to what went wrong? If it contains any relevant information please paste it here or post the complete file on a server somewhere.

I didn’t know about config.log. I think this is the relevant part:


file SConstruct,line 515:
Configure(confdir = .sconf_temp)
scons: Configure: Checking for C header file alsa/asoundlib.h…
.sconf_temp/conftest_5.c <-
|
|#include “alsa/asoundlib.h”
|
|
gcc -o .sconf_temp/conftest_5.o -c -I. .sconf_temp/conftest_5.c
/bin/sh: -c: line 0: unexpected EOF while looking for matching ``’
/bin/sh: -c: line 23: syntax error: unexpected end of file
scons: Configure: no

scons: Configure: Checking for C header file /System/Library/Frameworks/CoreMIDI.framework/Headers/CoreMIDI.h…
.sconf_temp/conftest_6.c <-
|
|#include “/System/Library/Frameworks/CoreMIDI.framework/Headers/CoreMIDI.h”
|
|
gcc -o .sconf_temp/conftest_6.o -c -I. .sconf_temp/conftest_6.c
/bin/sh: -c: line 0: unexpected EOF while looking for matching ``’
/bin/sh: -c: line 23: syntax error: unexpected end of file
scons: Configure: no

But

gcc -o .sconf_temp/conftest_5.o -c -I. .sconf_temp/conftest_5.c

compiles fine (manually), while the next doesn’t (as expected):

gcc -o .sconf_temp/conftest_6.o -c -I. .sconf_temp/conftest_6.c
.sconf_temp/conftest_6.c:2:76: error: /System/Library/Frameworks/CoreMIDI.framework/Headers/CoreMIDI.h: No such file or directory

I think there is something really wrong with scons here. If I comment out the part that checks for asoundlib in SConstruct I get this:

“This system has no functional C++ compiler. You cannot build Ardour from source without one”!!!

In config.log I get this:

file SConstruct,line 718:
Configure(confdir = .sconf_temp)
g++ --version
/bin/sh: -c: line 0: unexpected EOF while looking for matching ``’
/bin/sh: -c: line 23: syntax error: unexpected end of file

but “g++ --version” returns “g++ (GCC) 4.1.1 …and more stuff here…” as usual.

I didn’t know about config.log. I think this is the relevant part:

file SConstruct,line 515: Configure(confdir = .sconf_temp) scons: Configure: Checking for C header file alsa/asoundlib.h... .sconf_temp/conftest_5.c | |#include "alsa/asoundlib.h" | gcc -o .sconf_temp/conftest_5.o -c -I. .sconf_temp/conftest_5.c /bin/sh: -c: line 0: unexpected EOF while looking for matching ``' /bin/sh: -c: line 23: syntax error: unexpected end of file scons: Configure: no

scons: Configure: Checking for C header file /System/Library/Frameworks/CoreMIDI.framework/Headers/CoreMIDI.h…
.sconf_temp/conftest_6.c
|
|#include “/System/Library/Frameworks/CoreMIDI.framework/Headers/CoreMIDI.h”
|
gcc -o .sconf_temp/conftest_6.o -c -I. .sconf_temp/conftest_6.c
/bin/sh: -c: line 0: unexpected EOF while looking for matching ``’
/bin/sh: -c: line 23: syntax error: unexpected end of file
scons: Configure: no

But

gcc -o .sconf_temp/conftest_5.o -c -I. .sconf_temp/conftest_5.c

compiles fine (manually), while the next doesn’t (as expected):

gcc -o .sconf_temp/conftest_6.o -c -I. .sconf_temp/conftest_6.c
.sconf_temp/conftest_6.c:2:76: error: /System/Library/Frameworks/CoreMIDI.framework/Headers/CoreMIDI.h: No such file or directory

I think there is something really wrong with scons here. If I comment out the part that checks for asoundlib in SConstruct I get this:

“This system has no functional C++ compiler. You cannot build Ardour from source without one”!!!

In config.log I get this:

file SConstruct,line 718:
Configure(confdir = .sconf_temp)
g++ --version
/bin/sh: -c: line 0: unexpected EOF while looking for matching ``’
/bin/sh: -c: line 23: syntax error: unexpected end of file

but “g++ --version” returns

gcc (GCC) 4.1.1 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

as usual

what is the result of typing:

which g++

to your shell/terminal prompt?

/usr/bin/g++

I commented the SConstruct part that checks for asoundlib and c++ and it started compiling just fine. Until I got this error:

libs/pbd/mountpoint.cc:94:23: error: sys/ucred.h: No such file or directory
libs/pbd/mountpoint.cc: In function ‘std::string mountpoint(std::string)’:
libs/pbd/mountpoint.cc:107: error: ‘MNT_NOWAIT’ was not declared in this scope
libs/pbd/mountpoint.cc:107: error: ‘getmntinfo’ was not declared in this scope
libs/pbd/mountpoint.cc:122: error: invalid use of undefined type ‘struct statfs’
libs/pbd/mountpoint.cc:100: error: forward declaration of ‘struct statfs’

I don’t have sys/ucred.h in my system. what package installs it?

Any idea of what it could be? It’s obvious that something is wrong in my system, but I can’t put my finger on it.

Pedro

The “/System/Library/Frameworks/CoreMIDI.framework/” check is looking for midi files on MacOSX. You can ignore it.

SOLVED!

I finally figured out what was going on. scons was freaking out because I had this line in my ~/.bashrc:

export BREAK_CHARS=""#’(),;`\|!?[]{}"

now ardour2 in compiling fine. thank you guys for the help.