pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Firefox on NetBSD




> On May 24, 2024, at 10:33 PM, Ryo ONODERA <ryo%tetera.org@localhost> wrote:
> 
> Removing __CTASSERT() solves my problem.
> 
> CTASSERT(9) man page says:
> 
> IMPLEMENTATION NOTES
>     The CTASSERT() macro should not be used in a header file.  It is
>     implemented using a dummy typedef, with a name (based on line number)
>     that may conflict with a CTASSERT() in a source file including that
>     header.
> 
> If the man page says the correct description,
> CTASSERT should be used in more careful way.
> 
> The following patch to r1.23 works for www/firefox with lang/rust for me.

That seems to point to an even bigger problem - that something is using a definition of ucontext_t that’s incorrect.

> 
> Index: sys/sys/ucontext.h
> ===================================================================
> RCS file: /cvsroot/src/sys/sys/ucontext.h,v
> retrieving revision 1.23
> diff -u -r1.23 ucontext.h
> --- sys/sys/ucontext.h 24 May 2024 13:50:30 -0000 1.23
> +++ sys/sys/ucontext.h 25 May 2024 05:26:26 -0000
> @@ -1,4 +1,4 @@
> -/* $NetBSD: ucontext.h,v 1.23 2024/05/24 13:50:30 ryoon Exp $ */
> +/* $NetBSD: ucontext.h,v 1.22 2024/05/18 01:21:42 thorpej Exp $ */
> 
> /*-
>  * Copyright (c) 1999, 2003, 2024 The NetBSD Foundation, Inc.
> @@ -82,6 +82,12 @@
> #define _UC_UCONTEXT_ALIGN (~0)
> #endif
> 
> +#ifdef __UCONTEXT_SIZE
> +//__CTASSERT(sizeof(ucontext_t) == __UCONTEXT_SIZE);
> +#else
> +#define __UCONTEXT_SIZE sizeof(ucontext_t)
> +#endif
> +
> #ifndef _UC_TLSBASE
> #error _UC_TLSBASE not defined.
> #endif
> @@ -102,12 +108,6 @@
> void cpu_getmcontext(struct lwp *, mcontext_t *, unsigned int *);
> int cpu_setmcontext(struct lwp *, const mcontext_t *, unsigned int);
> int cpu_mcontext_validate(struct lwp *, const mcontext_t *);
> -
> -#ifdef __UCONTEXT_SIZE
> -__CTASSERT(sizeof(ucontext_t) == __UCONTEXT_SIZE);
> -#else
> -#define __UCONTEXT_SIZE sizeof(ucontext_t)
> -#endif
> #endif /* _KERNEL */
> 
> #endif /* !_SYS_UCONTEXT_H_ */
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>>> I suspect that Rust's C binding may be implemented in bad manner.
>>> 
>>> And I have found that rustc built under the latest kernel and userland
>>> does not work with SIGILL, and I have replaced only userland with
>>> a userland with my change, then rustc works fine.
>>> So I suspect something in NetBSD userland is implemented in the bad manner.
>>> 
>>> Thank you.
>>> 
>>>>> 
>>>>> Thank you.
>>>>> 
>>>>> 
>>>>>> On Sun, May 19, 2024, 06:32 Robert Swindells <rjs%fdy2.co.uk@localhost> wrote:
>>>>>> 
>>>>>>> 
>>>>>>> Is anyone else having problems building latest www/firefox on NetBSD?
>>>>>>> 
>>>>>>> Getting this kind of error:
>>>>>>> 
>>>>>>> gmake[2]: *** [/u23/pkgobj/www/firefox/work/firefox-126.0/config/
>>>>>>> recurse.mk:72: _VERSION='' CARGO_PKG_VERSION=0.1.0
>>>>>>> CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_
>>>>>>> MINOR=1 CARGO_PKG_VERSION_PATCH=0 CARGO_PKG_VERSION_PRE='' DEBUG=false
>>>>>>> HOST=x86_
>>>>>>> 64-unknown-netbsd
>>>>>>> LD_LIBRARY_PATH='/u23/pkgobj/www/firefox/work/build/release/de
>>>>>>> 
>>>>>>> ps:/u23/pkgobj/www/firefox/work/build/release:/usr/pkg/lib/rustlib/x86_64-unknow
>>>>>>> n-netbsd/lib' NUM_JOBS=16 OPT_LEVEL=2
>>>>>>> OUT_DIR=/u23/pkgobj/www/firefox/work/build
>>>>>>> /x86_64-unknown-netbsd/release/build/gecko-profiler-1b4e9916b47d39e3/out
>>>>>>> PROFILE
>>>>>>> =release RUSTC=/usr/pkg/bin/rustc
>>>>>>> RUSTC_LINKER=/u23/pkgobj/www/firefox/work/fire
>>>>>>> fox-126.0/build/cargo-linker RUSTDOC=/usr/pkg/bin/rustdoc
>>>>>>> TARGET=x86_64-unknown-
>>>>>>> netbsd
>>>>>>> /u23/pkgobj/www/firefox/work/build/release/build/gecko-profiler-beebe90b0
>>>>>>> 6c32bf4/build-script-build` (signal: 4, SIGILL: illegal instruction)
>>>>>>> 
>>>>>>> Tried both lang/rust-bin and building rust from source on NetBSD-current
>>>>>>> from today.
>>>>>>> 
>>>>>>> Firefox 125 built fine.
>>>>>>> 
>>>>> 
>>>>> -- 
>>>>> Ryo ONODERA // ryo%tetera.org@localhost
>>>>> PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3
>>>> 
>>>> -- thorpej
>>>> 
>>> 
>>> -- 
>>> Ryo ONODERA // ryo%tetera.org@localhost
>>> PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3
>> 
>> -- 
>> Ryo ONODERA // ryo%tetera.org@localhost
>> PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3
> 
> -- 
> Ryo ONODERA // ryo%tetera.org@localhost
> PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


-- thorpej



Home | Main Index | Thread Index | Old Index