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 16 Apr 2014, 09:34
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
upgrading xorg-server for Puppy 4.3
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
Karl Godt


Joined: 20 Jun 2010
Posts: 3860
Location: Kiel,Germany

PostPosted: Sat 28 Sep 2013, 16:30    Post subject:  upgrading xorg-server for Puppy 4.3
Subject description: sdksyms.sh awk poops ...
 

Trying to upgrade Xorg for Puppy 4.3 I am stuck at the

xorg-server-1.7.7/hw/xfree86/loader/sdksyms.sh

that I have added some debugging lines :

Code:
echo "$0:$@" >compile_sdksyms.text
[ -e sdksyms.c-original ] && cp -f sdksyms.c-original sdksyms.c || cp -a sdksyms.c sdksyms.c-original

${CPP:-cpp} "$@" -DXorgLoader sdksyms.c -o sdksyms.o
RV=$?
echo "
${CPP:-cpp} $@ -DXorgLoader sdksyms.c -o sdksyms.o"" : Returnvalue : $RV" >> compile_sdksyms.text

topdir=$1
shift
echo "TOPDIR topdir='$topdir'" >> compile_sdksyms.text

The unaltered awk part is that :
Code:
topdir=$1
shift
LC_ALL=C
export LC_ALL
${CPP:-cpp} "$@" -DXorgLoader sdksyms.c | ${AWK:-awk} -v topdir=$topdir '
BEGIN {
    sdk = 0;
    print("/*");
    print(" * These symbols are referenced to ensure they");
    print(" * will be available in the X Server binary.");
    print(" */");
    printf("/* topdir=%s */\n", topdir);
    print("_X_HIDDEN void *xorg_symbols[] = {");

    printf("sdksyms.c:") > "sdksyms.dep";
}
/^# [0-9]+ "/ {
    #   Process text after a include in a relative path or when the
    # processed file has a basename matching $top_srcdir.
    #   Note that indexing starts at 1; 0 means no match, and there
    # is a starting ".
    sdk = $3 !~ /^"\// || index($3, topdir) == 2;

    if (sdk && $3 ~ /\.h"$/) {
   # remove quotes
   gsub(/"/, "", $3);
   if (! headers[$3]) {
       printf(" \\\n  %s", $3) >> "sdksyms.dep";
       headers[$3] = 1;
   }
    }
}

/^extern[    ]/  {
    if (sdk) {
   n = 3;

   # skip attribute, if any
   while ($n ~ /^(__attribute__|__global)/ ||
       # skip modifiers, if any
       $n ~ /^\*?(unsigned|const|volatile|struct)$/ ||
       # skip pointer
       $n ~ /\*$/)
       n++;

   # type specifier may not be set, as in
   #   extern _X_EXPORT unsigned name(...)
   if ($n !~ /[^a-zA-Z0-9_]/)
       n++;

   # match
   #    extern _X_EXPORT type (* name[])(...)
   if ($n ~ /^[^a-zA-Z0-9_]+$/)
       n++;

   # match
   #   extern _X_EXPORT const name *const ...
   if ($n ~ /^([^a-zA-Z0-9_]+)?const$/)
       n++;

   # actual name may be in the next line, as in
   #   extern _X_EXPORT type
   # possibly ending with a *
   #   name(...)
   if ($n == "" || $n ~ /^\*+$/) {
       getline;
       n = 1;
   }

   # dont modify $0 or $n
   symbol = $n;

   # remove starting non word chars
   sub(/^[^a-zA-Z0-9_]+/, "",symbol);

   # remove from first non word to end of line
   sub(/[^a-zA-Z0-9_].*/, "", symbol);

   #print;
   printf("    (void *) &%s,\n", symbol);
    }
}

END {
    print("};");

    print("") >> "sdksyms.dep";
}' > _sdksyms.c

STATUS=$?

cat _sdksyms.c >> sdksyms.c
#rm _sdksyms.c

[ $? != 0 ] && exit $?

exit $STATUS

The problem is while
${CPP:-cpp} "$@" -DXorgLoader sdksyms.c -o sdksyms.o
creates an outputfile with content like
Code:
extern void OsVendorInit(void);

extern void OsBlockSignals (void);

extern void OsReleaseSignals (void);


extern int System(char *);
extern pointer Popen(char *, char *);

But the awk ed file gets like this :
Quote:
(void *) &OsVendorInit,
(void *) &void,
(void *) &void,

