Skip to content

Conversation

@div72
Copy link
Member

@div72 div72 commented Jul 3, 2024

No description provided.

@div72 div72 self-assigned this Jul 3, 2024
@jamescowens jamescowens self-requested a review July 3, 2024 16:09
@jamescowens jamescowens added this to the Natasha milestone Jul 3, 2024
Copy link
Member

@jamescowens jamescowens left a comment

Choose a reason for hiding this comment

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

utACK. This is marked still in progress, but looks good to me.

@div72
Copy link
Member Author

div72 commented Jul 4, 2024

@wilkart What version of FreeBSD are you using?

@wilkart
Copy link
Contributor

wilkart commented Jul 4, 2024

@div72 My recent approach was on FreeBSD 14.0 but I use many FreeBSD releases so I can easily verify the build on all supported if we need.
https://www.freebsd.org/security/#sup

@div72
Copy link
Member Author

div72 commented Jul 4, 2024

@wilkart I got use of undeclared identifier: 'be32enc' with 14.1 on this PR, can you try that?

@wilkart
Copy link
Contributor

wilkart commented Jul 10, 2024

Dear @div72, it seems on FreeBSD 14.1 the change I pass below (reverting to original) allows building. I suggest we revert my solution. I will check in future release of 13.4-RELEASE.
In next step I will update document how to build on FreeBSD 14.1 and higher releases.

[gridcoin@amarara ~/Gridcoin-Research]$ git diff
diff --git a/src/pbkdf2.cpp b/src/pbkdf2.cpp
index bcd75f3f8..588b50e7d 100644
--- a/src/pbkdf2.cpp
+++ b/src/pbkdf2.cpp
@@ -16,7 +16,6 @@ be32dec(const void *pp)
 }
 */

-#ifndef __FreeBSD__
 static inline void
 be32enc(void *pp, uint32_t x)
 {
@@ -27,7 +26,6 @@ be32enc(void *pp, uint32_t x)
     p[1] = (x >> 16) & 0xff;
     p[0] = (x >> 24) & 0xff;
 }
-#endif

 /**
  * PBKDF2_SHA256(passwd, passwdlen, salt, saltlen, c, buf, dkLen):

div72 added 3 commits July 15, 2024 16:47
1a6f001 introduced code using new
defines from checks not implemented yet. This is ok as the fallback
code that reads /dev/urandom is triggered instead but let's use the
proper interface.
be32enc is a function on BSDs which can lead to conflicts. Use the
WriteBE32 function that's used in crypto code instead.
@div72 div72 marked this pull request as ready for review July 15, 2024 18:59
@wilkart
Copy link
Contributor

wilkart commented Jul 17, 2024

@div72
I confirm I have successfully built on both FreeBSD 13.3-RELEASE and FreeBSD 14.1-RELEASE after your refactoring to use WriteBE32.

Copy link
Member

@jamescowens jamescowens left a comment

Choose a reason for hiding this comment

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

ACK

@jamescowens jamescowens merged commit 4ae471e into gridcoin-community:development Jul 17, 2024
@div72 div72 deleted the add-checks branch September 3, 2024 14:54
jamescowens added a commit that referenced this pull request Feb 16, 2025
Added
 - depends: add cross arm64-darwin support #2775 (@div72)
 - build: add missing randomness checks #2772 (@div72)
 - init, registry: Support -clearallregistryhistory startup parameter #2773 (@jamescowens)

Changed
 - build: omit _FORTIFY_SOURCE on debug #2793 (@div72)
 - doc: cmake is required for Windows depends #2791 (@barton2526)
 - CMake: Set maximum supported Boost version #2788 (@CyberTailor)
 - ci: bump to MacOS 13 #2784 (@div72)
 - build/cmake: disable LevelDB tests #2776 (@div72)
 - util: use XDG_STATE_HOME for datadir on Flatpak #2774 (@div72)
 - util, build: Support miniupnp API version 18+ #2771 (@jamescowens)
 - build: explicitly include FindPkgConfig for CMake #2769 (@jamescowens)
 - ci, cd: bump action versions #2763 (@div72)
 - Sync CMake CI #2762 (@CyberTailor)
 - cpid: Modify CPID local hasher to eliminate compiler warnings on 32 bit archs #2760 (@jamescowens)

Removed
 - refactor, misc: remove CBitcoin(Address|Secret) #2634 (@div72)

Fixed
 - poll, gui: Disable choice add button in poll wizard when choice limit is reached #2792 (@jamescowens)
 - diagnose, rpc: fix compilation with boost 1.87 #2786 (@div72)
 - node: fix build with GCC 15 #2783 (@CyberTailor)
 - ci: use overwrite with brew install on MacOS CMake #2782 (@div72)
 - scraper: Protect access to ConvergedStats.csv.gz with a lock #2779 (@jamescowens)
 - fix build on FreeBSD #2770 (@wilkart)
 - rpc/server: fix removing deprecated commands from command list #2768 (@lrusak)
 - cmake bdb53: disable error for implicit-int with gcc #2767 (@lrusak)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants