Re: Booting a T5140 panics

2021-11-19 Thread Rich
Curiously, I didn't see other people's replies to my message, probably
due to not being subscribed. I figured at the point where I just
bought another SPARC, I might as well...

I've done some digging into it. The short version is that commit
7d5ec3d3 introduced the readl() at
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/pci/msi.c?h=v5.14#n748
, and for reasons that are currently opaque to me not being familiar
with low-level SPARC details, that dies in a fire.

Just short-circuiting it to 1 instead of calling readl() seems to
function fine for my system, but isn't a great general solution...

(Bonus fun - my T5140 is currently booting from a /boot on a USB drive
and a / on an LSI SAS2 PCIe controller because A) the onboard SAS1
card is faulted and not obviously fixable, and B) I only figured out
how to get the SAS2 disks to show up as a bootable device by loading
the FCode blob onto the card after I did the install...I should
probably migrate that at some point.)

Last bit of fun is that Linux seems to be misinterpreting the
local-mac-address? setting and just unconditionally overriding
_everything_'s MAC with the system's, whether it's set to true or
false. (Amusingly, the "niu" driver has special casing for this and
instead of setting everything to e.g. 00:aa:aa:aa:aa:aa, sets the
first port to 00:aa:aa:aa:aa:aa, second to 00:aa:aa:aa:aa:ab, and so
on.)

- Rich

On Tue, Nov 16, 2021 at 3:39 AM John Paul Adrian Glaubitz
 wrote:
>
> Hello Rich!
>
> On 11/16/21 04:19, Rich wrote:
> > Anybody have a suggestion for how to not get burned by this? I can try
> > just booting older and older snapshots, but I only have so many
> > burnable discs.
>
> Try this image which has a 4.19 kernel which is known to be less problematic
> on older SPARCs:
>
> > https://cdimage.debian.org/cdimage/ports/snapshots/2019-07-16/debian-10.0-sparc64-NETINST-1.iso
>
> Adrian
>
> --
>  .''`.  John Paul Adrian Glaubitz
> : :' :  Debian Developer - glaub...@debian.org
> `. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
>   `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
>



Re: Mozilla Software on Sparc64/Linux

2021-11-19 Thread Connor McLaughlan
On Fri, Nov 19, 2021 at 5:28 PM Connor McLaughlan 
wrote:

>
>
> On Fri, Nov 19, 2021 at 5:21 PM Connor McLaughlan 
> wrote:
>
>>
>> On Fri, Nov 19, 2021 at 3:26 PM John Paul Adrian Glaubitz <
>> glaub...@physik.fu-berlin.de> wrote:
>>
>>> On 11/19/21 01:14, Connor McLaughlan wrote:
>>> > adding "CONFIGURE_FLAGS += --disable-warnings-as-errors" to
>>> debian/rules
>>> > didn't remove the error.
>>> >
>>> > Should i try to add -fpermissive to the CFLAGS?
>>>
>>> Yes, you can try this. But make sure you add it with "+=" to not
>>> overwrite
>>> the other CFLAGS/CXXFLAGS.
>>>
>>> You can also use DEB_CXXFLAGS_MAINT_APPEND, see [1].
>>>
>>>
>>  By adding -fpermissive to the CFLAGS the build process went further.
>>
>> Now it is stuck at a rustc compile error:
>>
>>Compiling url v1.7.0
>> error[E0713]: borrow may still be in use when destructor runs
>>--> /<>/third_party/rust/url/src/form_urlencoded.rs:261
>> :40
>> |
>> 259 | impl<'a> Target for ::UrlQuery<'a> {
>> |  -- lifetime `'a` defined here
>> 260 | fn as_mut_string( self) ->  String { 
>> self.url.serialization }
>> 261 | fn finish(self) -> &'a mut ::Url { self.url }
>> | - here, drop of
>> `self` needs exclusive access to `*self.url`, because the type
>> `UrlQuery<'_>` implements the `Drop` trait
>> ||
>> |returning this value
>> requires that `*self.url` is borrowed for `'a`
>>
>> For more information about this error, try `rustc --explain E0713`.
>> error: could not compile `url` due to previous error
>> make[5]: *** [/<>/config/rules.mk:951:
>> force-cargo-library-build] Error 101
>> make[5]: Leaving directory
>> '/<>/build-browser/toolkit/library/rust'
>> make[4]: *** [/<>/config/recurse.mk:74:
>> toolkit/library/rust/target] Error 2
>> make[4]: Leaving directory '/<>/build-browser'
>> make[3]: *** [/<>/config/recurse.mk:34: compile] Error 2
>> make[3]: Leaving directory '/<>/build-browser'
>> make[2]: *** [/<>/config/rules.mk:418: default] Error 2
>> make[2]: Leaving directory '/<>/build-browser'
>> dh_auto_build: error: cd build-browser && make -j1
>> LD_LIBS=-Wl,--no-gc-sections _LEAKTEST_FILES=leaktest.py returned exit code
>> 2
>> make[1]: *** [debian/rules:218: stamps/build-browser] Error 25
>> make[1]: Leaving directory '/<>'
>> make: *** [debian/rules:323: build-arch] Error 2
>> dpkg-buildpackage: error: debian/rules build-arch subprocess returned
>> exit status 2
>>
>> 
>> Build finished at 2021-11-19T16:01:50Z
>>
>> Regards,
>> Connor
>>
>>
> It seems the cause is that rust compiler has changed behavior and so the
> url v1.7.0 needs an update.
> But i don't know where to take it from and how to apply it...
>
> Regards,
> Connor
>

