cocoapods-static-frameworks icon indicating copy to clipboard operation
cocoapods-static-frameworks copied to clipboard

UIWebView-Markdown pod issue `duplicate symbol _find_block_tag`

Open fabb opened this issue 8 years ago • 7 comments

With the UIWebView-Markdown pod I get a linker error duplicate symbol _find_block_tag. find_block_tag is a C method from sundown pod which is a dependency of UIWebView-Markdown.

fabb avatar Oct 05 '17 08:10 fabb

Could you share your Podfile? I'm afraid I can't reproduce that behaviour.

b-ray avatar Oct 05 '17 18:10 b-ray

I could not yet reproduce it in a new project, but I let you know if I find something out. This warning happens in a simple new project too though:

/Users/fabian/dev/TestProjects/StaticSunDown/Pods/sundown/src/html_blocks.h:201:74: warning: static function 'gperf_case_strncmp' is used in an inline function with external linkage [-Wstatic-in-inline]
          if ((((unsigned char)*str ^ (unsigned char)*s) & ~32) == 0 && !gperf_case_strncmp (str, s, len) && s[len] == '\0')
                                                                         ^
[..]/Pods/sundown/src/html_blocks.h:138:1: note: use 'static' to give inline function 'find_block_tag' internal linkage
__inline
^
static 
[..]/Pods/sundown/src/html_blocks.h:62:1: note: 'gperf_case_strncmp' declared here
gperf_case_strncmp (s1, s2, n)
^

fabb avatar Oct 09 '17 08:10 fabb

Found it, compilation fails when I set OTHER_LDFLAGS = -Objc -all_load ${inherited} in the build settings of my main project.

fabb avatar Oct 09 '17 08:10 fabb

@b-ray any idea what the issue could be? Could you reproduce it in a project? I created a bug for the compiler warning, but no response so far: https://github.com/Huddle/UIWebView-Markdown/issues/2

fabb avatar Nov 14 '17 07:11 fabb

@fabb I did not, please share a project with me, so that I can reproduce your issue.

b-ray avatar Nov 26 '17 12:11 b-ray

Here is an example repo: https://github.com/fabb/StaticSunDown

fabb avatar Nov 27 '17 09:11 fabb

@b-ray looks like the issue is in sundown exposing private headers which results in duplicate symbols as the lib is included in the UIWebView-Markdown lib. I could fix it via https://github.com/Daij-Djan/sundown/pull/1, but it needs an update from both authors. strange that the issue does not happen with dynamic frameworks.

fabb avatar Dec 01 '17 11:12 fabb