This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Performance gcj & mysql


i substituded the line

%rename lib liborig
*lib: %{static-libgcj:-non_shared} %{s-bc-abi:-lgcj_bc;:-libgcj}
%{static-libgcj:-call_shared} -lm   -lpthread -lrt -lz   -ldl %(libgcc) 
%(liborig)

to:

%rename lib liborig
*lib: %{static-libgcj:-non_shared} %{s-bc-abi:-lgcj_bc}
%{static-libgcj:-call_shared} -lm   -lpthread -lrt -lz   -ldl %(libgcc) 
%(liborig)

and i get a very Ãlarge stack of error.. a little part of that is:

mysql-5.0.8.o: In function `void com::mysql::jdbc::Statement::cancel()':
mysql-connector-java-5.0.8-bin.jar:(.text+0xb0b48): undefined reference to
`_Jv_MonitorEnter'
mysql-connector-java-5.0.8-bin.jar:(.text+0xb0b87): undefined reference to
`_Jv_AllocObjectNoFinalizer'
mysql-connector-java-5.0.8-bin.jar:(.text+0xb0c24): undefined reference to
`_Jv_LookupInterfaceMethodIdx'


I also tried
%{s-bc-abi:-lgcj_bc;:-lgcj_bc}  
and it complains about -lgcj_bc  (/usr/bin/ld: cannot find-lgcj_bc )

Is not any little step by step tutorial of requirements ? paths, required
libs, etc. Any tested environment, perhups i could run any other distro of
linux, not ubuntu. I think the thinks i am trying to do are very basic
things.. dont believe that anybody passed by the same problems than I.


Marco Trudel-4 wrote:
> 
> 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.
>>>
>>>
>> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Performance-gcj---mysql-tp19375453p19494005.html
Sent from the gcc - java mailing list archive at Nabble.com.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]