[Slony1-bugs] Slony build failure with GCC 10

Steve Singer ssinger at afilias.info
Sun May 24 00:44:46 UTC 2020


On 5/21/20 1:28 PM, Moradhassel, Kavian via Slony1-bugs wrote:

Thanks for the report.

Patch attached.
Let me know if this fixes the issue.

Also pushed to github at 
https://github.com/ssinger/slony1-engine/tree/nocommon




> Hello,
> 
> GCC 10 has changed its default from “-fcommon” to “-fno-common” (ref 
> <https://gcc.gnu.org/legacy-ml/gcc-patches/2019-10/msg01847.html>), and 
> this results in build failure following several errors such as:
> 
> /usr/bin/ld: 
> runtime_config.o:/tmp/slony1-2.2.8/src/slon/confoptions.h:46: multiple 
> definition of `Syslog_ident'; 
> slon.o:/tmp/slony1-2.2.8/src/slon/confoptions.h:46: first defined here
> 
> /usr/bin/ld: local_listen.o:/tmp/slony1-2.2.8/src/slon/confoptions.h:56: 
> multiple definition of `command_on_logarchive'; 
> slon.o:/tmp/slony1-2.2.8/src/slon/confoptions.h:56: first defined here
> 
> /usr/bin/ld: 
> remote_listen.o:/tmp/slony1-2.2.8/src/slon/confoptions.h:53: multiple 
> definition of `log_timestamp_format'; 
> slon.o:/tmp/slony1-2.2.8/src/slon/confoptions.h:53: first defined here
> 
> /usr/bin/ld: 
> remote_worker.o:/tmp/slony1-2.2.8/src/slon/confoptions.h:54: multiple 
> definition of `sql_on_connection'; 
> slon.o:/tmp/slony1-2.2.8/src/slon/confoptions.h:54: first defined here
> 
> /usr/bin/ld: sync_thread.o:/tmp/slony1-2.2.8/src/slon/confoptions.h:55: 
> multiple definition of `lag_interval'; 
> slon.o:/tmp/slony1-2.2.8/src/slon/confoptions.h:55: first defined here
> 
> /usr/bin/ld: 
> monitor_thread.o:/tmp/slony1-2.2.8/src/slon/confoptions.h:52: multiple 
> definition of `drop_indices'; 
> slon.o:/tmp/slony1-2.2.8/src/slon/confoptions.h:52: first defined here
> 
> The above is just a sample of the error messages…several dozen of these 
> actually occur, and then the build fails with:
> 
> collect2: error: ld returned 1 exit status
> 
> This change in default value is referenced as the first item on the 
> “Porting to GCC 10” page, along with a description of how best to 
> address this change:
> 
> https://gcc.gnu.org/gcc-10/porting_to.html
> 
> The workaround is to setCFLAGS="-fcommon"when running the configure 
> script.  However, a more permanent fix would be appreciated.
> 
> Thanks,
> 
> *Kav Moradhassel*
> R&D Tools and Services <https://confluence.ciena.com/display/prism> | Ciena
> 5050 Innovation Drive 
> <https://cienacorp.sharepoint.com/sites/RealEstate/SitePages/Ottawa-Ontario.aspx>, 
> Ottawa, ON, K2K 0J2, Canada
> 
> 
> _______________________________________________
> Slony1-bugs mailing list
> Slony1-bugs at lists.slony.info
> http://lists.slony.info/mailman/listinfo/slony1-bugs
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-move-variable-declarations-to-the-.c-file.patch
Type: text/x-patch
Size: 2154 bytes
Desc: not available
URL: <http://lists.slony.info/pipermail/slony1-bugs/attachments/20200523/b7a188ba/attachment.bin>


More information about the Slony1-bugs mailing list