octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding external libraries to Octave


From: Kai Torben Ohlhus
Subject: Re: Adding external libraries to Octave
Date: Wed, 13 May 2020 22:10:09 +0900
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

On 5/13/20 2:12 AM, John W. Eaton wrote:
> On 5/12/20 12:08 PM, Abdallah Elshamy wrote:
>> Dear All,
>>
>> My GSoC project [1] requires the external library RapidJSON [2] which
>> is a header-only library. So, I was searching about how to add
>> libraries to Octave. I think that one way to do this is to put the
>> library in a suitable place inside "liboctave" folder and modifying
>> and/or creating the required "module.mk <http://module.mk>" files. Am
>> I on the right track here? Please let me know.
>>
>> Another option that was suggested by my mentor (Mr. Kai Torben Ohlhus)
>> is to modify the "bootstrap" script so that it fetches the latest
>> version of the library online and integrates it during building.
>>
>> I would like to know your evaluation of both methods and if you have
>> any suitable alternatives.
>>
>> Thanks for your time,
>> Abdallah
>>
>>
> 
> It looks like rapidjson is packaged for Debian (for example) so why not
> just check for it like other dependencies?  If it is not installed, then
> the user should do that first, before building.  Same as for other
> dependencies.
> 
> I don't think we should be distributing the header files as part of
> Octave, so there should be no reason to add it to the liboctave directory.
> 
> jwe


My suggestion was inspired by Andy's "octave-rapidjson" [3] which pulls
a certain git commit of RapidJSON like a charm before building the package.

You are right jwe, when I add the RapidJSON dependency into bootstrap,
we have to distribute it unnecessarily with each Octave release tarball,
as bootstrap is not available there.

Luckily, RapidJSON seemed to be quite matured.  The latest official
release 1.1.0 from 2016 is packaged in all Linux distributions I care
about [4,5,6].  Only some recently fixed bugs might be missing, but that
is an upstream problem.  Probably it is better to check for this
dependency, as for any other and to extend configure.ac.

Kai


[1] https://summerofcode.withgoogle.com/projects/#6263027378159616
[2] https://rapidjson.org/
[3] https://github.com/Andy1978/octave-rapidjson
[4] https://packages.debian.org/search?keywords=rapidjson
[5] https://software.opensuse.org/package/rapidjson
[6]
https://centos.pkgs.org/7/epel-x86_64/rapidjson-devel-1.1.0-2.el7.noarch.rpm.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]