Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 22 Aug 2014, 04:03
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Not a howto, but a request for a compiling howto.
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [20 Posts]   Goto page: 1, 2 Next
Author Message
Johnny Reb


Joined: 05 Aug 2005
Posts: 132
Location: The Confederate States of America (occupied)

PostPosted: Sun 16 Oct 2005, 22:14    Post subject:  Not a howto, but a request for a compiling howto.  

I've been attempting to find information on the subject of compiling applications both on this forum, and other places on the net, but haven't found anything really helpful yet. Most of the time the information I've found is very basic, and therefore not very useful.

I've got puppy 1.0.5 running in a fat32 partition as pup001, and have the usr_devx.sfs set up on it. Initially, I had pretty good luck and the first few things I tried compiling worked, but now I'd say I'm at an 85% or better failure rate.

The thing that's most aggravating is that in a majority of cases the failure is caused because the compiler can't find a library file it needs. That in itself would not be all that aggravating if the file were not installed in puppy, but in most cases it is, and it is in the folder the compiler said it looked in for it.

So, if any of y'all can provide some insight into the basics of compiling, or just point me in the right direction to find out I'd appriciate it.

Coming from a windoze background, I can tell y'all that compiling applications is one thing that scares a lot of people away from Linux, and a good howto that gives a reformed windoze user the basics would be a really big help. Compiling was never an issue for me. In my case it was hardware compatability that kept me away from it. Regardless, since I never had a need to do it before I'm having to play catch up when it comes to compiling.

_________________
He who dares not offend cannot be honest.
~ Thomas Paine
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger 
ICQ Number 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Sun 16 Oct 2005, 22:48    Post subject:  

Johnny, can you post an examle (with link to download), where you encounter this problem?

To compile a program, you will need the source of the libraries it depends on, and compile/install that too.
Puppy contains just the binaries of some programs, but not the source.
When you compile it yourself, not just the binary will be created, but also several headers (xxx.h) will be copied to the Filesystem (usually in one of the /include -folders) - these are needed to compile your program.

Mark
Back to top
View user's profile Send private message Visit poster's website 
Johnny Reb


Joined: 05 Aug 2005
Posts: 132
Location: The Confederate States of America (occupied)

PostPosted: Sun 16 Oct 2005, 23:39    Post subject:  

MU wrote:
Johnny, can you post an examle (with link to download), where you encounter this problem?

To compile a program, you will need the source of the libraries it depends on, and compile/install that too.
Puppy contains just the binaries of some programs, but not the source.
When you compile it yourself, not just the binary will be created, but also several headers (xxx.h) will be copied to the Filesystem (usually in one of the /include -folders) - these are needed to compile your program.

Mark


Mark,

I can copy several compile logs, but they would occupy too much space here. I'll try to pick out the errors in some of them so that it won't take up so much space.

One example, and this one is really aggravating is the libgpg-error, libgpgme, and libgcrypt. I've had trouble with all three of them while compiling GnuPG, or at least programs that work with GnuPG. I compiled libgpg-error, and libgcrypt without any trouble, and installed them. Regardless there is one program related to GnuPG, gnutls-1.2.7 that refuses to recognize that the libraries are installed even when I place the path to the libraries after the ./configure command (I don't recall the specific argument given to provide the path to the file, but I got it from ./configure --help). There are other examples, but it would probably be better if I went and pulled up specifice error messages. In fact I'll post the last one I got my copying it right out of rxvt output. It's an error message for another library file that I need to compile another program, but it won't compile.

Here's the error output from rxvt:
# make check
Making check in src
make[1]: Entering directory `/usr/local/libassuan-0.6.10/src'
./mkerrors < ./assuan.h > assuan-errors.c
make check-am
make[2]: Entering directory `/usr/local/libassuan-0.6.10/src'
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../include -g -O2 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -MT assuan-util.o -MD -MP -MF ".deps/assuan-util.Tpo" -c -o assuan-util.o assuan-util.c; \
then mv -f ".deps/assuan-util.Tpo" ".deps/assuan-util.Po"; else rm -f ".deps/assuan-util.Tpo"; exit 1; fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../include -g -O2 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -MT assuan-errors.o -MD -MP -MF ".deps/assuan-errors.Tpo" -c -o assuan-errors.o assuan-errors.c; \
then mv -f ".deps/assuan-errors.Tpo" ".deps/assuan-errors.Po"; else rm -f ".deps/assuan-errors.Tpo"; exit 1; fi
assuan-errors.c:107: error: parse error before '-' token
assuan-errors.c:107:4: warning: no newline at end of file
make[2]: *** [assuan-errors.o] Error 1
make[2]: Leaving directory `/usr/local/libassuan-0.6.10/src'
make[1]: *** [check] Error 2
make[1]: Leaving directory `/usr/local/libassuan-0.6.10/src'
make: *** [check-recursive] Error 1
#

