Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to install java on arm musl?
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3  
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1107
Location: Richmond Hill, Canada

PostPosted: Thu Jul 25, 2024 7:29 pm    Post subject: Reply with quote

M95D wrote:
OMG, that was the last thing I expected to cause problems!
I'll test it right now.

THANKS!!!

PS: Hold on a sec! Shouldn't file and readelf say something if the Alpine's java or rust stage0 were thumb binaries?


I would think so, did you have test readelf for gentoo bash compare to alpine java? I suspect the Flags will have different number. I want to take a break for now, so may be I will do that later.
Back to top
View user's profile Send private message
M95D
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2020
Posts: 91

PostPosted: Thu Jul 25, 2024 8:31 pm    Post subject: Reply with quote

Yeah, it doesn't really matter. I'm just happy Alpine java works. I'm doing emerge for the Gentoo package now, with Alpine java as bootstrap.
A very big THANK YOU again!
Back to top
View user's profile Send private message
M95D
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2020
Posts: 91

PostPosted: Thu Jul 25, 2024 9:53 pm    Post subject: Reply with quote

emerge failed. :cry:
Code:

gmake[6]: Entering directory '/var/tmp/portage/dev-java/openjdk-8.412_p08/work/jdk8u-jdk8u412-ga/build/linux-arm-normal-server-release/hotspot/linux_i486_compiler2/product'
Compiling /var/tmp/portage/dev-java/openjdk-8.412_p08/work/jdk8u-jdk8u412-ga/hotspot/src/share/vm/compiler/abstractCompiler.cpp
rm -f abstractCompiler.o
Compiling /var/tmp/portage/dev-java/openjdk-8.412_p08/work/jdk8u-jdk8u412-ga/hotspot/src/share/vm/utilities/accessFlags.cpp
Compiling ../generated/adfiles/ad_x86_32.cpp
rm -f accessFlags.o
/usr/bin/armv7a-unknown-linux-musleabihf-g++ -DLINUX -D_GNU_SOURCE -DIA32 -DPRODUCT  -I/var/tmp/portage/dev-java/openjdk-8.412_p08/work/jdk8u-jdk8u412-ga/hotspot/src/share/vm/prims -I/var/tmp/portage/dev-java/openjdk-8.412_p08/work/jdk8u-jdk8u412-ga/hotspot/src/share/vm -I/var/tmp/portage/dev-java/openjdk-8.412_p08/work/jdk8u-jdk8u412-armv7a-unknown-linux-musleabihf-g++: error: unrecognized command-line option '-m32'; did you mean '-mbe32'?
armv7a-unknown-linux-musleabihf-g++: error: unrecognized command-line option '-m32'; did you mean '-mbe32'?
gmake[6]: *** [/var/tmp/portage/dev-java/openjdk-8.412_p08/work/jdk8u-jdk8u412-ga/hotspot/make/linux/makefiles/rules.make:156: abstractCompiler.o] Error 1
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1107
Location: Richmond Hill, Canada

PostPosted: Fri Jul 26, 2024 12:53 am    Post subject: Reply with quote

M95D wrote:
emerge failed. :cry:
Code:

gmake[6]: Entering directory '/var/tmp/portage/dev-java/openjdk-8.412_p08/work/jdk8u-jdk8u412-ga/build/linux-arm-normal-server-release/hotspot/linux_i486_compiler2/product'
Compiling /var/tmp/portage/dev-java/openjdk-8.412_p08/work/jdk8u-jdk8u412-ga/hotspot/src/share/vm/compiler/abstractCompiler.cpp
rm -f abstractCompiler.o
Compiling /var/tmp/portage/dev-java/openjdk-8.412_p08/work/jdk8u-jdk8u412-ga/hotspot/src/share/vm/utilities/accessFlags.cpp
Compiling ../generated/adfiles/ad_x86_32.cpp
rm -f accessFlags.o
/usr/bin/armv7a-unknown-linux-musleabihf-g++ -DLINUX -D_GNU_SOURCE -DIA32 -DPRODUCT  -I/var/tmp/portage/dev-java/openjdk-8.412_p08/work/jdk8u-jdk8u412-ga/hotspot/src/share/vm/prims -I/var/tmp/portage/dev-java/openjdk-8.412_p08/work/jdk8u-jdk8u412-ga/hotspot/src/share/vm -I/var/tmp/portage/dev-java/openjdk-8.412_p08/work/jdk8u-jdk8u412-armv7a-unknown-linux-musleabihf-g++: error: unrecognized command-line option '-m32'; did you mean '-mbe32'?
armv7a-unknown-linux-musleabihf-g++: error: unrecognized command-line option '-m32'; did you mean '-mbe32'?
gmake[6]: *** [/var/tmp/portage/dev-java/openjdk-8.412_p08/work/jdk8u-jdk8u412-ga/hotspot/make/linux/makefiles/rules.make:156: abstractCompiler.o] Error 1

I don't know where to start to guess, so please share how you start this build process, specifically what command used that generate this error. Please share the exact command line with any environment setting.
Back to top
View user's profile Send private message
M95D
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2020
Posts: 91

PostPosted: Fri Jul 26, 2024 6:28 am    Post subject: Reply with quote

As I said before, I unpacked the Alpine Linux openjdk package into root Gentoo system. All files are in /usr/lib/jvm/openjdk-1.6/. After the new "thumb" option, it appears to be working fine.
Then I made sure all other deps of Gentoo dev-java/openjdk:8 are satisfied, except itself.
Then I did "emerge -atv --nodeps --autounmask dev-java/openjdk:8", which ran for about 30 min before ending with that error.

According to the manual, ARM GCC doesn't have that command line argument.
https://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html


Last edited by M95D on Fri Jul 26, 2024 8:28 am; edited 2 times in total
Back to top
View user's profile Send private message
logrusx
Advocate
Advocate


Joined: 22 Feb 2018
Posts: 2154

PostPosted: Fri Jul 26, 2024 8:22 am    Post subject: Reply with quote

pingtoo wrote:
M95D wrote:
emerge failed. :cry:
Code:

gmake[6]: Entering directory '/var/tmp/portage/dev-java/openjdk-8.412_p08/work/jdk8u-jdk8u412-ga/build/linux-arm-normal-server-release/hotspot/linux_i486_compiler2/product'
Compiling /var/tmp/portage/dev-java/openjdk-8.412_p08/work/jdk8u-jdk8u412-ga/hotspot/src/share/vm/compiler/abstractCompiler.cpp
rm -f abstractCompiler.o
Compiling /var/tmp/portage/dev-java/openjdk-8.412_p08/work/jdk8u-jdk8u412-ga/hotspot/src/share/vm/utilities/accessFlags.cpp
Compiling ../generated/adfiles/ad_x86_32.cpp
rm -f accessFlags.o
/usr/bin/armv7a-unknown-linux-musleabihf-g++ -DLINUX -D_GNU_SOURCE -DIA32 -DPRODUCT  -I/var/tmp/portage/dev-java/openjdk-8.412_p08/work/jdk8u-jdk8u412-ga/hotspot/src/share/vm/prims -I/var/tmp/portage/dev-java/openjdk-8.412_p08/work/jdk8u-jdk8u412-ga/hotspot/src/share/vm -I/var/tmp/portage/dev-java/openjdk-8.412_p08/work/jdk8u-jdk8u412-armv7a-unknown-linux-musleabihf-g++: error: unrecognized command-line option '-m32'; did you mean '-mbe32'?
armv7a-unknown-linux-musleabihf-g++: error: unrecognized command-line option '-m32'; did you mean '-mbe32'?
gmake[6]: *** [/var/tmp/portage/dev-java/openjdk-8.412_p08/work/jdk8u-jdk8u412-ga/hotspot/make/linux/makefiles/rules.make:156: abstractCompiler.o] Error 1

I don't know where to start to guess, so please share how you start this build process, specifically what command used that generate this error. Please share the exact command line with any environment setting.


I'm not an expert at all but I don't see this option on the command line. Only in the error message, which leads me to believe this SO question might be related: https://stackoverflow.com/questions/57238581/g-error-unrecognized-command-line-option-32-did-you-mean-m32#57239201

Best Regards,
Georgi
Back to top
View user's profile Send private message
M95D
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2020
Posts: 91

PostPosted: Fri Jul 26, 2024 8:39 am    Post subject: Reply with quote

That's probably not the command line used. I don't know why it's logged like that. This is the full log:
https://marius95.duckdns.org/posted/openjdk-cmd-m32.txt
There are a few more errors after the first one, some of them have -m32 and a lot of other weird arguments:
-DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_32 -DTARGET_OS_ARCH_linux_x86 -DTARGET_OS_ARCH_MODEL_linux_x86_32

It seems that "hotspot" component (whatever that is) is trying to build something for x86/i486 instead of arm.

This is the very first abnormality that I could find:
Code:

/usr/bin/gmake  VERBOSE="" LOG_LEVEL="debug" -R -I /var/tmp/portage/dev-java/openjdk-8.412_p08/work/jdk8u-jdk8u412-ga/make/common -f /var/tmp/portage/dev-java/openjdk-8.412_p08/work/jdk8u-jdk8u412-ga/hotspot/make/linux/makefiles/buildtree.make GAMMADIR=/var/tmp/portage/dev-java/openjdk-8.412_p08/work/jdk8u-jdk8u412-ga/hotspot OS_FAMILY=linux SRCARCH=x86 BUILDARCH=i486 LIBARCH=arm HOTSPOT_RELEASE_VERSION=25.412-b08 HOTSPOT_BUILD_VERSION= JRE_RELEASE_VERSION=1.8.0_412-b08 ENABLE_FULL_DEBUG_SYMBOLS=0 OBJCOPY=/usr/bin/armv7a-unknown-linux-musleabihf-objcopy STRIP_POLICY=min_strip ZIP_DEBUGINFO_FILES=0 ZIPEXE=zip VARIANT=tiered FORCE_TIERED=1

Notice the SRCARCH=x86 BUILDARCH=i486.
The closest related configure log that I could find is in /var/tmp/portage/dev-java/openjdk-8.412_p08/work/jdk8u-jdk8u412-ga/build/linux-arm-normal-server-release/configure.log ("hotspot" is a subdir in there). I can see nothing wrong in it. Here it is:
https://marius95.duckdns.org/posted/hotspot-configure.log
The build log in that subdir:
https://marius95.duckdns.org/posted/hotspot-build.log
Back to top
View user's profile Send private message
M95D
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jan 2020
Posts: 91

PostPosted: Fri Jul 26, 2024 9:59 am    Post subject: Reply with quote

I found the problem:
In hotspot/make/defs.make
Code:

  # uname, HotSpot source directory, build directory and JDK use different names
  # for CPU architectures.
  #   ARCH      - uname output
  #   SRCARCH   - where to find HotSpot cpu and os_cpu source files
  #   BUILDARCH - build directory
  #   LIBARCH   - directory name in JDK/JRE

  # Use uname output for SRCARCH, but deal with platform differences. If ARCH
  # is not explicitly listed below, it is treated as x86.
  SRCARCH    ?= $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 ppc ppc64 ppc64le zero aarch64,$(ARCH)))
  ARCH/       = x86
  ARCH/sparc  = sparc
  ARCH/sparc64= sparc
  ARCH/ia64   = ia64
  ARCH/amd64  = x86
  ARCH/x86_64 = x86
  ARCH/ppc64  = ppc
  ARCH/ppc64le= ppc
  ARCH/ppc    = ppc
  ARCH/zero   = zero
  ARCH/aarch64 = aarch64

There is no arm. @eschwartz said the versions after 8 don't support arm 32bit anymore. It seems that arm support was removed even earlier.
I'll dig in the portage archive to see if I can find a version that still has arm support.

LE: v8.382 didn't work. I'll just keep the Alpine package and that's it. The end.
Thank you all for your help.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum