How do I compile anything?

discuss compiling applications for Puppy
Message
Author
jomazq
Posts: 7
Joined: Thu 29 Sep 2011, 18:11

How do I compile anything?

#1 Post by jomazq »

so i'm running puppeeeRC2 with the devx.sfs on a eee pc 1001p and i've spent a few years around linux with dsl ubuntu knoppix and others . i with dsl was still being developed. it's my favorite.

./config and stuff wasn't working... it would unpack a lot of files and then there would be no application or executable file.

i've decided that all linux documentation is necessarily incomplete because after three years i haven't compiled one package from source that did anything but take up diskspace. i'm really tired of it...

i'm hoping to find someone who might be willing to hold my hand. because while i can write scripts - i'm no programmer . and the most frrustrating problem is when i compile or something and there's just no feedback about completing an operation.

./configure ./makeinstall ... what am i not understanding? what options should i use when ... i've tried all of them in varying combinations....

so now i thought src2pkg in puppeee (which i love dearly) was going to make linux software accessible to me. big whoop... i've made 15 lumps of memory called pets that don't install initialize or anything...

i just feel right now like putting my eeepc through the wall after a good afternoon of frustration.

User avatar
battleshooter
Posts: 1378
Joined: Wed 14 May 2008, 05:10
Location: Australia

#2 Post by battleshooter »

Hey jomazq,

Have a look at Packaging 101 Technosaurus has done an excellent write up on how to compile and package on Puppy.

I'm no programmer either, I just pick up what I know by Googling, but it helps to know the basics. I'd be willing to help answer any questions I know, but really, just shoot a question into the forums and someone will turn up who knows the answer, so in essence the whole forum would hold your hand :) Welcome to the kennels by the way :)

