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, 11:55
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Pet Packaging 100 & 101 & intro to 200
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 3 [39 Posts]   Goto page: Previous 1, 2, 3 Next
Author Message
technosaurus


Joined: 18 May 2008
Posts: 4335

PostPosted: Wed 05 Aug 2009, 00:48    Post subject:  

To compile statically against dietlibc
Code:
CC="diet gcc -nostdinc ” ./configure .....


To compile against uclibc (I think?)
Code:
CC="gcc -muclibc ” ./configure .....



To reduce the size of executables first compile like this

Code:

CFLAGS=" -pipe -combine -Os -ffunction-sections -fdata-sections -momit-leaf-frame-pointer -fomit-frame-pointer -fmerge-all-constants -march=i486 -mtune=i686 " \
CXXFLAGS=" -pipe -combine -Os -ffunction-sections -fdata-sections -momit-leaf-frame-pointer -fomit-frame-pointer -fmerge-all-constants -march=i486 -mtune=i686 " \
LDFLAGS=" -Wl,-relax,-Os,-s " \
./configure --build=i486-t2-linux-gnu --prefix=/usr --sysconfdir=/etc --localstatedir=/var ......


make

now delete the executable(s) in your build tree and recompile them as follows

Code:

CFLAGS=" -pipe -combine -Os -ffunction-sections -fdata-sections -momit-leaf-frame-pointer -fomit-frame-pointer -fmerge-all-constants -march=i486 -mtune=i686 " \
CXXFLAGS=" -pipe -combine -Os -ffunction-sections -fdata-sections -momit-leaf-frame-pointer -fomit-frame-pointer -fmerge-all-constants -march=i486 -mtune=i686 " \
LDFLAGS=" -Wl,-O,-Os,--gc-sections,-s " \
./configure --build=i486-t2-linux-gnu --prefix=/usr --sysconfdir=/etc --localstatedir=/var ......


(alternatively you could just add -Wl,--gc-sections to the LDFLAGS section of the appropriate makefile)

make

If you add --gc-sections from the start then programs that use intermediate static libraries (such as foo.a) instead of objects (like bar.o) will fail to compile properly since the final program can't find things that were garbage collected from the libraries and can't link properly even though the files are redundant or unused (this mostly affects programs that use plugins)

You can 90% of the time add these to CFLAGS/CCFLAGS to save some less significant size (remove them if they cause problems)
-momit-leaf-frame-pointer
-fomit-frame-pointer
-mpreferred-stack-boundary=2
-fmerge-all-constants or -fmerge-constants (more conservative)

The LDFLAG
--no-keep-memory
may be especially usefull for puppy especially if it is loaded in RAM - use less memory and more disk i/o, but I need to study/test that one

and for C programs
-combine

_________________
Web Programming - Pet Packaging 100 & 101

Last edited by technosaurus on Sun 11 Jul 2010, 13:06; edited 1 time in total
Back to top
View user's profile Send private message 
jikkypeter

Joined: 09 Oct 2009
Posts: 1

PostPosted: Fri 09 Oct 2009, 02:40    Post subject: this is jikkypeter
Subject description: this is information
 

[url="http://www.google.com"]click[/url]
Back to top
View user's profile Send private message 
Aitch


Joined: 04 Apr 2007
Posts: 6825
Location: Chatham, Kent, UK

PostPosted: Fri 09 Oct 2009, 21:03    Post subject:  

jikkypeter

What is the point of that??

Are you a google spammer? - they don't need you.... Laughing

Aitch Smile
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4335

PostPosted: Sat 12 Dec 2009, 00:10    Post subject:  

Here is a fairly simple way to compile other programs that makes them easily configurable as a RoxApp

run ./configure --help
you should see a list that includes --prefix= , --bindir= etc...
you will want to set all of these to /usr/local/apps/$MY_PROGRAM_NAME

here is an example:
Code:
CFLAGS=" -pipe -Os " CXXFLAGS=" -pipe -Os " LDFLAGS=" -Wl,-O2,-s " \
./configure --prefix=/usr/local/apps/abiword --bindir=/usr/local/apps/abiword \
--sysconfdir=/usr/local/apps/abiword --localstatedir=/usr/local/apps/abiword \
--libdir=/usr/local/apps/abiword ....<--more-options>
make
new2dir make install


(Then in /usr/local/apps/$MY_PROGRAM_NAME make a symlink for AppRun to the main executable and a symlink for .DirIcon to any image)