(void *) &System,
(void *) &Popen,

thus screwing around three dozend of symbols so that the Xorg binary does not compile .
Crying or Very sad
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4133

PostPosted: Sat 28 Sep 2013, 22:04    Post subject:  

looks like it assumes no space between function name and the parens
_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3860
Location: Kiel,Germany

PostPosted: Sun 29 Sep 2013, 02:50    Post subject:  

Looks like because of using $3 and not checking for $4 and further ..

Hmm even the debian patches seem not to correct anything .
Probably they used to fix it manually in the headers , but did not diff ed it .

These lines also do not get awk ed right , probably because of the * pointer becomes a wildcard:
Code:
extern int GetEventList(EventListPtr* list);
extern Mask GetWindowXI2Mask(DeviceIntPtr dev, WindowPtr win, xEvent* ev);

become
Code:
    (void *) &list,
    (void *) &ev,


while
Code:
extern EventListPtr InitEventList(int num_events);
extern void FreeEventList(EventListPtr list, int num_events);

are substituted correctly :
Code:
    (void *) &InitEventList,
    (void *) &FreeEventList,

LOL

~
Any hints welcome to at least clear that * problem .
Despite that 1.7 series of xorg started with that sdksyms.sh and apparently 1.10.6 is the last to include that .
Wary/Racy are using 1.11.x I think, clever !!
Back to top
View user's profile Send private message Visit poster's website 
Karl Godt


Joined: 20 Jun 2010
Posts: 3860
Location: Kiel,Germany

PostPosted: Sun 29 Sep 2013, 17:58    Post subject: sdksyms.c for xorg-server-1.7.7  

Quote:
It was created by xorg-server configure 1.7.7, which was
generated by GNU Autoconf 2.63. Invocation command line was

$ ./configure --prefix=/usr/X11 --with-dri-driver-path=/usr/X11/lib/xorg/modules/dri --with-int10=vm86 --enable-shave=no --enable-xfbdev --enable-xfake --enable-xsdl --enable-xephyr --enable-kdrive --enable-xquartz --enable-xnest --enable-xvfb --enable-dmx --enable-xorg --enable-int10-module --enable-vbe --enable-vgahw --enable-xaa --enable-xfree86-utils --disable-config-hal --enable-config-dbus=no --enable-multibuffer --enable-tslib --enable-xcalibrate=yes --enable-dri --enable-dri2 --enable-glx-tls --enable-install-libxf86config --enable-static LDFLAGS=-L/usr/X11/lib

## --------- ##
## Platform. ##
## --------- ##

hostname = puppypc
uname -m = i686
uname -r = 2.6.30.9-i586-dpup005-Celeron2G
uname -s = Linux
uname -v = #6 SMP Sat Jan 15 13:35:51 GMT-8 2011
Of course GMT-8 was not right then, should have been GMT+1

Fixing the headers made 90% of the errors vanish, but of course not all of them .
So added
Code:
if [ -f sdksyms.c.shouldbe.2 ] ; then
cp -f sdksyms.c.shouldbe.2 sdksyms.c
else
[ .. awk .. ]
fi
to sdksyms.sh
sdksyms.c.shouldbe.2.bz2
Description 
bz2

 Download 
Filename  sdksyms.c.shouldbe.2.bz2 
Filesize  12.02 KB 
Downloaded  74 Time(s) 
Back to top
View user's profile Send private message Visit poster's website 
Karl Godt


Joined: 20 Jun 2010
Posts: 3860
Location: Kiel,Germany

PostPosted: Thu 03 Oct 2013, 15:38    Post subject:  

Update : have downloaded all
ftp://ftp.freedesktop.org/pub/xorg/X11R7.*/src/everything
from 7.2 to current :

Code:
X Window System Version 7.2.0
Release Date: 22 January 2007
X Protocol Version 11, Revision 0, Release 7.2
Build Operating System: Linux 2.6.30.9-i586-dpup005-Celeron2G i686
Current Operating System: Linux puppypc 2.6.30.9-i586-dpup005-Celeron2G #6 SMP Sat Jan 15 13:35:51 GMT-8 2011 i686
Build Date: 01 October 2013
Works OK with i810 on my intel graphics , just the screen is a middle of the 1920x1080 possible and the 1600x1200 that the driver supports .


