Skip to content

Static linking error in RHEL9.x #60

@n-isaka

Description

@n-isaka

#59 の内容に関して、RHEL9.xで静的リンクに関するテストがエラーになっていました。
gccのバージョンに依存する問題と考えられ、cob_funcの重複定義が問題となっています。詳細なエラーは末尾に示します。
テストはオプション-z muldefsを付けることで一旦OKにしていますが、cobcでの解決を今後検討します。


Regarding #59, tests related to static linking failed in RHEL9.x.
This appears to be a problem related to the version of gcc, and the duplicate definition of cob_func is causing the issue. Details of the error are shown at the end.

The details of the cobc renovation will be considered in the future.


gcc -pipe  -Wl,--export-dynamic -o prog caller.o callee.o  -L/usr/local/lib -lcob -lm -lvbisam -lgmp -lncurses
/usr/bin/ld: callee.o:(.bss+0x0): multiple definition of `cob_unifunc'; caller.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions