-
Notifications
You must be signed in to change notification settings - Fork 78
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
Can't build cleanly for FreeBSD/powerpc64 #107
Comments
Hmm unsure how this can happen. We are just using the libffi sources as-is and I assume they should compile. @chmeeedalf Are you able to build libffi from the sources at jni/libffi? |
A simple './configure --disable-multi-os-directory; gmake' builds it just fine (--disable-multi-os-directory is needed for clang) |
I apparently missed the most important bit, and just now noticed (even re-reading the errors several times):
So it's actually failing in jffi, not libffi. I don't know how I missed that earlier, when I filed this issue. |
I do not currently have access to a ppc machine to test this on. If your security restrictions allow it, I would be happy to try to fix the build on a machine of yours. Otherwise I will need you to do some playing around with the build and sources to figure out why these constants are being accessed but not defined. |
I can create you a temporary account on my machine. Just email me with your username and SSH public key (my github name at gmail) |
So this seems like an ordering issue within libffi, but I can't believe we are the only ones to see it. The logic in jffi is simple here: it includes ffi.h, which includes the platform-specific ffitarget.h, which tries to reference I found this change from 7 years ago that added the references to Still trying to figure out why this ppc file seems to access constants before they are defined. |
Near as I can tell this seems wrong in the libffi sources. I assume we are doing something wrong, but I have filed libffi/libffi#637 to try to get some help from libffi folks as to what we are doing wrong (and what it is I am not seeing, because those headers definitely appear to be wrong). |
Hitting this in Gentoo too. Can arrange access to PPC if required, but definitely seems like it may be on the libffi side. Just confused as to how nothing else has hit it so far... |
@thesamesam Ok let's fix that. We currently have a workflow for Linux that builds the binary across several architectures. PPC is not one of them. I think the architecture we want to add is "powerpc64"? Worst case I can try to debug this via CI but access to a machine might make it go quicker. It would also help if you know why it's failing and how to fix it. 😀 |
So sorry I missed this!! I'm looking at a PR to get CI running for PPC now. May need approval from your end it to actually run once I've got one filed. (I really wish I knew why, but I don't, sadly) |
Bug: jnr#107 Signed-off-by: Sam James <[email protected]>
Bug: jnr#107 Signed-off-by: Sam James <[email protected]>
Bug: jnr#107 Signed-off-by: Sam James <[email protected]>
Bug: jnr#107 Signed-off-by: Sam James <[email protected]>
Bug: jnr#107 Signed-off-by: Sam James <[email protected]>
@chmeeedalf @thesamesam Any updates here? |
@headius You won't believe it but there genuinely is an update as of only a few days ago! I've been stuck on a QEMU bug which meant that any CI jobs would die instantly and it should be fixed in the next QEMU release: https://gitlab.com/qemu-project/qemu/-/issues/588#note_891295188. I'm going to try backport it or running an experimental version of QEMU for the purpose of the CI job. It's on my list to try and integrate the fix and see if we can get CI running again. I'll take a look tonight and go from there. |
@thesamesam Wonderful, I'm glad I pinged! Standing by to help or merge whatever looks good. It will be great to get more platforms auto-generating soon! |
For powerpc at least, these definitions are referenced in the target-specific ffitarget.h. Discovered in the jffi project. Should close libffi#637. Downstream jffi bug jnr/jffi#107. Downstream distro bug https://bugs.gentoo.org/827215. Testing - both libffi and jffi test suites pass with this patch applied, at least on ppc64le linux. I did not see any warnings about redefinitions. Tested versions - libffi 3.4.2, jffi 1.3.6 and 1.3.9.
For powerpc at least, these definitions are referenced in the target-specific ffitarget.h. Discovered in the jffi project. Should close #637. Downstream jffi bug jnr/jffi#107. Downstream distro bug https://bugs.gentoo.org/827215. Testing - both libffi and jffi test suites pass with this patch applied, at least on ppc64le linux. I did not see any warnings about redefinitions. Tested versions - libffi 3.4.2, jffi 1.3.6 and 1.3.9.
Backports libffi/libffi#722. Bug: jnr/jffi#107 Closes: https://bugs.gentoo.org/827215 Closes: #26529 Signed-off-by: Sam James <[email protected]>
3.4.2-r1 was causing https://bugs.gentoo.org/827215 on ppc64 -> jnr/jffi#107 Signed-off-by: Volkmar W. Pogatzki <[email protected]>
3.4.2-r1 was causing issues on PPC64. Bug: https://bugs.gentoo.org/827215 Bug: jnr/jffi#107 Signed-off-by: Volkmar W. Pogatzki <[email protected]> Closes: #26568 Signed-off-by: Sam James <[email protected]>
For powerpc at least, these definitions are referenced in the target-specific ffitarget.h. Discovered in the jffi project. Should close libffi/libffi#637. Downstream jffi bug jnr/jffi#107. Downstream distro bug https://bugs.gentoo.org/827215. Testing - both libffi and jffi test suites pass with this patch applied, at least on ppc64le linux. I did not see any warnings about redefinitions. Tested versions - libffi 3.4.2, jffi 1.3.6 and 1.3.9.
I tried building this for FreeBSD/powerpc64, in an effort to also port jnr/jnr-ffi to FreeBSD/powerpc64, and ran into the following error:
libffi on its own builds fine from ports(devel/libffi) on FreeBSD/powerpc64, and I see that this builds fine for Linux/powerpc64, so I'm not sure why it's failing here for FreeBSD/powerpc64.
The text was updated successfully, but these errors were encountered: