cht電腦資訊gcin
adm Find login register

gcin使用GCC 10編譯產生錯誤

yan12125
joined: 2018-10-05
posted: 7
promoted:
bookmarked:
1subject: gcin使用GCC 10編譯產生錯誤Promote 0 Bookmark 02020-05-15quote  

你好,gcin 2.8.9使用GCC 10編議會產生以下錯誤:

 

gcc -Wl,-rpath,/usr/lib/gcin -o tslearn tslearn.o util.o gcin-conf.o pho-util.o tsin-util.o gcin-send.o pho-sym.o table-update.o locale.o gcin-settings.o gcin-common.o gcin-icon.o pho-dbg.o pho2pinyin.o pinyin.o lang.o gtab-list.o gtab-init.o fullchar.o gtab-tsin-fname.o unix-exec.o gtab-util.o -L./im-client -lgcin-im-client -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -Wl,--as-needed -lgtk-3 -lgdk-3 -lz -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lX11 -ldl -lm
/usr/bin/ld: pho2pinyin.o:(.bss+0x3c8): multiple definition of `pin_juyin'; gcin-common.o:(.bss+0x0): first defined here
/usr/bin/ld: pho2pinyin.o:(.bss+0x0): multiple definition of `text_pho_N'; gcin-common.o:(.data+0x4): first defined here

 

如果使用CFLAGS="-fcommon"就能編譯成功。原因應該是和GCC 10開始預設值為-fno-common [1]。能麻煩看看嗎?

 

系統環境:Arch Linux latest, gcc 10.1.0

 

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85678

eliu

joined: 2007-08-09
posted: 11478
promoted: 617
bookmarked: 187
新竹, 台灣
2subject: Promote 0 Bookmark 02020-05-15quote  

試試看 剛剛 release 的 2.9.0 是否有解決問題。

yan12125
joined: 2018-10-05
posted: 7
promoted:
bookmarked:
3subject: Promote 0 Bookmark 02020-05-17quote  

用GCC 10編譯沒問題了,非常感謝!

cht電腦資訊gcin
adm Find login register
views:7118