12.99.3 build fails on darwin
Summary
It seems we're missing LDFLAGS that with automake were provisioned by
- https://gitlab.freedesktop.org/pulseaudio/pulseaudio/blob/master/configure.ac#L536 and in the Makefiles.
By passing
-framework CoreServices -framework Cocoa -framework AudioUnit
the build would get further, with one caveat being that nodelete_link_args
needs to be wrapped in
cc.get_supported_link_arguments()
else it would fail with
ld: unknown option: -z
So now we see
[75/440] Linking target src/libpulsecommon-12.99.dylib.
FAILED: src/libpulsecommon-12.99.dylib
/nix/store/hi40vi42w2rnf9pflyhmsalcj5jf2bsv-clang-wrapper-7.1.0/bin/cc -o src/libpulsecommon-12.99.dylib 'src/25a6634@@pulsecommon-12.99@sha/pulse_client-conf.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulse_fork-detect.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulse_format.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulse_json.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulse_xmalloc.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulse_proplist.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulse_utf8.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulse_channelmap.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulse_sample.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulse_util.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulse_timeval.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulse_rtclock.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulse_volume.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_authkey.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_conf-parser.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_core-error.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_core-format.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_core-rtclock.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_core-util.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_dynarray.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_fdsem.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_flist.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_g711.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_hashmap.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_i18n.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_idxset.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_arpa-inet.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_iochannel.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_ioline.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_ipacl.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_lock-autospawn.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_log.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_ratelimit.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_mcalign.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_memblock.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_memblockq.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_memchunk.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_mutex-posix.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_native-common.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_once.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_packet.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_parseaddr.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_pdispatch.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_pid.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_pipe.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_memtrap.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_aupdate.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_proplist-util.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_pstream-util.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_pstream.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_queue.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_random.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_srbchannel.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_sample-util.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_semaphore-posix.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_shm.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_bitset.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_socket-client.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_socket-server.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_socket-util.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_strbuf.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_strlist.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_tagstruct.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_thread-posix.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_time-smoother.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_tokenizer.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_usergroup.c.o' 'src/25a6634@@pulsecommon-12.99@sha/pulsecore_sndfile-util.c.o' -Wl,-dead_strip_dylibs -Wl,-headerpad_max_install_names -shared -install_name @rpath/libpulsecommon-12.99.dylib -lm -ldl /nix/store/lpf4g3x1fhkfncij6ipbwfwh0nxcfrvc-libsndfile-1.0.28/lib/libsndfile.dylib -Wl,-headerpad_max_install_names -Wl,-rpath,/nix/store/lpf4g3x1fhkfncij6ipbwfwh0nxcfrvc-libsndfile-1.0.28/lib
Undefined symbols for architecture x86_64:
"_pa_poll", referenced from:
_pa_autospawn_lock_acquire in pulsecore_lock-autospawn.c.o
ld: symbol(s) not found for architecture x86_64
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
[76/440] Compiling C object 'src/pulse/afab8d4@@pulse@sha/ext-stream-restore.c.o'.
In file included from ../src/pulse/ext-stream-restore.c:29:
In file included from ../src/pulsecore/pstream-util.h:24:
In file included from ../src/pulsecore/pstream.h:30:
In file included from ../src/pulsecore/memblock.h:31:
../src/pulsecore/atomic.h:120:33: warning: incompatible pointer to integer conversion passing 'void *' to parameter of type 'unsigned long' [-Wint-conversion]
__atomic_store_n(&a->value, p, __ATOMIC_SEQ_CST);
^
1 warning generated.
Is this an issue with libatomic_ops not being handled properly for darwin?
environment
We were testing the release on Nix at
with our darwin CI.
What is the expected correct behavior?
Build would succeed on darwin, and meson.build should set the correct link_args for darwin as mentioned. I didn't mention things about CoreAudio because I wasn't used in nixpkgs, and it appears that it isn't setup in meson.build yet.