I only recommend this for programs - not libraries
If you want to include additional libraries this way I would recommend first compiling the libraries with ./configure --enable-static --disable-shared before compiling your program (that way only the necessaryparts get included - sometimes only a couple of kb of a multi-MB library)

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
phogi

Joined: 05 Mar 2010
Posts: 15

PostPosted: Sun 07 Mar 2010, 13:13    Post subject:  

I'm attempting to follow the directions in the first method. My goal is to implement a driver I found for my synaptics touchpad that is on my laptop. The issue is erratic pointer behavior, and random hangs. Makes it all quite difficult to use (so I just plugged in a usb mouse). But, this driver supposedly will take care of those problems.

I'm running puppy 4.3.1 on a Compaq presario V5000.

So, everything goes fine until I get to the command line step. I type in ./configure, it tells me something like 'no such file.'

I'm assuming that some dependency is not filled for the command line program to work, or the directions I'm following are for a model of command line usage which is no longer in effect.

So, what do I need to do to make it work?
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4335

PostPosted: Sun 07 Mar 2010, 14:13    Post subject:  

there should be a readme file of some kind... sometimes you need to run ./autogen.sh to build ./configure ... others require editing the make files, others now use waf instead - either way, it should be in the documentation - please read it

synaptics is already supported (mine is working) so you shouldn't need to build a "driver" I think jemimah has already built flsynclient, which may work to configure it

kernel drivers have a whole different build process than software - there is a whole category in additional software dedicated to drivers

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
chrome307


Joined: 15 Jan 2009
Posts: 713

PostPosted: Mon 26 Jul 2010, 09:15    Post subject:  

Is it possible to combine 3 pet files eg.

spellcheck_addon.pet
gimme-2.2.3.pet
pan-0.1.3.2.pet

Into a single Pet application?
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4335

PostPosted: Mon 26 Jul 2010, 10:47    Post subject:  

yes just use pet2tgz and then tar -xf to expand them all ... then copy the contents all into 1 tree (in appropriately named folder)
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
chrome307


Joined: 15 Jan 2009
Posts: 713

PostPosted: Tue 27 Jul 2010, 05:18    Post subject:  

Thanks for getting back to me regarding this Smile

Once I have expanded all the files and place them into a 'single' folder, is my next step to create a 'new' pet file with all the contents?

[UPDATE]





I have created the directory with all the contents, then I used:

Code:
dir2pet Pan.Newsreader-0.132-full


to create a PET file, which it did.




However, after I installed it for testing purposes it failed to open.
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4335

PostPosted: Sun 29 Aug 2010, 14:55    Post subject:  

Another tip
If you are running low on space you can download tarballs and expand them at the same time. (chromium's bootstrap tarball is over 800mb)

for .tar.gz (change the "z" as applicable to your compression type)
wget -q -O - <url of tarball> |tar -xz

Bonus tip
here are a couple of flags to (try to) add to CXXFLAGS for C++ based compiles:
-fno-rtti -fno-exceptions
(they don't always both work but can save 5-10% of total compiled size)

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
enhu


Joined: 26 May 2009
Posts: 301

PostPosted: Fri 17 Sep 2010, 14:36    Post subject:  

where else can i get tra.gz files that fit to puppy besides what was given http://packages.debian.org/source/etch
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4335

PostPosted: Fri 17 Sep 2010, 14:51    Post subject:  

enhu wrote:
where else can i get tra.gz files that fit to puppy besides what was given http://packages.debian.org/source/etch
huh?
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4335

PostPosted: Mon 11 Oct 2010, 03:08    Post subject:  

I tracked down a bunch of sites that will produce a tarball of the latest development code directly from version control- over 4000 projects from gnu.org,kernel.org & repo.or.cz (+uclibc,uclibc++,busybox & buildroot) - pretty much all the major projects that support this function.

hopefully this reduces your search time trying to get the latest code.
urls.bz2
Description 
bz2

 Download 
Filename  urls.bz2 
Filesize  28.33 KB 
Downloaded  810 Time(s) 

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
enhu


Joined: 26 May 2009
Posts: 301

PostPosted: Fri 29 Oct 2010, 09:41    Post subject:  

cant seem to find tar.gz file in http://packages.debian.org/source/etch

where else can i see some?
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4335

PostPosted: Fri 29 Oct 2010, 16:20    Post subject:  

Etch is no longer supported in the package search - use lenny now (or squeeze or sid)
http://www.debian.org/distrib/packages

or http://t2-project.org/packages/

fallback is still google

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 3 [39 Posts]   Goto page: Previous 1, 2, 3 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.0840s ][ Queries: 13 (0.0063s) ][ GZIP on ]