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

Fix GUIX Build For Windows, Linux, Intel Mac #224

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

JaredTate
Copy link

@JaredTate JaredTate commented Apr 1, 2024

This PR partially reverts PR #194 which fixed Apple silicon builds. When I previously tested the GUIX build process for that PR, I only GUIX built Apple silicon and did not realize the changes had broken all the other GUIX builds including Windows, Linux, and Intel Mac builds.

This PR allows us to GUIX build Windows, 3 Linux distros, and Intel Mac, but it breaks the GUIX Apple silicon build. However, it still does build everything & should allow for compiling m1 builds locally. The broken part is in devtools which is needed after the build is complete for GUIX. It would be great to have someone test compile apple silicone from this PR locally to confirm.

In the interest of time getting an RC4 release out, and the recent GoFetch disclosure on vulnerabilities with m1 chips and theft of crypto private keys I am proposing this fix as is for the time being until we can finalize an Apple silicone fix for devtools on GUIX. I already spent 2.5 days trying to get Apple Silicon to GUIX build along with all the others, but in the interest of time let's get the rest of the RC4 builds out without Apple silicon GUIX. People should still be able to build Apple Silicon locally for their m1 chips if they want.

Screenshot 2024-04-01 at 1 56 34 PM

GUIX Build

env HOSTS='x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu x86_64-w64-mingw32 x86_64-apple-darwin' ./contrib/guix/guix-build

…re/feature/appl-silicon-support""

This reverts commit 042b18acf45808082dfb48cc7ef01ea3bfc92039.
@ycagel ycagel requested review from SmartArray, ycagel, digicontributer, gto90, j50ng and a user April 1, 2024 20:02
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK Tested! Nice work @JaredTate .

Screenshot from 2024-04-01 23-52-50

Copy link
Member

@ycagel ycagel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cACK. Good job @JaredTate!

@JaredTate
Copy link
Author

JaredTate commented Apr 1, 2024

To clarify this PR does successfully compile Apple Silicone on GUIX... it's just the final security check unique to GUIX build process that fails and needs further modifications, which is complicated. ... the actual compilation of the qt is successful so it should build locally for people with m1s.

Screenshot 2024-04-01 at 2 04 24 PM

Full GUIX Security Check Error:

 CXXLD    digibyted
  AR       libtest_util.a
  CXXLD    test/test_digibyte
  AR       qt/libdigibyteqt.a
  CXXLD    qt/digibyte-qt
make[2]: Leaving directory '/distsrc-base/distsrc-57a62e3697fe-arm64-apple-darwin/src'
make[1]: Leaving directory '/distsrc-base/distsrc-57a62e3697fe-arm64-apple-darwin/src'
Making all in doc/man
make[1]: Entering directory '/distsrc-base/distsrc-57a62e3697fe-arm64-apple-darwin/doc/man'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/distsrc-base/distsrc-57a62e3697fe-arm64-apple-darwin/doc/man'
make[1]: Entering directory '/distsrc-base/distsrc-57a62e3697fe-arm64-apple-darwin'
make[1]: Nothing to be done for 'all-am'.
make[1]: Leaving directory '/distsrc-base/distsrc-57a62e3697fe-arm64-apple-darwin'
ld: warning: -no_pie ignored for arm64
F
======================================================================
FAIL: test_MACHO (__main__.TestSecurityChecks)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./contrib/devtools/test-security-check.py", line 94, in test_MACHO
    self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-no_pie','-Wl,-flat_namespace','-Wl,-allow_stack_execute','-fno-stack-protector']),
AssertionError: Tuples differ: (1, 'test1: failed NOUNDEFS NX LAZY_BINDINGS Canary CONTROL_FLOW') != (1, 'test1: failed PIE NOUNDEFS NX LAZY_BINDINGS Canary CONTROL_FLOW')

First differing element 1:
'test1: failed NOUNDEFS NX LAZY_BINDINGS Canary CONTROL_FLOW'
'test1: failed PIE NOUNDEFS NX LAZY_BINDINGS Canary CONTROL_FLOW'

- (1, 'test1: failed NOUNDEFS NX LAZY_BINDINGS Canary CONTROL_FLOW')
+ (1, 'test1: failed PIE NOUNDEFS NX LAZY_BINDINGS Canary CONTROL_FLOW')
?                   ++++


----------------------------------------------------------------------
Ran 1 test in 0.515s

FAILED (failures=1)
make: *** [Makefile:1445: test-security-check] Error 1
# ls

Copy link
Member

@gto90 gto90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@gto90 gto90 merged commit 527219d into DigiByte-Core:develop Apr 2, 2024
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

Successfully merging this pull request may close these issues.

3 participants