LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-10-2010, 01:42 PM   #1
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 372
Blog Entries: 2

Rep: Reputation: 32
Question Why are Linux programs available only in source?


When I go to sites like kde-apps.org or gtk-apps.org i often times find that lots of programs there are available only in source code? Why? Why is it so hard for the developer to compile the package or to make that .deb or .rpm package? I'm sure it's easier for the developer to compile his own program than for a linux user... i don't get this.. why does everything come in source code?
 
Old 07-10-2010, 01:49 PM   #2
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,811
Blog Entries: 1

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
First of all, not everyone uses deb or rpm package systems and source code is universal can usually be compiled on almost any (supported) platform.

Secondly, by compiling from source, the packages is tailored to your system/hardware, etc.

thirdly, providing binary packages (deb/rpm) takes away your freedom to enable/disable some functions of the program.
By default the most common functions are enabled, however, depending on your system/needs you may slim it down disabling some functionalities or add some additional ones.
You can see the list of available options by issuing ./configure --help

Compiling is not that difficult. If you don't want to customise your package, in most cases the following will suffice:

Quote:
./configure
make
make install
 
Old 07-10-2010, 01:50 PM   #3
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,200

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
yes and no, there are so many distributions out there with their own package format as well as so many versions of those distributions still in operation that it would be quite a bit of work to compile them for all of them, even for just the most common ones, it is much simpler to simply create a configure script and a makefile and let the person installing it do the compiling themselves to ensure the greatest compatibility, not to mention, provided the necessary libraries and header files are present on the machine the source code can be compiled on almost any *nix like operating system, including bsd, OSX, other UNIXes etc.. in short a source release is more flexible.
 
Old 07-10-2010, 02:15 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Say, you have Ubuntu 10.04 Lucid.
Available packages = about 30,000.

Not often any reason to compile anything.

..
 
Old 07-10-2010, 02:15 PM   #5
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 372
Blog Entries: 2

Original Poster
Rep: Reputation: 32
sycamorex, that almost never works.. it didn't for this wordplay game...

Quote:
queenz@martin-lucid:~/Downloads/wordplay-0.3$ ./configure
bash: ./configure: No such file or directory
Quote:
$ make
wordplay.c:2048: error: ‘struct <anonymous>’ has no member named ‘mouse_off_y’
wordplay.c:2049: error: ‘struct <anonymous>’ has no member named ‘drag_y’
wordplay.c:2050: error: ‘struct <anonymous>’ has no member named ‘drag_y’
wordplay.c:2051: error: ‘struct <anonymous>’ has no member named ‘drag_y’
wordplay.c:2051: error: ‘struct <anonymous>’ has no member named ‘tile_height’
wordplay.c:2052: error: ‘struct <anonymous>’ has no member named ‘drag_y’
wordplay.c:2052: error: ‘struct <anonymous>’ has no member named ‘tile_height’
wordplay.c:2056: error: ‘struct <anonymous>’ has no member named ‘drag_x’
wordplay.c:2056: error: ‘struct <anonymous>’ has no member named ‘drag_y’
wordplay.c:2059: warning: implicit declaration of function ‘gtk_widget_queue_draw_area’
wordplay.c:2059: error: ‘struct <anonymous>’ has no member named ‘canvas’
wordplay.c:2060: error: ‘struct <anonymous>’ has no member named ‘tile_width’
wordplay.c:2060: error: ‘struct <anonymous>’ has no member named ‘tile_height’
wordplay.c:2061: error: ‘struct <anonymous>’ has no member named ‘canvas’
wordplay.c:2061: error: ‘struct <anonymous>’ has no member named ‘drag_x’
wordplay.c:2061: error: ‘struct <anonymous>’ has no member named ‘drag_y’
wordplay.c:2062: error: ‘struct <anonymous>’ has no member named ‘tile_width’
wordplay.c:2062: error: ‘struct <anonymous>’ has no member named ‘tile_height’
wordplay.c: At top level:
wordplay.c:2069: error: expected ‘)’ before ‘*’ token
wordplay.c:2087: error: expected ‘)’ before ‘*’ token
wordplay.c:2105: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘handle_hook_key_press’
wordplay.c:2122: error: expected ‘)’ before ‘*’ token
wordplay.c:2161: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘handle_defs_mouse_wheel’
wordplay.c:2180: error: expected ‘)’ before ‘*’ token
wordplay.c:2187: error: expected ‘)’ before ‘*’ token
wordplay.c:2196: error: expected ‘)’ before ‘*’ token
wordplay.c:2210: error: expected ‘)’ before ‘*’ token
wordplay.c:2238: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘complete_tile_drop’
wordplay.c: In function ‘cancel_tile_drop’:
wordplay.c:2251: error: ‘struct <anonymous>’ has no member named ‘drop_timeout_id’
wordplay.c:2252: error: ‘struct <anonymous>’ has no member named ‘drop_timeout_id’
wordplay.c:2253: error: ‘struct <anonymous>’ has no member named ‘drop_timeout_id’
wordplay.c: At top level:
wordplay.c:2260: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘restore_message_text’
make: *** [wordplay.o] Error 1
 
