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 Wed 23 Apr 2014, 06:32
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Puppy In-House Development
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 6 of 16 [229 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, ..., 14, 15, 16 Next
Author Message
Iguleder


Joined: 11 Aug 2009
Posts: 1776
Location: Israel, somewhere in the beautiful desert

PostPosted: Fri 15 Nov 2013, 04:00    Post subject:  

I'm aware of that, but I want it to be clean. I want the whole thing to work without additional parameters, so EFISTUB can be used in the future.
_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
technosaurus


Joined: 18 May 2008
Posts: 4134

PostPosted: Fri 15 Nov 2013, 11:54    Post subject:  

When I did microsaurus, one of the things that really helped to simplify things was making every executable path a symlink to /bin and every library path a symlink to /lib (and similar things with other common areas: modules, images, xdgdirs...) The kernel with builtin initramfs (static Xvesa, jwm, rxvt and busybox) was less than 1Mb. This worked better than I could have expected for speeding up start times when the prime purpose was size reduction. It turns out that a lot of the time goes to looking in directories for executables and libraries, and even kernel module loads were nearly instant with everything in /lib/modules/<version> rather than in subdirs (though certain programs need to be patched to remove those hardcoded paths - ndiswrapper.c is one example)
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Iguleder


Joined: 11 Aug 2009
Posts: 1776
Location: Israel, somewhere in the beautiful desert

PostPosted: Fri 15 Nov 2013, 12:56    Post subject:  

Currently, the file system is very simple - only /bin and /lib, only static libraries.

Since things fail to build against tinyxlib, I'm currently improving it so it gets installed as libX11.a, while other libraries are links to it. This solves unresolved symbol problems which arise when applications assume they need to link only against a single library, without its dependencies.

EDIT: it's awesome! JWM recognizes all available extensions and X libraries now.

EDIT 2: other applications are still messed up because of static linking. Now I understand why pupngo has shared libraries Laughing

_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
technosaurus


Joined: 18 May 2008
Posts: 4134

PostPosted: Sat 16 Nov 2013, 00:00    Post subject:  

How are they "messed up by static linking"? I've never had that problem. Is it possible that hardcoded compiled builtin paths need to be fixed? If you build with a standard Puppy, then it will try to put stuff in /usr/... due to $PREFIX env var and many others... for autotools, you need to specify --prefix=, --bindir=, --sysconfdir=, --localstatedir=, etc... and rox requires some xdg dirs to be set.
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 777

PostPosted: Sat 16 Nov 2013, 04:03    Post subject:  

Iguleder wrote:
..Now I understand why pupngo has shared libraries Laughing

Question you mean no libraries Question If not you are studying quite old version...
Next step might be to do multi-call binaries of jwm, xfbdev, init, rxvt...
Back to top
View user's profile Send private message Visit poster's website 
Iguleder


Joined: 11 Aug 2009
Posts: 1776
Location: Israel, somewhere in the beautiful desert

PostPosted: Sat 16 Nov 2013, 06:17    Post subject:  

technosaurus wrote:
How are they "messed up by static linking"?


When an application wants to link against libXt, it assumes libXt is linked against its own dependencies. That's true for shared objects, but not for static libraries - when something links against it statically, you get hundreds of undefined functions.

EDIT: using pkg-config and passing "--static" through a wrapper in $PATH seems to solve all X11 linking problems.

EDIT 2: lookin' good! Still fighting glib and GTK1, but I got JWM to build with Xft support.

Code:

#!/bin/sh
for i in linux_headers musl lazy_utils loksh tinyxlib xinit zlib tinyxserver font_cursor_misc font_misc_misc font_alias freetype expat fontconfig libxft jwm ttf_bitstream_vera; do sh build.sh $i; done
. ./config
cd $SYSROOT/usr/share/fonts/misc
mkfontscale
mkfontdir

_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
goingnuts

Joined: 07 Dec 2008
Posts: 777

PostPosted: Sat 16 Nov 2013, 12:51    Post subject:  

Iguleder wrote:
...EDIT 2: lookin' good! Still fighting glib and GTK1, but I got JWM to build with Xft support.
You might want to use attached patches.
gtk+-1.2.10.diff.gz
Description 
gz

 Download 
Filename  gtk+-1.2.10.diff.gz 
Filesize  3.62 KB 
Downloaded  45 Time(s) 
glib-1.2.10-gstrfuncs.diff.gz
Description 
gz

 Download 
Filename  glib-1.2.10-gstrfuncs.diff.gz 
Filesize  2.32 KB 
Downloaded  41 Time(s) 
Back to top
View user's profile Send private message Visit poster's website 
Iguleder


Joined: 11 Aug 2009
Posts: 1776
Location: Israel, somewhere in the beautiful desert

PostPosted: Sat 16 Nov 2013, 14:06    Post subject:  

Got GTK1 to build.

Here's what I get when I run emelFM:
Quote:
GLib-ERROR **: could not allocate 4294967295 bytes
aborting...

_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
Ibidem

Joined: 25 May 2010
Posts: 430
Location: State of Jefferson

PostPosted: Sat 16 Nov 2013, 20:29    Post subject:  

Iguleder wrote:
Got GTK1 to build.

Here's what I get when I run emelFM:
Quote:
GLib-ERROR **: could not allocate 4294967295 bytes
aborting...

That looks like UINT_MAX/WEOF/WCHAR_MAX (0xFFFFFFFF), but I have no idea where it comes from.
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4134

PostPosted: Mon 18 Nov 2013, 00:19    Post subject:  

I had that issue once when building gtk1 with musl, but it fixed itself after rerunning configure with a couple of -D*** CFLAGS (I don't recall if it was POSIX, GNU or some other _SOURCE option) ...for musl make sure you enable large file support. Both gtk and glib 1 need a LOT of code cleanup. I started on some of it, but only got about half way through glib (if you can simply ignore the bloat, it would probably only take an hour or so)
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Ibidem

Joined: 25 May 2010
Posts: 430
Location: State of Jefferson

PostPosted: Mon 18 Nov 2013, 23:04    Post subject:  

Ah yes. musl always has large file support (no 32-bit off_t), so some things do get rather picky...I would not be surprised if that was the issue.

_ALL_SOURCE is supposedly default now, but I'm inclined to pass -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
(just because of some of the GNU braindamage). With musl, -D_XOPEN_SOURCE=700 gives you POSIX2008/POSIX2013, but -D_XOPEN_SOURCE=<number less than 700> gives you that plus the functions that were removed before then.

-D_LARGEFILE64_SOURCE makes musl look like glibc exposing off64_t and related ABI.
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4134

PostPosted: Tue 19 Nov 2013, 22:22    Post subject:  

Here is a useful script helper for sorting:

Code:
#include <stdlib.h>
#include <string.h>
static inline int cmp(const void *a, const void *b){
   return strcmp(*(const char **)a, *(const char **)b);
}

int main(int argc, char *argv[]){
    qsort(++argv, --argc, sizeof(char *), cmp);
    while (argc){
      write(1,argv[0],strlen(argv[0]));
      write(1,(--argc && argv++)?"\t":"\n",1);
   }
}


it could be extended to use strcasecmp, strverscmp

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


Joined: 11 Aug 2009
Posts: 1776
Location: Israel, somewhere in the beautiful desert

PostPosted: Thu 21 Nov 2013, 11:38    Post subject:  

On my way home, I'll try to rebuild glib. I hope it's going to work, since I have only two days to work on it.

Next week I'll be busy with my new apartment, so I won't have much time to mess with this project. Crying or Very sad

EDIT: I found out that g_malloc() receives a gulong (which is 32-bit), while stat() returns a 64-bit off_t, which gets truncated to ULONG_MAX. I'm currently trying to rebuild GLib and GTK1 with gulong as unsigned int, to see whether the problem is gone.

EDIT 2: the problem persists. I ran GDB and I think the problem is here:
Code:
guint bufsize = sysconf (_SC_GETPW_R_SIZE_MAX);


GLib allocates this size, but musl's sysconf() returns -1, (signed) which is put in a gulong (unsigned). I'm rebuilding GLib with a fixed buffer size I took from glibc's headers - this looks more promising Smile

EDIT 3: yay! Very Happy
emelfm.png
 Description   
 Filesize   6.62 KB
 Viewed   280 Time(s)

emelfm.png


_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
Iguleder


Joined: 11 Aug 2009
Posts: 1776
Location: Israel, somewhere in the beautiful desert

PostPosted: Fri 22 Nov 2013, 14:09    Post subject:  

More good news - I got emelFM and Beaver to cross-compile cleanly, without any modifications, using wrappers for glib-config and gtk-config.

Any recommendations for more GTK1 applications? Currently, ROX-Filer and mtPaint are the TODO list.

_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
greengeek

Joined: 20 Jul 2010
Posts: 2099
Location: New Zealand

PostPosted: Fri 22 Nov 2013, 14:27    Post subject:  

Maybe a basic audio recording program? (Is there a GTK1 version of something like mhwaveedit??). And a basic audio player.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 6 of 16 [229 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, ..., 14, 15, 16 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
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.0726s ][ Queries: 13 (0.0060s) ][ GZIP on ]