Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json-c's libjson.so library conflicts with other json libraries #5

Closed
hawicz opened this issue Oct 13, 2011 · 3 comments
Closed

json-c's libjson.so library conflicts with other json libraries #5

hawicz opened this issue Oct 13, 2011 · 3 comments

Comments

@hawicz
Copy link
Member

hawicz commented Oct 13, 2011

The use of "libjson.so" (and symlinks libjson.so.0, etc...) for the json-c library can lead to conflicts because other people have used the same, rather generic name for their libraries.
The solution for this is fairly obvious, rename it to something like libjson-c.so.
In addition to renaming the library we probably want to rename the include directory:
include/json/json.h ==> include/json-c/json.h

Of course, there still might be conflicts if you try to use two json libraries in the same program, but that's a considerably more difficult fix.

@kdopen
Copy link
Contributor

kdopen commented Apr 4, 2012

Eric,

My pull request on this issue (which implements what you've suggested above) is not urgent ... I can see that it will potentially have significant impact on existing users. But I think this issue needs to be addressed one way or another, and doing so will benefit json-c in the long run, so perhaps the hit needs to be taken sooner rather than later.

I don't know autotools very well (yet), but is it possible to handle this change another way? I'm looking into it, but maybe you (or someone else on this list) may know the answer.

Can we set it up so that a parameter can be specified to autoconf (or better yet configure) such as

./configure --JSON_NAME=myjson --JSON_INCLUDE=myjsoninc

With JSON_INCLUDE defaulting to the same as JSON_NAME, and JSON_NAME defaulting to "json". Then, if desired, I could build json-c as

./configure --JSON_NAME=json-c

or even

./configure --JSON_NAME=cjson

(which is what it's currently called in our system)

From what I've seen so far, I suspect the parameterization will have to happen at the autoconf level - i.e be some magic in "configure.in"

Keith

@hawicz
Copy link
Member Author

hawicz commented Apr 4, 2012

Actually, I was thinking that, for at least one release, we would build both a library called libjson.so and one called libjson-c.so, to give people time to migrate over to the new name. On the unix side, this should be pretty easy: just create a few symlinks. The tricky part is going to be setting this up so it works on windows too.

Setting up a configure parameter to change the name seems like it'll lead to all sorts of confusion if people use different names in different places so I'd prefer to avoid doing that.

@kdopen
Copy link
Contributor

kdopen commented Apr 4, 2012

Fair enough ... I'm happy with the change over to json-c as the name. For me that means I've got to modify upwards of 25 components ... plus peer review, change control board , ..... the usual. But it's the right thing to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants