Bug #64
audacious uses system includes (potentially from previous version) when building from source
100%
Description
My system (freebsd-9.0) has installed audacious-3.1.1 from ports. It's full install with all dev files, so it has /usr/local/include/audacious/*
I try build new version from sources:
tar xjf audacious-3.2.tar.bz2
cd audacious-3.2
bash configure --prefix=$HOME/audacious --with-libintl-prefix=/usr/local
gmake
...
Entering directory libaudcore.
In file included from tuple_formatter.h:23,
from tuple.c:39:
/usr/local/include/libaudcore/tuple.h:29:20: error: mowgli.h: No such file or directory
In file included from tuple_compiler.h:25,
from tuple_compiler.c:43:
/usr/local/include/libaudcore/tuple.h:29:20: error: mowgli.h: No such file or directory
In file included from tuple_compiler.h:25,
from tuple_formatter.c:24:
/usr/local/include/libaudcore/tuple.h:29:20: error: mowgli.h: No such file or directory
and many more...
It's because -I/usr/local/include added as first element to CPPFLAGS
postgresql use this constructs:
override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS)
xterm has in Makefile.in:
CPPFLAGS = -I. -I$(srcdir) -DHAVE_CONFIG_H CPPFLAGS
$(EXTRA_CPPFLAGS)
gnome soft (pidgin, ekiga, etc...) uses analogs in Makefile.am:
from pidgin:
AM_CPPFLAGS = \
-DDATADIR=\"$(datadir)\" \
-DLIBDIR=\"$(libdir)/pidgin/\" \
-DLOCALEDIR=\"$(datadir)/locale\" \
-DSYSCONFDIR=\"$(sysconfdir)\" \
-I$(top_builddir)/libpurple \
-I$(top_srcdir)/libpurple/ \
-I$(top_builddir) \
-I$(top_srcdir) \
$(GLIB_CFLAGS) \
$(GCR_CFLAGS) \
$(GSTREAMER_CFLAGS) \
...
So I propose attached patch (against 3.2 sources), it do 2 things:
1. Prepends CPPFLAGS in buildsys.mk with -I. for local includes, -I$(abs_top_srcdir) for config.h and -I$(abs_top_srcdir)/src for other project includes
2. Cleanups other Makefiles where -I. -I.. appends to end of CPPFLAGS
patch can be applied as cd audacious-3.2; patch -p1 < improve-makefiles.patch
History
#1 Updated by John Lindgren almost 13 years ago
It's because -I/usr/local/include added as first element to CPPFLAGS
Where is this added? It seems wrong.
#2 Updated by John Lindgren almost 13 years ago
After this change:
https://github.com/audacious-media-player/audacious/commit/062809bfb88aa495cd4ca375489d45ae98d89331
I am able to compile Audacious 3.2 fine on FreeBSD 9 with the binary package for Audacious 2.5.4 installed under /usr/local.
#3 Updated by Vladimir Timofeev almost 13 years ago
John Lindgren wrote:
It's because -I/usr/local/include added as first element to CPPFLAGS
Where is this added? It seems wrong.
It's added in all makefiles (see patch). For example:
src/libaudcore/Makefile:
1. includes buildsys.mk in line 27 (after that CPPFLAGS = /usr/local/include this do configure while process buildsys.mk.in)
2. includes extra.mk in line 28 (it dosn't touch CPPFLAGS)
3. then line 32: CPPFLAGS += -DHAVE_CONFIG_H ${PTHREAD_CFLAGS} ${GLIB_CFLAGS} -I.. -I../..
And now CPPFLAGS = /usr/local/include -DHAVE_CONFIG_H ${PTHREAD_CFLAGS} ${GLIB_CFLAGS} -I.. -I../..
#4 Updated by Vladimir Timofeev almost 13 years ago
John Lindgren wrote:
After this change:
https://github.com/audacious-media-player/audacious/commit/062809bfb88aa495cd4ca375489d45ae98d89331I am able to compile Audacious 3.2 fine on FreeBSD 9 with the binary package for Audacious 2.5.4 installed under /usr/local.
Strange... I'm not much familiar with autotools.
After cloning repo from github, I simple run autoconf and:
configure.ac:11: error: possibly undefined macro: AC_SUBST
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:44: error: possibly undefined macro: AC_DEFINE
configure.ac:58: error: possibly undefined macro: AM_GNU_GETTEXT
configure.ac:117: error: possibly undefined macro: AC_PATH_PROG
File configure was created, when run:
bash configure --prefix=$HOME/audacious --with-libintl-prefix=/usr/local
configure: WARNING: unrecognized options: --with-libintl-prefix
...
checking for cexpf... yes
checking for /proc/self/exe... no
configure: line 3755: syntax error near unexpected token `external'
configure: line 3755: `AM_GNU_GETTEXT(external)'
What I can try to build from git repo?
But AFAIK this doesn't resolve issues with CPPFLAGS, it's only change LDFLAGS...
#5 Updated by John Lindgren almost 13 years ago
Don't run autoconf directly; use ./autogen.sh instead.
#6 Updated by John Lindgren almost 13 years ago
I get no /usr/local/include in CPPFLAGS in buildsys.mk here.
#7 Updated by Vladimir Timofeev almost 13 years ago
John Lindgren wrote:
I get no /usr/local/include in CPPFLAGS in buildsys.mk here.
Yes I found source of /usr/local/include in CPPFLAGS, it's a --with-libintl-prefix=/usr/local option for configure! I.e. check for libintl add it.
But without this option:
Entering directory libaudcore. In file included from audstrings.c:29: ../audacious/i18n.h:23:21: error: libintl.h: No such file or directory In file included from tuple.c:34: ../audacious/i18n.h:23:21: error: libintl.h: No such file or directory Successfully generated dependencies. Successfully compiled audio.c (lib). In file included from audstrings.c:29: ../audacious/i18n.h:23:21: error: libintl.h: No such file or directory
So, i try configure and make without any options (with default prefix /usr/local):
Entering directory libaudcore. In file included from tuple_formatter.h:23, from tuple.c:39: /usr/local/include/libaudcore/tuple.h:29:20: error: mowgli.h: No such file or directory In file included from tuple_compiler.h:25, from tuple_compiler.c:43: /usr/local/include/libaudcore/tuple.h:29:20: error: mowgli.h: No such file or directory In file included from tuple_compiler.h:25, from tuple_formatter.c:24: /usr/local/include/libaudcore/tuple.h:29:20: error: mowgli.h: No such file or directory
And generated buildsys.mk again have -I/usr/local/include
#8 Updated by John Lindgren almost 13 years ago
See if this commit fixes the problem:
https://github.com/audacious-media-player/audacious/commit/bd57afcdf19c7519f1e35ebc8b196e066f571a74
#9 Updated by Vladimir Timofeev almost 13 years ago
John Lindgren wrote:
See if this commit fixes the problem:
https://github.com/audacious-media-player/audacious/commit/bd57afcdf19c7519f1e35ebc8b196e066f571a74
Yes!
Now build complete!
And you changes more structured, than in my patch. Thanks!
#10 Updated by John Lindgren almost 13 years ago
- Status changed from New to Closed
- Target version set to 3.2.1
- % Done changed from 0 to 100
- Affects version 3.2 added
- Affects version deleted (
)