Performance gcj & mysql
Marco Trudel
marco@mtsystems.ch
Fri Sep 12 08:02:00 GMT 2008
ezer wrote:
>> I run gcj -static-libgcj --main=MysqlConnect -o mysqlconnect
> MysqlConnect.java mysql-5.0.8.o
>> i get:
> /usr/bin/ld: cannot find -lgcj
> collect2: ld returned 1 exit status
>> The file libgcj.spec :
Right, now I remember. This one has already been discussed long ago. I
even had a local patch to fix it for testing purposes...
I think my conclusion back then was that libgcj.spec was/is flawed for
using "-static-libgcj". But the discussion was - if I remember right -
somewhat strange and Andrew didn't agree with that. One of the
discussions about libgcj.spec can be found here:
http://gcc.gnu.org/ml/java/2007-03/msg00074.html
But I think it's not really the discussion I have in mind.
Anyway, you need to adjust that file. Just try temporarily removing
"-lgcj"...
Hope that helps
Marco
> %rename startfile startfileorig
> *startfile: %(startfileorig)
>> %rename lib liborig
> *lib: %{static-libgcj:-non_shared} %{s-bc-abi:-lgcj_bc;:-lgcj}
> %{static-libgcj:-call_shared} -lm -lpthread -lrt -lz -ldl %(libgcc)
> %(liborig)
>> *jc1: -fhash-synchronization -fno-use-divide-subroutine -fuse-boehm-gc
> -fnon-call-exceptions -fkeep-inline-functions
>>> I cant find any lgcj file, i found libgcj, even changing the names i get the
> same error. Sghould i define a path or add any other file ?
>>>> Andrew Haley wrote:
>> Marco Trudel wrote:
>>> Andrew Haley wrote:
>>>>> 2) ./mysqlconnect stays dependant of the gcj libraries? When i
>>>>> uninstall gcj
>>>>> the executable complains about libgcj. Is there any way to have it
>>>>> totally
>>>>> independent, for example i want to copy the executable and
>>>>> mysql-5.0.8.o
>>>>> library without worring if have have gcj installed on that machine.
>>>> This is very difficult. The -static-libgcj option might help,
>>>> but I wouldn't guarantee it. For more details see:
>>>> http://gcc.gnu.org/wiki/Statically%20linking%20libgcj
>>> Actually it works quite well as long as you know some little details.
>> Well, no. It can work in some circumstances, and in others it doesn't
>> work at all.
>>>> Andrew.
>>>>>
More information about the Java
mailing list