Battleshooter
[url=http://www.murga-linux.com/puppy/viewtopic.php?t=94580]LMMS 1.0.2[/url], [url=http://www.murga-linux.com/puppy/viewtopic.php?t=94593]Ardour 3.5.389[/url], [url=http://www.murga-linux.com/puppy/viewtopic.php?t=94629]Kdenlive 0.9.8[/url]

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#3 Post by amigo »

You still have to *install* the pets after creating them with src2pkg.

User avatar
battleshooter
Posts: 1378
Joined: Wed 14 May 2008, 05:10
Location: Australia

#4 Post by battleshooter »

Haha, I'm wondering how I missed that :lol: That could be what's wrong :lol:

Battleshooter
[url=http://www.murga-linux.com/puppy/viewtopic.php?t=94580]LMMS 1.0.2[/url], [url=http://www.murga-linux.com/puppy/viewtopic.php?t=94593]Ardour 3.5.389[/url], [url=http://www.murga-linux.com/puppy/viewtopic.php?t=94629]Kdenlive 0.9.8[/url]

emil
Posts: 633
Joined: Tue 10 Nov 2009, 08:36
Location: Austria
Contact:

#5 Post by emil »

could you please be a bit more specific about what does not work as expected?
Maybe an example sourcecode, and the output you get from ./configure.

DPUP5520
Posts: 800
Joined: Wed 16 Feb 2011, 05:38

#6 Post by DPUP5520 »

here's an easy one, nwipe (one of the packages I have up on here) is really simple to compile you can find it on sourceforge. download the package and then unpack it. once you unpack it go into the folder and type in a window ./configure --prefix=usr and enter after that type make all hit enter
and then type make install DESTDIR=/tmp/nwipe what this will do is create the nwipe folder in the tmp directory, then go into the tmp directory and bring up a new window and type dir2pet nwipe and it will bring up a list of options to create a pet file out of the nwipe folder in the tmp directory it's pretty straight forward and easy.
[url=http://www.murga-linux.com/puppy/viewtopic.php?t=69651][b][i]PupRescue 2.5[/i][/b][/url]
[url=http://www.murga-linux.com/puppy/viewtopic.php?t=72178][b][i]Puppy Crypt 528[/i][/b][/url]

DPUP5520
Posts: 800
Joined: Wed 16 Feb 2011, 05:38

#7 Post by DPUP5520 »

dammit why is it not letting me edit my post I mean to put ./configure --prefix=/usr
[url=http://www.murga-linux.com/puppy/viewtopic.php?t=69651][b][i]PupRescue 2.5[/i][/b][/url]
[url=http://www.murga-linux.com/puppy/viewtopic.php?t=72178][b][i]Puppy Crypt 528[/i][/b][/url]

User avatar
battleshooter
Posts: 1378
Joined: Wed 14 May 2008, 05:10
Location: Australia

#8 Post by battleshooter »

Yeah I noticed that, I thought I was the only one. On some threads I can't edit either. It's weird.

Battleshooter
[url=http://www.murga-linux.com/puppy/viewtopic.php?t=94580]LMMS 1.0.2[/url], [url=http://www.murga-linux.com/puppy/viewtopic.php?t=94593]Ardour 3.5.389[/url], [url=http://www.murga-linux.com/puppy/viewtopic.php?t=94629]Kdenlive 0.9.8[/url]

User avatar
Makoto
Posts: 1665
Joined: Fri 04 Sep 2009, 01:30
Location: Out wandering... maybe.

#9 Post by Makoto »

There's always been an issue with the permissions in this subforum, ever since it was created. We discussed it in the sticky at the top of the list (New Forum "Compiling"). I didn't think the permissions problem still existed, though. :(

Basically, the list of things you can and can't do probably looks like this (at the bottom of the Compiling subforum thread listing):
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
[ Puppy 4.3.1 JP, Frugal install ] * [ XenialPup 7.5, Frugal install ] * [XenialPup 64 7.5, Frugal install] * [ 4GB RAM | 512MB swap ]
In memory of our beloved American Eskimo puppy (1995-2010) and black Lab puppy (1997-2011).

User avatar
battleshooter
Posts: 1378
Joined: Wed 14 May 2008, 05:10
Location: Australia

#10 Post by battleshooter »

Ahh yes, I see that now. Well at least that explains it, thanks.

Battleshooter
[url=http://www.murga-linux.com/puppy/viewtopic.php?t=94580]LMMS 1.0.2[/url], [url=http://www.murga-linux.com/puppy/viewtopic.php?t=94593]Ardour 3.5.389[/url], [url=http://www.murga-linux.com/puppy/viewtopic.php?t=94629]Kdenlive 0.9.8[/url]

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#11 Post by 8-bit »

You missed one that is mis-stated on the forum.
It says You can delete your own posts if they have not been replied to.

I have never been able to delete a new post that I made that has not been replied to so that statement is wrong.

So about all you can do is edit your post to be empty other than a request in it to a moderator to delete the post.

And if your post is a reply to a thread, you cannot remove your reply and can only edit it.

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#12 Post by 8-bit »

In attempts to compile source code sometimes one runs into problems of required dependencies needed by the code not being present.

And some packagers of source code just assume that if their PC has that dependency file that others have it too.

Also, tracking down those missing dependency files can be a real pain.

And then some dependencies require other dependencies.

Sometimes I think it is a wonder that one can compile anything.

Also, who among us has the knowledge to write a "config" file for compiling?

Answer. Barry does. I do not.

leahcimewol
Posts: 1
Joined: Tue 27 Sep 2011, 22:32

compiling what? from newbie

#13 Post by leahcimewol »

8-bit wrote:In attempts to compile source code sometimes one runs into problems of required dependencies needed by the code not being present.

And some packagers of source code just assume that if their PC has that dependency file that others have it too.

Also, tracking down those missing dependency files can be a real pain.

And then some dependencies require other dependencies.

Sometimes I think it is a wonder that one can compile anything.

Also, who among us has the knowledge to write a "config" file for compiling?

Answer. Barry does. I do not.
I like what you say about barry, made me chuckle, and feel a little better.
What I don't understand is why we have to compile at all?
It's the one thing I miss about windows, you download a program and you install it, easy peazy! none of this config and compile crap, it's so complicated when you are a newbie?! I know in the end I will learn loads and more than windows could ever have taught me, but honestly sometimes I just haven't got the time to sit at a computer trying to understand how to carry out something that ends up taking an entire evening to get my head round?...anyway deep breath here goes I'm going to dive into creating my first file and also creating my first backupfile so I can mess around with that and not screw up my system! wish me luck, any pointers would be gretaly appreciated and any hands to hold would be great as well as I familiarise myself here at the kennels! :wink:

DPUP5520
Posts: 800
Joined: Wed 16 Feb 2011, 05:38

#14 Post by DPUP5520 »

What I don't understand is why we have to compile at all?
It's the one thing I miss about windows, you download a program and you install it, easy peazy! none of this config and compile crap, it's so complicated when you are a newbie?! I know in the end I will learn loads and more than windows could ever have taught me, but honestly sometimes I just haven't got the time to sit at a computer trying to understand how to carry out something that ends up taking an entire evening to get my head round?
That's because those programs have already been compiled for you, the same as all the pet packages here on the forum have been compiled already so all you have to do is click and install.Plus most software which works on Windows is proprietary. There are programs that work for windows which still require compiling, noticably a lot of open source programs such as what you would find on Sourceforge which are made for multiple operating systems.
[url=http://www.murga-linux.com/puppy/viewtopic.php?t=69651][b][i]PupRescue 2.5[/i][/b][/url]
[url=http://www.murga-linux.com/puppy/viewtopic.php?t=72178][b][i]Puppy Crypt 528[/i][/b][/url]

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#15 Post by technosaurus »

compiling is actually pretty easy - the problem is all the complicated layers that have placed between the compiler and the code

I often find it easier to ignore the configure scripts and do this

grep ifdef src/*.c
grep ifndef src/*.c
<take note of things I may want to define - look in source if unsure>

to define them we just use -D<whatever>

ex.
we have a gtk2 program that has ifndef NDEBUG that we want to optimize for size and strip and all the .c files are in the same dir

cd srcdir
gcc -Os -DNDEBUG *.c -Wl,-s -lgtk-x11-2.0

you can add extra CFLAGS to -Os (optimize for size) or extra LDFLAGS to -Wl,-s (stripping) for better optimizations
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
michaellowe
Posts: 66
Joined: Sat 17 Dec 2011, 08:33
Location: The Garden

No package 'libffi' found

#16 Post by michaellowe »

8-bit wrote:In attempts to compile source code sometimes one runs into problems of required dependencies needed by the code not being present.

And some packagers of source code just assume that if their PC has that dependency file that others have it too.

Also, tracking down those missing dependency files can be a real pain.

And then some dependencies require other dependencies.

Sometimes I think it is a wonder that one can compile anything.

Also, who among us has the knowledge to write a "config" file for compiling?

Answer. Barry does. I do not.
ditto we are on the same page 8bit lol ;-)
Smash forehead on keyboard to continue.....
well thats at least how some of us deal with ba$h !

learnhow2code

#17 Post by learnhow2code »

it would be great to have a database of things that compile "out of the box" and in what puppy they compile in.

these would be pretty good for practice, perhaps an "easy, intermediate, difficult" list would be even better.

Sailor Enceladus
Posts: 1543
Joined: Mon 22 Feb 2016, 19:43

#18 Post by Sailor Enceladus »

learnhow2code wrote:it would be great to have a database of things that compile "out of the box" and in what puppy they compile in.

these would be pretty good for practice, perhaps an "easy, intermediate, difficult" list would be even better.
Slacko 6.3, from memory:

- dosbox (pretty easy)
- links browser (pretty easy)
- mplayer (pretty easy)
- timidity (pretty easy)
- tar, gzip, xz, p7zip (pretty easy)
- jwm (pretty easy)
- gnome-player (pretty easy)
- htop (pretty easy)
- wine (pretty easy but takes a long time)
- firefox (pretty easy but takes a longggggg time)
- ndiswrapper (intermediate)
- broadcom_wl (intermediate)
- pidgin (difficult)

I tried a ton more but usually just were a one time things sporadically then deleted.

User avatar
rockedge
Posts: 1864
Joined: Wed 11 Apr 2012, 13:32
Location: Connecticut, United States
Contact:

#19 Post by rockedge »

I regularly compile ZoneMinder. It was a steep learning curve but once I got the hang of it I can rip one out pretty easily.

I solve each error or missing dependency one by one and a lot of thinking out of the box and experimenting. I learned how to add PERL modules using CPAN and CPANM and how to find libs that must be present and are not. I search engine around the Ubuntu repos looking for the Debs that are called for.

I found that mixing some stuff from Debian and some from Ubuntu in Tahr 6.0,5 works and I just finished upgrading to ZoneMinder 1.30 by building it for source instead of using the PPM2 which with the new PPM mod 1.0.1 really makes it a snap to add repositories.

Any way good luck and keep at it until it works! I lucked out and somehow found away to build this ZM in Puppy Linux and it works very well.

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#20 Post by smokey01 »

Compiling for many is a bit of a black art. In fact it can be quite easy all the way up to very difficult. Many of us like to compile our own software and sometimes even for the experienced user it can be difficult to achieve. From my experience there are a few major factors that need to be considered:
The environment (the distro you are using EG: Fatdog, tahrpup & slacko etc);
The version of the Environment. (Fatdog64-710, tahrpup-6.0.5, slacko-6.3.2);
The application to be compiled;
The required dependencies and the order they need to be built and installed, and The build recipe.

In all cases the Devx needs to be loaded as this contains the majority of compiling tools. Sometimes you also need the distro kernel headers. This is required especially when you want to build driver modules.

If you are a slacko or Fatdog user you have a great resource avaiable called slackbuilds. This site will link you to the source code and provide a build recipe. In most cases this system is successful but occasionally it fails due to missing dependencies. Often where dependencies are required, the recipe will provide a link to them. https://slackbuilds.org/


Most of us are repeatedly reinventing the wheel. What I propose is we share our build recipes here on the forum using notecase as the database. The reason I suggest notecase is three fold:
It's in most pups,
It's easy to use,
You can import and export nodes, and
It has a hierarchical structure.

This way anyone can upload a node with the build recipe, links etc and others can download it and import it into their notecase database.

As rockedge said, he can build zoneminder quite quickly and easliy as he's done it many time in the past. If you are starting from scratch, trust me when I say this, it's a pig the first time you try. I'll bet there are many who have tried and given up, me for one.

Shortly I will post a simple template/example and I encourage others to do the same. I personally would like to see rockedge zoneminder example.
Attachments
Notecase-compiling.png
A simple example
(37.67 KiB) Downloaded 594 times
compiling.ncd.gz
Fake .gz deleted it.
(1.09 KiB) Downloaded 546 times

Post Reply