Compiler GUI and other packaging tools

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#16 Post by technosaurus »

the problem there is with the echo command in Puppy not "echoing" the = (that is why I added the common default options that contain an equal sign) I believe the version 0.07 had similar options included (for upup). It should be fine to edit the ./configure --prefix.... line in src2all with those with an = as default options

also you can put the options (no = sign though) in a text file and pass it to src2all from the command line as the second option $2 (the third option "$3" is a directory containing a tree of extra files and the first "$1" is of course your source tarball)

if your options are common config attributes (and I suspect that they might be) I may add them to the defaults.

side note:
I wanted to add tar.lzma support but it seems that Barry configured busybox to only do lzma compression up to level 6 (7,8 and 9 require an extra config option to be set that does add some size)... it may be time to add the extra small amount of weight though since many packages are now released as tar.lzma and also because puppy is one of if not THE best distros for dialup - it would really help them out (as well as those of us who up/download a lot with slower "high speed" connections)

completely off topic:
doesn't all data travel at the same "speed" strictly speaking - light speed - wouldn't it be better to say a high rate of data transfer ... maybe not - does anyone still have one of those old modems that used a speaker/mic attached to a handset - I guess at least part of that process relies on the speed of sound
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
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

#17 Post by Gedrean »

Regarding the old modem: There was an awesome Picture story on Toms Hardware with one of those, or maybe it was another site, or maybe it was a video I watched where he got it to work. I thought it was awesome, he did Lynx... in 800 baud... it was awful.

Anyhow, I suppose then I interpreted that correctly, I looked at src2all.

Found line:
./configure --build=i486-t2-linux-gnu --prefix=/usr $CONFOPTS

So I assume I stick everything else in and it should not vomit too much. That sounds SPLENDID.

Just make sure $confopts doesn't have = things, otherwise pass it as a config file, that JUST has the contents of what I want I guess.

Thanks! I think. I hope...

User avatar
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

#18 Post by Gedrean »

New question:

From the original wiki page mentioned earlier, I saw...
-build=i486-pc-linux-gnu
And in the src2all, I saw...
--build=i486-t2-linux-gnu

So... what's the difference between pc and t2? New at this part and not sure what are best options so the pets I compile are easy for the system to figure out dependencies, and are properly going to run right for other users such that they are compatible with the standard "This is how it should be done in puppy!" thing...

Thanks!

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

#19 Post by technosaurus »

my odd numbered releases have 'pc' and the even ones have 't2'
odd numbers are for upup style woof builds (still in development)
even numbers are for 4.X (possibly earlier versions too)
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
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#20 Post by technosaurus »

This time I added a bunch of personally selected size optimizations into the build scripts, also testing zip and xz formats and removed 2petnsfs since it was only useful for manual builds.

usage is the same but you should get smaller packages by 10-40%

once this is fully debugged I would recommend setting up a repository for config files similar to slack builds (this would open the role of package maintainer to a much wider group)
Attachments
pcompile-0.1.0.pet
(4.07 KiB) Downloaded 950 times
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
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

#21 Post by Gedrean »

So, I tested out Pcompile 0.1.0, found a minor issue - in src2all, the following line:

Code: Select all

CFLAGS=" -pipe -combine -Os -ffunction-sections -fdata-sections -momit-leaf-frame-pointer -fomit-frame-pointer -march=i486 -mtune=i486 " CXXFLAGS=" -pipe -combine -Os -ffunction-sections -fdata-sections -momit-leaf-frame-pointer -fomit-frame-pointer -march=i486 -mtune=i486 " LDFLAGS=" -Wl,-Os,--gc-sections,-s "./configure --build=i486-t2-linux-gnu --prefix=/usr --sysconfdir=/etc --localstatedir=/var  $CONFOPTS
If you notice, there is no space between LDFLAGS=" -Wl,-Os,--gc-sections,-s " and ./configure --build=i486-t2-linux-gnu --prefix=/usr --sysconfdir=/etc --localstatedir=/var $CONFOPTS -- I inserted a space and that configure command ran after displaying the configure help in gtkdialog - thus guaranteeing that it actually configged with the options I chose.

