RFR: GensrcMisc.gmk linker issue on windows
Hi, we're unable to build on windows due to link issue /out:genSocketOptionRegistry.exe /out:ut:r:/buildroot/jdk/btnative/genSocketOptionRegistry/genSocketOptionRegistry.exe r:/buildroot/jdk/btnative/genSocketOptionRegistry/genSocketOptionRegistry.obj LINK : fatal error LNK1104: cannot open file 'ut:r:/buildroot/jdk/btnative/genSocketOptionRegistry/genSocketOptionRegistry.exe' make[2]: *** [gensrc/GensrcMisc.gmk:75: /cygdrive/r/buildroot/jdk/btnative/genSocketOptionRegistry/genSocketOptionRegistry.exe] Error 2 This fix the issue: aarch64-port/jdk8u - https://michalvala.fedorapeople.org/webrevs/gensrcmisclinker-aarch64/webrev.... aarch64-port/jdk8u-shenandoah - https://michalvala.fedorapeople.org/webrevs/gensrcmisclinker-aarch64-shenand... -- -Michal
----- Original Message -----
Hi, we're unable to build on windows due to link issue
/out:genSocketOptionRegistry.exe /out:ut:r:/buildroot/jdk/btnative/genSocketOptionRegistry/genSocketOptionRegistry.exe
r:/buildroot/jdk/btnative/genSocketOptionRegistry/genSocketOptionRegistry.obj
LINK : fatal error LNK1104: cannot open file 'ut:r:/buildroot/jdk/btnative/genSocketOptionRegistry/genSocketOptionRegistry.exe' make[2]: *** [gensrc/GensrcMisc.gmk:75: /cygdrive/r/buildroot/jdk/btnative/genSocketOptionRegistry/genSocketOptionRegistry.exe] Error 2
This fix the issue: aarch64-port/jdk8u - https://michalvala.fedorapeople.org/webrevs/gensrcmisclinker-aarch64/webrev.... aarch64-port/jdk8u-shenandoah - https://michalvala.fedorapeople.org/webrevs/gensrcmisclinker-aarch64-shenand...
-- -Michal
This is a divergence from upstream jdk8u, silently introduced by: changeset: 11016:391be061dfc7 parent: 11015:7ebad38ac2b3 parent: 8810:fc4ac66aa657 user: Edward Nevill edward.nevill@linaro.org date: Mon Dec 23 13:00:14 2013 +0000 summary: Remerge to jdk8-b117 Have you tested that reverting this to the upstream jdk8u version doesn't break aarch64? I did a comparison of upstream jdk8u121-b14 with the current state of aarch64/jdk8u (attached) and all other changes do seem to be necessary for aarch64 (the test issue is a merge issue already resolved in the main jdk8u tree, but not jdk8u121-b14). -- Andrew :) Senior Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Web Site: http://fuseyism.com Twitter: https://twitter.com/gnu_andrew_java PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net) Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
Have you tested that reverting this to the upstream jdk8u version doesn't break aarch64?
I did a comparison of upstream jdk8u121-b14 with the current state of aarch64/jdk8u (attached) and all other changes do seem to be necessary for aarch64 (the test issue is a merge issue already resolved in the main jdk8u tree, but not jdk8u121-b14).
Haven't tried on aarch64, but I'll do. -- -Michal
On 03/09/2017 08:24 AM, Michal Vala wrote:
Have you tested that reverting this to the upstream jdk8u version doesn't break aarch64?
I did a comparison of upstream jdk8u121-b14 with the current state of aarch64/jdk8u (attached) and all other changes do seem to be necessary for aarch64 (the test issue is a merge issue already resolved in the main jdk8u tree, but not jdk8u121-b14).
Haven't tried on aarch64, but I'll do.
How you please got the patch? I just could find this huge merge changeset under the hash [1]. If I tried to revert patch you sent "patch -R -p1 < ~/tmp/aarch64.jdk.patch" I got following error on aarch64: gmake[2]: *** No rule to make target `/mnt/ramdisk/tmp/aarch64-port-jdk8u/jdk/src/solaris/bin/aarch64/jvm.cfg', needed by `/mnt/ramdisk/tmp/aarch64-port-jdk8u/build/linux-aarch64-normal-server-release/jdk/lib/aarch64/jvm.cfg'. Stop. With just LDEXE fix I sent, aarch64 build is ok. -- -Michal [1] - http://hg.openjdk.java.net/aarch64-port/jdk8u/jdk/rev/391be061dfc7
Hi, On 03/09/2017 01:04 PM, Michal Vala wrote:
On 03/09/2017 08:24 AM, Michal Vala wrote:
Have you tested that reverting this to the upstream jdk8u version doesn't break aarch64?
I did a comparison of upstream jdk8u121-b14 with the current state of aarch64/jdk8u (attached) and all other changes do seem to be necessary for aarch64 (the test issue is a merge issue already resolved in the main jdk8u tree, but not jdk8u121-b14).
Haven't tried on aarch64, but I'll do.
How you please got the patch? I just could find this huge merge changeset under the hash [1].
If I tried to revert patch you sent "patch -R -p1 < ~/tmp/aarch64.jdk.patch" I got following error on aarch64:
gmake[2]: *** No rule to make target `/mnt/ramdisk/tmp/aarch64-port-jdk8u/jdk/src/solaris/bin/aarch64/jvm.cfg', needed by `/mnt/ramdisk/tmp/aarch64-port-jdk8u/build/linux-aarch64-normal-server-release/jdk/lib/aarch64/jvm.cfg'. Stop.
With just LDEXE fix I sent, aarch64 build is ok.
I contributed the opposite change once for aarch32 [1]. Just checked with aarch64-jdk8u - proposed change breaks aarch64 cross-compilation (on ubuntu 16.04 x86_64 with --openjdk-target=aarch64-linux-gnu ) causing the following error: /usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 00000000004000b0 /home/aarch64/jdk8u-aarch64/build/linux-aarch64-normal-server-release/jdk/btnative/genSocketOptionRegistry/genSocketOptionRegistry.o: In function `out': genSocketOptionRegistry.c:(.text+0x10): undefined reference to `puts' /home/aarch64/jdk8u-aarch64/build/linux-aarch64-normal-server-release/jdk/btnative/genSocketOptionRegistry/genSocketOptionRegistry.o: In function `emit': genSocketOptionRegistry.c:(.text+0x48): undefined reference to `printf' genSocketOptionRegistry.c:(.text+0x5c): undefined reference to `printf' gensrc/GensrcMisc.gmk:74: recipe for target '/home/aarch64/jdk8u-aarch64/build/linux-aarch64-normal-server-release/jdk/btnative/genSocketOptionRegistry/genSocketOptionRegistry' failed make[2]: *** [/home/aarch64/jdk8u-aarch64/build/linux-aarch64-normal-server-release/jdk/btnative/genSocketOptionRegistry/genSocketOptionRegistry] Error 1 Though this change is indeed required for windows builds, ojdkbuild brings a local patch for it [2]. [1] http://mail.openjdk.java.net/pipermail/aarch32-port-dev/2016-February/000111... [2] https://github.com/ojdkbuild/lookaside_java-1.8.0-openjdk/commit/e71366e75ca... -- -Alex
On 03/09/2017 02:46 PM, Alex Kashchenko wrote:
I contributed the opposite change once for aarch32 [1]. Just checked with aarch64-jdk8u - proposed change breaks aarch64 cross-compilation (on ubuntu 16.04 x86_64 with --openjdk-target=aarch64-linux-gnu )
Though this change is indeed required for windows builds, ojdkbuild brings a local patch for it [2].
ok, so what's the result of this for aarch64-port/jdk8u and aarch64-port/jdk8u-shenandoah ? It breaks cross-compile but fix windows build. Upstream jdk8u has fixed version[3]
[1] http://mail.openjdk.java.net/pipermail/aarch32-port-dev/2016-February/000111...
[2] https://github.com/ojdkbuild/lookaside_java-1.8.0-openjdk/commit/e71366e75ca...
-- -Michal [3] - http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/file/8c93eb3fa1c0/make/gensrc/Gen...
On 13/03/17 09:20, Michal Vala wrote:
ok, so what's the result of this for aarch64-port/jdk8u and aarch64-port/jdk8u-shenandoah ?
It breaks cross-compile but fix windows build. Upstream jdk8u has fixed version[3]
This discussion has gone on for a very long time. I can't see any analysis of the problem which indicates what the actual problem is, and why the needs differ. Andrew.
We shouldn't just change fron CC to LD and back without some kind of explanation. Why did one work, and not another? Andrew.
On 03/09/2017 09:57 AM, Andrew Haley wrote:
We shouldn't just change fron CC to LD and back without some kind of explanation. Why did one work, and not another?
Build tries to link binary (obj) file to executable (exe). When CC, it calls CL compiler, which results to total nonsense: cl -out:/cygdrive/r/buildroot/jdk/btnative/genSocketOptionRegistry/genSocketOptionRegistry.exe /cygdrive/r/buildroot/jdk/btnative/genSocketOptionRegistry/genSocketOptionRegistry.obj cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release it doesn't event know -out parameter and tries to go with -o and file "ut:..." so this is totally wrong. Also "genSocketOptionRegistry.obj" file is already binary. When LD, then "link" is used and binary obj is correctly linked to executable: link -out:/cygdrive/r/buildroot/jdk/btnative/genSocketOptionRegistry/genSocketOptionRegistry.exe /cygdrive/r/buildroot/jdk/btnative/genSocketOptionRegistry/genSocketOptionRegistry.obj
Andrew.
However, as Alex pointed out[1], the patch breaks cross-compilation :/ -- -Michal [1] - http://mail.openjdk.java.net/pipermail/aarch64-port-dev/2017-March/004298.ht...
participants (4)
-
Alex Kashchenko
-
Andrew Haley
-
Andrew Hughes
-
Michal Vala