Old 07-10-2010, 02:24 PM   #6
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,811
Blog Entries: 1

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
Probably the reason that it never works for you is that you never read the INSTALL/README files included with the sources. Is this the case?
Wordplay compiles nicely on my system. The INSTALL file says:

Quote:
To compile, check the top of Makefile for configuration options (you may want
to change PREFIX and/or CFLAGS), then type "make". To install, type "make
install".

Gtk 1.2.x and Gdk-Pixbuf are required.
Check if you've got necessary dependencies Gtk/Gdk.
 
Old 07-10-2010, 02:27 PM   #7
fbobraga
Member
 
Registered: Jul 2010
Location: S„o Paulo - Brasil
Distribution: Debian 7 / Crunchbang 11
Posts: 229

Rep: Reputation: 41
apt-get install wordplay ?
 
Old 07-10-2010, 02:28 PM   #8
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 372
Blog Entries: 2

Original Poster
Rep: Reputation: 32
sycamorex, i do have GTK and also GDK i guess but there i just no such file configure there...

Quote:
-rw-r--r-- 1 queenz queenz 43 2006-08-23 23:45 AUTHORS
lrwxrwxrwx 1 queenz queenz 4 2010-07-10 21:09 ChangeLog -> NEWS
-rw-r--r-- 1 queenz queenz 18009 2006-08-23 23:45 COPYING
drwxr-xr-x 2 queenz queenz 4096 2007-08-19 01:14 data
-rw-r--r-- 1 queenz queenz 15505 2006-08-23 23:45 icons.c
-rw-r--r-- 1 queenz queenz 205 2006-08-23 23:45 icons.h
lrwxrwxrwx 1 queenz queenz 6 2010-07-10 21:09 INSTALL -> README
-rw-r--r-- 1 queenz queenz 831 2006-08-23 23:45 Makefile
-rw-r--r-- 1 queenz queenz 156 2007-08-14 10:42 NEWS
-rw-r--r-- 1 queenz queenz 1664 2007-08-14 14:08 README
-rwxr-xr-x 1 queenz queenz 14 2006-08-23 23:45 tags
-rw-r--r-- 1 queenz queenz 17494 2007-08-14 14:09 TAGS
drwxr-xr-x 3 queenz queenz 4096 2006-08-23 23:45 tilesets
-rw-r--r-- 1 queenz queenz 7663 2006-08-23 23:45 util.c
-rw-r--r-- 1 queenz queenz 2324 2006-08-23 23:45 util.h
-rw-r--r-- 1 queenz queenz 465 2006-08-23 23:45 wordplay_16x16.png
-rw-r--r-- 1 queenz queenz 650 2006-08-23 23:45 wordplay_32x32.png
-rw-r--r-- 1 queenz queenz 946 2006-08-23 23:45 wordplay_48x48.png
-rw-r--r-- 1 queenz queenz 82991 2007-08-14 10:48 wordplay.c
-rw-r--r-- 1 queenz queenz 8780 2007-08-14 08:20 wordplay.h
 
