#373: pulseaudio 0.9.12 fails to build on FreeBSD --------------------+------------------------------------------------------- Reporter: alexis | Owner: lennart Type: defect | Status: new Priority: normal | Milestone: Component: core | Severity: normal Keywords: | --------------------+------------------------------------------------------- First I get: {{{ pulsecore/core-util.c:2337: error: ‘_NSIG’ undeclared (first use in this function) pulsecore/core-util.c:2337: error: (Each undeclared identifier is reported only once pulsecore/core-util.c:2337: error: for each function it appears in.) }}}
While NSIG doesn't seem standard according to the single unix specification, replacing _NSIG by NSIG here seems to be more portable. Maybe this needs some more care as I see in other parts of this file '#ifdef NSIG' things. Then: {{{ pulsecore/proplist-util.c: In function ‘pa_init_proplist’: pulsecore/proplist-util.c:47: error: ‘environ’ undeclared (first use in this function) pulsecore/proplist-util.c:47: error: (Each undeclared identifier is reported only once pulsecore/proplist-util.c:47: error: for each function it appears in.) }}} There is this portion of code: {{{ #ifndef HAVE_DECL_ENVIRON extern char **environ; #endif }}} while config.h says: {{{ /* Define to 1 if you have the declaration of `environ', and to 0 if you don't. */ #define HAVE_DECL_ENVIRON 0 }}} Changing it from #ifndef to #if ! appears to work better. Then I get: {{{ pulsecore/protocol-native.c:2201: error: dereferencing pointer to incomplete type }}} Offending lines of code: {{{ if (do_shm) { /* Only enable SHM if both sides are owned by the same * user. This is a security measure because otherwise data * private to the user might leak. */ const pa_creds *creds; if (!(creds = pa_pdispatch_creds(pd)) || getuid() != creds->uid) do_shm = FALSE; } }}} Adding #ifdef HAVE_CREDS around seems to fix the problem. Then I get a linking error: {{{ libtool: link: rm -f ".libs/pulseaudioS.c" ".libs/pulseaudio.nm" ".libs/pulseaudio.nmS" ".libs/pulseaudio.nmT" libtool: link: i686-gentoo-freebsd7.0-gcc -std=gnu99 -I../src -I../src/modules -I../src/modules/rtp -I../src/modules/gconf -D_THREAD_SAFE -pthread -D_POSIX_PTHREAD_SEMANTICS -DPA_DLSEARCHPATH=\"/usr/lib/pulse-0.9/modules/\" -DPA_DEFAULT_CONFIG_DIR=\"/etc/pulse\" -DPA_BINARY=\"/usr/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/share/locale\" -DPA_MACHINE_ID=\"/var/lib/dbus /machine-id\" "-DDEBUG_TRAP=__asm__(\"int \$3\")" -I/usr/include/liboil-0.3 -I/usr/include/liboil-0.3 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -march=athlon-xp -O2 -pipe -g -ggdb -UNDEBUG -Wall -W -Wextra -pedantic -pipe -Wno-long-long -Wno-overlength-strings -Wconversion -Wundef -Wformat -Wpacked -Wformat- security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing- noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite- strings -Wno-unused-parameter -ffast-math -Wl,-no-undefined -Wl,--gc- sections .libs/pulseaudioS.o -Wl,--as-needed -o .libs/pulseaudio pulseaudio-caps.o pulseaudio-cmdline.o pulseaudio-cpulimit.o pulseaudio- daemon-conf.o pulseaudio-dumpmodules.o pulseaudio-ltdl-bind-now.o pulseaudio-main.o -Wl,--export-dynamic ./.libs/libpulsecore.so -L/usr/lib /usr/lib/libiconv.so /usr/lib/libltdl.so /usr/lib/libsamplerate.so /usr/lib/libspeexdsp.so /usr/lib/libsndfile.so /usr/lib/libFLAC.so /usr/lib/libvorbisenc.so /usr/lib/libvorbis.so -logg /usr/lib/liboil-0.3.so /usr/lib/libdbus-1.so /usr/lib/libgdbm.so -lrt -lm -pthread pulseaudio-caps.o: In function `pa_drop_root': /var/tmp/portage/media- sound/pulseaudio-0.9.12/work/pulseaudio-0.9.12/src/daemon/caps.c:62: undefined reference to `libintl_dgettext' pulseaudio-cmdline.o: In function `pa_cmdline_parse': /var/tmp/portage/media- sound/pulseaudio-0.9.12/work/pulseaudio-0.9.12/src/daemon/cmdline.c:338: undefined reference to `libintl_dgettext' /var/tmp/portage/media- sound/pulseaudio-0.9.12/work/pulseaudio-0.9.12/src/daemon/cmdline.c:319: undefined reference to `libintl_dgettext' /var/tmp/portage/media- sound/pulseaudio-0.9.12/work/pulseaudio-0.9.12/src/daemon/cmdline.c:262: undefined reference to `libintl_dgettext' pulseaudio-cmdline.o: In function `pa_cmdline_help': /var/tmp/portage/media- sound/pulseaudio-0.9.12/work/pulseaudio-0.9.12/src/daemon/cmdline.c:117: undefined reference to `libintl_dgettext' pulseaudio-daemon-conf.o:/var/tmp/portage/media- sound/pulseaudio-0.9.12/work/pulseaudio-0.9.12/src/daemon/daemon- conf.c:567: more undefined references to `libintl_dgettext' follow ./.libs/libpulsecore.so: undefined reference to `libintl_bind_textdomain_codeset' ./.libs/libpulsecore.so: undefined reference to `libintl_bindtextdomain' collect2: ld returned 1 exit status }}} Adding $(INTLLIBS) to AM_LDADD and AM_LIBADD fixes this (there are many other failures if I add it only to pulseaudio_LDADD). After that some tests fail to build because they contain some linuxisms; i'll probably submit a patch later for that too. -- Ticket URL: <http://pulseaudio.org/ticket/373> PulseAudio <http://pulseaudio.org/> The PulseAudio Sound Server _______________________________________________ pulseaudio-tickets mailing list pulseaudio-tickets@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-tickets