* [PR PATCH] bees: fix build on musl & platforms without 64-bit atomics
@ 2023-07-03 14:51 hazen2215
2023-07-05 3:43 ` [PR REVIEW] " classabbyamp
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: hazen2215 @ 2023-07-03 14:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1113 bytes --]
There is a new pull request by hazen2215 against master on the void-packages repository
https://github.com/hazen2215/void-packages bees
https://github.com/void-linux/void-packages/pull/44816
bees: fix build on musl & platforms without 64-bit atomics
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-musl)
A patch file from https://github.com/void-linux/void-packages/pull/44816.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-bees-44816.patch --]
[-- Type: text/x-diff, Size: 2281 bytes --]
From 532217f7c688b683c2e00b172963faf7f0a28f40 Mon Sep 17 00:00:00 2001
From: hazen2215 <haz@disroot.org>
Date: Mon, 3 Jul 2023 23:37:33 +0900
Subject: [PATCH] bees: fix build on musl & platforms without 64-bit atomics
---
srcpkgs/bees/patches/pthread_getname1.patch | 23 +++++++++++++++++++++
srcpkgs/bees/patches/series | 1 +
srcpkgs/bees/template | 4 ++--
3 files changed, 26 insertions(+), 2 deletions(-)
create mode 100644 srcpkgs/bees/patches/pthread_getname1.patch
diff --git a/srcpkgs/bees/patches/pthread_getname1.patch b/srcpkgs/bees/patches/pthread_getname1.patch
new file mode 100644
index 000000000000..2dcc4c63d589
--- /dev/null
+++ b/srcpkgs/bees/patches/pthread_getname1.patch
@@ -0,0 +1,23 @@
+--- a/lib/task.cc
++++ b/lib/task.cc
+@@ -289,7 +289,6 @@
+ lock.unlock();
+
+ char buf[24] = { 0 };
+- DIE_IF_MINUS_ERRNO(pthread_getname_np(pthread_self(), buf, sizeof(buf)));
+ DIE_IF_MINUS_ERRNO(pthread_setname_np(pthread_self(), m_title.c_str()));
+
+ TaskStatePtr this_task = shared_from_this();
+--- a/src/bees-trace.cc
++++ b/src/bees-trace.cc
+@@ -136,10 +136,6 @@
+ // OK try the pthread name next.
+ char buf[24];
+ memset(buf, '\0', sizeof(buf));
+- int err = pthread_getname_np(pthread_self(), buf, sizeof(buf));
+- if (err) {
+- return string("pthread_getname_np: ") + strerror(err);
+- }
+ buf[sizeof(buf) - 1] = '\0';
+
+ // thread_getname_np returns process name
diff --git a/srcpkgs/bees/patches/series b/srcpkgs/bees/patches/series
index d9a2837128f2..c0258b77f4a2 100644
--- a/srcpkgs/bees/patches/series
+++ b/srcpkgs/bees/patches/series
@@ -1,2 +1,3 @@
0001-don-t-run-tests-unless-asked.patch
0002-move-sbin-into-bin.patch
+pthread_getname1.patch
diff --git a/srcpkgs/bees/template b/srcpkgs/bees/template
index 9cd43f1d8277..e0ee8679c62b 100644
--- a/srcpkgs/bees/template
+++ b/srcpkgs/bees/template
@@ -2,7 +2,6 @@
pkgname=bees
version=0.8
revision=1
-archs="~*-musl"
build_style=gnu-makefile
make_check_target="test"
hostmakedepends="pkg-config"
@@ -24,7 +23,8 @@ if [ "$CROSS_BUILD" ]; then
fi
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
- broken="undefined reference to __atomic_fetch_add_8"
+ makedepends+=" libatomic-devel"
+ CXXFLAGS+=" -latomic"
fi
pre_build() {
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PR REVIEW] bees: fix build on musl & platforms without 64-bit atomics
2023-07-03 14:51 [PR PATCH] bees: fix build on musl & platforms without 64-bit atomics hazen2215
@ 2023-07-05 3:43 ` classabbyamp
2023-07-06 12:32 ` [PR PATCH] [Updated] " hazen2215
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: classabbyamp @ 2023-07-05 3:43 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 197 bytes --]
New review comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/44816#discussion_r1252503040
Comment:
revbump so it gets built on musl/no atomic 8
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PR PATCH] [Updated] bees: fix build on musl & platforms without 64-bit atomics
2023-07-03 14:51 [PR PATCH] bees: fix build on musl & platforms without 64-bit atomics hazen2215
2023-07-05 3:43 ` [PR REVIEW] " classabbyamp
@ 2023-07-06 12:32 ` hazen2215
2023-07-06 12:32 ` hazen2215
2023-07-10 9:30 ` [PR PATCH] [Merged]: " classabbyamp
3 siblings, 0 replies; 5+ messages in thread
From: hazen2215 @ 2023-07-06 12:32 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1118 bytes --]
There is an updated pull request by hazen2215 against master on the void-packages repository
https://github.com/hazen2215/void-packages bees
https://github.com/void-linux/void-packages/pull/44816
bees: fix build on musl & platforms without 64-bit atomics
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-musl)
A patch file from https://github.com/void-linux/void-packages/pull/44816.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-bees-44816.patch --]
[-- Type: text/x-diff, Size: 2323 bytes --]
From b60ac2032a35c2eaf588c1b2f7f759b4323950b6 Mon Sep 17 00:00:00 2001
From: hazen2215 <haz@disroot.org>
Date: Mon, 3 Jul 2023 23:37:33 +0900
Subject: [PATCH] bees: fix build on musl & platforms without 64-bit atomics
---
srcpkgs/bees/patches/pthread_getname1.patch | 23 +++++++++++++++++++++
srcpkgs/bees/patches/series | 1 +
srcpkgs/bees/template | 6 +++---
3 files changed, 27 insertions(+), 3 deletions(-)
create mode 100644 srcpkgs/bees/patches/pthread_getname1.patch
diff --git a/srcpkgs/bees/patches/pthread_getname1.patch b/srcpkgs/bees/patches/pthread_getname1.patch
new file mode 100644
index 000000000000..2dcc4c63d589
--- /dev/null
+++ b/srcpkgs/bees/patches/pthread_getname1.patch
@@ -0,0 +1,23 @@
+--- a/lib/task.cc
++++ b/lib/task.cc
+@@ -289,7 +289,6 @@
+ lock.unlock();
+
+ char buf[24] = { 0 };
+- DIE_IF_MINUS_ERRNO(pthread_getname_np(pthread_self(), buf, sizeof(buf)));
+ DIE_IF_MINUS_ERRNO(pthread_setname_np(pthread_self(), m_title.c_str()));
+
+ TaskStatePtr this_task = shared_from_this();
+--- a/src/bees-trace.cc
++++ b/src/bees-trace.cc
+@@ -136,10 +136,6 @@
+ // OK try the pthread name next.
+ char buf[24];
+ memset(buf, '\0', sizeof(buf));
+- int err = pthread_getname_np(pthread_self(), buf, sizeof(buf));
+- if (err) {
+- return string("pthread_getname_np: ") + strerror(err);
+- }
+ buf[sizeof(buf) - 1] = '\0';
+
+ // thread_getname_np returns process name
diff --git a/srcpkgs/bees/patches/series b/srcpkgs/bees/patches/series
index d9a2837128f2..c0258b77f4a2 100644
--- a/srcpkgs/bees/patches/series
+++ b/srcpkgs/bees/patches/series
@@ -1,2 +1,3 @@
0001-don-t-run-tests-unless-asked.patch
0002-move-sbin-into-bin.patch
+pthread_getname1.patch
diff --git a/srcpkgs/bees/template b/srcpkgs/bees/template
index 9cd43f1d8277..5296bf799137 100644
--- a/srcpkgs/bees/template
+++ b/srcpkgs/bees/template
@@ -1,8 +1,7 @@
# Template file for 'bees'
pkgname=bees
version=0.8
-revision=1
-archs="~*-musl"
+revision=2
build_style=gnu-makefile
make_check_target="test"
hostmakedepends="pkg-config"
@@ -24,7 +23,8 @@ if [ "$CROSS_BUILD" ]; then
fi
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
- broken="undefined reference to __atomic_fetch_add_8"
+ makedepends+=" libatomic-devel"
+ CXXFLAGS+=" -latomic"
fi
pre_build() {
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: bees: fix build on musl & platforms without 64-bit atomics
2023-07-03 14:51 [PR PATCH] bees: fix build on musl & platforms without 64-bit atomics hazen2215
2023-07-05 3:43 ` [PR REVIEW] " classabbyamp
2023-07-06 12:32 ` [PR PATCH] [Updated] " hazen2215
@ 2023-07-06 12:32 ` hazen2215
2023-07-10 9:30 ` [PR PATCH] [Merged]: " classabbyamp
3 siblings, 0 replies; 5+ messages in thread
From: hazen2215 @ 2023-07-06 12:32 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 154 bytes --]
New comment by hazen2215 on void-packages repository
https://github.com/void-linux/void-packages/pull/44816#issuecomment-1623601144
Comment:
revbumped
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PR PATCH] [Merged]: bees: fix build on musl & platforms without 64-bit atomics
2023-07-03 14:51 [PR PATCH] bees: fix build on musl & platforms without 64-bit atomics hazen2215
` (2 preceding siblings ...)
2023-07-06 12:32 ` hazen2215
@ 2023-07-10 9:30 ` classabbyamp
3 siblings, 0 replies; 5+ messages in thread
From: classabbyamp @ 2023-07-10 9:30 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 961 bytes --]
There's a merged pull request on the void-packages repository
bees: fix build on musl & platforms without 64-bit atomics
https://github.com/void-linux/void-packages/pull/44816
Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-musl)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-07-10 9:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-03 14:51 [PR PATCH] bees: fix build on musl & platforms without 64-bit atomics hazen2215
2023-07-05 3:43 ` [PR REVIEW] " classabbyamp
2023-07-06 12:32 ` [PR PATCH] [Updated] " hazen2215
2023-07-06 12:32 ` hazen2215
2023-07-10 9:30 ` [PR PATCH] [Merged]: " classabbyamp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).