philippe44 / LMS-ShairTunes2W

Airtunes with LMS (fork of https://github.com/disaster123/shairport2_plugin)
65 stars 3 forks source link

FreeBSD - shairport_helper #25

Closed Shogoki closed 4 years ago

Shogoki commented 4 years ago

Hi,

I was trying to get that running today on my FreeBSD installation, where i have a running LMS installation.

I was able to get the plugin itself to run, and i can see my players as airplay devices.

However i cannot start playing, because i am getting an error from the helper binary. Which is probably, cause there is no precompiled FreeBSD version.

I tried to get the things together and compile the helper for my FreeBSD, however I am stuck in some place..

I have installed flac and cloned tinysvcmdns Repo to get the libraries i need. my Makefile looks like this:

CFLAGS  ?= -Wall -fPIC -ggdb -m64 -O2 $(OPTS) -I$(INCLUDE) $(DEFINES)
LDFLAGS ?= -s -m64 -lpthread -lcrypto -ldl -lm -lrt -L. -static

OBJ                     = bin/bsd
EXECUTABLE      = bin/shairport_helper-x64-bsd

include Makefile

But when running gmake i get the following errors:

cc bin/bsd/alac.o bin/bsd/hairtunes.o bin/bsd/main.o bin/bsd/mdns.o bin/bsd/mdnsd.o bin/bsd/tinysvcmdns.o bin/bsd/log_util.o bin/bsd/util.o  bin/bsd/libFLAC.a bin/bsd/libshine.a -s -m64 -lpthread -lcrypto -ldl -lm -lrt -L. -static -Wl,--gc-sections -o bin/shairport_helper-x64-bsd
bin/bsd/libFLAC.a(ogg_encoder_aspect.o): In function `FLAC__ogg_encoder_aspect_init':
(.text+0x10): undefined reference to `ogg_stream_init'
bin/bsd/libFLAC.a(ogg_encoder_aspect.o): In function `FLAC__ogg_encoder_aspect_finish':
(.text+0x5a): undefined reference to `ogg_stream_clear'
bin/bsd/libFLAC.a(ogg_encoder_aspect.o): In function `FLAC__ogg_encoder_aspect_write_callback_wrapper':
(.text+0x218): undefined reference to `ogg_stream_packetin'
bin/bsd/libFLAC.a(ogg_encoder_aspect.o): In function `FLAC__ogg_encoder_aspect_write_callback_wrapper':
(.text+0x27f): undefined reference to `ogg_stream_pageout'
bin/bsd/libFLAC.a(ogg_encoder_aspect.o): In function `FLAC__ogg_encoder_aspect_write_callback_wrapper':
(.text+0x2ef): undefined reference to `ogg_stream_flush'
bin/bsd/libFLAC.a(ogg_helper.o): In function `simple_ogg_page__get_at':
(.text+0x2b2): undefined reference to `ogg_page_checksum_set'
bin/bsd/libFLAC.a(ogg_helper.o): In function `simple_ogg_page__set_at':
(.text+0x356): undefined reference to `ogg_page_checksum_set'
bin/bsd/libFLAC.a(ogg_decoder_aspect.o): In function `FLAC__ogg_decoder_aspect_init':
(.text+0x12): undefined reference to `ogg_stream_init'
bin/bsd/libFLAC.a(ogg_decoder_aspect.o): In function `FLAC__ogg_decoder_aspect_init':
(.text+0x25): undefined reference to `ogg_sync_init'
bin/bsd/libFLAC.a(ogg_decoder_aspect.o): In function `FLAC__ogg_decoder_aspect_finish':
(.text+0x71): undefined reference to `ogg_sync_clear'
bin/bsd/libFLAC.a(ogg_decoder_aspect.o): In function `FLAC__ogg_decoder_aspect_finish':
(.text+0x83): undefined reference to `ogg_stream_clear'
bin/bsd/libFLAC.a(ogg_decoder_aspect.o): In function `FLAC__ogg_decoder_aspect_flush':
(.text+0xbe): undefined reference to `ogg_stream_reset'
bin/bsd/libFLAC.a(ogg_decoder_aspect.o): In function `FLAC__ogg_decoder_aspect_flush':
(.text+0xca): undefined reference to `ogg_sync_reset'
bin/bsd/libFLAC.a(ogg_decoder_aspect.o): In function `FLAC__ogg_decoder_aspect_reset':
(.text+0xee): undefined reference to `ogg_stream_reset'
bin/bsd/libFLAC.a(ogg_decoder_aspect.o): In function `FLAC__ogg_decoder_aspect_reset':
(.text+0xfa): undefined reference to `ogg_sync_reset'
bin/bsd/libFLAC.a(ogg_decoder_aspect.o): In function `FLAC__ogg_decoder_aspect_read_callback_wrapper':
(.text+0x238): undefined reference to `ogg_sync_pageout'
bin/bsd/libFLAC.a(ogg_decoder_aspect.o): In function `FLAC__ogg_decoder_aspect_read_callback_wrapper':
(.text+0x252): undefined reference to `ogg_page_serialno'
bin/bsd/libFLAC.a(ogg_decoder_aspect.o): In function `FLAC__ogg_decoder_aspect_read_callback_wrapper':
(.text+0x276): undefined reference to `ogg_stream_pagein'
bin/bsd/libFLAC.a(ogg_decoder_aspect.o): In function `FLAC__ogg_decoder_aspect_read_callback_wrapper':
(.text+0x2a9): undefined reference to `ogg_stream_packetout'
bin/bsd/libFLAC.a(ogg_decoder_aspect.o): In function `FLAC__ogg_decoder_aspect_read_callback_wrapper':
(.text+0x38b): undefined reference to `ogg_sync_buffer'
bin/bsd/libFLAC.a(ogg_decoder_aspect.o): In function `FLAC__ogg_decoder_aspect_read_callback_wrapper':
(.text+0x3ef): undefined reference to `ogg_sync_wrote'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
gmake: *** [Makefile:36: bin/shairport_helper-x64-bsd] Error 1

For now i am not too sure, what´s going wrong.. maybe you can help me, and point me into the right direction to identify what i am doing wrong/i am missing.

Thank you very much for your help.

philippe44 commented 4 years ago

You have to configure flac libraries w/o ogg:

./configure --enable-static --disable-shared --disable-ogg --disable-cpplibs

Shogoki commented 4 years ago

Damn! I was somehow thinking that the issue was, that i was missing ogg.. Thank you very much. That made it for me. Got it working on FreeBSD now :-)

I will open a PR, to add the pre-compiled binary, so the next FreeBSD Users will have it easier :-).