Hello,
Has anyone tried to build this with gcc 10? GCC 10 added -fno-common so that means you can't have multiple definitions for symbols.
I think you should be able to see the build log here:
https://kojipkgs.fedoraproject.org//work/tasks/3341/41463341/build.log
In case you can't see that here is the important part:
g++ -Wno-multichar -Wall -Wextra -Wno-clobbered -Wno-psabi -pthread -DSYSCONFDIR=\"/etc\" -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux -mfloat-abi=hard -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o shairport-sync shairport.o rtsp.o mdns.o common.o rtp.o player.o alac.o audio.o loudness.o activity_monitor.o mdns_avahi.o audio_alsa.o audio_stdout.o audio_pipe.o audio_dummy.o audio_pa.o -lpulse -lasound -lavahi-common -lavahi-client -lsoxr -lssl -lcrypto -lconfig -lpopt -lm -lpthread -lrt
make[2]: Leaving directory '/builddir/build/BUILD/shairport-sync-3.3.5'
/usr/bin/ld: rtsp.o:/builddir/build/BUILD/shairport-sync-3.3.5/rtsp.h:7: multiple definition of `conns'; shairport.o:/builddir/build/BUILD/shairport-sync-3.3.5/rtsp.h:7: first defined here
/usr/bin/ld: rtsp.o:/builddir/build/BUILD/shairport-sync-3.3.5/rtsp.h:6: multiple definition of `playing_conn'; shairport.o:/builddir/build/BUILD/shairport-sync-3.3.5/rtsp.h:6: first defined here
/usr/bin/ld: rtsp.o:/builddir/build/BUILD/shairport-sync-3.3.5/common.h:412: multiple definition of `r64_mutex'; shairport.o:/builddir/build/BUILD/shairport-sync-3.3.5/common.h:412: first defined here
/usr/bin/ld: rtsp.o:/builddir/build/BUILD/shairport-sync-3.3.5/common.h:377: multiple definition of `the_conn_lock'; shairport.o:/builddir/build/BUILD/shairport-sync-3.3.5/common.h:377: first defined here
/usr/bin/ld: rtsp.o:/builddir/build/BUILD/shairport-sync-3.3.5/common.h:362: multiple definition of `config_file_stuff'; shairport.o:/builddir/build/BUILD/shairport-sync-3.3.5/common.h:362: first defined here
/usr/bin/ld: rtsp.o:/builddir/build/BUILD/shairport-sync-3.3.5/common.h:361: multiple definition of `config'; shairport.o:/builddir/build/BUILD/shairport-sync-3.3.5/common.h:361: first defined here
/usr/bin/ld: rtsp.o:/builddir/build/BUILD/shairport-sync-3.3.5/common.h:359: multiple definition of `main_thread_id'; shairport.o:/builddir/build/BUILD/shairport-sync-3.3.5/common.h:359: first defined here
/usr/bin/ld: rtsp.o:/builddir/build/BUILD/shairport-sync-3.3.5/common.h:352: multiple definition of `fp_time_at_last_debug_message'; shairport.o:/builddir/build/BUILD/shairport-sync-3.3.5/common.h:352: first defined here
Thanks for the heads-up. It would be nice to take advantage of the new feature, but in the meantime, does adding the flag -fcommon allow the build to complete successfully?
Are you testing on upcoming builds of Fedora? If so, could you point in the direction of where you’re getting them from, please?
Hi Mike,
I believe you can do scratch builds in fedora as long as you have a fedoraproject.org account.
fedpkg build --target f33 --scratch --srpm /home/bpeck/Sandbox/shairport-sync/shairport-sync-3.3.5-1.fc33.src.rpm
I found this doc about porting to gcc10 as well. https://gcc.gnu.org/gcc-10/porting_to.html
I've patched the current build to use -fcommon until you can properly port.
I couldn’t get any joy with a Fedora 32 image in a VM, but Ubuntu 20.04 did allow me to install and use gcc-10. It seems that the fcommon flag is set by default but it does allow you to specify fno-common. it looks pretty straightforward to bring Shairport Sync up to date.
Actually, correct me if I'm wrong, the fno-common flag is available on GCC 8.3. I guess it's set to -fcommon by default.
this is my "fix" for now..
diff -Nur shairport-sync-3.3.5/Makefile.am shairport-sync-3.3.5.fixed/Makefile.am
--- shairport-sync-3.3.5/Makefile.am 2019-11-13 17:17:51.000000000 -0500
+++ shairport-sync-3.3.5.fixed/Makefile.am 2020-02-12 08:55:25.606471346 -0500
@@ -18,8 +18,8 @@
AM_CXXFLAGS = -I/usr/local/include -Wno-multichar -Wall -Wextra -Wno-clobbered -Wno-psabi -pthread -DSYSCONFDIR=\"$(sysconfdir)\"
AM_CFLAGS = -Wno-multichar -Wall -Wextra -pthread -DSYSCONFDIR=\"$(sysconfdir)\"
else
- AM_CXXFLAGS = -Wno-multichar -Wall -Wextra -Wno-clobbered -Wno-psabi -pthread -DSYSCONFDIR=\"$(sysconfdir)\"
- AM_CFLAGS = -Wno-multichar -Wall -Wextra -Wno-clobbered -Wno-psabi -pthread -DSYSCONFDIR=\"$(sysconfdir)\"
+ AM_CXXFLAGS = -fcommon -Wno-multichar -Wall -Wextra -Wno-clobbered -Wno-psabi -pthread -DSYSCONFDIR=\"$(sysconfdir)\"
+ AM_CFLAGS = -fcommon -Wno-multichar -Wall -Wextra -Wno-clobbered -Wno-psabi -pthread -DSYSCONFDIR=\"$(sysconfdir)\"
endif
endif
Thanks. Actually, I've just pushed an update to the development branch that, I think, does the business. If you got a chance to check it, it would be great.
This looks good.
https://koji.fedoraproject.org/koji/taskinfo?taskID=41504998
This looks good.
https://koji.fedoraproject.org/koji/taskinfo?taskID=41504998
Thanks Bill. Is that with your fix or is it with the update?
Assuming I did this correctly I pulled from 0902cdfe1a7b5e8c8520c1154b1ad13f8256ce22, removed the gcc10 I originally put in place and built a srpm from that. Then I submitted to f33 build target in koji and everything built as expected.
Thanks again.
Just to be clear – this is for Fedora 33, not Fedora 32, right?
Hi Mike,
It's broken for F32 as well. I can do a git release or I can wait till you have a proper release if it's soon. Right now the Fedora build system is complaining to me that it's not going to be part of f32 release if I don't fix it soon.
Okay, thanks. How soon is soon?
Feb 25th
Okay, well it's out on the development branch, and if we can wait a couple of days to see if any oddities are reported then I can push out 3.3.6. How does that sound?
Sounds like a plan. I'll do a build this weekend coming up with either the development branch or with 3.3.6 if you release it by then.
Thanks again!
Hi Bill. I just updated the master branch release to 3.3.6.
Hi Mike,
I've built a new verison which should get pulled into f32 automatically.
Thanks again.
https://koji.fedoraproject.org/koji/buildinfo?buildID=1468506
On Fri, Feb 21, 2020 at 8:48 AM Mike Brady notifications@github.com wrote:
Hi Bill. I just updated the master branch release to 3.3.6.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/mikebrady/shairport-sync/issues/973?email_source=notifications&email_token=AAUPZOFGG3G2NKHCYBPX7N3RD7LTVA5CNFSM4KTRTKM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMSX7II#issuecomment-589660065,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAUPZOCUIDNHBFRPRDYSN2TRD7LTVANCNFSM4KTRTKMQ
.