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 Thu 30 Oct 2014, 13:57
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 25 Posts_count   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, ..., 23, 24, 25 Next
Author Message
Iguleder


Joined: 11 Aug 2009
Posts: 1923
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_website MSNM 
ICQ 
technosaurus


Joined: 18 May 2008
Posts: 4353

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: 1923
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_website MSNM 
ICQ 
technosaurus


Joined: 18 May 2008
Posts: 4353

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: 782

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_website 
Iguleder


Joined: 11 Aug 2009
Posts: 1923
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_website MSNM 
ICQ 
goingnuts

Joined: 07 Dec 2008
Posts: 782

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  82 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  80 Time(s) 
Back to top
View user's profile Send_private_message Visit_website 
Iguleder


Joined: 11 Aug 2009
Posts: 1923
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_website MSNM 
ICQ 
Ibidem

Joined: 25 May 2010
Posts: 502
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: 4353

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: 502
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: 4353

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: 1923
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   330 Time(s)

emelfm.png


_________________
My homepage
Back to top
View user's profile Send_private_message Visit_website MSNM 
ICQ 
Iguleder


Joined: 11 Aug 2009
Posts: 1923
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_website MSNM 
ICQ 
greengeek

Joined: 20 Jul 2010
Posts: 2607
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:   Sort by:   
Page 6 of 25 Posts_count   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, ..., 23, 24, 25 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0915s ][ Queries: 13 (0.0128s) ][ GZIP on ]