#67486 closed defect (fixed)
bc: link fails for 10.6: duplicate symbol _edit in bc.o and main.o
Reported by: | mascguy (Christopher Nielsen) | Owned by: | mascguy (Christopher Nielsen) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | snowleopard | Cc: | MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) |
Port: | bc |
Description
After updating bc
to add a build dep against texinfo
- needed for Ventura - builds for 10.6 are failing with a link error:
ld: duplicate symbol _edit in bc.o and main.o for architecture i386
Presumably texinfo
isn't the culprit, since there isn't any linkage to it.
Could this be due to libedit
, or...?
Change History (8)
comment:1 follow-up: 3 Changed 18 months ago by mascguy (Christopher Nielsen)
comment:2 Changed 14 months ago by Christopher Nielsen <mascguy@…>
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 Changed 14 months ago by mascguy (Christopher Nielsen)
Replying to mascguy:
Not surprisingly, installing either without
+libedit
- or using+readline
- works fine. It's only the former that's now problematic.
Took a few minutes to look at upstream's configure script, etc - along with perusing the various sources and headers (both for bc
, as well as libedit
) - and it's not immediately obvious where public symbol _edit
is coming from. But it's definitely an issue, as it exists in every bc
object file.
So for now, let's fallback to +readline
for 10.6 and earlier.
comment:4 follow-up: 5 Changed 14 months ago by jmroot (Joshua Root)
The edit
variable is defined (not declared) in global.h
, so every file that includes it will have its own definition. The definition should probably be moved to global.c
and extern declarations put in global.h
.
comment:5 Changed 14 months ago by mascguy (Christopher Nielsen)
Replying to jmroot:
The
edit
variable is defined (not declared) inglobal.h
, so every file that includes it will have its own definition. The definition should probably be moved toglobal.c
and extern declarations put inglobal.h
.
While that makes sense, why does linking only fail on 10.6?
comment:6 Changed 14 months ago by jmroot (Joshua Root)
Different compiler, so possibly different defaults for common linkage.
Not surprisingly, installing either without
+libedit
- or using+readline
- works fine. It's only the former that's now problematic.