On Fri, Nov 19, 2021 at 5:28 PM Connor McLaughlan <cont6p...@gmail.com> wrote:
> > > On Fri, Nov 19, 2021 at 5:21 PM Connor McLaughlan <cont6p...@gmail.com> > 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 >> --> /<<PKGBUILDDIR>>/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(&mut self) -> &mut String { &mut >> 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]: *** [/<<PKGBUILDDIR>>/config/rules.mk:951: >> force-cargo-library-build] Error 101 >> make[5]: Leaving directory >> '/<<PKGBUILDDIR>>/build-browser/toolkit/library/rust' >> make[4]: *** [/<<PKGBUILDDIR>>/config/recurse.mk:74: >> toolkit/library/rust/target] Error 2 >> make[4]: Leaving directory '/<<PKGBUILDDIR>>/build-browser' >> make[3]: *** [/<<PKGBUILDDIR>>/config/recurse.mk:34: compile] Error 2 >> make[3]: Leaving directory '/<<PKGBUILDDIR>>/build-browser' >> make[2]: *** [/<<PKGBUILDDIR>>/config/rules.mk:418: default] Error 2 >> make[2]: Leaving directory '/<<PKGBUILDDIR>>/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 '/<<PKGBUILDDIR>>' >> 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=/<<PKGBUILDDIR>>/build-browser/toolkit/library RUSTC=/usr/bin/rustc RUSTDOC=/usr/bin/rustdoc MOZ_SRC=/<<PKGBUILDDIR>> MOZ_DIST=/<<PKGBUILDDIR>>/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=/<<PKGBUILDDIR>>/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,/<<PKGBUILDDIR>>/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=/<<PKGBUILDDIR>>/build/cargo-linker /usr/bin/cargo rustc --release --frozen --manifest-path /<<PKGBUILDDIR>>/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 `/<<PKGBUILDDIR>>/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