[ 
https://issues.apache.org/jira/browse/AVRO-1358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13851947#comment-13851947
 ] 

Hudson commented on AVRO-1358:
------------------------------

ABORTED: Integrated in AvroJava #411 (See 
[https://builds.apache.org/job/AvroJava/411/])
AVRO-1358. C: Hide symbols that aren't part of the public API.

Right now we're doing this via GCC visibility pragmas.  The only symbols that
should be exported by libavro.so begin with `avro_` or `AVRO_`. (dcreager: rev 
1551936)
* /avro/trunk/CHANGES.txt
* /avro/trunk/lang/c/jansson/src/hashtable.h
* /avro/trunk/lang/c/jansson/src/jansson.h
* /avro/trunk/lang/c/jansson/src/jansson_private.h
* /avro/trunk/lang/c/jansson/src/strbuffer.h
* /avro/trunk/lang/c/jansson/src/utf.h
* /avro/trunk/lang/c/src/dump.h
* /avro/trunk/lang/c/src/st.h


> internal version of jansson exports the jansson symbols which collide with 
> json-c and jansson libraries
> -------------------------------------------------------------------------------------------------------
>
>                 Key: AVRO-1358
>                 URL: https://issues.apache.org/jira/browse/AVRO-1358
>             Project: Avro
>          Issue Type: Bug
>          Components: c
>    Affects Versions: 1.7.4
>         Environment: linux
>            Reporter: External Builds
>             Fix For: 1.7.6
>
>         Attachments: 0001-Hide-Jansson-symbols-in-Avro-library.patch
>
>
> The 1.7.x version of AVRO includes an "internal" copy of jansson library, but 
> it also exports all of the jansson symbols which will collide with other 
> libraries. The symbol 'json_object_get' will collide with the json-c library 
> and all of the 'json_*' symbols collide with the external jansson library.
> If you don't want to have an external dependency on 'jansson' then it seems 
> that the symbols will need to have a hidden visibility or some other 
> mechanism to keep them from being exported with the AVRO library.
> As a temporary solution we have wrapped the internal jansson functions with 
> this so they are hidden:
> #pragma GCC visibility push(hidden)
> json_function()
> #pragma GCC visibility pop
> Many other solutions exist. I don't see that having an external dependency is 
> such a drawback, as many other open source packages have dependencies on 
> other open source packages, but any solution would be appreciated.
> Thanks!



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Reply via email to