{"id":1930,"date":"2023-11-22T21:56:51","date_gmt":"2023-11-22T20:56:51","guid":{"rendered":"https:\/\/alessandromasciadri.com\/?p=1930"},"modified":"2023-11-22T22:09:10","modified_gmt":"2023-11-22T21:09:10","slug":"come-risolvere-lerrore-di-compilazione-cmake-multiple-definition-of","status":"publish","type":"post","link":"https:\/\/alessandromasciadri.com\/come-risolvere-lerrore-di-compilazione-cmake-multiple-definition-of\/","title":{"rendered":"Come risolvere l&#8217;errore di compilazione CMake &#8220;multiple definition of&#8221;"},"content":{"rendered":"\t\t<div data-akihiro-type=\"ama-post\" data-akihiro-id=\"1930\" class=\"akihiro akihiro-1930\" data-akihiro-post-type=\"post\">\n\t\t\t\t<div class=\"akihiro-element akihiro-element-f95386d e-flex e-con-boxed e-con e-parent\" data-id=\"f95386d\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"akihiro-element akihiro-element-5f56296 akihiro-widget akihiro-widget-text-editor\" data-id=\"5f56296\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"akihiro-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Nella mia avventura alla scoperta di EDID, mi stavo dilettando a compilare dai sorgenti il tool read-edid quando mi sono imbattuto in questo errore:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"akihiro-element akihiro-element-7157442 akihiro-widget akihiro-widget-code-highlight\" data-id=\"7157442\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"akihiro-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-okaidia copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language- \">\n\t\t\t\t<code readonly=\"true\" class=\"language-\">\n\t\t\t\t\t<xmp>multiple definition of `quiet'; \nCMakeFiles\/get-edid.dir\/get-edid.c.o:.\/obj-s390x-linux-gnu\/get-edid\/.\/get-edid\/get-edid.c:12:\n first defined here<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"akihiro-element akihiro-element-31ddfd9 akihiro-widget akihiro-widget-text-editor\" data-id=\"31ddfd9\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"akihiro-widget-container\">\n\t\t\t\t\t\t\t\t\tDopo qualche ricerca, mi sono imbattuto nella soluzione. Dalla versione GCC10, il default &#8220;-fcommon&#8221; flag \u00e8 cambiato in &#8220;-fnocommon&#8221;. Per fixare il problema \u00e8 sufficiente quindi attivare <code>-DCMAKE_C_FLAGS=-fcommon<\/code> quando si esegue cmake.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"akihiro-element akihiro-element-ccb46fa akihiro-widget akihiro-widget-heading\" data-id=\"ccb46fa\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"akihiro-widget-container\">\n\t\t\t\t\t<h3 class=\"akihiro-heading-title akihiro-size-default\">Caso specifico<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"akihiro-element akihiro-element-cb1df87 akihiro-widget akihiro-widget-text-editor\" data-id=\"cb1df87\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"akihiro-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Nel mio caso specifico stavo creando uno snap di read-edid, pertanto la soluzione l&#8217;ho raggiunta aggiungendo allo <code>snapcraft.yaml<\/code> il seguente:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"akihiro-element akihiro-element-d12f3cd akihiro-widget akihiro-widget-code-highlight\" data-id=\"d12f3cd\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"akihiro-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-okaidia copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language- \">\n\t\t\t\t<code readonly=\"true\" class=\"language-\">\n\t\t\t\t\t<xmp>\nparts:\n  read-edid:\n    plugin: cmake\n    source: read-edid-3.0.2\n    cmake-parameters:\n      - -DCMAKE_C_FLAGS=-fcommon<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Nella mia avventura alla scoperta di EDID, mi stavo dilettando a compilare dai sorgenti il tool read-edid quando mi sono imbattuto in questo errore: multiple definition of `quiet&#8217;; CMakeFiles\/get-edid.dir\/get-edid.c.o:.\/obj-s390x-linux-gnu\/get-edid\/.\/get-edid\/get-edid.c:12: first defined here Dopo qualche ricerca, mi sono imbattuto nella soluzione. Dalla versione GCC10, il default &#8220;-fcommon&#8221; flag \u00e8 cambiato in &#8220;-fnocommon&#8221;. Per fixare il problema [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[20],"class_list":["post-1930","post","type-post","status-publish","format-standard","hentry","category-programmazione","tag-linux"],"_links":{"self":[{"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/posts\/1930","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/comments?post=1930"}],"version-history":[{"count":7,"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/posts\/1930\/revisions"}],"predecessor-version":[{"id":1937,"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/posts\/1930\/revisions\/1937"}],"wp:attachment":[{"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/media?parent=1930"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/categories?post=1930"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alessandromasciadri.com\/ama-json\/wp\/v2\/tags?post=1930"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}