* openjdk-7 and gcc v5
@ 2015-10-29 23:00 Bruce, Henry
2015-10-30 0:43 ` Khem Raj
0 siblings, 1 reply; 6+ messages in thread
From: Bruce, Henry @ 2015-10-29 23:00 UTC (permalink / raw)
To: openembedded-devel@lists.openembedded.org
Many thanks to contributors who fixed openjdk build issues introduced by gcc v5 and for maintainers for pushing the updates.
However one problem remains: openjdk build fails in openjdk/jdk/make/java/nio due to -static compiler flag being used in conjunction with -pthread giving error
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: cannot find -lc
I fixed this by removing -static flag from Makefile. Not sure of this was the right thing to do (so I didn't submit patch) but it worked for me.
I added the following to the an openjdk bbappend and it fixed the build and resulting jre is running OK.
do_configure_append() {
gcc -v 2>&1 | grep 5\..
if [ "$?" == "0" ]; then
sed -i s/-static// ${B}/openjdk/jdk/make/java/nio/Makefile
fi
}
Regards,
Henry Bruce
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: openjdk-7 and gcc v5 2015-10-29 23:00 openjdk-7 and gcc v5 Bruce, Henry @ 2015-10-30 0:43 ` Khem Raj 2015-11-03 18:18 ` Bruce, Henry 0 siblings, 1 reply; 6+ messages in thread From: Khem Raj @ 2015-10-30 0:43 UTC (permalink / raw) To: openembeded-devel On Thu, Oct 29, 2015 at 4:00 PM, Bruce, Henry <henry.bruce@intel.com> wrote: > Many thanks to contributors who fixed openjdk build issues introduced by gcc v5 and for maintainers for pushing the updates. > However one problem remains: openjdk build fails in openjdk/jdk/make/java/nio due to -static compiler flag being used in conjunction with -pthread giving error > /usr/bin/ld: cannot find -lpthread > /usr/bin/ld: cannot find -lc > its not clear how the -static flag can cause this. may be its using CC for LD or wise versa ? > I fixed this by removing -static flag from Makefile. Not sure of this was the right thing to do (so I didn't submit patch) but it worked for me. > I added the following to the an openjdk bbappend and it fixed the build and resulting jre is running OK. > > do_configure_append() { > gcc -v 2>&1 | grep 5\.. > if [ "$?" == "0" ]; then why this check for gcc ? > sed -i s/-static// ${B}/openjdk/jdk/make/java/nio/Makefile > fi > } > > Regards, > > Henry Bruce > > -- > _______________________________________________ > Openembedded-devel mailing list > Openembedded-devel@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: openjdk-7 and gcc v5 2015-10-30 0:43 ` Khem Raj @ 2015-11-03 18:18 ` Bruce, Henry 2015-11-03 19:32 ` Khem Raj 0 siblings, 1 reply; 6+ messages in thread From: Bruce, Henry @ 2015-11-03 18:18 UTC (permalink / raw) To: openembedded-devel@lists.openembedded.org On Thu, 2015-10-29 at 17:43 -0700, Khem Raj wrote: > On Thu, Oct 29, 2015 at 4:00 PM, Bruce, Henry <henry.bruce@intel.com> > wrote: > > Many thanks to contributors who fixed openjdk build issues > > introduced by gcc v5 and for maintainers for pushing the updates. > > However one problem remains: openjdk build fails in > > openjdk/jdk/make/java/nio due to -static compiler flag being used > > in conjunction with -pthread giving error > > /usr/bin/ld: cannot find -lpthread > > /usr/bin/ld: cannot find -lc > > > > its not clear how the -static flag can cause this. may be its using > CC for LD or wise versa ? Not clear to me either, but if you create a simple file, say test.c int main() { return 0; } and compile with gcc test.c -pthread -static it fails as follows with gcc v5 /usr/bin/ld: cannot find -lpthread /usr/bin/ld: cannot find -lc but compiles OK with earlier versions of gcc. > > > I fixed this by removing -static flag from Makefile. Not sure of > > this was the right thing to do (so I didn't submit patch) but it > > worked for me. > > I added the following to the an openjdk bbappend and it fixed the > > build and resulting jre is running OK. > > > > do_configure_append() { > > gcc -v 2>&1 | grep 5\.. > > if [ "$?" == "0" ]; then > > why this check for gcc ? It only fails with gcc v5, so if it's not broken, don't fix it... > > > sed -i s/-static// > > ${B}/openjdk/jdk/make/java/nio/Makefile > > fi > > } > > > > Regards, > > > > Henry Bruce > > > > -- > > _______________________________________________ > > Openembedded-devel mailing list > > Openembedded-devel@lists.openembedded.org > > http://lists.openembedded.org/mailman/listinfo/openembedded-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: openjdk-7 and gcc v5 2015-11-03 18:18 ` Bruce, Henry @ 2015-11-03 19:32 ` Khem Raj 2015-11-05 19:21 ` Bruce, Henry 0 siblings, 1 reply; 6+ messages in thread From: Khem Raj @ 2015-11-03 19:32 UTC (permalink / raw) To: openembedded-devel [-- Attachment #1: Type: text/plain, Size: 2177 bytes --] > On Nov 3, 2015, at 10:18 AM, Bruce, Henry <henry.bruce@intel.com> wrote: > > On Thu, 2015-10-29 at 17:43 -0700, Khem Raj wrote: >> On Thu, Oct 29, 2015 at 4:00 PM, Bruce, Henry <henry.bruce@intel.com> >> wrote: >>> Many thanks to contributors who fixed openjdk build issues >>> introduced by gcc v5 and for maintainers for pushing the updates. >>> However one problem remains: openjdk build fails in >>> openjdk/jdk/make/java/nio due to -static compiler flag being used >>> in conjunction with -pthread giving error >>> /usr/bin/ld: cannot find -lpthread >>> /usr/bin/ld: cannot find -lc >>> >> >> its not clear how the -static flag can cause this. may be its using >> CC for LD or wise versa ? > > Not clear to me either, but if you create a simple file, say test.c > > int main() > { > return 0; > } > > and compile with gcc test.c -pthread -static > it fails as follows with gcc v5 > /usr/bin/ld: cannot find -lpthread > /usr/bin/ld: cannot find -lc > > but compiles OK with earlier versions of gcc. isn’t this gcc on your build host ? > >> >>> I fixed this by removing -static flag from Makefile. Not sure of >>> this was the right thing to do (so I didn't submit patch) but it >>> worked for me. >>> I added the following to the an openjdk bbappend and it fixed the >>> build and resulting jre is running OK. >>> >>> do_configure_append() { >>> gcc -v 2>&1 | grep 5\.. >>> if [ "$?" == "0" ]; then >> >> why this check for gcc ? > > It only fails with gcc v5, so if it's not broken, don't fix it... > >> >>> sed -i s/-static// >>> ${B}/openjdk/jdk/make/java/nio/Makefile >>> fi >>> } >>> >>> Regards, >>> >>> Henry Bruce >>> >>> -- >>> _______________________________________________ >>> Openembedded-devel mailing list >>> Openembedded-devel@lists.openembedded.org >>> http://lists.openembedded.org/mailman/listinfo/openembedded-devel > -- > _______________________________________________ > Openembedded-devel mailing list > Openembedded-devel@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-devel [-- Attachment #2: Message signed with OpenPGP using GPGMail --] [-- Type: application/pgp-signature, Size: 211 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: openjdk-7 and gcc v5 2015-11-03 19:32 ` Khem Raj @ 2015-11-05 19:21 ` Bruce, Henry 2015-12-15 10:06 ` Huang, Jie (Jackie) 0 siblings, 1 reply; 6+ messages in thread From: Bruce, Henry @ 2015-11-05 19:21 UTC (permalink / raw) To: openembedded-devel@lists.openembedded.org On Tue, 2015-11-03 at 11:32 -0800, Khem Raj wrote: > > On Nov 3, 2015, at 10:18 AM, Bruce, Henry <henry.bruce@intel.com> > > wrote: > > > > On Thu, 2015-10-29 at 17:43 -0700, Khem Raj wrote: > > > On Thu, Oct 29, 2015 at 4:00 PM, Bruce, Henry < > > > henry.bruce@intel.com> > > > wrote: > > > > Many thanks to contributors who fixed openjdk build issues > > > > introduced by gcc v5 and for maintainers for pushing the > > > > updates. > > > > However one problem remains: openjdk build fails in > > > > openjdk/jdk/make/java/nio due to -static compiler flag being > > > > used > > > > in conjunction with -pthread giving error > > > > /usr/bin/ld: cannot find -lpthread > > > > /usr/bin/ld: cannot find -lc > > > > > > > > > > its not clear how the -static flag can cause this. may be its > > > using > > > CC for LD or wise versa ? > > > > Not clear to me either, but if you create a simple file, say test.c > > > > int main() > > { > > return 0; > > } > > > > and compile with gcc test.c -pthread -static > > it fails as follows with gcc v5 > > /usr/bin/ld: cannot find -lpthread > > /usr/bin/ld: cannot find -lc > > > > but compiles OK with earlier versions of gcc. > > isn’t this gcc on your build host ? Yes, it is the gcc on my build host. The openjdk recipe causes this specific makefile to build with ${CC_FOR_BUILD} which is "gcc" not ${CC}. > > > > > > > > > > > I fixed this by removing -static flag from Makefile. Not sure > > > > of > > > > this was the right thing to do (so I didn't submit patch) but > > > > it > > > > worked for me. > > > > I added the following to the an openjdk bbappend and it fixed > > > > the > > > > build and resulting jre is running OK. > > > > > > > > do_configure_append() { > > > > gcc -v 2>&1 | grep 5\.. > > > > if [ "$?" == "0" ]; then > > > > > > why this check for gcc ? > > > > It only fails with gcc v5, so if it's not broken, don't fix it... > > > > > > > > > sed -i s/-static// > > > > ${B}/openjdk/jdk/make/java/nio/Makefile > > > > fi > > > > } > > > > > > > > Regards, > > > > > > > > Henry Bruce > > > > > > > > -- > > > > _______________________________________________ > > > > Openembedded-devel mailing list > > > > Openembedded-devel@lists.openembedded.org > > > > http://lists.openembedded.org/mailman/listinfo/openembedded-dev > > > > el > > -- > > _______________________________________________ > > Openembedded-devel mailing list > > Openembedded-devel@lists.openembedded.org > > http://lists.openembedded.org/mailman/listinfo/openembedded-devel > > -- > _______________________________________________ > Openembedded-devel mailing list > Openembedded-devel@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: openjdk-7 and gcc v5 2015-11-05 19:21 ` Bruce, Henry @ 2015-12-15 10:06 ` Huang, Jie (Jackie) 0 siblings, 0 replies; 6+ messages in thread From: Huang, Jie (Jackie) @ 2015-12-15 10:06 UTC (permalink / raw) To: openembedded-devel@lists.openembedded.org > -----Original Message----- > From: openembedded-devel-bounces@lists.openembedded.org [mailto:openembedded-devel- > bounces@lists.openembedded.org] On Behalf Of Bruce, Henry > Sent: Friday, November 06, 2015 3:22 AM > To: openembedded-devel@lists.openembedded.org > Subject: Re: [oe] openjdk-7 and gcc v5 > > On Tue, 2015-11-03 at 11:32 -0800, Khem Raj wrote: > > > On Nov 3, 2015, at 10:18 AM, Bruce, Henry <henry.bruce@intel.com> > > > wrote: > > > > > > On Thu, 2015-10-29 at 17:43 -0700, Khem Raj wrote: > > > > On Thu, Oct 29, 2015 at 4:00 PM, Bruce, Henry < > > > > henry.bruce@intel.com> > > > > wrote: > > > > > Many thanks to contributors who fixed openjdk build issues > > > > > introduced by gcc v5 and for maintainers for pushing the > > > > > updates. > > > > > However one problem remains: openjdk build fails in > > > > > openjdk/jdk/make/java/nio due to -static compiler flag being > > > > > used > > > > > in conjunction with -pthread giving error > > > > > /usr/bin/ld: cannot find -lpthread > > > > > /usr/bin/ld: cannot find -lc > > > > > > > > > > > > > its not clear how the -static flag can cause this. may be its > > > > using > > > > CC for LD or wise versa ? > > > > > > Not clear to me either, but if you create a simple file, say test.c > > > > > > int main() > > > { > > > return 0; > > > } > > > > > > and compile with gcc test.c -pthread -static > > > it fails as follows with gcc v5 > > > /usr/bin/ld: cannot find -lpthread > > > /usr/bin/ld: cannot find -lc > > > > > > but compiles OK with earlier versions of gcc. > > > > isn’t this gcc on your build host ? > > Yes, it is the gcc on my build host. > The openjdk recipe causes this specific makefile to build with > ${CC_FOR_BUILD} which is "gcc" not ${CC}. I think it's not related to the gcc version, I met this error in my host with gcc 4.4.7, it's because the static library libpthread.a is not installed. The "-static" option was added by the patch icedtea-jdk-build-nio-gensor-genuc-gensc-static.patch which I think is inappropriate and no evidence or comments explaining why it needs static builds, so I sent a patch to drop the patch. Thanks, Jackie > > > > > > > > > > > > > > > > > > I fixed this by removing -static flag from Makefile. Not sure > > > > > of > > > > > this was the right thing to do (so I didn't submit patch) but > > > > > it > > > > > worked for me. > > > > > I added the following to the an openjdk bbappend and it fixed > > > > > the > > > > > build and resulting jre is running OK. > > > > > > > > > > do_configure_append() { > > > > > gcc -v 2>&1 | grep 5\.. > > > > > if [ "$?" == "0" ]; then > > > > > > > > why this check for gcc ? > > > > > > It only fails with gcc v5, so if it's not broken, don't fix it... > > > > > > > > > > > > sed -i s/-static// > > > > > ${B}/openjdk/jdk/make/java/nio/Makefile > > > > > fi > > > > > } > > > > > > > > > > Regards, > > > > > > > > > > Henry Bruce > > > > > > > > > > -- > > > > > _______________________________________________ > > > > > Openembedded-devel mailing list > > > > > Openembedded-devel@lists.openembedded.org > > > > > http://lists.openembedded.org/mailman/listinfo/openembedded-dev > > > > > el > > > -- > > > _______________________________________________ > > > Openembedded-devel mailing list > > > Openembedded-devel@lists.openembedded.org > > > http://lists.openembedded.org/mailman/listinfo/openembedded-devel > > > > -- > > _______________________________________________ > > Openembedded-devel mailing list > > Openembedded-devel@lists.openembedded.org > > http://lists.openembedded.org/mailman/listinfo/openembedded-devel > -- > _______________________________________________ > Openembedded-devel mailing list > Openembedded-devel@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-devel ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-12-15 10:06 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-10-29 23:00 openjdk-7 and gcc v5 Bruce, Henry 2015-10-30 0:43 ` Khem Raj 2015-11-03 18:18 ` Bruce, Henry 2015-11-03 19:32 ` Khem Raj 2015-11-05 19:21 ` Bruce, Henry 2015-12-15 10:06 ` Huang, Jie (Jackie)
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.