Github messages for voidlinux
 help / color / mirror / Atom feed
From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: Re: New Package: mariadb-connector-c-3.1.4
Date: Tue, 05 Nov 2019 19:39:05 +0100	[thread overview]
Message-ID: <20191105183905.QnalahxBaXLsjaw2i4mrux7n3MiVtluETpq-qMCycHg@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-16128@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1430 bytes --]

New comment by newbluemoon on void-packages repository

https://github.com/void-linux/void-packages/pull/16128#issuecomment-549960367

Comment:
The failure on musl targets is because the musl libc doesn’t have `ucontext.h`. See e.g. [here](https://www.openwall.com/lists/musl/2018/01/29/2) why.

In `include/ma_context.h` there is
```
#ifdef _WIN32
#define MY_CONTEXT_USE_WIN32_FIBERS 1
#elif defined(__GNUC__) && __GNUC__ >= 3 && defined(__x86_64__) && !defined(__ILP32__)
#define MY_CONTEXT_USE_X86_64_GCC_ASM
#elif defined(__GNUC__) && __GNUC__ >= 3 && defined(__i386__)
#define MY_CONTEXT_USE_I386_GCC_ASM
#elif defined(HAVE_UCONTEXT_H)
#define MY_CONTEXT_USE_UCONTEXT
#else
#define MY_CONTEXT_DISABLE
#endif
```
So `mariadb-connector-c` uses its own asm code for x86_64. That’s why this target works. For ARM (and other targets) it falls back to the libc’s `ucontext.h`. The check for `ucontext.h` doesn’t fail because it is part of the cross-compiler packages (I don’t have enough insight to know why). But you just have to patch out that check so that the code follows the branch without ucontext, like e.g.:

```
pre_configure() {
	case "$XBPS_TARGET_MACHINE" in
		*-musl)	vsed -i -e "/CHECK_INCLUDE_FILES (ucontext.h HAVE_UCONTEXT_H)/d" \
			cmake/CheckIncludeFiles.cmake
	esac
}
```

and remove the line
`archs="x86_64 i686 x86_64-musl"`

Now it should be fine. :)

  parent reply	other threads:[~2019-11-05 18:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-05  0:28 [PR PATCH] " voidlinux-github
2019-11-05  0:30 ` voidlinux-github
2019-11-05  1:46 ` voidlinux-github
2019-11-05  1:55 ` [PR PATCH] [Updated] " voidlinux-github
2019-11-05  2:08 ` voidlinux-github
2019-11-05 14:47 ` [PR PATCH] [Updated] " voidlinux-github
2019-11-05 18:39 ` voidlinux-github [this message]
2019-11-05 18:44 ` voidlinux-github
2019-11-05 19:19 ` voidlinux-github
2019-11-05 19:55 ` voidlinux-github
2019-11-08 17:13 ` voidlinux-github
  -- strict thread matches above, loose matches on Subject: below --
2019-11-04 22:23 [PR PATCH] " voidlinux-github
2019-11-04 23:22 ` voidlinux-github
2019-11-04 23:43 ` voidlinux-github
2019-11-04 23:51 ` voidlinux-github

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191105183905.QnalahxBaXLsjaw2i4mrux7n3MiVtluETpq-qMCycHg@z \
    --to=voidlinux-github@inbox.vuxu.org \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).