Ticket #5 (closed feature request: invalid)
OSX - unwind_resume link error
Reported by: | kyngchaos | Owned by: | anton |
---|---|---|---|
Priority: | minor | Milestone: | Version 1.1 |
Component: | pgRouting package | Version: | |
Keywords: | Cc: |
Description
When compiling pgrouting on OSX 10.4 (Xcode 2.4), there is a missing symbol error for unwind_resume. This is a common problem on OSX with Xcode 2.2+ when linking C++ software with gcc instead of g++ (there was a similar problem in MapServer). Linking -lsdtc++ is not enough, and using g++ is needed.
This one is tricky to handle in Postgres, since the link command is set by the Postgres pgxs. I was able to get around it by adding this line after the include $(PGXS) line in the makefile (mirroring what is set in pgxs.mk for Darwin):
LINK.shared = g++ -bundle -multiply_defined suppress
and removing -lstdc++ from SHLIB_LINK.
I don't know how else to handle this (I tend to do brute-force hacks). The change happened in Xcode 2.2, though the GC version did not change (4.0.1 I think).