Should probably be fixed if that is in error.

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

#22 Post by technosaurus »

good catch, I'll make sure to fix that in the meantime the file is /usr/bin/src2all

use this code to automagically patch it

Code: Select all

sed -i 's/.\/configure/ .\/configure/' /usr/bin/src2all
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
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

#23 Post by Gedrean »

Yeah. My only problem now is I tried to build Transmission (newest 1.74) and got everything BUT the program, using pcompile. LOL.

Something odd, I'll figure it out I guess, but still. It works at least. :)

User avatar
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

My changes, submitting a modified pet...

#24 Post by Gedrean »

Thought I'd revisit this little topic, and take another look at src2all and its buddies.

I made a few changes I thought you'd like, technosaurus.

First, fixed the bug we found earlier, with the space before ./configure
Second, put the "default" extras straight into the already-included options, changed the text to reflect.
Cleaned up the pcompile interface window with that in mind a bit.

Tried to make the labels look a bit better and not be over-spaced, but no dice - text formatting in gtkdialog is spotty with that kind of wording.

Wanted to add in a button that would trigger the ./configure --help but no dice there either, too complicated to pull off.

Well anyhow, have a look see if it plays nice for you. I used these changes to compile and build SDL and various SDL-Subgroup PETs, with plenty of success.
Attachments
pcompile-0.1.1.pet
PCompile 0.1.0 with changes made, 0.1.1 resulting version suggested. This is an unofficial pcompile version.
(4.11 KiB) Downloaded 806 times

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

#25 Post by technosaurus »

Maybe some checkboxes that default to TRUE that way they can be unchecked for packages that fail if that option is not available... then put them together in one string to pass to src2all (maybe src2all can just be part of pcompile now)
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
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

#26 Post by Gedrean »

Spoke too soon, found another glitch I never found before -- out of sheer luck apparently.

When handling bzip/bz2, src2all passes the arg -xyf to tar. Sadly, the tar version in Puppies 431 (and probably puppy 4.3.0 / upcoming 4.3.1) doesn't like y, and fails out. tar -xf <arg> seems to work, so modified it too.

I'll reply to your other suggestion in a moment.

*sigh*. Now to rebuild the damn pet and repost.
Attachments
pcompile-0.1.1.pet
use this one, not the previous one. Fixed tar bug in src2all
(4.1 KiB) Downloaded 785 times

User avatar
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

#27 Post by Gedrean »

technosaurus wrote:Maybe some checkboxes that default to TRUE that way they can be unchecked for packages that fail if that option is not available... then put them together in one string to pass to src2all (maybe src2all can just be part of pcompile now)
To be honest that sounds really spectacular. Have it trigger a default options dialog with those checkbox to turn them off if need be, and instead of having default settings in src2all just have them passed in the config file that's passed.

While joining them together may theoretically speed things up a little bit, I don't think the time is that big of an issue. Compared to the fact that src2all is already rather... disconcertingly complicated...

But I love the checkbox idea.

Pity my skills with gtkdialog have already proven... lacking.

That being said, some of the options are almost guaranteed to be there, like prefix, and build. So those can remain.

User avatar
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

#28 Post by Gedrean »

Another thought.

Some packages (like GlibC which I'm trying desparately to compile the newest version for puppy - a game requires 2.7, and all the depos have 2.6, and I can't compile 2.10 due to some falloc call being undefined) require building from a separate build directory.

I tried building and doing 2dirs and dir2pet from a separate directory, called pcompile_build, located inside several different package dirs.
doing all the commands, building, doing 2dirs, and then doing dir2pet on the proper location, all worked from inside that build directory.

In the interests of keeping everything clean and orderly in the main package directory, pcompile should probably do that, I think.
I can rewrite some lines here and there to make it work, and post that later today.

User avatar
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

#29 Post by Gedrean »

