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

add clips_vendor to index of current distros #43450

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TarikViehmann
Copy link

Please Add This Package to be indexed in the rosdistro.

humble jazzy and rolling

The source is here:

https://github.com/carologistics/clips_vendor

Checks

  • [] All packages have a declared license in the package.xml
  • [] This repository has a LICENSE file
  • [] This package is expected to build on the submitted rosdistro

Explanation

I would like to vendor CLIPS (https://clipsrules.net/) as a preparation for releasing a high-level knowledge-based reasoning framework the CLIPS-Executive for ROS 2 using it. We have been using CLIPS for many years now, but never went through with actually making it available to the ROS ecosystem, which I now want to correct.

A very old version of CLIPS is available in Ubuntu already (https://packages.ubuntu.com/noble/clips) (Version 6.30-4.1build1) as well as on fedora (https://packages.fedoraproject.org/pkgs/clips/clips/) with version 6.31-10.
However, Version 6.4x has been around for years now, offering a more modern API and version 7 is currently being developed as well.

Packaging CLIPS is a bit of a hassle as it is plain C code and makefiles (and the build system in general is minimalistic, not compiling shared libraries).
The packaged versions for Ubuntu and Fedora use plain makefiles and provide pkg-config files for projects.

To make it broadly available in the ROS ecosystem I instead wrote a new CMake based buildsys that is used by the proposed clips_vendor package, which allows for a way easier integration with other ROS projects and offers some additional QoL things such as optionally building the java-based examples and IDE.

The vendor package exposes 3 ways of leveraging CLIPS, as plain C library, as C++ library or as C++ library with added namespaces (by automatically wrapping every code block with a namespace). The latter variant is what I would recommend for usage to minimize the amount of unintentional interference with other libraries (which is sadly still unavoidable to some extend due to the large number of preprocessor macros used throughout CLIPS).

The package is building fine on Ubuntu and Fedora (tested on humble and jazzy and saw no breaking changes in rolling), I have no Windows setup to test it on at the moment, but CLIPS itself is compatible with Windows and therefore I only expect some tweaking to be necessary (if at all) to make it available on Windows.

There will be two warnings when building (and I already oppressed many more):

/home/tviehmann/ros2/clips_ws/build/clips_vendor/clips_vendor-prefix/src/clips_vendor/core/textpro.c:714:25: warning: invalid conversion from ‘void*’ to ‘char*’ [-fpermissive]
  714 |     theString = genalloc(theEnv,length+1);
      |                 ~~~~~~~~^~~~~~~~~~~~~~~~~
      |                         |
      |                         void*
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-invalid-cast’ may have been intended to silence earlier diagnostics
/home/tviehmann/ros2/clips_ws/build/clips_vendor/clips_vendor-prefix/src/clips_vendor-build/ns_core/textpro.c: In function ‘clips::TextProError clips::ParseLine(Environment*, const char*, int*, char*, char**)’:
/home/tviehmann/ros2/clips_ws/build/clips_vendor/clips_vendor-prefix/src/clips_vendor-build/ns_core/textpro.c:723:25: warning: invalid conversion from ‘void*’ to ‘char*’ [-fpermissive]
  723 |     theString = genalloc(theEnv,length+1);
      |                 ~~~~~~~~^~~~~~~~~~~~~~~~~
      |                         |
      |                         void*

I could patch them out in principle, but for maintainability I so far tried to stay away from patching individual things in CLIPS (I am not the maintainer of CLIPS, just an enthusiastic user).

Once the package is indexed I intend to start the release procedure, following the documentation of releasing a package.
So feedback is very welcome :)

@github-actions github-actions bot added humble Issue/PR is for the ROS 2 Humble distribution jazzy Issue/PR is for the ROS 2 Jazzy distribution rolling Issue/PR is for the ROS 2 Rolling distribution labels Nov 11, 2024
@christophebedard
Copy link
Member

Can you point to a license file for CLIPS? I see this on the website (https://clipsrules.net/):

Since 1996, CLIPS has been available as public domain software.

but I can't find a license file here: https://svn.code.sf.net/p/clipsrules/code/branches/64x (or by searching the files after cloning it locally using git svn clone https://svn.code.sf.net/p/clipsrules/code/branches/64x).

@christophebedard christophebedard added the more information needed Maintainers have asked for additional information label Nov 11, 2024
@TarikViehmann
Copy link
Author

TarikViehmann commented Nov 12, 2024

The license is documented in the basic programming guide https://clipsrules.net/documentation/v641/bpg641.pdf

Edit: Looking at it again, it seems a bit ambiguous. Sourceforge lists it as public domain on the project page: https://sourceforge.net/projects/clipsrules/

All documentation pdfs lists the MIT-O as follows (which is also the license I use in the vendor package):

MIT No Attribution
Copyright 2023 Secret Society Software, LLC
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do
so.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

I can also reach out to the author of CLIPS to clear this up, if needed.

@wjwwood
Copy link
Member

wjwwood commented Nov 12, 2024

general comment: I think the license of the vendor package doesn't need to match that of the vendor, but I could be wrong

Maybe @nuclearsandwich or @cottsay can say what we do in most of our vendor packages.

@christophebedard
Copy link
Member

It would be a lot cleaner if we had a definitive license/statement we could point to, but maybe others think this is enough.

general comment: I think the license of the vendor package doesn't need to match that of the vendor, but I could be wrong

I think we usually have both the license of the vendored software and the license of the vendor package itself (e.g., Apache 2.0) in the vendor package's package.xml. Some examples:

@TarikViehmann
Copy link
Author

TarikViehmann commented Nov 13, 2024

I think we usually have both the license of the vendored software and the license of the vendor package itself (e.g., Apache 2.0) in the vendor package's package.xml. Some examples:

ah nice, I was not aware of that! I would like to keep the vendor package under MIT-O aswell, but should probably at least add a comment in the package.xml file to reflect that it applies to both the vendor and the vendored software.

I also contacted the software author to request adding a LICENSE file (and if possible, update the license tag in sourceforge):

https://sourceforge.net/p/clipsrules/discussion/776945/thread/f3176d3efe/

TarikViehmann added a commit to carologistics/clips_vendor that referenced this pull request Nov 13, 2024
@TarikViehmann
Copy link
Author

Per the author, the license is now part of the source code https://sourceforge.net/p/clipsrules/discussion/776945/thread/f3176d3efe/#e913
I updated the vendor package to fetch the latest version to reflect that and distinguished between vendor and source package license via a comment:
https://github.com/carologistics/clips_vendor/blob/edd029d04e7753589e082aa40f240df58732abfa/package.xml#L8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
humble Issue/PR is for the ROS 2 Humble distribution jazzy Issue/PR is for the ROS 2 Jazzy distribution more information needed Maintainers have asked for additional information rolling Issue/PR is for the ROS 2 Rolling distribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants