Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] musl update #29632

Closed
dkwo opened this issue Mar 20, 2021 · 13 comments
Closed

[RFC] musl update #29632

dkwo opened this issue Mar 20, 2021 · 13 comments

Comments

@dkwo
Copy link
Contributor

dkwo commented Mar 20, 2021

Has a musl update been planned?
My reason for asking is I'm trying to build flint and it throws me an error unknown type name 'cpu_set_t', while I noticed Alpine Linux packages it.
Otherwise, does anyone understand what should be patched in our musl to build it?

Thanks.

@abenson
Copy link
Contributor

abenson commented Mar 20, 2021

What architecture are you on? I was able to build it for x86_64-musl.

index: added `flint2-2.7.1_1' (x86_64-musl).

@dkwo
Copy link
Contributor Author

dkwo commented Mar 20, 2021

Thanks for helping.
I'm on the same architecture.
If I create a template, it works for me as well (previously, I was just using cmake on another machine).
Do you think this looks fine?

# Template file for 'flint2'
pkgname=flint2
version=2.7.1
revision=1
wrksrc=flint-${version}
build_style=cmake
configure_args="-DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DBUILD_TESTING=ON"
makedepends="cmake gmp-devel mpfr-devel blas-devel python3"
short_desc="C library in support of computations in number theory"
maintainer="..."
license="LGPL-2.1-or-later"
homepage="https://www.flintlib.org"
distfiles="https://www.flintlib.org/flint-${version}.tar.gz"
checksum=186e2fd9ab67df8a05b122fb018269b382e4babcdb17353c4be1fe364dca481e
distfiles="https://www.flintlib.org/flint-${version}.tar.gz"
checksum=186e2fd9ab67df8a05b122fb018269b382e4babcdb17353c4be1fe364dca481e

@Johnnynator
Copy link
Member

You need to.most be some makedpends (cmake, python3) to hostmakedepends.
Furthermore everything in configure_args but BUILD_TESTING can be dropped, it is already defined by the build_style

@Logarithmus
Copy link
Contributor

Logarithmus commented Mar 21, 2021

What about musl update though? It's been half a year since 1.2 was released, yet we are still on 1.1. glibc got updated, but musl didn't. Alpine somehow managed to update, what are the blocking issues for Void?

@sgn
Copy link
Member

sgn commented Mar 21, 2021 via email

@Logarithmus
Copy link
Contributor

Logarithmus commented Mar 21, 2021 via email

@Duncaen
Copy link
Member

Duncaen commented Mar 21, 2021

Somehow we've managed to rebuild the whole world for new glibc. How's musl different in this aspect? Also AFAIK there's no i686-musl variant, so i686 is out of scope of the question.

No we didn't, glibc update doesn't require a rebuild. armv6l-musl and armv7l-musl require a whole rebuild because of the 64bit time changes.

http://musl.libc.org/time64.html

@ericonr
Copy link
Member

ericonr commented Mar 22, 2021

The XBPS feature proposal is void-linux/xbps#331 , at least AFAIK.

Fixes for the flint template have been suggested, so I'm closing this.

@ericonr ericonr closed this as completed Mar 22, 2021
@dkwo
Copy link
Contributor Author

dkwo commented Apr 19, 2021

@ericonr is it ok to briefly reopen this?
I tried to build musl 1.2.2 by myself on x86_64, but firefox stops working:

(/usr/lib/firefox/firefox:2087): Gtk-WARNING **: 08:51:38.988: Failed to parse /home/dkwo/.config/gtk-3.0/settings.ini: Permission denied
Crash Annotation GraphicsCriticalError: |[C0][GFX1]: no fonts - init: 1 fonts: 80 loader: 0 (t=0.371393) [GFX1]: no fonts - init: 1 fonts: 80 loader: 0
JavaScript error: moz-extension://3be9b177-ed03-40c3-9f1f-25790023c3e7/content/staticNS.js, line 77: ReferenceError: policy is not defined
###!!! [Parent][MessageChannel] Error: (msgtype=0x5D0014,name=PHttpChannel::Msg_DeleteSelf) Channel error: cannot send/recv
Sandbox: seccomp sandbox violation: pid 2128, tid 2128, syscall 16, args 2 21523 140731621541608 0 1 2128.

Do you know what should be changed?
I deleted

srcpkgs/musl/patches/0001_reorder_thread_list_unlink_in_pthread_exit_after_all.patch,
0002_don_t_use_libc_threads_minus_1_as_relaxed_atomic_for.patch,
0003_cut_down_size_of_some_libc_struct_members.patch,
0004_restore_lock_skipping_for_processes_that_return_to_s.patch,
CVE-2020-28928.patch b/srcpkgs/musl/patches/CVE-2020-28928.patch,
aarch64-fregs.patch b/srcpkgs/musl/patches/aarch64-fregs.patch,
ppc-pt_regs.patch b/srcpkgs/musl/patches/ppc-pt_regs.patch,
ppc64-fpregset_t.patch b/srcpkgs/musl/patches/ppc64-fpregset_t.patch,
ppcle.patch b/srcpkgs/musl/patches/ppcle.patch

and edited

/srcpkgs/musl/template
 # Template file for 'musl'
 pkgname=musl
-reverts="1.2.0_1"
-version=1.1.24
-revision=6
+version=1.2.2
+revision=1
 archs="*-musl"
 bootstrap=yes
 build_style=gnu-configure
@@ -11,8 +10,9 @@ short_desc="Musl C library"
 maintainer="Enno Boland <[email protected]>"
 license="MIT"
 homepage="http://www.musl-libc.org/"
-distfiles="http://www.musl-libc.org/releases/musl-${version}.tar.gz"
-checksum=1370c9a812b2cf2a7d92802510cca0058cc37e66a7bedd70051f0a34015022a3
+# distfiles="${homepage}/releases/musl-${version}.tar.gz"
+distfiles="https://git.musl-libc.org/cgit/musl/snapshot/musl-${version}.tar.gz"
+checksum=aec1ca7128576753111a1e66a0404127fff07683f8884f1677cd29aa4074e640
 
 nostrip_files="libc.so"
 shlib_provides="libc.so"

Thanks.

@Duncaen
Copy link
Member

Duncaen commented Apr 19, 2021

Firefoxs sandbox needs to be patched to allow the syscall or the the specific arguments. There is also a whitelist option in about:config as workaround.

@dkwo
Copy link
Contributor Author

dkwo commented Apr 19, 2021

@Duncaen Thanks, do you refer to this by any chance?

@Duncaen
Copy link
Member

Duncaen commented Apr 19, 2021

Maybe that too later, but your error uses syscall number 16, which is ioctl on x86_64, the sandbox will filter ioctl syscalls based on the arguments.

@ericonr
Copy link
Member

ericonr commented Apr 19, 2021

iirc the issue was to do with O_LARGEFILE now being defined to a proper value, which, unless Firefox is built with such headers, leads to a sandbox violation. I am running 1.2.1 myself with some patches on top because of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants