注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

勇敢的劳尤条

 
 
 

日志

 
 

为什么mysql的授权是GPL,而mysql++为何是LGPL?  

2014-02-19 14:54:05|  分类: mysql相关 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

众所周知,mysql是著名的开源数据库,授权是GPL,同时它提供了客户端API,在库libmysqlclien-dev里面,这里包含了mysql操作的C API,都是GPL的。

而mysql++是mysql C API的封装,在官网有说明,它以LGPL许可发布。


在这里不免产生一个疑问,mysql是GPL的,而mysql++显然链接到libmysqlclien.a,为什么还能以LGPL发布呢?

下面的问题来自于参考资料的《疑问来源》。


MySQL++ is licensed though LGPL, that means that I could release an executable dynamically linked against it without worrying about the source code not being GPL. But, MySQL++ DOES link against libmysqlclient{_r}.{a,so} ( http://tangentsoft.net/mysql++/#linkerrors ) which is GPLed.
As seen as then MySQL++ is technically just a 'wrapper' (btw a very well implemented wrapper, don't get me wrong) towards the GPLed libmysqlclient{_r}.{a,so}, if I link against MySQL++ is like linking against libmysqlclient{_r}.{a,so} ?
If this is the case, then the purpose of MySQL++ being LGPLed is pointless as seen as then any executable dynamically linking against it MUST be then linked against libmysqlclient{_r}.{a,so} as well.

大意:mysql++以LGPL发布,mysql++链接到了以GPL发布的libmysqlclient{_r}.{a,so},如果我链接mysql++,那么必然也链接了libmysqlclient{_r}.{a,so},那么mysql++以LGPL发布,是不是没有意义了呢?


I believe that you are correct in concluding that linking against LGPL library A which itself links against GPL library B is the same as linking against a GPL library, and so requires your program to be under the GPL.

So I would agree that libmysql++ being LGPL is pretty pointless, but I think it may be that way because older versions of the MySQL client libraries used to be LGPL. (They're all full-GPL now, though, as you noticed)

大意:楼上认为,LGPL的A链接到了GPL的B,会被传染为GPL,所以整个都必须是GPL的。而mysql++以LGPL发布,是因为以前的mysql client libraries曾经是LGPL的。

Well the GPL client is the 4.0 client. The 3.23 client is still LGPL. 


还有另一观点

Think of MySQL++ the same way you'd think of glibc or libstdc++ on a Linux system. You can build programs that link against these libraries dynamically without forcing them to use the LGPL. Only linking statically triggers the "viral" aspects of the LGPL. 

大意:mysql++相当于glibc,而mysql相当于内核。glibc是LGPL发布的。

【参考资料】

http://www.mysql.com/

http://tangentsoft.net/mysql++/#linkerrors

http://yuanshuilee.blog.163.com/blog/static/217697275201391482712233/

http://stackoverflow.com/questions/1260591/about-mysql-gpl-and-lgpl 《疑问来源》

http://osdir.com/ml/db.mysql.c++/2007-08/msg00026.html (另一观点)

http://lists.mysql.com/plusplus?date=2011-09 (mail list)



  评论这张
 
阅读(332)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017