Board index » kylix » CrossKylix 0.9.0 released - major rewrite.

CrossKylix 0.9.0 released - major rewrite.


2004-10-07 09:19:01 AM
kylix1
Hi there,
it's finally done - I've just released the new CrossKylix Version
0.9.0.
During the last few weeks, I've completely rewritten the Linux emulation
engine, which now doesn't use LINE/CygWin anymore, but is a native
Win32 executable. The result should be MUCH less strange bugs, crashes
and compatibility issues. As added features there now is command line
compiler available, also the execshield fixes are included. And of
course, lots of Bugs fixed...
Here are the full news:
- Finished a complete rewrite of the emulation engine. Everything now is native Win32 code,
LINE is gone, and that {*word*99}py cygwin1.dll isn't used anymore \o/
- The outer part of the emulation engine has been moved to Delphi code, and now resides
in the ckdcc.pas unit. The only stuff still written in C is the Linux ELF loader code and
some syscalls implementations.
- Changed form positions to poScreenCenter for better multi-monitor support (thanks Craig)
- Added the option to output a full trace of all linux syscalls done by DCC. This is for
debugging purposes, and hell slow.
- A command-line compiler, ckdcc, is now part of the project
- Added all the missing locale-stuff. CK is now able to compile source files that use characters
outside the ANSI set, e.g. german umlauts. In the CK Options dialog it's now possible to
select the source encoding. The default, ISO-8859-15, should be fine for western europe
and the USA.
- As reported by Kristijan (Thanks!), my Libc dlopen workaround did not work on Debian distros.
This is now fixed.
- As recently reported, Kylix compiled applications crash on Linux kernels with exec-shield
enabled. I've provided a fix for this at crosskylix.untergrund.net/execshield/.
This fix now automaticly is applied in-memory on CrossKylix-compiled executables, so you
are no longer affected by this Kylix compiler issue.
As this is the very first release of this re-write, I expect to see
quite some bug-reports. I hope it will work for most of you, though :)
Installation notes for users of previous CrossKylix versions:
It is recommended to completely remove the old CrossKylix version
prior to your 0.9.0 install, as almost everything has changed. You may
also uninstall Cygwin, as it's no longer needed. After you uninstalled
the IDE plugin package and removed the CrossKylix directory, simply
run the setup program inside the CrossKylix 0.9.0 package.
Detailed installation instructions are available at the CrossKylix
Website at crosskylix.untergrund.net.
Download is at:
crosskylix.untergrund.net/crosskylix-090.zip
Have fun,
Simon Kissel
 
 

Re:CrossKylix 0.9.0 released - major rewrite.

Excellent Job Simon - many thanks for all your work on this project.
Out of interest, is it possible to get a copy of the patched Libc.pas file
without installing CrossKylix?
I'd like to replace the original libc.pas file on my Linux machine for
easier deployment of apps.....
Thanks,
Dean
 

Re:CrossKylix 0.9.0 released - major rewrite.

Quote
Excellent Job Simon - many thanks for all your work on this project.
Thank you.
Quote
Out of interest, is it possible to get a copy of the patched Libc.pas file
without installing CrossKylix?
As the file is copyrighted by Borland, I may not redistribute the modified
file. I could create a patch, but the following instructions should be
enough:
1.) In libc.pas, at the beginning of the implementation section, find the line
function dlopen; external libdlmodulename name 'dlopen';
and replace it with
function __dlopen(Filename: PChar; Flag: Integer): Pointer; cdecl; external libdlmodulename name 'dlopen';
2.) At the end of the file, add the following (before end.)
function dlopen(Filename: PChar; Flag: Integer): Pointer; cdecl;
var i:integer;
s:string;
szFileName: array[0..4095] of Char;
begin
result:=__dlopen(Filename, Flag);
// if dlopen fails, the reason might be no path was given to it
// and the required libs are not in the LD_LIBRARY_PATH.
// In this case let's try again, this time giving our application
// directory as path.
if (not assigned(result)) and (Filename[0]<>'/') then
begin
s:=paramstr(0);
if pos('/',s)<1 then
begin // looks like this didn't work. Let's try GetModuleFileName instead.
GetModuleFileName(hInstance, szFileName, 4095);
s:=szFileName;
end;
// only do this if paramstr(0) contains path info, which should always be the case
if pos('/',s)>0 then
begin
i:=length(Filename);
while (s[i]<>'/') and (i>1) do i:=i-1;
s:=copy(s,1,i);
s:=s+Filename;
// ok, let's try again.
result:=__dlopen(pchar(s), Flag);
end;
end;
end;
That's it. Please note that there still are some situations where the code may fail,
for example if the application was started through a link and the Linux distribution
doesn't have the /proc filesystem. In reality this has never happened to me, though.
Simon
 

{smallsort}

Re:CrossKylix 0.9.0 released - major rewrite.

That's great - thank you!
Dean
 

Re:CrossKylix 0.9.0 released - major rewrite.

As there have been some reports from people having these problems, I'd
like to give out the following to hints (now also published on the
website):
1.) Error "Unit identifier 'bratwurst' does not match file name"
While CrossKylix internally translates all paths to windows format
whenever a file is accessed, the Kylix dcc compiler expects file paths
to be in linux format inside the source files. If you use relative or
absolute paths inside your projects, for example
uses bratwurst in '..\bratwurst.pas';
CrossKylix will access the file just fine. But for Kylix dcc, the
only valid path delimiter is '/' (forward slash), as it is under Linux.
So the example given will result in dcc thinking the unit name is
'..\bratwurst', which will not match "bratwurst" and fail to compile.
Solution: For projects you are compiling with CrossKylix, always make
sure you use forward slashes, e.g.
uses bratwurst in '../bratwurst.pas';
in your source files including the project file. Luckily the Windows
compiler also accepts forward slashes as a valid path delimiter, so
you do not have to use IFDEFs to seperate between Linux and Windows -
just always use forward slashes in path names inside your sources.
2.) When compiling with CrossKylix, do not enable "Use Debug DCUs"
in your project settings. Doing this will result in Delphi setting
your search path to Delphi VCL/RTL debug DCUs, which won't work with
CrossKylix.
Greetings,
Simon Kissel