I tried to enable the driver for a DigitalDevices dvb card. I also have enabled CONFIG_MEDIA_SUBDRV_AUTOSELECT=y and therefore (I guess) CONFIG_DVB_TDA18271C2DD and CONFIG_DVB_TDA18212DD=y got selected, too (there seems to be the real problem) when compiling with these options enabled i get this error: LD drivers/media/dvb-frontends/built-in.o drivers/media/dvb-frontends/tda18212dd.o:(.data+0x120): multiple definition of `m_StandardTable' drivers/media/dvb-frontends/tda18271c2dd.o:(.data+0x1920): first defined here ld: Warning: size of symbol `m_StandardTable' changed from 228 in drivers/media/dvb-frontends/tda18271c2dd.o to 160 in drivers/media/dvb-frontends/tda18212dd.o scripts/Makefile.build:387: recipe for target 'drivers/media/dvb-frontends/built-in.o' failed I'll have such a card in the next couple of days, and therefore I'm interested in getting this work, and also will gladly help with debugging.
update: building ddbridge (and needed frontends also) as module works fine. Shouldn't it be prevented that ddbridge is compiled in?
When you build it as a module the symbols are not public so the clash is not seen. Probably in both cases m_StandardTable should be marked "static" in the source.
Created attachment 122571 [details] making definitions of m_StandardTable static Thanks, that works out. If added a patch-file with the changes. Hope it's the right format? A little of topic: I don't really understand, why "static" fixes the issue. from http://en.cppreference.com/w/c/language/storage_class_specifiers: static storage duration. The variable is allocated when the program begins and deallocated when the program ends. Only one instance of the variable can exist. Variables declared with static or extern have this storage duration. I'm not sure, what "program" means in kernel terms. I would think the whole kernel. but that still means, that there are to symbols with the same name. could you please explain that a little?
static changes the variable scope to be per file not global - so the two copies are not confused but privave to the drivers
OK, thx. didn't know, that static also affects a variables scope.