如何更改 autogen.sh 的 CFLAGS

如何更改 autogen.sh 的 CFLAGS

我對 Linux 比較陌生。

我試圖從 url 重建適用於 Linux mint 的 MDM 顯示管理器 https://github.com/linuxmint/mdm

在文檔中據說你應該使用

./autogen.sh --enable-ipv6=yes --with-prefetch 

如果我這樣做並進行 make 我會收到此錯誤

mdm-daemon-config.c:1818:4: 錯誤:格式不是字串文字,也沒有格式參數 [-Werror=format-security]

gchar *s = g_strdup_printf (C_(N_("MDM "

^

然後我在某處讀到 ubuntu 將此視為錯誤。我嘗試過

./autogen.sh --enable-ipv6=yes --with-prefetch CFLAGS="-Wno-format-security"

我擺脫了這個警告,但又出現了另一個錯誤:

mdm-daemon-config.c:2003:1: 錯誤:「mdm_daemon_load_config_file」沒有先前的原型 [-Werror=missing-prototypes] mdm_daemon_load_config_file (MdmConfig **load_config) ^

然後我嘗試了

./autogen.sh --enable-ipv6=yes --with-prefetch CFLAGS="-Wno-format-security -Wno-missing-prototypes"

但這也沒有幫助。當我執行 a 時,make我看到 gcc 正在使用(除其他外,只是複製了有趣的部分)

-Wno-missing-prototypes -Wall -Wstrict-prototypes -Wnested-externs -Werror=missing-prototypes

所以它同時使用 -Wno-missing-prototypes 和 -Werror=missing-prototypes 這可能是導致其故障的原因。

相關內容