Alright, can't compile GlibC as it'll put puppy in a bag and drown it in the river:( ... but I put in the changes to make it do what I mentioned above, and it seems complacent...

One question, though, there's the python setup.py command in there, does setup.py get created by ../configure or is it usually in the main src directory anyhow? I'm not sure whether to drop back to the main directory to run that setup.py or not...

User avatar
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

#30 Post by Gedrean »

Also, and this is just my personal thing with it, since /root/my-applications is in the Path and LD Lib path, my changes put the files into that location, specifically /root/my-applications/bin -- This way I can find them easier for those on-the-fly changes and tests... <G> this is just for the pcompile files, not the files compiled - those still sit in /usr since there's no corresponding directories for etc, share, and the like.

As far as the checkboxes, I can put them in but damned if I understand how parsing works in Linux, so I'll leave that up to you techno. :)

But I'll have them in there, and comments, and lots of documentation on what I can document for the script, so it's understandable kinda...

God, nobody tell my programming professor I've been *gasp* documenting code, it'll give him a conniption.

User avatar
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

#31 Post by Gedrean »

Alright, done. Pcompile 0.1.2, now installing pcompile to /root/my-applications/bin (you can change it in the pet/tgz if you want to, this is more of a bugfix and minor change to see if it works, then I'd suggest building a pet that puts it where it should go. :) )

Works great by making the pcompile_build directory, which makes for figuring out what got built where easier.

Used it to build the new Glade3, which didn't help in my GUI developing any because it doesn't seem to include things -- and it wouldn't have mattered, because gtkdialog3 requires certain libs that should be included with GTK but aren't, to make Glade files readable as interfaces... so back to the drawing board. Though I did find techno's handy-dandy reference of different functions to copy paste... so I think I'll do that, and then just copy out some stuff and do some copypasta to make it work with the checkboxes.

Anyhow, here's 0.1.2.
Attachments
pcompile-0.1.2.pet
Pcompile 0.1.2, see above for changes.
(4.18 KiB) Downloaded 868 times

User avatar
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

#32 Post by Gedrean »

And I think now I've figured out how to do it. Thanks to your tutorial, and a little help here and there, I've figured out the elusive "notebook" tag, which has made doing this easier, though it's still not pretty.

In any case, it'll be better-ish for those tabs.
I might think it would be a good idea to split the actual file for the dialog to another file, and pcompile be designed to call that dialog and parse the results, then send those to src2all -- since it's a standalone program and can run easily without more than one argument, since it by default just takes a tarball of various types and compiles builds and pets it.

The only thing that concerns me is trying to figure out how to make pcompile pass arguments that have an = in them, as those were previously a challenge... I recall that was funky.

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

#33 Post by technosaurus »

Here are the Flags that work 99% of the time and make the compile faster and smaller.

CFLAGS=" -pipe -combine -Os -momit-leaf-frame-pointer -fomit-frame-pointer \
-fmerge-all-constants -mpreferred-stack-boundary=2 -march=i386 -mtune=i686 " \
CXXFLAGS=" -pipe -combine -Os -momit-leaf-frame-pointer -fomit-frame-pointer \
-fmerge-all-constants -mpreferred-stack-boundary=2 -march=i386 -mtune=i686 " \
LDFLAGS=" -Wl,-O4,-Os,-relax,--sort-common,--no-keep-memory,-s " \
./configure ....................
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
Gedrean
Posts: 139
Joined: Fri 05 Jun 2009, 05:59

#34 Post by Gedrean »

Okay. I'm at a wall here, so until I can figure that out I can't fix the "= in entry" bug we had before.

Instead of sed'ing out the " and = chars beforehand, then grepping, I grep first to get down to the varname="value" level.
From there I strip out the 'varname=' entirely, leaving me with "value".

I can sed out the first ", but I'm trying to kill the second ", and having a hell of a time figuring out a way. All the options with sed seem to match first occurrence, and anything with " in it needs to be preserved, but the last " does NOT need to be preserved, imho.

So, ideas?

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

#35 Post by technosaurus »

That is why I was suggesting integrating src2all - maybe a newer version of sed/grep/cat etc... who knows? I never figured that one out, but it is not applicable if you don't have to pass the parameters outside of the script (just paste src2all into the end of pcompile and fix $1, $2 and $3 to use the parameters in pcompile - noone really uses src2all directly - that is what T2 and src2pkg are for)
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].

Post Reply