GithubHelp home page GithubHelp logo

Comments (7)

xbjfk avatar xbjfk commented on July 19, 2024 1

Hello,
Thanks for your response

I think that the best way forward is not to check for every libc, but check only for glibc. This is because:

  • It seems that the only prebuilt binary releases for linux are using glibc.
  • If the user/distro builds with another libc, it falls on the user to ensure they follow the license of the libc.
  • Musl upstream is MIT licensed, and they are specifically against adding a __MUSL__ macro

(Obligatory I am not a lawyer and this is not legal advice)

from openseachest.

vonericsen avatar vonericsen commented on July 19, 2024 1

Hi @xbjfk,

That seems like a good reason to only check glibc. I have seen the musl macro discussions in the past, so it was going to be some kind of #if glibc ... #else... approach anyways. I was searching to see if there were any other likely libc's that would be encountered...it looks like it is not likely that anything else will come up...and if it does, that can be a new issue ๐Ÿ˜„

When the linux macro check was first added, it was because one of our customers used the strings tool to search for lgpl and gpl and were not wanting to find those licenses anywhere in the FreeBSD build, so the solution will likely keep the Linux macro for now and add a second layer below for detecting libs to preserve this functionality so that the MIT license isn't shown when it isn't used in one of the other OSs that openSeaChest supports.

Something like:

#if defined (__linux__)
     #if defined (__glibc__)
           //show lgpl
     #else      
          //show mit for musl
     #endif     
#endif

I'm also considering a way to add a preproccessor definition, such as LIBC_MIT or LIBC_LGPL to force a specific license to allow for setting the correct license in other odd builds where autodetect looks off.

I'm happy to hear other ideas, but want to make sure that the licenses shown in each build of openSeaChest is reasonably accurate. I have a contact in Seagate I can verify legal questions with if I need to since I'm not a legal expert either ๐Ÿ˜„

from openseachest.

xbjfk avatar xbjfk commented on July 19, 2024 1

I personally do not think that assuming that non-glibc linux systems are using musl. I'd say just to print nothing if compiled with linux but not glibc, because the binary releases are using glibc, and I do think that it is the responsibility of the person compiling the code to ensure they fall under the libc's license

from openseachest.

vonericsen avatar vonericsen commented on July 19, 2024 1

Hi @xbjfk,

I did some testing of the commit I pushed yesterday in a few machines that I have and an Alpine linux docker container and it works.
A preprocessor flag can be added to the makefile for musl (-DUSING_MUSL_LIBC), but others are not defined at this time. Other libc support can be added in the future as needed.

Let me know if this solves this, or if you think I need to tweak it some more first.

from openseachest.

vonericsen avatar vonericsen commented on July 19, 2024 1

Excellent ๐Ÿ˜„

I merged it into our develop branch this morning.
The last thing I added yesterday allows for making this even easier:
make release USING_MUSL=1

from openseachest.

vonericsen avatar vonericsen commented on July 19, 2024

Hi @xbjfk,
Thanks for creating this issue. I've been meaning to update and investigate compiling with musl for a while now.

Using the glibc macro seems reasonable. I will do some additional research and see what looks like the best solution since the tool should display the MIT license for musl when it is used instead of glibc.

from openseachest.

xbjfk avatar xbjfk commented on July 19, 2024

I think is the best solution, Thank you!

from openseachest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.