You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Stefano Mazzocchi <st...@apache.org> on 2006/11/10 08:26:01 UTC

[general] what's the status of harmony support for em64?

I'm asking because finally have a testing system ready to rock the
harmony planet... but it's AMD64 :-( [and it's Geir's machine!?! can you
believe that?]

-- 
Stefano.


Re: [general] what's the status of harmony support for em64?

Posted by Tim Ellison <t....@gmail.com>.
Stefano Mazzocchi wrote:
> I'm asking because finally have a testing system ready to rock the
> harmony planet... but it's AMD64 :-( [and it's Geir's machine!?! can you
> believe that?]

LOL.  AFAIK we took in a patch to get the IA32 code 64-bit clean, but
nobody is regularly building and testing with it.  If you can do that it
would be great.

Regards,
Tim

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

Re: [general] what's the status of harmony support for em64?

Posted by Gregory Shimansky <gs...@gmail.com>.
Gregory Shimansky wrote:
> Stefano Mazzocchi wrote:
>> Geir Magnusson Jr. wrote:
>> anyway, I can't build the native part of harmony/classlib
>>
>> doing "ant build-native" results in
>>
>>   classlib/depends/libs/linux.x86_64
>>
>> not being found.
> 
> There should be prebuilt ICU binaries. You can build them yourself or 
> you can take them from HARMONY-1678. Note, for me those libraries had 

Oops. It should be HARMONY-1676

