Board index » kylix » Re: Workaround for kylix de{*word*81} on kernels > 2.6.10

Re: Workaround for kylix de{*word*81} on kernels > 2.6.10


2006-02-23 12:27:45 AM
kylix1
Andreas Hausladen schrieb:
Quote

And I always asked me why the printer started to output strange letters
when I wanted to link an application :-)


But I told you: Always turn off the printer when linking! ;-)
 
 

Re:Re: Workaround for kylix de{*word*81} on kernels > 2.6.10

theo wrote:
Quote

>
>The de{*word*81} works fine,
>but code browsing (ctr-clicking on a unit or procedure)
>does not work on new kernels.
>
>

?? I can't confirm this
I downloaded Suse 10 and in Suse 10 indeed
everything works (code browsing + debugging via ptrace_interposer.so)
but in Mandriva 2006 code browsing does not work.
Does anyone have similar problem on another distro (Fedora ?, Redhat ? ...)
How to replicate:
startdelphi
file ->new ->application
in editor ctrl+left click on word "Types" in the uses clause of Unit1.pas.
This does not open the unit Types.
The cursor temporarily goes to hourglass (background parsing)
but the browsing does not work.
source /usr/kylix3/bin/kylixpath
strace -ff -o dada.pid /usr/kylix/bin/delphi
gives alot of output, but no clue :-)
kind regards,
Den Jean
 

Re:Re: Workaround for kylix de{*word*81} on kernels > 2.6.10

Den Jean schrieb:
Quote

with echo 1>/proc/sys/vm/legacy_va_layout
it now also works in Mandriva 2006.0 (Mandrake)

so everything works fine now in Mandriva (debugging,code browsing)
For mysql you need to install libmysqlclient-10 (get it from Mandrake 9.1)

Could you complete the page
www.theo.ch/kylix/suse10.html
for Mandriva and send it to me?
But I won't test it myself. ;-)
 

{smallsort}

Re:Re: Workaround for kylix de{*word*81} on kernels > 2.6.10

Den Jean wrote:
Quote
I downloaded Suse 10 and in Suse 10 indeed
everything works (code browsing + debugging via ptrace_interposer.so)

but in Mandriva 2006 code browsing does not work.

with echo 1>/proc/sys/vm/legacy_va_layout
it now also works in Mandriva 2006.0 (Mandrake)
so everything works fine now in Mandriva (debugging,code browsing)
For mysql you need to install libmysqlclient-10 (get it from Mandrake 9.1)
kind regards,
Den Jean
 

Re:Re: Workaround for kylix de{*word*81} on kernels > 2.6.10

Lionel Reynaud wrote:
Quote
Very great news ! Many thanks !

is the C++ part works ??

Regards,
Lionel
I recently found this information (from the winehq)
before:
0x08000000 ... binary code
0x08xxxxxx ... brk area
0x40000000 ... start of mmap, new mmaps go after old ones
0xbfxxxxxx ... stack
after:
0x08000000 ... binary code
0x08xxxxxx ... brk area
0xbfxxxxxx ... _end_ of all mmaps, new mmaps go below old ones
0xbfyyyyyy ... stack
And my ilink "debugging" showed that it crashes because of a mmap call
with some calculation (if I remember correctly). So the change from
top-down to bottom-up for the mmap allocations could be the problem for
the latest ilink problems.
--
Regards,
Andreas Hausladen
(www.kylix-patch.de.vu - unofficial Kylix 3 patches)
(andy.jgknet.de/blog)
 

Re:Re: Workaround for kylix de{*word*81} on kernels > 2.6.10

theo wrote:
Quote
Could you complete the page
www.theo.ch/kylix/suse10.html
for Mandriva and send it to me?

#all as root
#edit startdelpi
vi `which startdelphi`
#Add to the existing export lines
#(at least before the last line)
export LD_ASSUME_KERNEL=2.4.21
export LD_PRELOAD=/usr/lib/ptrace_interposer.so
#copy ptrace_interpose.so /usr/lib
#edit sysctl.conf
vi /etc/sysctl.conf
#Add this line at the end:
vm.legacy_va_layout=1
#you need to reboot for this config setting to take effect
#or you can do this manually on the commandline
#but unlike the config setting, it is not permanent
echo 1>/proc/sys/vm/legacy_va_layout
#you can verify this setting by doing
cat /proc/sys/vm/legacy_va_layout
#it should return 1
 

