Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Re: looking into SWT 3.0 M8 for native compilation with GCJ

>>> The source folders are used to factorize some of the code shared between 
>>> platforms and the code specific to a given platform/profile.

I've noticed it, and it's probably better. It's much better than M3. That one was
completely messed up. Now it looks as if we can have a realistic go at native
compilation.

>>> The SWT jar file is built by selecting a list of source folders and having 
>>> all these files compiled TOGETHER. Each source folder is not meant to be 
>>> an independant compilation entity.

I've come to the same conclusion. And it's not much of a problem any longer.
(Still, why these heavily intertwined interdependencies? They'll sure come back to
bite you someday ...)

The problem I'm facing now, is with the purely native stuff, aka the jni
dependencies. The truth is, your nightly build.xml doesn't actually build them. As a
matter of fact, the build system doesn't compile them at all.

$ ls
atk.c         atk_custom.h   callback.c    os.c         os_custom.h   swt.h
atk.h         atk_structs.c  callback.h    os.h         os_structs.c
atk_custom.c  atk_structs.h  make_gtk.mak  os_custom.c  os_structs.h

I can get callback.c to compile. However, os.c doesn't compile at all. Are you sure
that it is a working version? I haven't tried the other *.c files.

Any of this shouldn't be hard at all (and it wasn't with 2.132), if your build system
would compile these dlls nightly as well. Then, you would notice by yourself that
something is wrong.

By the way, thanks the folks for hardcoding /bluebird/teamswt/swt-builddir/jdk1.5.0,
/bluebird/teamswt/swt-builddir/IBMJava2-141. That's really user-friendly.

[And please don't tell me, you're adding 1.5 dependencies already ...]

By the way, I just hope that there were no new reflection calls added in between
2.132 and 3.044. I haven't bothered to compile any version in between natively with
GCJ. I just know from experience that GCJ chokes on reflection calls, and that it's a
lot of work to figure out where they are and then add the "artificial dragger
constants" in to make things work anyway.


Back to the top