|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 | Next > |
|
|
Re: libgcj_bc.so not embeddedDavid Daney wrote:
> Mohsen Saboorian wrote: >> I have compiled all jar dependencies into .o files using >> -findirect-dispatch option. My last command line to make all-in-one >> executable file looks like this: >> $ gcj-4.1 -omyApp.executable -static-libgcj -O3 --main=my.main.Class >> -findirect-dispatch -fjni jar1.o jar2.o jar3.o >> > > -static-libgcj has never been tested with -findirect-dispatch or -fjni. > If you are statically linking there should be no need for > -findirect-dispatch as you will never be upgrading the runtime (or > anything else for that matter). > > >> as I addded -static-libgcj, it gives me: >> /usr/bin/ld: cannot find -lgcj_bc Could be related with this thread: http://gcc.gnu.org/ml/java/2007-03/msg00047.html Maybe removing the "-lgcj_bc" parts from libgcj.spec will do the trick... Marco >> collect2: ld return ed 1 exit status >> >> I believe I'm doing something wrong and this simple usage should not >> be a bug. >> >> Thanks. >> >> On 4/7/07, David Daney <ddaney@...> wrote: >>> Mohsen Saboorian wrote: >>> > When using "-static-libgcj", I'm getting this error: >>> > /usr/bin/ld: cannot find -lgcj_bc >>> > >>> Please post your complete command line or file a complete bug report. >>> If there is a problem in GCC we can fix it. >>> >>> David Daney >>> >>> > > |
|
|
Re: libgcj_bc.so not embeddedDavid Daney writes:
> Mohsen Saboorian wrote: > > I have compiled all jar dependencies into .o files using > > -findirect-dispatch option. My last command line to make all-in-one > > executable file looks like this: > > $ gcj-4.1 -omyApp.executable -static-libgcj -O3 --main=my.main.Class > > -findirect-dispatch -fjni jar1.o jar2.o jar3.o > > > > -static-libgcj has never been tested with -findirect-dispatch or -fjni. > If you are statically linking there should be no need for > -findirect-dispatch as you will never be upgrading the runtime (or > anything else for that matter). That's right. With -findirect-dispatch and -static-libgcj the linker won't have a clue what it's supposed to be linking. Andrew. -- Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK Registered in England and Wales No. 3798903 |
|
|
Re: libgcj_bc.so not embeddedThanks,
It now compiles correctly. The application starts, but gives NCDFE. The problem is now the code loaded via reflection, which causes problems with -static-gcj option (which someone mentioned earlier). I load XML with Java 1.4 API. DOM implementation for GCJ is gnu.xml.dom.*, which is not embedde in the final executable file. Is is possible to statically link some other library for this mean? If yes which library and how? If there is no direct solution for that, I think I should bundle Xerces with my code. The size is gradually increasing. It might better to install a gij runtime for OLPC then :) Thanks. On 4/8/07, Andrew Haley <aph@...> wrote: > David Daney writes: > > Mohsen Saboorian wrote: > > > I have compiled all jar dependencies into .o files using > > > -findirect-dispatch option. My last command line to make all-in-one > > > executable file looks like this: > > > $ gcj-4.1 -omyApp.executable -static-libgcj -O3 --main=my.main.Class > > > -findirect-dispatch -fjni jar1.o jar2.o jar3.o > > > > > > > -static-libgcj has never been tested with -findirect-dispatch or -fjni. > > If you are statically linking there should be no need for > > -findirect-dispatch as you will never be upgrading the runtime (or > > anything else for that matter). > > That's right. With -findirect-dispatch and -static-libgcj the linker > won't have a clue what it's supposed to be linking. > > Andrew. > > -- > Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK > Registered in England and Wales No. 3798903 > |
|
|
Re: libgcj_bc.so not embeddedMohsen Saboorian writes:
> It now compiles correctly. The application starts, but gives NCDFE. > The problem is now the code loaded via reflection, which causes > problems with -static-gcj option (which someone mentioned earlier). I > load XML with Java 1.4 API. DOM implementation for GCJ is > gnu.xml.dom.*, which is not embedde in the final executable file. Is > is possible to statically link some other library for this mean? If > yes which library and how? It's not impossible, just fiddly. Run your code in gij with -verbose:class, look at the classes that get loaded, and write a few static references of the form Class x = gnu.xml.dom.<thing>.class; The chances are good that you'll only have to write a few of these and everything you need wil be pulled in. Andrew. -- Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK Registered in England and Wales No. 3798903 |
| < Prev | 1 - 2 | Next > |
| Free embeddable forum powered by Nabble | Forum Help |