_________________
He who dares not offend cannot be honest.
~ Thomas Paine
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger 
ICQ Number 
noip

Joined: 06 Oct 2005
Posts: 93
Location: Sydney

PostPosted: Mon 17 Oct 2005, 00:12    Post subject:  

JR, (wasn't he in a TV series?)

A couple of things that might be of help (at the risk of going off on a tangent from what you were after).

1. Puppy is not set up to compile programs out of the box.
2. Most (all?) source code for Linux assumes you have the GCC compiler on your system.

BUT ... the up side is that compiling programs is easy.

My humble suggestion is that you also install Vector Linux to use as the compiling environment for Puppy (at least for the moment). I think that Vector is the "approved" distro for library compatibility ... An alternative would be Slackware 10.0 or 10.1 if you're lucky.

I'll have a look in my directories for the compiling notes ...


Rgds

GS

vp & ftgs
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11017
Location: Arizona USA

PostPosted: Mon 17 Oct 2005, 02:07    Post subject:  

noip wrote:
...
1. Puppy is not set up to compile programs out of the box.
2. Most (all?) source code for Linux assumes you have the GCC compiler on your system...

I haven't compiled anything so I could be wrong about this, but I'm pretty sure Puppy 1.0.5 has an associated file available for download which contains pretty much all you need to compile applications for Puppy. I can't think of the name of that file. Sad
Back to top
View user's profile Send private message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Mon 17 Oct 2005, 02:25    Post subject:  

http://puppylinux.org/wikka/Compiling
_________________
Puppy WIKI

Last edited by Lobster on Sat 25 Mar 2006, 21:33; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
noip

Joined: 06 Oct 2005
Posts: 93
Location: Sydney

PostPosted: Mon 17 Oct 2005, 02:48    Post subject:  

I guess what I'm trying to say here, is that if you are not experienced in compiling programs, then DON'T start with puppy. Install Vector or Slackware 10.1 and start there.

In the absence of me finding the notes I've collected, I'd point you to

www.linuxpackages.net
http://www.linuxpackages.net/howto.php?page=package&title=Package+Howto
http://asic-linux.com.mx/~izto/checkinstall/

Knowing how to build a Slackware package, and knowing about "checkinstall" is VERY useful in compiling an app for puppy. A Slackware package (correct version) has everything you need to install into Puppy.

Rgds

GS

vp&ftgs

ps .. steal some of the packages for 10.1 from linuxpackages - they may well run in puppy.
Back to top
View user's profile Send private message 
Johnny Reb


Joined: 05 Aug 2005
Posts: 132
Location: The Confederate States of America (occupied)

PostPosted: Mon 17 Oct 2005, 03:34    Post subject:  

noip wrote:
JR, (wasn't he in a TV series?)


Hello noip, yeah there was a JR in a television series.

Quote:
A couple of things that might be of help (at the risk of going off on a tangent from what you were after).

1. Puppy is not set up to compile programs out of the box.
2. Most (all?) source code for Linux assumes you have the GCC compiler on your system.

BUT ... the up side is that compiling programs is easy.


I understand that Puppy was not set up for compiling out of the box, but it was my understanding that most of the tools necessary for compiling were included in the usr_devx.sfs file, which I have installed. It does seem to be working for the most part. Most of the trouble I've had is that it can't find certain library files. Some of this I can understand, but when I've successfully compiled a libray file libgpg-error & libgcrypt for example, and it still can't find them it's puzzling.

Quote:
My humble suggestion is that you also install Vector Linux to use as the compiling environment for Puppy (at least for the moment). I think that Vector is the "approved" distro for library compatibility ... An alternative would be Slackware 10.0 or 10.1 if you're lucky.


If I'm unable to do what I want with the compiler in Puppy that is an option, however disk space is a problem. I do have another version of Linux on this box, Peanut Linux 9.5 but the compiler does not work on it. I do intend to try and get it going again, but since I found Puppy have not done much with it. I don't know how compatable it would be for Puppy. It does have a 2.4.x kernel so at least in that respect it might work. At least for now, I've got Puppy 1.0.4 installed on the hard drive, and I've got Puppy 1.0.5 working from the pup001 file. It was my intention to work it that way so that I could compile some programs that I'd really like to use, and have them ready as dotpups and later install Puppy 1.0.5 on the hard drive. I also figured that if I really screwed the system up trying to compile something that it would be a lot eaiser to start over again that way since as long as I'm working from the pup001 I'm looking at everything as being temporary, but once I install to the hard drive I'll start saving things there that I intend to keep there and won't want to loose.

Quote:
I'll have a look in my directories for the compiling notes ...


Any tips you can give me will be very much appriciated. One thing I have been wondering about, and this may have something to do with the compiler not being able to find certain files, is does it make a difference *where* you do your compiling? I've been doing it all in /usr/local.


He that would make his own liberty secure, must guard even his enemy from oppression; for if he violates this duty, he establishes a precedent that will reach to himself.
Thomas Paine, Dissertation on First Principles of Government, December 23, 1791

_________________
He who dares not offend cannot be honest.
~ Thomas Paine
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger 
ICQ Number 
Johnny Reb


Joined: 05 Aug 2005
Posts: 132
Location: The Confederate States of America (occupied)

PostPosted: Mon 17 Oct 2005, 03:39    Post subject:  

noip wrote:
In the absence of me finding the notes I've collected, I'd point you to

www.linuxpackages.net
http://www.linuxpackages.net/howto.php?page=package&title=Package+Howto
http://asic-linux.com.mx/~izto/checkinstall/

Knowing how to build a Slackware package, and knowing about "checkinstall" is VERY useful in compiling an app for puppy. A Slackware package (correct version) has everything you need to install into Puppy.

ps .. steal some of the packages for 10.1 from linuxpackages - they may well run in puppy.


Thanks for the info, I'll sure check it out!

Society in every state is a blessing, but government, even in its best state, is but a necessary evil; in its worst state an intolerable one; for when we suffer or are exposed to the same miseries by a government, which we might expect in a country without government, our calamity is heightened by reflecting that we furnish the means by which we suffer.
Thomas Paine, Common Sense, 1776

_________________
He who dares not offend cannot be honest.
~ Thomas Paine
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger 
ICQ Number 
Nathan F


Joined: 08 Jun 2005
Posts: 1760
Location: Wadsworth, OH (occasionally home)

PostPosted: Mon 17 Oct 2005, 08:46    Post subject:  

In almost every case when compiling a program, the configure script checks the library's header files, not the libraries themselves. The neccessary files will be in /usr/include or in /usr/lib/pkgconfig. It is not unheard of for a library to be included in Puppy but the associated headers to be missing from usr_devx.sfs. In those cases, the libraries will also have to be compiled, even though they are already in Puppy. I had to compile Gimp myself in order to compile Gimp plugins, for instance.

Compiling from Vector works well in most cases, but not all. Some programs are very specific in what will or will not fly and seem only to run on the host they were compiled on. For the most part5 this is rare, though. Vector is my second choice in a distro, right behind Puppy. If you're worried about space, Vector is also very small for an installed Linux system. Depending on the number of packages you install, count on 1-3GB total, including space for compiling. As far as compiling apps, Vector and Slackware are miles ahead of any other distro and you will probably never have ANY issues.

It doesn't matter where you do your compiling at as long as it's a Linux partition and has enough space. What does matter is that you place everything in the right place afterword. Libraries in Puppy need to be in /usr/lib, not /usr/local/lib which is the default path. When you do the configure step, do this.
Code:
./configure --prefix=/usr

This will also make sure that the libs are placed where they can be found easily to compile against. If you want to make a dotpup, they can late be moved to /root/my-applications/lib if you prefer.

Beyond that, make sure you read any included docs carefully before compiling a package. It will save you a lot of trouble. The most important file is usually named INSTALL and will have most of the info you need.

Good luck.
Nathan
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger 
Guest
Guest


PostPosted: Mon 17 Oct 2005, 20:00    Post subject:  

Here's a simple explanation I've found (works for me) for compiling on a Slackware based system:

PACKAGE CREATION
================
1. Create the package creation directory

# mkdir -p /pkgcreate/usr/local

2. Unpack the source distribution, configure it
then compile.
... you should be in /pkgcreate (?)

# tar -zxvf foobar-a.b.c.tar.gz (so you now have directory /pkgcreate/foobar-a.b.c )
# cd foobar-a.b.c
# ./configure --prefix=/usr/local (the ultimate destination)
# make

3. 'Install' the created files in the package
creation directory.

# make install prefix=/pkgcreate/usr/local (where you want the intermediate install to go)

4. Build the tarball package

# cd /pkgcreate
# makepkg foobar-a.b.c-i686-1.tgz
(usually follow the suggestions to create symbolic
links via the script and to NOT change ownership
attributes of the files)

5. Presto you have your tarball package! Stow it
away for safekeeping. (when you "installpkg" it will now go into /usr/local)



Hope this helps a bit.

Rgds

GS

vp&ftgs
Back to top
noip

Joined: 06 Oct 2005
Posts: 93
Location: Sydney

PostPosted: Mon 17 Oct 2005, 20:02    Post subject:  

Sorry, forgot to log in.

GS

vp&ftgs
Back to top
View user's profile Send private message 
Guest
Guest


PostPosted: Tue 18 Oct 2005, 02:41    Post subject:  

Nathan F wrote:
In almost every case when compiling a program, the configure script checks the library's header files, not the libraries themselves. The neccessary files will be in /usr/include or in /usr/lib/pkgconfig. It is not unheard of for a library to be included in Puppy but the associated headers to be missing from usr_devx.sfs. In those cases, the libraries will also have to be compiled, even though they are already in Puppy. I had to compile Gimp myself in order to compile Gimp plugins, for instance.


Now that explains a lot!

Quote:
Compiling from Vector works well in most cases, but not all. Some programs are very specific in what will or will not fly and seem only to run on the host they were compiled on. For the most part5 this is rare, though. Vector is my second choice in a distro, right behind Puppy. If you're worried about space, Vector is also very small for an installed Linux system. Depending on the number of packages you install, count on 1-3GB total, including space for compiling. As far as compiling apps, Vector and Slackware are miles ahead of any other distro and you will probably never have ANY issues.


I may try Vector if I can make room for it. I'm going to see if I can move a lot of stuff I've got saved over to cd. Even though I almost never boot into windows now that I've got the modem working in Puppy, I still intend to keep at least win2k pro on one partition. Unfortunatly it is still useful for some things, although the aggravation factor while using it is a lot higher after working with Puppy. Only bad thing about trying another distro is the download time..............on a 56k modem it takes awhile 'Evil or Very Mad'

Quote:
It doesn't matter where you do your compiling at as long as it's a Linux partition and has enough space. What does matter is that you place everything in the right place afterword. Libraries in Puppy need to be in /usr/lib, not /usr/local/lib which is the default path. When you do the configure step, do this.
Code:
./configure --prefix=/usr

This will also make sure that the libs are placed where they can be found easily to compile against. If you want to make a dotpup, they can late be moved to /root/my-applications/lib if you prefer.


This explains even more about what may be causing the trouble I've been having. I've been using the default location that the compiler places the files. When I boot back into Pup 1.0.5 I'll try again and specify for the library files to go into /usr/lib instead of /usr/local/lib.

Quote:
Beyond that, make sure you read any included docs carefully before compiling a package. It will save you a lot of trouble. The most important file is usually named INSTALL and will have most of the info you need.


That I have been doing. Actually I've been reading a lot from quiet a few different sources.


"Guard with jealous attention the public liberty. Suspect every one who approaches that jewel. Unfortunately, nothing will preserve it but downright force. Whenever you give up that force, you are ruined.... The great object is that every man be armed." Patrick Henry
Back to top
Guest
Guest


PostPosted: Tue 18 Oct 2005, 02:50    Post subject:  

Oops, that was me making the reply. For some reason my login timed out before I got the message posted. I'm not sure why that's happening because I wasn't logged in that long, but it's happened two or three times now.
Back to top
Johnny Reb


Joined: 05 Aug 2005
Posts: 132
Location: The Confederate States of America (occupied)

PostPosted: Tue 18 Oct 2005, 03:11    Post subject:  

Humm, for some reason my logins were not persisting using standard Mozilla, but they seem to be using Firefox. Rather weird since the only difference is that I was using Tor with standard Mozilla, and I'm using JAP with Firefox. Other than that the settings are exactly the same.
_________________
He who dares not offend cannot be honest.
~ Thomas Paine
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger 
ICQ Number 
Display posts from previous:   Sort by:   
Page 1 of 2 [20 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot 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 can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1340s ][ Queries: 12 (0.0114s) ][ GZIP on ]