Re:Re: Workaround for kylix de{*word*81} on kernels > 2.6.10

theo wrote:
Quote

But I won't test it myself. ;-)
For Suse 10 I have some remarks, you can test yourself :-)
1) LANG must be set
Even if you just use language "en" you still need to do
export LANG=en_US
2) LC_CTYPE must be set correctly
When working in a root login ('su -' or just actually logged in as root)
LC_CTYPE is not set correctly in Suse
export LC_CTYPE=en_US
If you do not do this, the font get very small or just disappear and
the forms of the ide get extremely large.
If you ran kylix like this and than make the fix with export blabla,
the next time your layout me be disturbed because kylix tried to save the
broken form positions. Just delete delphi96rc
rm ~/.borland/delphi69rc
3) MySQL:
mysql: we did not manage to get libmysqlclient-10 compiled on suse,
but just copying the Mandrake files and making the version links just worked
# cat install.sh
#!bin/bash
cp libmysqlclient.so.10.0.0 /usr/lib
cp libmysqlclient_r.so.10.0.0 /usr/lib
ln -sf /usr/lib/libmysqlclient.so.10.0.0 /usr/lib/libmysqlclient.so.10
ln -sf /usr/lib/libmysqlclient_r.so.10.0.0 /usr/lib/libmysqlclient_r.so.10
4) /proc/sys/vm/legacy_va_layout ?
This is not set in Suse10, though everything seems to
work, maybe if later you still discover problems in Suse with Kylix,
you may try it aswell. Googling for wine legacy_va_layout or
legacy_va_layout linux games reveals alot.
kind regards,
Den Jean
 

Re:Re: Workaround for kylix de{*word*81} on kernels > 2.6.10

Thanks Andreas for this new information. We progress !
But i don't know how to use this information ;)
I am more a "end user" than a "hacker" :)
Regards,
Lionel
"Andreas Hausladen" < XXXX@XXXXX.COM >a écrit
dans le message de news: XXXX@XXXXX.COM ...
Quote
Lionel Reynaud wrote:

>Very great news ! Many thanks !
>
>is the C++ part works ??
>
>Regards,
>Lionel

I recently found this information (from the winehq)

before:

0x08000000 ... binary code
0x08xxxxxx ... brk area
0x40000000 ... start of mmap, new mmaps go after old ones
0xbfxxxxxx ... stack

after:

0x08000000 ... binary code
0x08xxxxxx ... brk area
0xbfxxxxxx ... _end_ of all mmaps, new mmaps go below old ones
0xbfyyyyyy ... stack

And my ilink "debugging" showed that it crashes because of a mmap call
with some calculation (if I remember correctly). So the change from
top-down to bottom-up for the mmap allocations could be the problem for
the latest ilink problems.


--
Regards,

Andreas Hausladen
(www.kylix-patch.de.vu - unofficial Kylix 3 patches)
(andy.jgknet.de/blog)
 

Re:Re: Workaround for kylix de{*word*81} on kernels > 2.6.10

Thanks
I've updated the page on: www.theo.ch/kylix/suse10.html
with your report.
 

Re:Re: Workaround for kylix de{*word*81} on kernels > 2.6.10

Paulo Marques írta:
Quote

Hi, all

Me and Paulo Costa have been trying to find out why the kylix integrated
de{*word*81} hangs with recent kernels. You can follow the thread on LKML here:

lkml.org/lkml/2006/2/14/419

We've now been able to make the de{*word*81} work with any recent kernel (I
hope) using a stub that intercepts system calls made by the de{*word*81}, so
that it simulates the old kernel behavior.

I've posted the file with the stub to borland.public.attachments.

To make the de{*word*81} work:

- unzip the stub file
- place the ptrace_interposer.so in /usr/lib (for instance)
- do export "LD_PRELOAD=/usr/lib/ptrace_interposer.so" before calling
"startdelphi"

This works for us under both kernel 2.6.12 and 2.6.16-rc3. The de{*word*81}
doesn't hang anymore and works just fine.

