Find the answer to your Linux question:
Results 1 to 5 of 5
Hi. First post. And I am writing this the third time now... I am using links2 in graphics mode, and first time, I pressed left arrow accidentally. Second time, my ...
  1. #1
    kag
    kag is offline
    Just Joined!
    Join Date
    Jun 2008
    Posts
    0

    Packaging programs in a single C source file

    Hi. First post. And I am writing this the third time now... I am using links2 in graphics mode, and first time, I pressed left arrow accidentally. Second time, my session ended before I posted and I got angry and clicked left arrow accidentally again. But anyway, X is Evil. I also use gmail web interface under links2, and it looks good - the use almost no CSS OK, so here I am.

    I converted some programs into single big C source files, and they work quite well. For example, ./configure script from ncftp package runs for some 30 seconds, while my converted version compiles in a second (!).

    I started to think that make is only good for huge projects, such as the kernel or wine.

    You can try my converted files, I made a list here: http://cgz.tensus.net

    Write what do you think about it. Maybe it is time to introduce a change in GNU's messy packaging system.

  2. #2
    Linux User
    Join Date
    Jun 2007
    Posts
    458
    Yes, when I was new to Linux, packages were in a bag of filth. I couldn't do anything with them. But you see, if all files (libraries, headers, binaries) are packed within one file, it would weigh tons. And imagine the time taken for downloading packages. I think the Ubuntu's package managing system is a better option.
    "When you have nothing to say, say nothing."

  3. #3
    kag
    kag is offline
    Just Joined!
    Join Date
    Jun 2008
    Posts
    0
    Quote Originally Posted by usamamuneeb View Post
    But you see, if all files (libraries, headers, binaries) are packed within one file, it would weigh tons.
    Well, neither libraries, headers nor binaries go into the one-file source (the package becomes actually a lot smaller).

    And you can still use packaging system of your distribution. You would not notice any difference until you build programs from source.

    Any kind of package can be easily made from program source in a single C file, but it does not go the other way. A package that depends on make and configure requires much effort when converting it to other platforms, for example non-UNIX.

  4. #4
    Linux Guru
    Join Date
    Nov 2004
    Posts
    6,110
    Surely though your code is modular? Monolithic source files are more like scripts or shopping-lists. Write something once and reuse. Also wouldn't your entire binary need to be loaded into memory at once instead of calling what's required from libraries?

  5. #5
    kag
    kag is offline
    Just Joined!
    Join Date
    Jun 2008
    Posts
    0
    Memory management does not change.

    This one is the only real argument:

    Quote Originally Posted by bigtomrodney View Post
    Surely though your code is modular? Monolithic source files are more like scripts or shopping-lists. Write something once and reuse.
    However:

    1. Programs can be written in such a way that it is possible to join and split them easily, with some script or so.

    2. For end users, it is not an issue.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •