Opened 4 years ago
Closed 3 years ago
#1090 closed defect (fixed)
Link failure with -arch arm64: duplicate symbols
Reported by: | Dave Allured | Owned by: | strk |
---|---|---|---|
Priority: | major | Milestone: | 3.9.2 |
Component: | Core | Version: | 3.9.0 |
Severity: | Significant | Keywords: | |
Cc: |
Description
Affects MacOS builds for Apple Silicon (arm64) under the Macports build system. Geos versions tested: 3.8.1, 3.9.0. C++ files compile normally, then errors when linking libgeos-3.9.0.dylib
.
duplicate symbol 'vtable for geos::noding::BasicSegmentString' in: .libs/inlines.o noding/.libs/libnoding.a(BasicSegmentString.o) duplicate symbol 'typeinfo name for geos::noding::BasicSegmentString' in: .libs/inlines.o noding/.libs/libnoding.a(BasicSegmentString.o) duplicate symbol 'typeinfo for geos::noding::BasicSegmentString' in: .libs/inlines.o noding/.libs/libnoding.a(BasicSegmentString.o) ld: 3 duplicate symbols for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Offending link command, word wrapped for readability:
libtool: link: /usr/bin/clang++ -dynamiclib\\ -o .libs/libgeos-3.9.0.dylib\\ .libs/inlines.o\\ -Wl,-force_load,algorithm/.libs/libalgorithm.a\\ -Wl,-force_load,edgegraph/.libs/libedgegraph.a\\ -Wl,-force_load,geom/.libs/libgeom.a\\ -Wl,-force_load,geomgraph/.libs/libgeomgraph.a\\ -Wl,-force_load,index/.libs/libindex.a\\ -Wl,-force_load,io/.libs/libio.a\\ -Wl,-force_load,linearref/.libs/liblinearref.a\\ -Wl,-force_load,math/.libs/libmath.a\\ -Wl,-force_load,noding/.libs/libnoding.a\\ -Wl,-force_load,operation/.libs/liboperation.a\\ -Wl,-force_load,planargraph/.libs/libplanargraph.a\\ -Wl,-force_load,precision/.libs/libprecision.a\\ -Wl,-force_load,simplify/.libs/libsimplify.a\\ -Wl,-force_load,triangulate/.libs/libtriangulate.a\\ -Wl,-force_load,shape/.libs/libshape.a\\ -Wl,-force_load,util/.libs/libutil.a\\ -L/opt/local/lib\\ -Os -arch arm64\\ -Wl,-headerpad_max_install_names\\ -Wl,-syslibroot\\ -Wl,/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk\\ -arch arm64\\ -install_name /opt/local/lib/libgeos-3.9.0.dylib\\ -Wl,-single_module
Latest build environment:
Date: Dec 16 2020 OS: macOS 11.0 (darwin/20.1.0) build system type... arm-apple-darwin20.1.0 host system type... arm-apple-darwin20.1.0 target system type... arm-apple-darwin20.1.0 GEOS version... "3.9.0" GEOS CAPI version... "1.16.2" GEOS_INLINE: Is defined Compiler: Xcode Clang (Apple) Xcode version: 12.2 Build type: Autotools
Full build log is available from Macports buildbot results, under 2.1 "stdio": https://build.macports.org/builders/ports-11_arm64-builder/builds/5555
Change History (10)
comment:1 by , 4 years ago
Component: | Build/Install → Core |
---|
comment:2 by , 4 years ago
comment:3 by , 4 years ago
Related tickets:
#1019 -- closed defect (wontfix) -- Rasberry Pi 32-bit errors autotools
#993 -- new defect -- Build failure for 3.8.0rc2 on 32 bit raspberry pi
- BasicSegmentString
- Also includes same reports, same symbols, for mingw, both 64-bit and 32-bit
- Includes workaround: -DDISABLE_GEOS_INLINE=ON
comment:4 by , 4 years ago
Here is a partial fix in an unofficial clone: https://github.com/libgeos/geos/pull/365
comment:5 by , 4 years ago
It looks like that unofficial fix disables inlining. Can this problem be resolveded in a way that preserves inlining for -arch arm64
?
comment:6 by , 3 years ago
comment:7 by , 3 years ago
Milestone: | 3.9.1 → 3.9.2 |
---|
comment:9 by , 3 years ago
Can you try the master branch and see if the removal of inlines.cpp fixes your issue?
comment:10 by , 3 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Closing on no response for now.
Downstream issue on Macports: https://trac.macports.org/ticket/61821