I would like to know if this works for everyone, or if there are still
problems with this approach with some distributions.

Thanks for any feedback,

--
Paulo Marques - www.grupopie.com
Hello,
I have some problem to compile this PATCH under FC4. Can you help me?
1. BUG: <linux/user.h>does not exist. Sad
[aperger@ati02 ptrace4]$ make
gcc -W -Wall -O2 -o ptrace_interposer.o -fPIC -c ptrace_interposer.c
ptrace_interposer.c:13:24: error: linux/user.h: Nincs ilyen fájl vagy
könyvtár
ptrace_interposer.c: In function ‘ptrace?
ptrace_interposer.c:117: error: dereferencing pointer to incomplete type
ptrace_interposer.c:118: error: dereferencing pointer to incomplete type
ptrace_interposer.c:119: error: storage size of ‘tmp_regs?isn’t known
ptrace_interposer.c:121: error: dereferencing pointer to incomplete type
ptrace_interposer.c:121: error: dereferencing pointer to incomplete type
ptrace_interposer.c:119: warning: unused variable ‘tmp_regs?
ptrace_interposer.c:135: error: dereferencing pointer to incomplete type
ptrace_interposer.c:139: error: dereferencing pointer to incomplete type
make: *** [ptrace_interposer.so] Error 1
OK. I remame "/usr/include/linux" to "/usr/include/linux_orig" and I
link my actual kernel source "/usr/src/linux/include/linux" to the
original place as "/usr/include/linux". Unfortunaltelly I get the
following error:
2. BUG Error from <sys/ptrace.h>file ???
gcc -W -Wall -O2 -o ptrace_interposer.o -fPIC -c ptrace_interposer.c
In file included from ptrace_interposer.c:16:
/usr/include/sys/ptrace.h:33: error: syntax error before numeric constant
/usr/include/sys/ptrace.h:49: error: syntax error before numeric constant
/usr/include/sys/ptrace.h:61: error: syntax error before numeric constant
make: *** [ptrace_interposer.so] Error 1
Any idea to compile? Or do you have a binary which is working under FC4
- 2.6.16-2069?
Thanks for the HELP!
Attila Perger
 

Re:Re: Workaround for kylix de{*word*81} on kernels > 2.6.10

zeljko írta:
Quote
>This works for us under both kernel 2.6.12 and 2.6.16-rc3. The de{*word*81}
>doesn't hang anymore and works just fine.

works fine here 2.6.12-1.1378_FC3smp :)
tnx guys :)

Hi
I can not complie this PATCH under FC4, I have an own kernel 2.6.16-2069
+ ACPI patch.
andy.jgknet.de/oss/kylix/Forum/viewtopic.php
Can you send me your binary? Or any help? Idea?
THANKS FOR THE HELP.
Attila Perger
 

Re:Re: Workaround for kylix de{*word*81} on kernels > 2.6.10

Perger Attila írta:
Quote
zeljko írta:

>>This works for us under both kernel 2.6.12 and 2.6.16-rc3. The de{*word*81}
>>doesn't hang anymore and works just fine.
>
>
>works fine here 2.6.12-1.1378_FC3smp :)
>tnx guys :)
>
Hi

I can not complie this PATCH under FC4, I have an own kernel 2.6.16-2069
+ ACPI patch.

andy.jgknet.de/oss/kylix/Forum/viewtopic.php

Can you send me your binary? Or any help? Idea?

THANKS FOR THE HELP.

Attila Perger
Hi All,
I can fix the compilation problem. I should reorder the list of include
files in "ptrace_interpose.c" :
OLD:
*********************
#include <stdarg.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <dlfcn.h>
#include <stdio.h>
#include <linux/user.h>
#include <linux/unistd.h>
#include <sys/types.h>
#include <sys/ptrace.h>
*********************
NEW:
**********************
#include <stdarg.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#include <dlfcn.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/ptrace.h>
#include <linux/user.h>
#include <linux/unistd.h>
**********************
and I should use exactly the same LD_ASSUME_KERNEL = 2.4.1 as you
(if it was 2.4.21 it can not work!!!)
ThanX for this stuff!!!!
Attila
Kylix 3 Professional + Fedora Core 4 - Kernel 2.6.16.-1.2069 + ACPI patch