pulseaudio build error (curious/strange)

Andriy Gapon avg at icyb.net.ua
Thu Aug 20 13:37:07 UTC 2009


...
/bin/sh /usr/obj/ports/usr/ports/audio/pulseaudio/work/gnome-libtool --tag=CC
--mode=compile cc -std=gnu99 -DHAVE_CONFIG_H -I. -I..   -I/usr/local/include
-I../src -I../src -I../src/modules -I../src/modules -I../src/modules/rtp
-I../src/modules/rtp -I../src/modules/gconf -I../src/modules/gconf
-I../src/modules/bluetooth -I../src/modules/bluetooth -I../src/modules/alsa
-I../src/modules/alsa -I../src/modules/raop -D_THREAD_SAFE
-D_POSIX_PTHREAD_SEMANTICS -I/usr/local/include   -I/usr/local/include
-I/usr/local/include   -DPA_DLSEARCHPATH=\"/usr/local/lib/pulse-0.9.15/modules/\"
-DPA_DEFAULT_CONFIG_DIR=\"/usr/local/etc/pulse\"
-DPA_BINARY=\"/usr/local/bin/pulseaudio\"
-DPA_SYSTEM_RUNTIME_PATH=\"/var/run/pulse\"
-DPA_SYSTEM_CONFIG_PATH=\"/var/lib/pulse\"
-DPA_SYSTEM_STATE_PATH=\"/var/lib/pulse\" -DAO_REQUIRE_CAS
-DPULSE_LOCALEDIR=\"/usr/local/share/locale\"
-DPA_MACHINE_ID=\"/var/lib/dbus/machine-id\" -O2 -fno-strict-aliasing -pipe -O2
-fno-strict-aliasing -pipe -march=nocona -Wall -W -Wextra -pipe -Wno-long-long
-Winline -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2
-Wsign-compare -Wformat-security -Wformat-nonliteral -Wold-style-definition
-Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal
-Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations
-Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing=2
-Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2
-fno-common -fdiagnostics-show-option -MT module-raop-sink.lo -MD -MP -MF
.deps/module-raop-sink.Tpo -c -o module-raop-sink.lo `test -f
'modules/module-raop-sink.c' || echo './'`modules/module-raop-sink.c
gnome-libtool: compile:  cc -std=gnu99 -DHAVE_CONFIG_H -I. -I..
-I/usr/local/include -I../src -I../src -I../src/modules -I../src/modules
-I../src/modules/rtp -I../src/modules/rtp -I../src/modules/gconf
-I../src/modules/gconf -I../src/modules/bluetooth -I../src/modules/bluetooth
-I../src/modules/alsa -I../src/modules/alsa -I../src/modules/raop -D_THREAD_SAFE
-D_POSIX_PTHREAD_SEMANTICS -I/usr/local/include -I/usr/local/include
-I/usr/local/include -DPA_DLSEARCHPATH=\"/usr/local/lib/pulse-0.9.15/modules/\"
-DPA_DEFAULT_CONFIG_DIR=\"/usr/local/etc/pulse\"
-DPA_BINARY=\"/usr/local/bin/pulseaudio\"
-DPA_SYSTEM_RUNTIME_PATH=\"/var/run/pulse\"
-DPA_SYSTEM_CONFIG_PATH=\"/var/lib/pulse\"
-DPA_SYSTEM_STATE_PATH=\"/var/lib/pulse\" -DAO_REQUIRE_CAS
-DPULSE_LOCALEDIR=\"/usr/local/share/locale\"
-DPA_MACHINE_ID=\"/var/lib/dbus/machine-id\" -O2 -fno-strict-aliasing -pipe -O2
-fno-strict-aliasing -pipe -march=nocona -Wall -W -Wextra -pipe -Wno-long-long
-Winline -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2
-Wsign-compare -Wformat-security -Wformat-nonliteral -Wold-style-definition
-Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal
-Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations
-Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing=2
-Wwrite-strings -Wno-unused-parameter -ffast-math -Wp,-D_FORTIFY_SOURCE=2
-fno-common -fdiagnostics-show-option -MT module-raop-sink.lo -MD -MP -MF
.deps/module-raop-sink.Tpo -c modules/module-raop-sink.c  -fPIC -DPIC -o
.libs/module-raop-sink.o
In file included from /usr/local/include/sdp.h:26,
                 from modules/module-raop-sink.c:65:
/usr/local/include/mpeg4ip.h:126: warning: redundant redeclaration of 'strcasestr'
[-Wredundant-decls]
/usr/include/string.h:72: warning: previous declaration of 'strcasestr' was here
modules/module-raop-sink.c: In function 'module_raop_sink_LTX_pa__get_version':
modules/module-raop-sink.c:71: error: 'PACKAGE_VERSION' undeclared (first use in
this function)
modules/module-raop-sink.c:71: error: (Each undeclared identifier is reported only
once
modules/module-raop-sink.c:71: error: for each function it appears in.)


The thing is that PACKAGE_VERSION is actually defined in config.h.
But there is something strange/curios.
module-raop-sink.c includes /usr/local/include/sdp.h that in turn includes
/usr/local/include/mpeg4ip.h.
mpeg4ip.h has the following code:

#ifndef _WIN32
#ifdef PACKAGE_BUGREPORT
#define TEMP_PACKAGE_BUGREPORT PACKAGE_BUGREPORT
#define TEMP_PACKAGE_NAME PACKAGE_NAME
#define TEMP_PACKAGE_STRING PACKAGE_STRING
#define TEMP_PACKAGE_TARNAME PACKAGE_TARNAME
#define TEMP_PACKAGE_VERSION PACKAGE_VERSION
#undef PACKAGE_BUGREPORT
#undef PACKAGE_NAME
#undef PACKAGE_STRING
#undef PACKAGE_TARNAME
#undef PACKAGE_VERSION
#include <mpeg4ip_config.h>
#undef PACKAGE_BUGREPORT
#undef PACKAGE_NAME
#undef PACKAGE_STRING
#undef PACKAGE_TARNAME
#undef PACKAGE_VERSION
#define PACKAGE_BUGREPORT TEMP_PACKAGE_BUGREPORT
#define PACKAGE_NAME TEMP_PACKAGE_NAME
#define PACKAGE_STRING TEMP_PACKAGE_STRING
#define PACKAGE_TARNAME TEMP_PACKAGE_TARNAME
#define PACKAGE_VERSION TEMP_PACKAGE_VERSION
#else
#include <mpeg4ip_config.h>
#endif
#endif


In our case PACKAGE_BUGREPORT is actually defined (in config.h).
So this whole block is enabled.
But after pre-processor goes through it PACKAGE_VERSION becomes 'simply defined',
that is, it is defined, but not to any particular value.
So apparently the witty macro code doesn't work like its authors intended it to
work (akin to push/pop).
Ideas?

-- 
Andriy Gapon


More information about the freebsd-ports mailing list