Old 07-10-2010, 02:34 PM   #9
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,811
Blog Entries: 1

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
As the INSTALL file states, you don't need to issue ./configure in this case. The Make file is ready. You can just customise some flags by editing the Makefile file.
In this case however, there's not much to customise.

./configure
make && make install

They are just generic instructions. Always read the INSTALL / README files to follow the install instructions.

You say you guess that you've got gdk-pixbuf. You need to doublecheck it. Without all necessary dependencies, it won't compile.
 
Old 07-10-2010, 02:52 PM   #10
QueenZ
Member
 
Registered: Sep 2008
Distribution: openSUSE, Ubuntu
Posts: 372
Blog Entries: 2

Original Poster
Rep: Reputation: 32
ok i didn't have it but anyway..
Usually if you compile a program it will work on almost every distro out there... and most of the time it will be enough for the end user.. no?
 
Old 07-10-2010, 03:07 PM   #11
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,811
Blog Entries: 1

Rep: Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191Reputation: 1191
Quote:
Originally Posted by QueenZ View Post
ok i didn't have it but anyway..
Usually if you compile a program it will work on almost every distro out there... and most of the time it will be enough for the end user.. no?
I'm not sure I understand. What will be enough for the end user?

Generally, your first source of packages should be your distro's repository. You'll grab the source code only if:
1. It's not in the distro repository
2. You want to enable some extra functionality.

With the number of packages in Ubuntu repositories, an *average* Ubuntu user (from your bash prompt I assume you use Ubuntu) will rarely (if never) need to install anything from the source code.

Last edited by sycamorex; 07-10-2010 at 03:09 PM.
 
Old 07-10-2010, 03:33 PM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
About wordplay :
http://archive.ubuntu.com/ubuntu/poo...22.orig.tar.gz

cd wordplay-7.22.orig/
patch -p1 < wordplay_7.22-1.diff

make CC=gcc-3.3
I.e. the file wordplay.c is from 1996.
You can get gcc-3.3 from e.g. Ubuntu Hardy.
http://packages.ubuntu.com/hardy-updates/gcc-3.3
..

Last edited by knudfl; 07-10-2010 at 03:37 PM.
 
Old 07-10-2010, 10:26 PM   #13
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 1,960

Rep: Reputation: 333Reputation: 333Reputation: 333Reputation: 333
Quote:
Originally Posted by QueenZ View Post
Why is it so hard for the developer to compile the package or to make that .deb or .rpm package?
Releasing source code allows people to compile and package it however they please, even allowing different OSes to use the software. For example, you can compile KDE on the *BSDs.

I note that the distributions you're listed as using (Ubuntu and OpenSuse) are, by default, tailored towards not requiring the end user to compile their own software. As a couple of people have mentioned, with these two distros, it's probably best if you install the binary packages supplied by the distributor.

In order to be able to compile software, your OS has to have an environment designed with the goal of enabling the end user to do so. Slackware is one such distro. In fact, (and I might be going out on a limb here), I think that Slackware has the best "out-of-the-box" environment for compiling stuff. I've seen only a handful of failures over the 11 years I've been using Slackware, and none for at least 5 of those years. So far I've built 106 packages for Slackware 13.1 with no failures.

Ubuntu and OpenSuse can be customised to compile software as easily as Slackware, but you need to add some of the "*-devel" packages. I'm not sure which ones, because I haven't tested either of these distros over the past couple of years.

HTH

Last edited by rkelsen; 07-11-2010 at 01:39 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing programs from source? Cityscape Linux - General 6 04-19-2010 08:15 PM
Building programs from source Rick069 Debian 6 10-10-2007 11:47 PM
why is compiling source programs under linux such a headache? guy24x Linux - Software 21 07-28-2005 07:04 AM
Compiling Programs from Source-help orisma Linux - Newbie 6 03-03-2005 08:57 AM
source code for little linux programs durden2.0 Linux - Software 1 02-22-2004 06:16 PM


All times are GMT -5. The time now is 07:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration