From owner-freebsd-gnome@FreeBSD.ORG Sat Aug 22 17:26:32 2009 Return-Path: Delivered-To: gnome@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C69F8106568C for ; Sat, 22 Aug 2009 17:26:32 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 46BFF8FC0A for ; Sat, 22 Aug 2009 17:26:31 +0000 (UTC) Received: (qmail invoked by alias); 22 Aug 2009 16:59:51 -0000 Received: from p54A3D5D5.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.213.213] by mail.gmx.net (mp069) with SMTP; 22 Aug 2009 18:59:51 +0200 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX1/NVDRs0sTNUKfjZchW/g6ATMTc93ZUyFfZoc1Hl5 zoGf4JMEyQ0K0q Message-ID: <4A902406.1060506@gmx.de> Date: Sat, 22 Aug 2009 18:59:50 +0200 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.22 (X11/20090809) MIME-Version: 1.0 To: Andriy Gapon References: <4A8D517F.7050405@icyb.net.ua> In-Reply-To: <4A8D517F.7050405@icyb.net.ua> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.52 Cc: gnome , freebsd-ports@FreeBSD.ORG Subject: Re: pulseaudio build error (curious/strange) X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Aug 2009 17:26:32 -0000 Andriy Gapon schrieb: > ... > /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 > #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 > #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? You are right, the macro code cannot work by design of the preprocssor: #define TEMP_PACKAGE_VERSION PACKAGE_VERSION tells TEMP_PACKAGE_VERSION to expand to PACKAGE_VERSION. This will in turn expand to whatever PACKAGE_VERSION is defined _at the point where TEMP_PACKAGE_VERSION is used_. PACKAGE_VERSION is later defined to expand to TEMP_PACKAGE_VERSION. So when using PACKAGE_VERSION, it will first expand to TEMP_PACKAGE_VERSION, which in turn expands to PACKAGE_VERSION. The preprocessors forbids recursion on macros, therefore macro expansion stops right there, because in this chain of expansion we already expanded PACKAGE_VERSION. So in the end we get the word PACKAGE_VERSION in the preprocessed source code. Long story short: The above preprocessing directives cannot work. Do you know, where/why PACKAGE_BUGREPORT is defined? Christoph