Re: breakage at usr.sbin/jail/Makefile

2019-11-21 Thread Dennis Clarke

On 11/21/19 11:33 AM, Ed Maste wrote:

On Wed, 20 Nov 2019 at 23:19, Pete Wright  wrote:


the issue seems to be on my amd64 system ${LINKER_TYPE} is not defined.
i was contemplating suggesting updating the .if clause in the Makefile
like so:

.if defined($LINKER_TYPE}) && ${LINKER_TYPE} == "bfd" && ${MACHINE} ==
"riscv"


Yes, this is the approach I went with - Cirrus-CI started building my
proposed change last night but it wasn't finished before I was. When I
checked this morning it confirmed the fix works. In any case the best
fix here will be to resolve the underlying RISC-V binutils issue and
revert all of the workarounds.

Note that FreeBSD's CI did not catch this issue because it builds with
-DNO_CLEAN. I also build locally with -DNO_CLEAN and wouldn't have
seen it either. In my opinion we ought to just remove the not-NO_CLEAN
case from buildworld/buildkernel.


I generally look at the CI traffic to get a feel for what I *should* be
seeing and thus I was baffled when my cross compile was blowing up on
exactly this issue.

Really I want to debug :
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242067

wherein printf seems to get down to _ldtoa.c and then confusion sets in
over the in memory data for fp128 little endian data but that is another
story. I can't get very far without some basic tools and at the moment
the CI builds are not very useful as they barely have anything for tools
in /bin or anywhere else. Not even ed? Really?

In any case I did look at the RISC-V projects GNU Toolchain and I did go
with a build of the latest from :

https://github.com/riscv/riscv-gnu-toolchain

and that did work well for a buildworld a few days ago. The buildkernel
fails. So I start over as if I am fishing for code in a fast flowing
stream of water where I never know what works and what doesn't the next
moment.  Why?  Because the CI builds were not failing. Sometimes I get
lucky. With r354874 and the new GNU Toolchain cross tools I get a clean
buildworld and then the kernel fails.

So today I will start over from scratch but I will use the GNU Toolchain
from RISC-V upstream project thus :

vesta#
vesta# uname -apKU
FreeBSD vesta 12.1-RELEASE-p1 FreeBSD 12.1-RELEASE-p1 GENERIC  amd64 
amd64 1201000 1201000

vesta# /opt/rv64/tools/bin/riscv64-unknown-elf-gcc --version
riscv64-unknown-elf-gcc (GCC) 9.2.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

vesta#

So I will try again today and report back.




--
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional











___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: breakage at usr.sbin/jail/Makefile

2019-11-21 Thread Ed Maste
On Wed, 20 Nov 2019 at 23:19, Pete Wright  wrote:
>
> the issue seems to be on my amd64 system ${LINKER_TYPE} is not defined.
> i was contemplating suggesting updating the .if clause in the Makefile
> like so:
>
> .if defined($LINKER_TYPE}) && ${LINKER_TYPE} == "bfd" && ${MACHINE} ==
> "riscv"

Yes, this is the approach I went with - Cirrus-CI started building my
proposed change last night but it wasn't finished before I was. When I
checked this morning it confirmed the fix works. In any case the best
fix here will be to resolve the underlying RISC-V binutils issue and
revert all of the workarounds.

Note that FreeBSD's CI did not catch this issue because it builds with
-DNO_CLEAN. I also build locally with -DNO_CLEAN and wouldn't have
seen it either. In my opinion we ought to just remove the not-NO_CLEAN
case from buildworld/buildkernel.
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: breakage at usr.sbin/jail/Makefile

2019-11-20 Thread Glen Barber
On Wed, Nov 20, 2019 at 08:18:52PM -0800, Pete Wright wrote:
> 
> 
> On 11/20/19 8:13 PM, Glen Barber wrote:
> > On Wed, Nov 20, 2019 at 07:57:57PM -0800, Pete Wright wrote:
> > > Hello,
> > > looks like some of the recent commits to usr.sbin/jail/Makefile has broken
> > > CURRENT.  I am getting this error when attempting a buildworld:
> > > 
> > > ===> usr.sbin/jail (cleandir)
> > > make[4]: "/usr/home/pete/git/freebsd/usr.sbin/jail/Makefile" line 21:
> > > Malformed conditional (${LINKER_TYPE} == "bfd" && ${MACHINE} == "riscv")
> > > make[4]: Fatal errors encountered -- cannot continue
> > > make[4]: stopped in /usr/home/pete/git/freebsd/usr.sbin/jail
> > > *** [cleandir_subdir_usr.sbin/jail] Error code 1
> > > 
> > > 
> > > here's the code in question:
> > >   18 # workaround for GNU ld (GNU Binutils) 2.33.1:
> > >   19 #   relocation truncated to fit: R_RISCV_GPREL_I against `.LANCHOR2'
> > >   20 # https://bugs.freebsd.org/242109
> > >   21 .if ${LINKER_TYPE} == "bfd" && ${MACHINE} == "riscv"
> > >   22 CFLAGS+=-Wl,--no-relax
> > >   23 .endif
> > > 
> > > 
> > > looks like Ed Maste caught this already in the
> > > https://bugs.freebsd.org/242109 but wanted to flag it here as well in case
> > > anyone else runs into this in the hopes it saves some debugging time :)
> > > 
> > Reverted out of frustration in r354935.
> 
> thanks!
> 
> the issue seems to be on my amd64 system ${LINKER_TYPE} is not defined.  i was
> contemplating suggesting updating the .if clause in the Makefile like so:
> 
> .if defined($LINKER_TYPE}) && ${LINKER_TYPE} == "bfd" && ${MACHINE} ==
> "riscv"
> 
> 
> it allows things to compile on my end, but i'm not sure this is best way to
> resolve this issue.
> 