I tried to add modify third_party/rust/url/src/form_urlencoded.rs like here:
https://hg.mozilla.org/mozilla-central/rev/93bdaf4be8e4042cadf8fddcc20d43155622474c

I modified the file and did the three steps after that like before...
commit and the 2x dch commands.
But something appears to have gone wrong:

force-cargo-library-build
env   RUSTFLAGS='-C opt-level=2 -C debuginfo=2 '
 CARGO_TARGET_DIR=/<>/build-browser/toolkit/library
RUSTC=/usr/bin/rustc RUSTDOC=/usr/bin/rustdoc MOZ_SRC=/<>
MOZ_DIST=/<>/build-browser/dist
LIBCLANG_PATH="/usr/lib/llvm-11/lib"
CLANG_PATH="/usr/lib/llvm-11/bin/clang" PKG_CONFIG_ALLOW_CROSS=1
RUST_BACKTRACE=full MOZ_TOPOBJDIR=/<>/build-browser
 MOZ_CARGO_WRAP_LDFLAGS="-lpthread -Wl,--as-needed
-Wl,--reduce-memory-overheads -Wl,--no-keep-memory -Wl,--stats
-Wl,-z,noexecstack -Wl,-z,text -Wl,-z,relro -Wl,--build-id
-Wl,-rpath-link,/<>/build-browser/dist/bin
-Wl,-rpath-link,/usr/lib" MOZ_CARGO_WRAP_LD=" /usr/bin/gcc -std=gnu99"
CARGO_TARGET_SPARC64_UNKNOWN_LINUX_GNU_LINKER=/<>/build/cargo-linker
/usr/bin/cargo rustc  --release --frozen --manifest-path
/<>/toolkit/library/rust/Cargo.toml --lib
--target=sparc64-unknown-linux-gnu --features "servo bindgen quantum_render
cubeb_pulse_rust cubeb-remoting moz_memory" --  -C lto
error: the listed checksum of `/<>/third_party/rust/url/src/
form_urlencoded.rs` has changed:
expected: 320418526c4564a4469581d426e7467bcefe504eecd098e1eb90a2663a75fd80
actual:   d8c35e92375cafcd7e12c4f0d5374bab62aa1f333629d55b007a9c3d5c3cb615

directory sources are not intended to be edited, if modifications are
required then it is recommended that `[patch]` is used with a forked copy
of the source


Not sure how to undo it and reapply it correctly.
But i can start from scratch if needed i guess...

Regards,
Connor


Re: Mozilla Software on Sparc64/Linux

2021-11-19 Thread Connor McLaughlan
On Fri, Nov 19, 2021 at 5:21 PM Connor McLaughlan 
wrote:

