从 Raspbian buster 更新到 Raspbian bullseye 导致 OpenSSL 中出现定义错误。为什么?

Updating from Raspbian buster to Raspbian bullseye is causing definition errors in OpenSSL. Why?

我有两个 Raspberry Pi(型号 3b)运行 Raspbian。其中一个在 Buster 上,一个在 Bullseye 上。

我有一个使用 lcrypto 和 lssl 编译器标志并使用 openssl/bio.h 的小型软件项目(根据我没有安装它时收到的错误警告判断)。

在 Raspbian Buster 上,软件可以正常编译和运行。

然而,当我将机器更新为 Raspbian Bullseye 时,我不断得到:

/usr/bin/ld: /tmp/(bunch of letters).o(.bss+0x0): multiple definition of 'bio_err'; /tmp/(bunch of letters).o(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status

(“字母串”部分看起来像“cctQpGnH”或“ccxvj07F”,每次我尝试编译软件时都会更改。)

这在我更新的机器和我安装了新的 Bullseye 图像的机器上都会发生。

任何人都可以阐明这一点或提出可能的解决方案吗?

再次说明相关要点:

提前致谢。

Craig Estey 的上述评论提供了解决方案。添加标志:

-fcommon

我的 makefile 中的说明解决了这个问题。

正如他所指出的,这似乎是不同版本之间 gcc 的默认标志发生了变化。