Code:
X.Org X Server 1.4.0
Release Date: 5 September 2007
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.30.9-i586-dpup005-Celeron2G i686
Current Operating System: Linux puppypc 2.6.30.9-i586-dpup005-Celeron2G #6 SMP Sat Jan 15 13:35:51 GMT-8 2011 i686
Build Date: 03 October 2013  09:37:05AM
Works OK but, the keyboard keys from right of the main keys plus some modifier keys are totally mapped wrong . Also the keyboard LEDs don't switch on/off . Half of the input drivers were linked to versions one minor to low to compile straight plus several video drivers incl. the intel one .


Both times had trouble with libXfont-1.2.9/src/FreeType/ftfuncs.c : needed
#include <ctype.h>
for
ftfuncs.c:2081: warning: implicit declaration of function `isspace'
ftfuncs.c:2081: warning: nested extern declaration of `isspace'
That compiled anyway but Xorg choked on the wrong function in the library at collect time .

Compiling of one Xorg took me two days without libdrm and mesa .

Here my batch script :
Code:
#!/bin/sh

ME_PRO=`realpath "$0"`
ME_DIR="${ME_PRO%/*}"
echo "ME_DIR=$ME_DIR"

export PKG_CONFIG_PATH=/usr/X11R7.3/lib/pkgconfig:/usr/X11/lib/pkgconfig:/usr/gtk/lib/pkgconfig
export LD_LIBRARY_PATH=/lib:/usr/X11R7.3/lib:/usr/X11/lib:/usr/gtk/lib:/usr/local/lib:/usr/lib
export PATH=/bin:/sbin:/usr/X11R7.3/bin:/usr/X11/bin:/usr/gtk/bin:/usr/local/bin:/usr/local/sbin:/usr/gtk/bin:/usr/bin:/usr/sbin:/root/my-applications/bin:/root/my-applications/sbin

for pack in *.tar*
do
[ -f "$pack" ] || continue

    echo "Extracting $pack"
    tar -axf "$pack"
    [ "$?" = 0 ] || continue
 NEWDIR=`ls -1c | head -n1`
 echo "NEWDIR=$NEWDIR"
 [ -d "$NEWDIR" ] || continue
 #[ -e "$NEWDIR"/Makefile ] && continue
 [ -f "$NEWDIR"/configure ] || continue

 cd "$NEWDIR"
 ERR=/dev/null
 mv -f --backup=numbered config.log config.log.old 2>$ERR
 mv -f --backup=numbered make_errs.log make_errs.log.old 2>$ERR
 mv -f --backup=numbered make_install_errs.log make_install_errs.log.old 2>$ERR

 ./configure --prefix=/usr/X11R7.3 --enable-static=yes CFLAGS="-I/usr/X11R7.3/include -I/usr/X11/include -I/usr/gtk/include" LDFLAGS="-L/usr/X11R7.3/lib -L/usr/X11/lib -L/usr/gtk/lib"
 [ "$?" = 0 ] || { cd "$ME_DIR";continue; }
 make -i 2>>make_errs.log
 [ "$?" = 0 ] || { cd "$ME_DIR";continue; }
 make -i install 2>>make_install_errs.log
 new2dir -fr
 sleep 2m
 cd "$ME_DIR"

done

I have altered new2dir to accept -fr options to force going on answering all questions with defaults and grep the ARCH out of the config.log file .
Back to top
View user's profile Send private message Visit poster's website 
Karl Godt


Joined: 20 Jun 2010
Posts: 3860
Location: Kiel,Germany

PostPosted: Wed 09 Oct 2013, 13:50    Post subject: Xorg-7.3 xorg-server-1.4  

Finally got mesa working . libdrm-2.3.0 is highest and mesa must be above 6.5.3 and below 7.1.0 ( used 7.0.3 ) .

Will try to add glitz and tslib .

Quote:
X.Org X Server 1.4.0
Release Date: 5 September 2007
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.30.9-i586-dpup005-Celeron2G i686
Current Operating System: Linux puppypc 2.6.30.5 #1 SMP Tue Sep 1 15:48:26 GMT-8 2009 i686
Build Date: 09 October 2013 03:25:58PM

(II) AIGLX: Loaded and initialized /usr/X11R7.3/lib/dri/i965_dri.so
(II) GLX: Initialized DRI GL provider for screen 0
(II) intel(0): Setting screen physical size to 477 x 268


