[oi-dev] [developer] recompile oi-userland > gcc-7

Toomas Soome tsoome at me.com
Mon Feb 28 15:09:47 UTC 2022



> On 28. Feb 2022, at 17:03, Klaus Ziegler <klausz at haus-gisela.de> wrote:
> 
> Hi,
> 
> I'm currently trying to re-compile oi-userland with gcc-11 and where
> C++ usage in gcc-11 is too new, I'm taking gcc-10. However I found
> some packages which won't compile with either of 10/11 GCC releases:
> 
> print/cups-filters:
> ld: fatal: symbol 'postpipe' is multiply-defined:
>     (file foomatic_rip-foomaticrip.o type=OBJT; file foomatic_rip-options.o type=OBJT);
> ld: fatal: symbol 'printer_model' is multiply-defined:
>     (file foomatic_rip-foomaticrip.o type=OBJT; file foomatic_rip-options.o type=OBJT);
> ld: fatal: symbol 'cupsfilter' is multiply-defined:
>     (file foomatic_rip-foomaticrip.o type=OBJT; file foomatic_rip-options.o type=OBJT);
> ld: fatal: file processing errors. No output written to .libs/foomatic-rip
> collect2: error: ld returned 1 exit status
> 
> library/trousers - works using gcc-7 and gcc-9:
> ld: fatal: symbol 'tcsd_sa_chld' is multiply-defined:
>     (file .libs/libtspi_la-tspi_context.o type=OBJT; file .libs/libtspi_la-rpc_context.o type=OBJT);
> ld: fatal: symbol 'tcsd_sa_int' is multiply-defined:
>     (file .libs/libtspi_la-tspi_context.o type=OBJT; file .libs/libtspi_la-rpc_context.o type=OBJT);
> ld: fatal: symbol 'tcsd_sa_chld' is multiply-defined:
>     (file .libs/libtspi_la-tspi_context.o type=OBJT; file .libs/libtspi_la-tcs_api.o type=OBJT);
> ...
> 
> If those are compiled using gcc-7 all is fine, how could I fix these linking errors,
> of course -z muldefs would be a solution - but is it okay to just add muldefs
> to involved Makefile(s) and or libtool?
> 
> Many Regards
> Klaus
> 

Multiply defined symbol means there are many object modules providing the same symbol. This often happens because variable is declared in header without ‘extern’. gcc 10 did switch on that warning - it was off in previous versions. Many third party packages already have this fixed, so you may want to check for updates….

rgds,
toomas





More information about the oi-dev mailing list