Not necessarily, there were followups to the original commit that leaned
in different directions.  But, nonetheless, I reverted the offending
commits because allowing head to be broken for hours is absurd, and
I personally do not tolerate it when I can resolve it.

Glen



signature.asc
Description: PGP signature


Re: breakage at usr.sbin/jail/Makefile

2019-11-20 Thread Pete Wright




On 11/20/19 8:13 PM, Glen Barber wrote:

On Wed, Nov 20, 2019 at 07:57:57PM -0800, Pete Wright wrote:

Hello,
looks like some of the recent commits to usr.sbin/jail/Makefile has broken
CURRENT.  I am getting this error when attempting a buildworld:

===> usr.sbin/jail (cleandir)
make[4]: "/usr/home/pete/git/freebsd/usr.sbin/jail/Makefile" line 21:
Malformed conditional (${LINKER_TYPE} == "bfd" && ${MACHINE} == "riscv")
make[4]: Fatal errors encountered -- cannot continue
make[4]: stopped in /usr/home/pete/git/freebsd/usr.sbin/jail
*** [cleandir_subdir_usr.sbin/jail] Error code 1


here's the code in question:
  18 # workaround for GNU ld (GNU Binutils) 2.33.1:
  19 #   relocation truncated to fit: R_RISCV_GPREL_I against `.LANCHOR2'
  20 # https://bugs.freebsd.org/242109
  21 .if ${LINKER_TYPE} == "bfd" && ${MACHINE} == "riscv"
  22 CFLAGS+=-Wl,--no-relax
  23 .endif


looks like Ed Maste caught this already in the
https://bugs.freebsd.org/242109 but wanted to flag it here as well in case
anyone else runs into this in the hopes it saves some debugging time :)


Reverted out of frustration in r354935.


thanks!

the issue seems to be on my amd64 system ${LINKER_TYPE} is not defined.  
i was contemplating suggesting updating the .if clause in the Makefile 
like so:


.if defined($LINKER_TYPE}) && ${LINKER_TYPE} == "bfd" && ${MACHINE} == 
"riscv"



it allows things to compile on my end, but i'm not sure this is best way 
to resolve this issue.


-p


--
Pete Wright
p...@nomadlogic.org
@nomadlogicLA

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: breakage at usr.sbin/jail/Makefile

2019-11-20 Thread Glen Barber
On Wed, Nov 20, 2019 at 07:57:57PM -0800, Pete Wright wrote:
> Hello,
> looks like some of the recent commits to usr.sbin/jail/Makefile has broken
> CURRENT.  I am getting this error when attempting a buildworld:
> 
> ===> usr.sbin/jail (cleandir)
> make[4]: "/usr/home/pete/git/freebsd/usr.sbin/jail/Makefile" line 21:
> Malformed conditional (${LINKER_TYPE} == "bfd" && ${MACHINE} == "riscv")
> make[4]: Fatal errors encountered -- cannot continue
> make[4]: stopped in /usr/home/pete/git/freebsd/usr.sbin/jail
> *** [cleandir_subdir_usr.sbin/jail] Error code 1
> 
> 
> here's the code in question:
>  18 # workaround for GNU ld (GNU Binutils) 2.33.1:
>  19 #   relocation truncated to fit: R_RISCV_GPREL_I against `.LANCHOR2'
>  20 # https://bugs.freebsd.org/242109
>  21 .if ${LINKER_TYPE} == "bfd" && ${MACHINE} == "riscv"
>  22 CFLAGS+=-Wl,--no-relax
>  23 .endif
> 
> 
> looks like Ed Maste caught this already in the
> https://bugs.freebsd.org/242109 but wanted to flag it here as well in case
> anyone else runs into this in the hopes it saves some debugging time :)
> 

Reverted out of frustration in r354935.

Glen



signature.asc
Description: PGP signature


breakage at usr.sbin/jail/Makefile

2019-11-20 Thread Pete Wright

Hello,
looks like some of the recent commits to usr.sbin/jail/Makefile has 
broken CURRENT.  I am getting this error when attempting a buildworld:


===> usr.sbin/jail (cleandir)
make[4]: "/usr/home/pete/git/freebsd/usr.sbin/jail/Makefile" line 21: 
Malformed conditional (${LINKER_TYPE} == "bfd" && ${MACHINE} == "riscv")

make[4]: Fatal errors encountered -- cannot continue
make[4]: stopped in /usr/home/pete/git/freebsd/usr.sbin/jail
*** [cleandir_subdir_usr.sbin/jail] Error code 1


here's the code in question:
 18 # workaround for GNU ld (GNU Binutils) 2.33.1:
 19 #   relocation truncated to fit: R_RISCV_GPREL_I against `.LANCHOR2'
 20 # https://bugs.freebsd.org/242109
 21 .if ${LINKER_TYPE} == "bfd" && ${MACHINE} == "riscv"
 22 CFLAGS+=-Wl,--no-relax
 23 .endif


looks like Ed Maste caught this already in the 
https://bugs.freebsd.org/242109 but wanted to flag it here as well in 
case anyone else runs into this in the hopes it saves some debugging time :)


-p

--
Pete Wright
p...@nomadlogic.org
@nomadlogicLA

___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"