Keyboard still is skewed :
Quote:
(**) AT Translated Set 2 keyboard: always reports core events
(**) AT Translated Set 2 keyboard: Device: "/dev/input/event0"
(II) AT Translated Set 2 keyboard: Found keys
(II) AT Translated Set 2 keyboard: Configuring as keyboard
(II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD)
(**) Option "xkb_rules" "base"
(**) AT Translated Set 2 keyboard: xkb_rules: "base"
(**) Option "xkb_model" "evdev"
(**) AT Translated Set 2 keyboard: xkb_model: "evdev"
(**) Option "xkb_layout" "us"
(**) AT Translated Set 2 keyboard: xkb_layout: "us"
(WW) Couldn't load XKB keymap, falling back to pre-XKB keymap
(**) Dell Dell USB Keyboard: always reports core events
(**) Dell Dell USB Keyboard: Device: "/dev/input/event7"
(II) Dell Dell USB Keyboard: Found keys
(II) Dell Dell USB Keyboard: Configuring as keyboard
(II) XINPUT: Adding extended input device "Dell Dell USB Keyboard" (type: KEYBOARD)
(**) Option "xkb_rules" "base"
(**) Dell Dell USB Keyboard: xkb_rules: "base"
(**) Option "xkb_model" "evdev"
(**) Dell Dell USB Keyboard: xkb_model: "evdev"
(**) Option "xkb_layout" "us"
(**) Dell Dell USB Keyboard: xkb_layout: "us"
(WW) Couldn't load XKB keymap, falling back to pre-XKB keymap
(**) Dell Dell USB Keyboard: always reports core events
(**) Dell Dell USB Keyboard: Device: "/dev/input/event6"
(II) Dell Dell USB Keyboard: Found keys
(II) Dell Dell USB Keyboard: Configuring as keyboard
(II) XINPUT: Adding extended input device "Dell Dell USB Keyboard" (type: KEYBOARD)
(**) Option "xkb_rules" "base"
(**) Dell Dell USB Keyboard: xkb_rules: "base"
(**) Option "xkb_model" "evdev"
(**) Dell Dell USB Keyboard: xkb_model: "evdev"
(**) Option "xkb_layout" "us"
(**) Dell Dell USB Keyboard: xkb_layout: "us"
(WW) Couldn't load XKB keymap, falling back to pre-XKB keymap
(**) 2.4G RF MOUSE: always reports core events
(**) 2.4G RF MOUSE: Device: "/dev/input/event5"
(II) 2.4G RF MOUSE: Found x and y relative axes
(II) 2.4G RF MOUSE: Found mouse buttons
(II) 2.4G RF MOUSE: Configuring as mouse
(II) XINPUT: Adding extended input device " 2.4G RF MOUSE" (type: MOUSE)
(**) Mosart Wireless Mouse: always reports core events
(**) Mosart Wireless Mouse: Device: "/dev/input/event3"
(II) Mosart Wireless Mouse: Found x and y relative axes
(II) Mosart Wireless Mouse: Found mouse buttons
(II) Mosart Wireless Mouse: Configuring as mouse
(II) XINPUT: Adding extended input device "Mosart Wireless Mouse" (type: MOUSE)
(**) Power Button: always reports core events
(**) Power Button: Device: "/dev/input/event2"
(II) Power Button: Found keys
(II) Power Button: Configuring as keyboard
(II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD)
(**) Option "xkb_rules" "base"
(**) Power Button: xkb_rules: "base"
(**) Option "xkb_model" "evdev"
(**) Power Button: xkb_model: "evdev"
(**) Option "xkb_layout" "us"
(**) Power Button: xkb_layout: "us"
(WW) Couldn't load XKB keymap, falling back to pre-XKB keymap
(**) Power Button: always reports core events
(**) Power Button: Device: "/dev/input/event1"
(II) Power Button: Found keys
(II) Power Button: Configuring as keyboard
(II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD)
(**) Option "xkb_rules" "base"
(**) Power Button: xkb_rules: "base"
(**) Option "xkb_model" "evdev"
(**) Power Button: xkb_model: "evdev"
(**) Option "xkb_layout" "us"
(**) Power Button: xkb_layout: "us"
(WW) Couldn't load XKB keymap, falling back to pre-XKB keymap
Xorg seems to try to evaluate every /dev/input/* as keyboard .

And xerrs.log says :
Quote:
syntax error: line 1 of stdin
Errors encountered in stdin; not compiled.
Error loading new keyboard description
for my setxkbmap command line - setxkbmap works in the console , but using it ends in weird keyboard layout .
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
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.0967s ][ Queries: 13 (0.0043s) ][ GZIP on ]