This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Dumb idea for accelerating FOSS development


On 12/01/2011 12:07, Bill Cox wrote:
First, the problem:  I've got a C library I want to share.  There are
many users who want to use it.  This should be as easy as breathing,
but it's not!

My users and I face what I'm calling "GNU/Linux Innovation Red Tape".
This library is two files: sonic.c and sonic.h.  To share it in
Debian, first, I had to learn how to make a clean Debian package.
Something like 30 files are involved, and in my case a few days of
learning and laboring.  Next, I have to grovel on the debian-mentor's
list, and pray that Debian Sponsor Gods will take pity on me.  No
response from the Sponsor Gods so far...  maybe I'll have more luck
after they've finished the current release.  Shouldn't we be ashamed
that getting a package into Debian is harder than publishing an app
for iPhones?  Assuming I find a Debian sponsor, my package will be
uploaded to Unstable, then Testing, and after a few years, Stable.

Guess where my package has to be before my users are willing to link
to it?  Debian Stable.  We're hosed.  There's just no freaking way for
my users to use my library.  You know what they do?  Every one of them
bypasses the Innovation Red Tape, and simply copies my source code
directly into their application.  How's that as a reuse paradigm?

My dumb idea for today is a way to break through this red tape.
Unfortunately, while I could implement this idea in a few days, the
red tape would keep it in limbo so long that I'll likely die of old
age before it gets into Debian Stable.  Oh, well... here's the dumb
idea anyway...  In short, support a syntax in gcc like:

$ gcc myprog.c -lgit://github/~waywardgeek/sonic=0.1

In theory, this would cause gcc to do the following:

     - Check and see if the requested library has already been
downloaded and built, and still in the cache
     - If not, download the latest compatible signed version, verify
the signature, and compile it
     - link to the library in the cache

A feature like this would make sharing C libraries as easy as
breathing.  My users wouldn't even have to 'apt-get install
libsonic0-dev'.  They would stop copying my source code, and just link
to my library.  Sharing of C libraries in FOSS land might increase
dramatically.  The year of GNU/Linux on the desktop would finally
come, and we'd all march off to Paradise as heroes.  Or not.

Anyway, just my dumb idea for the day... If through some miracle this
particular dumb idea appeals to the GCC Gods, I volunteer to write it.

Bill


I can see the point of your idea, but I think it's too limited, and gcc is the wrong place to put it.


Are you familiar with Python? Python has a system called "easy_install", which lets you easy download libraries or packages for Python (as Python is interpreted, there is no distinction between development libraries and runtime libraries). If your package were a python library, you would publish it in at one of the commonly used Python package library sites, and users could then type "easy_install sonic" and use your library.

I believe Perl has a similar idea, as does (La)TeX.

The reason I think gcc is the wrong place for such a feature, is that there are many parts to a library. Most importantly, there is the headers, the source files, the configuration files, the documentation, the static libraries, and the dynamic libraries. Many of these parts need to be installed before getting as far as the gcc command line.

Secondly, git is just one of many ways to get hold of the files. A useful tool would support a range of protocols, including http, svn, mg, etc. Practically speaking, this means a separate tool and plugins.

Thirdly, to be truly useful the tool should support searching of a number of standard sites (github, sourceforge, google code, etc.) automatically, to make the job as easy as possible for the user.

Fourthly, it should support additional features such as searching, updating, etc.

In other words, what I am really suggesting here is a sort of specialised package manager that can be used in addition to the distribution's main package manager.

Of course, it is important to consider conflicts with the distribution's libraries - who has priority if there are different versions?




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]