Opened 3 years ago

Last modified 3 years ago

#63744 assigned defect

zstd: link failure on 10.4 PPC: common symbols not allowed with MH_DYLIB output format with the -multi_module option

Reported by: mascguy (Christopher Nielsen) Owned by: mascguy (Christopher Nielsen)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: kencu (Ken), evanmiller (Evan Miller)
Port: zstd

Description

I'm seeing the following link error, when attempting to install this port on 10.4 PPC:

:info:build /usr/bin/ld: common symbols not allowed with MH_DYLIB output format with the -multi_module option
:info:build obj/conf_bf5285a93c681430f8fd86e69930a4b6/dynamic/threading.o private external definition of common _g_ZSTD_threading_useless_symbol (size 4)
:info:build collect2: ld returned 1 exit status
:info:build gmake[2]: *** [Makefile:294: obj/conf_bf5285a93c681430f8fd86e69930a4b6/dynamic/libzstd.1.5.0.dylib] Error 1
:info:build gmake[1]: *** [Makefile:281: libzstd.1.5.0.dylib] Error 2

Reviewed similar tickets with this issue, and there didn't seem to be (?) one right answer/solution.

10.4 aficionados, do you have an easy fix?

Attachments (1)

zstd-build-failure-10.4.log.xz (5.1 KB) - added by mascguy (Christopher Nielsen) 3 years ago.

Download all attachments as: .zip

Change History (5)

Changed 3 years ago by mascguy (Christopher Nielsen)

comment:1 Changed 3 years ago by evanmiller (Evan Miller)

I would suggest installing a newer linker (ld64). I have zstd @1.5.0_0 installed here just fine.

comment:2 Changed 3 years ago by jmroot (Joshua Root)

TBH the preferable solution is to compile with -fno-common and fix the code to work that way. That's the default with newer compilers, few people understand what common linkage does, and it's very rare that you actually need it.

comment:3 Changed 3 years ago by jmroot (Joshua Root)

:info:build compress/zstd_ldm_geartab.h:15: warning: integer constant is too large for 'long' type

Those warnings are also likely to be unsafe to ignore.

Version 0, edited 3 years ago by jmroot (Joshua Root) (next)

comment:4 in reply to:  3 Changed 3 years ago by mascguy (Christopher Nielsen)

Replying to jmroot:

:info:build compress/zstd_ldm_geartab.h:15: warning: integer constant is too large for 'long' type

Those warnings are also likely to be unsafe to ignore. Building with -std=c99 might help.

Agreed, those caused some serious tingling of my Spidey Sense, too. I'll take a look, as part of the overall effort.

Note: See TracTickets for help on using tickets.