> libicu*.so.34.1 names while our build wants libicu*.so.34. So I had to 
> set up links from *34.1 to *34.
> 
>> If I try to make a symlink between linux.x86_64 and linux.x86_32 (no
>> idea what I'm doing here, just trying things out), I get
> 
> I think this is a wrong thing to do. You cannot link together code built 
> for different architectures. Linker should have told you that but 
> apparently it encountered an internal error.
> 
> Also don't use x86 versions of lib*.a for libraries in 
> depends/libs/build/{jpeg,lcms,png}/. That shouldn't work. You need to 
> find 64-bit versions on your system or build them yourself.
> 
> Yesterday I built classlib native stuff successfully (see [classlib] 
> Building on x86_64 thread) but it wasn't easy. Somehow lib*.a static 
> libraries weren't meant to be linked to shared libraries on SUSE9, so I 
> had to replace links in depends/libs/build/{jpeg,lcms,png}/ with links 
> to shared ones. It seem to have worked, but I couldn't check how well 
> classlib works since drlvm build on x86_64 is now broken, most likely by 
> HARMONY-1558.
> 
>> build-native:
>>      [exec] make: Nothing to be done for `all'.
>>      [exec] make: Nothing to be done for `all'.
>>      [exec] make: Nothing to be done for `all'.
>>      [copy] Copying 1 file to
>> /home/stefano/src/harmony/classlib/deploy/jdk/jre/bin
>>      [exec] cc -shared -Wl,--version-script,libhythr.exp \
>>      [exec]     -Wl,-soname=libhythr.so  -o ../libhythr.so \
>>      [exec]     ../shared/thread_copyright.o x86_64/thrhelp.o
>> x86_64/thrspinlock.o hythread.o ../shared/hythreadinspect.o
>> linuxonexit.o priority.o rasthrsup.o ../shared/rwmutex.o thrcreate.o
>> thrdsup.o ../shared/thrprof.o -lpthread \
>>      [exec]     -Xlinker --start-group
>> /home/stefano/src/harmony/classlib/deploy/lib/libhypool.a
>> /home/stefano/src/harmony/classlib/deploy/lib/libhycommon.a -Xlinker
>> --end-group \
>>      [exec]     -lc -lm -ldl
>>      [exec] /usr/bin/ld: x86_64/thrspinlock.o: relocation R_X86_64_PC32
>> against `hythread_yield' can not be used when making a shared object;
>> recompile with -fPIC
>>      [exec] /usr/bin/ld: final link failed: Bad value
>>      [exec] collect2: ld returned 1 exit status
>>      [exec] make: *** [../libhythr.so] Error 1
>>
>> googling it up a little finds
>>
>>  http://sources.redhat.com/ml/binutils/2005-04/msg00649.html
>>
>> which is a reference to a GCC bug that was apparently fixed a long 
>> time go.
>>
>> Ah btw,
>>
>> [stefano@harmony-em64t] ~/src/harmony/classlib $ gcc --version
>> gcc (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
>>
>> [stefano@harmony-em64t] ~/src/harmony/classlib $ ld --version
>> GNU ld version 2.16.91 20060118 Debian GNU/Linux
>>
>> [stefano@harmony-em64t] ~/src/harmony/classlib $ uname -a
>> Linux harmony-em64t 2.6.15-27-amd64-generic #1 SMP PREEMPT Sat Sep 16
>> 01:50:50 UTC 2006 x86_64 GNU
>>
>> Please, bare with my ignorance, I have *zero* knowledge on native stuff
>> (I moved from x86 assembly on windows to java without going thru C ;-)
>>
>> No idea what to do now, please help and I can reward you with a freshly
>> juiced gump run :-)
>>
> 
> 


-- 
Gregory


Re: [general] what's the status of harmony support for em64?

Posted by Stefano Mazzocchi <st...@apache.org>.
Gregory Shimansky wrote:
> Stefano Mazzocchi wrote:
>> Gregory Shimansky wrote:
>>> Stefano Mazzocchi wrote:
>>>> Geir Magnusson Jr. wrote:
>>>> anyway, I can't build the native part of harmony/classlib
>>>>
>>>> doing "ant build-native" results in
>>>>
>>>>   classlib/depends/libs/linux.x86_64
>>>>
>>>> not being found.
>>> There should be prebuilt ICU binaries. You can build them yourself or
>>> you can take them from HARMONY-1678. Note, for me those libraries had
>>> libicu*.so.34.1 names while our build wants libicu*.so.34. So I had to
>>> set up links from *34.1 to *34.
>>
>> Ok, I've done this. But I still get the same error
>>
>>      [exec] cc -shared -Wl,--version-script,libhythr.exp \
>>      [exec]     -Wl,-soname=libhythr.so  -o ../libhythr.so \
>>      [exec]     ../shared/thread_copyright.o x86_64/thrhelp.o
>> x86_64/thrspinlock.o hythread.o ../shared/hythreadinspect.o
>> linuxonexit.o priority.o rasthrsup.o ../shared/rwmutex.o thrcreate.o
>> thrdsup.o ../shared/thrprof.o -lpthread \
>>      [exec]     -Xlinker --start-group
>> /home/stefano/src/harmony/classlib/deploy/lib/libhypool.a
>> /home/stefano/src/harmony/classlib/deploy/lib/libhycommon.a -Xlinker
>> --end-group \
>>      [exec]     -lc -lm -ldl
>>      [exec] /usr/bin/ld: x86_64/thrspinlock.o: relocation R_X86_64_PC32
>> against `hythread_yield' can not be used when making a shared object;
>> recompile with -fPIC
>>      [exec] /usr/bin/ld: final link failed: Bad value
>>      [exec] collect2: ld returned 1 exit status
>>      [exec] make: *** [../libhythr.so] Error 1
>>
>>
>> I've also tried to change make/properties.xml into
>>
>> --- properties.xml      (revision 472739)
>> +++ properties.xml      (working copy)
>> @@ -116,7 +116,7 @@
>>          <equals arg1="${hy.arch}" arg2="ia64"/>
>>      </condition>
>>
>> -    <condition property="hy.cflags" value="-fpic">
>> +    <condition property="hy.cflags" value="-fPIC">
>>          <equals arg1="${hy.arch}" arg2="x86_64"/>
>>      </condition>
>>      <condition property="hy.cflags" value="-march=pentium3">
>>
>> to see if case makes any difference (and 'ant rebuild-native') but it
>> didn't.
> 
> Did the -fPIC flag appear in compilation flags of hythread sources? I
> think ANT files is not the correct place to set C compilation flags.
> They are set somewhere in depends/build/make.include and
> depends/build/rules.mk.

Yup.

     [exec] cc -O1 -fPIC -DLINUX -D_REENTRANT -DIPv6_FUNCTION_SUPPORT
-DHYX86_64  -I/home/stefano/src/harmony/classlib/deploy/include
-I/home/stefano/src/harmony/classlib/deploy/jdk/include -I. -I../shared/
-fpic   -c -o ../shared/hythreadinspect.o ../shared/hythreadinspect.c

it appears *twice* actually, so maybe the cancel each-other out? ;-)

-- 
Stefano.


Re: [general] what's the status of harmony support for em64?

Posted by Gregory Shimansky <gs...@gmail.com>.
Stefano Mazzocchi wrote:
> Gregory Shimansky wrote:
>> Stefano Mazzocchi wrote:
>>> Geir Magnusson Jr. wrote:
>>> anyway, I can't build the native part of harmony/classlib
>>>
>>> doing "ant build-native" results in
>>>
>>>   classlib/depends/libs/linux.x86_64
>>>
>>> not being found.
>> There should be prebuilt ICU binaries. You can build them yourself or
>> you can take them from HARMONY-1678. Note, for me those libraries had
>> libicu*.so.34.1 names while our build wants libicu*.so.34. So I had to
>> set up links from *34.1 to *34.
> 
> Ok, I've done this. But I still get the same error
> 
>      [exec] cc -shared -Wl,--version-script,libhythr.exp \
>      [exec]     -Wl,-soname=libhythr.so  -o ../libhythr.so \
>      [exec]     ../shared/thread_copyright.o x86_64/thrhelp.o
> x86_64/thrspinlock.o hythread.o ../shared/hythreadinspect.o
> linuxonexit.o priority.o rasthrsup.o ../shared/rwmutex.o thrcreate.o
> thrdsup.o ../shared/thrprof.o -lpthread \
>      [exec]     -Xlinker --start-group
> /home/stefano/src/harmony/classlib/deploy/lib/libhypool.a
> /home/stefano/src/harmony/classlib/deploy/lib/libhycommon.a -Xlinker
> --end-group \
>      [exec]     -lc -lm -ldl
>      [exec] /usr/bin/ld: x86_64/thrspinlock.o: relocation R_X86_64_PC32
> against `hythread_yield' can not be used when making a shared object;
> recompile with -fPIC
>      [exec] /usr/bin/ld: final link failed: Bad value
>      [exec] collect2: ld returned 1 exit status
>      [exec] make: *** [../libhythr.so] Error 1
> 
> 
> I've also tried to change make/properties.xml into
> 
> --- properties.xml      (revision 472739)
> +++ properties.xml      (working copy)
> @@ -116,7 +116,7 @@
>          <equals arg1="${hy.arch}" arg2="ia64"/>
>      </condition>
> 
> -    <condition property="hy.cflags" value="-fpic">
> +    <condition property="hy.cflags" value="-fPIC">
>          <equals arg1="${hy.arch}" arg2="x86_64"/>
>      </condition>
>      <condition property="hy.cflags" value="-march=pentium3">
> 
> to see if case makes any difference (and 'ant rebuild-native') but it
> didn't.

Did the -fPIC flag appear in compilation flags of hythread sources? I 
think ANT files is not the correct place to set C compilation flags. 
They are set somewhere in depends/build/make.include and 
depends/build/rules.mk.

-- 
Gregory


Re: [general] what's the status of harmony support for em64?

Posted by Stefano Mazzocchi <st...@apache.org>.
Gregory Shimansky wrote:
> Stefano Mazzocchi wrote:
>> Geir Magnusson Jr. wrote:
>> anyway, I can't build the native part of harmony/classlib
>>
>> doing "ant build-native" results in
>>
>>   classlib/depends/libs/linux.x86_64
>>
>> not being found.
> 
> There should be prebuilt ICU binaries. You can build them yourself or
> you can take them from HARMONY-1678. Note, for me those libraries had
> libicu*.so.34.1 names while our build wants libicu*.so.34. So I had to
> set up links from *34.1 to *34.

Ok, I've done this. But I still get the same error

     [exec] cc -shared -Wl,--version-script,libhythr.exp \
     [exec]     -Wl,-soname=libhythr.so  -o ../libhythr.so \
     [exec]     ../shared/thread_copyright.o x86_64/thrhelp.o
x86_64/thrspinlock.o hythread.o ../shared/hythreadinspect.o
linuxonexit.o priority.o rasthrsup.o ../shared/rwmutex.o thrcreate.o
thrdsup.o ../shared/thrprof.o -lpthread \
     [exec]     -Xlinker --start-group
/home/stefano/src/harmony/classlib/deploy/lib/libhypool.a
/home/stefano/src/harmony/classlib/deploy/lib/libhycommon.a -Xlinker
--end-group \
     [exec]     -lc -lm -ldl
     [exec] /usr/bin/ld: x86_64/thrspinlock.o: relocation R_X86_64_PC32
against `hythread_yield' can not be used when making a shared object;
recompile with -fPIC
     [exec] /usr/bin/ld: final link failed: Bad value
     [exec] collect2: ld returned 1 exit status
     [exec] make: *** [../libhythr.so] Error 1


I've also tried to change make/properties.xml into

--- properties.xml      (revision 472739)
+++ properties.xml      (working copy)
@@ -116,7 +116,7 @@
         <equals arg1="${hy.arch}" arg2="ia64"/>
     </condition>

-    <condition property="hy.cflags" value="-fpic">
+    <condition property="hy.cflags" value="-fPIC">
         <equals arg1="${hy.arch}" arg2="x86_64"/>
     </condition>
     <condition property="hy.cflags" value="-march=pentium3">

to see if case makes any difference (and 'ant rebuild-native') but it
didn't.

Suggestions?

-- 
Stefano.


Re: [general] what's the status of harmony support for em64?

Posted by Gregory Shimansky <gs...@gmail.com>.
Stefano Mazzocchi wrote:
> Geir Magnusson Jr. wrote:
> anyway, I can't build the native part of harmony/classlib
> 
> doing "ant build-native" results in
> 
>   classlib/depends/libs/linux.x86_64
> 
> not being found.

There should be prebuilt ICU binaries. You can build them yourself or 
you can take them from HARMONY-1678. Note, for me those libraries had 
libicu*.so.34.1 names while our build wants libicu*.so.34. So I had to 
set up links from *34.1 to *34.

> If I try to make a symlink between linux.x86_64 and linux.x86_32 (no
> idea what I'm doing here, just trying things out), I get

I think this is a wrong thing to do. You cannot link together code built 
for different architectures. Linker should have told you that but 
apparently it encountered an internal error.

Also don't use x86 versions of lib*.a for libraries in 
depends/libs/build/{jpeg,lcms,png}/. That shouldn't work. You need to 
find 64-bit versions on your system or build them yourself.

Yesterday I built classlib native stuff successfully (see [classlib] 
Building on x86_64 thread) but it wasn't easy. Somehow lib*.a static 
libraries weren't meant to be linked to shared libraries on SUSE9, so I 
had to replace links in depends/libs/build/{jpeg,lcms,png}/ with links 
to shared ones. It seem to have worked, but I couldn't check how well 
classlib works since drlvm build on x86_64 is now broken, most likely by 
HARMONY-1558.

> build-native:
>      [exec] make: Nothing to be done for `all'.
>      [exec] make: Nothing to be done for `all'.
>      [exec] make: Nothing to be done for `all'.
>      [copy] Copying 1 file to
> /home/stefano/src/harmony/classlib/deploy/jdk/jre/bin
>      [exec] cc -shared -Wl,--version-script,libhythr.exp \
>      [exec]     -Wl,-soname=libhythr.so  -o ../libhythr.so \
>      [exec]     ../shared/thread_copyright.o x86_64/thrhelp.o
> x86_64/thrspinlock.o hythread.o ../shared/hythreadinspect.o
> linuxonexit.o priority.o rasthrsup.o ../shared/rwmutex.o thrcreate.o
> thrdsup.o ../shared/thrprof.o -lpthread \
>      [exec]     -Xlinker --start-group
> /home/stefano/src/harmony/classlib/deploy/lib/libhypool.a
> /home/stefano/src/harmony/classlib/deploy/lib/libhycommon.a -Xlinker
> --end-group \
>      [exec]     -lc -lm -ldl
>      [exec] /usr/bin/ld: x86_64/thrspinlock.o: relocation R_X86_64_PC32
> against `hythread_yield' can not be used when making a shared object;
> recompile with -fPIC
>      [exec] /usr/bin/ld: final link failed: Bad value
>      [exec] collect2: ld returned 1 exit status
>      [exec] make: *** [../libhythr.so] Error 1
> 
> googling it up a little finds
> 
>  http://sources.redhat.com/ml/binutils/2005-04/msg00649.html
> 
> which is a reference to a GCC bug that was apparently fixed a long time go.
> 
> Ah btw,
> 
> [stefano@harmony-em64t] ~/src/harmony/classlib $ gcc --version
> gcc (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
> 
> [stefano@harmony-em64t] ~/src/harmony/classlib $ ld --version
> GNU ld version 2.16.91 20060118 Debian GNU/Linux
> 
> [stefano@harmony-em64t] ~/src/harmony/classlib $ uname -a
> Linux harmony-em64t 2.6.15-27-amd64-generic #1 SMP PREEMPT Sat Sep 16
> 01:50:50 UTC 2006 x86_64 GNU
> 
> Please, bare with my ignorance, I have *zero* knowledge on native stuff
> (I moved from x86 assembly on windows to java without going thru C ;-)
> 
> No idea what to do now, please help and I can reward you with a freshly
> juiced gump run :-)
> 


-- 
Gregory


Re: [general] what's the status of harmony support for em64?

Posted by Stefano Mazzocchi <st...@apache.org>.
Geir Magnusson Jr. wrote:
> Get ahold of yourself, man!  You're going to get me fired! :)

> model name      :               Intel(R) Pentium(R) D CPU 3.20GHz

ohhh, sorry about that :-)

anyway, I can't build the native part of harmony/classlib

doing "ant build-native" results in

  classlib/depends/libs/linux.x86_64

not being found.

If I try to make a symlink between linux.x86_64 and linux.x86_32 (no
idea what I'm doing here, just trying things out), I get

build-native:
     [exec] make: Nothing to be done for `all'.
     [exec] make: Nothing to be done for `all'.
     [exec] make: Nothing to be done for `all'.
     [copy] Copying 1 file to
/home/stefano/src/harmony/classlib/deploy/jdk/jre/bin
     [exec] cc -shared -Wl,--version-script,libhythr.exp \
     [exec]     -Wl,-soname=libhythr.so  -o ../libhythr.so \
     [exec]     ../shared/thread_copyright.o x86_64/thrhelp.o
x86_64/thrspinlock.o hythread.o ../shared/hythreadinspect.o
linuxonexit.o priority.o rasthrsup.o ../shared/rwmutex.o thrcreate.o
thrdsup.o ../shared/thrprof.o -lpthread \
     [exec]     -Xlinker --start-group
/home/stefano/src/harmony/classlib/deploy/lib/libhypool.a
/home/stefano/src/harmony/classlib/deploy/lib/libhycommon.a -Xlinker
--end-group \
     [exec]     -lc -lm -ldl
     [exec] /usr/bin/ld: x86_64/thrspinlock.o: relocation R_X86_64_PC32
against `hythread_yield' can not be used when making a shared object;
recompile with -fPIC
     [exec] /usr/bin/ld: final link failed: Bad value
     [exec] collect2: ld returned 1 exit status
     [exec] make: *** [../libhythr.so] Error 1

googling it up a little finds

 http://sources.redhat.com/ml/binutils/2005-04/msg00649.html

which is a reference to a GCC bug that was apparently fixed a long time go.

Ah btw,

[stefano@harmony-em64t] ~/src/harmony/classlib $ gcc --version
gcc (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5)

[stefano@harmony-em64t] ~/src/harmony/classlib $ ld --version
GNU ld version 2.16.91 20060118 Debian GNU/Linux

[stefano@harmony-em64t] ~/src/harmony/classlib $ uname -a
Linux harmony-em64t 2.6.15-27-amd64-generic #1 SMP PREEMPT Sat Sep 16
01:50:50 UTC 2006 x86_64 GNU

Please, bare with my ignorance, I have *zero* knowledge on native stuff
(I moved from x86 assembly on windows to java without going thru C ;-)

No idea what to do now, please help and I can reward you with a freshly
juiced gump run :-)

-- 
Stefano.


Re: [general] what's the status of harmony support for em64?

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
Get ahold of yourself, man!  You're going to get me fired! :)

geir@harmony-em64t:/proc$ more cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      :               Intel(R) Pentium(R) D CPU 3.20GHz
stepping        : 4
cpu MHz         : 3200.279
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge 
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx l
m constant_tsc pni monitor ds_cpl cid cx16 xtpr
bogomips        : 6410.31
clflush size    : 64
cache_alignment : 128
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 15
model           : 4
model name      :               Intel(R) Pentium(R) D CPU 3.20GHz
stepping        : 4
cpu MHz         : 3200.279
cache size      : 1024 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge 
mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx l
m constant_tsc pni monitor ds_cpl cid cx16 xtpr
bogomips        : 6400.81
clflush size    : 64
cache_alignment : 128
address sizes   : 36 bits physical, 48 bits virtual
power management:




Stefano Mazzocchi wrote:
> I'm asking because finally have a testing system ready to rock the
> harmony planet... but it's AMD64 :-( [and it's Geir's machine!?! can you
> believe that?]
>