>
> On Fri, Nov 19, 2021 at 3:26 PM John Paul Adrian Glaubitz <
> glaub...@physik.fu-berlin.de> wrote:
>
>> On 11/19/21 01:14, Connor McLaughlan wrote:
>> > adding "CONFIGURE_FLAGS += --disable-warnings-as-errors" to debian/rules
>> > didn't remove the error.
>> >
>> > Should i try to add -fpermissive to the CFLAGS?
>>
>> Yes, you can try this. But make sure you add it with "+=" to not overwrite
>> the other CFLAGS/CXXFLAGS.
>>
>> You can also use DEB_CXXFLAGS_MAINT_APPEND, see [1].
>>
>>
>  By adding -fpermissive to the CFLAGS the build process went further.
>
> Now it is stuck at a rustc compile error:
>
>Compiling url v1.7.0
> error[E0713]: borrow may still be in use when destructor runs
>--> /<>/third_party/rust/url/src/form_urlencoded.rs:261:40
> |
> 259 | impl<'a> Target for ::UrlQuery<'a> {
> |  -- lifetime `'a` defined here
> 260 | fn as_mut_string( self) ->  String { 
> self.url.serialization }
> 261 | fn finish(self) -> &'a mut ::Url { self.url }
> | - here, drop of
> `self` needs exclusive access to `*self.url`, because the type
> `UrlQuery<'_>` implements the `Drop` trait
> ||
> |returning this value requires
> that `*self.url` is borrowed for `'a`
>
> For more information about this error, try `rustc --explain E0713`.
> error: could not compile `url` due to previous error
> make[5]: *** [/<>/config/rules.mk:951:
> force-cargo-library-build] Error 101
> make[5]: Leaving directory
> '/<>/build-browser/toolkit/library/rust'
> make[4]: *** [/<>/config/recurse.mk:74:
> toolkit/library/rust/target] Error 2
> make[4]: Leaving directory '/<>/build-browser'
> make[3]: *** [/<>/config/recurse.mk:34: compile] Error 2
> make[3]: Leaving directory '/<>/build-browser'
> make[2]: *** [/<>/config/rules.mk:418: default] Error 2
> make[2]: Leaving directory '/<>/build-browser'
> dh_auto_build: error: cd build-browser && make -j1
> LD_LIBS=-Wl,--no-gc-sections _LEAKTEST_FILES=leaktest.py returned exit code
> 2
> make[1]: *** [debian/rules:218: stamps/build-browser] Error 25
> make[1]: Leaving directory '/<>'
> make: *** [debian/rules:323: build-arch] Error 2
> dpkg-buildpackage: error: debian/rules build-arch subprocess returned exit
> status 2
>
> 
> Build finished at 2021-11-19T16:01:50Z
>
> Regards,
> Connor
>
>
It seems the cause is that rust compiler has changed behavior and so the
url v1.7.0 needs an update.
But i don't know where to take it from and how to apply it...

Regards,
Connor


Re: Mozilla Software on Sparc64/Linux

2021-11-19 Thread Connor McLaughlan
On Fri, Nov 19, 2021 at 3:26 PM John Paul Adrian Glaubitz <
glaub...@physik.fu-berlin.de> wrote:

> On 11/19/21 01:14, Connor McLaughlan wrote:
> > adding "CONFIGURE_FLAGS += --disable-warnings-as-errors" to debian/rules
> > didn't remove the error.
> >
> > Should i try to add -fpermissive to the CFLAGS?
>
> Yes, you can try this. But make sure you add it with "+=" to not overwrite
> the other CFLAGS/CXXFLAGS.
>
> You can also use DEB_CXXFLAGS_MAINT_APPEND, see [1].
>
>
 By adding -fpermissive to the CFLAGS the build process went further.

Now it is stuck at a rustc compile error:

   Compiling url v1.7.0
error[E0713]: borrow may still be in use when destructor runs
   --> /<>/third_party/rust/url/src/form_urlencoded.rs:261:40
|
259 | impl<'a> Target for ::UrlQuery<'a> {
|  -- lifetime `'a` defined here
260 | fn as_mut_string( self) ->  String { 
self.url.serialization }
261 | fn finish(self) -> &'a mut ::Url { self.url }
| - here, drop of
`self` needs exclusive access to `*self.url`, because the type
`UrlQuery<'_>` implements the `Drop` trait
||
|returning this value requires
that `*self.url` is borrowed for `'a`

For more information about this error, try `rustc --explain E0713`.
error: could not compile `url` due to previous error
make[5]: *** [/<>/config/rules.mk:951:
force-cargo-library-build] Error 101
make[5]: Leaving directory
'/<>/build-browser/toolkit/library/rust'
make[4]: *** [/<>/config/recurse.mk:74:
toolkit/library/rust/target] Error 2
make[4]: Leaving directory '/<>/build-browser'
make[3]: *** [/<>/config/recurse.mk:34: compile] Error 2
make[3]: Leaving directory '/<>/build-browser'
make[2]: *** [/<>/config/rules.mk:418: default] Error 2
make[2]: Leaving directory '/<>/build-browser'
dh_auto_build: error: cd build-browser && make -j1
LD_LIBS=-Wl,--no-gc-sections _LEAKTEST_FILES=leaktest.py returned exit code
2
make[1]: *** [debian/rules:218: stamps/build-browser] Error 25
make[1]: Leaving directory '/<>'
make: *** [debian/rules:323: build-arch] Error 2
dpkg-buildpackage: error: debian/rules build-arch subprocess returned exit
status 2

Build finished at 2021-11-19T16:01:50Z

Regards,
Connor


Re: Mozilla Software on Sparc64/Linux

2021-11-19 Thread John Paul Adrian Glaubitz
On 11/19/21 01:14, Connor McLaughlan wrote:
> adding "CONFIGURE_FLAGS += --disable-warnings-as-errors" to debian/rules
> didn't remove the error.
> 
> Should i try to add -fpermissive to the CFLAGS?

Yes, you can try this. But make sure you add it with "+=" to not overwrite
the other CFLAGS/CXXFLAGS.

You can also use DEB_CXXFLAGS_MAINT_APPEND, see [1].

Adrian

> [1] 
> https://www.debian.org/doc/manuals/debmake-doc/ch04.en.html#step-maintainer

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913