Bug 240695

Summary: net-p2p/litecoin: fix build on big-endian architectures
Product: Ports & Packages Reporter: Piotr Kubaj <pkubaj>
Component: Individual Port(s)Assignee: Piotr Kubaj <pkubaj>
Status: Closed FIXED    
Severity: Affects Only Me CC: hsw
Priority: --- Flags: bugzilla: maintainer-feedback? (hsw)
koobs: merge-quarterly?
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch hsw: maintainer-approval+

Description Piotr Kubaj freebsd_committer freebsd_triage 2019-09-19 19:47:19 UTC

    
Comment 1 Piotr Kubaj freebsd_committer freebsd_triage 2019-09-19 19:48:02 UTC
Include sys/endian.h in src/crypto/scrypt.cpp, big-endian architectures need it:
crypto/scrypt.cpp:157:3: error: 'be32enc' was not declared in this scope
  157 |   be32enc(ivec, (uint32_t)(i + 1));
      |   ^~~~~~~
crypto/scrypt.cpp: In function 'void scrypt_1024_1_1_256_sp_generic(const char*, char*, char*)':
crypto/scrypt.cpp:269:10: error: 'le32dec' was not declared in this scope
  269 |   X[k] = le32dec(&B[4 * k]);
      |          ^~~~~~~
crypto/scrypt.cpp:285:3: error: 'le32enc' was not declared in this scope
  285 |   le32enc(&B[4 * k], X[k]);
      |   ^~~~~~~
Comment 2 Piotr Kubaj freebsd_committer freebsd_triage 2019-09-19 19:48:24 UTC
Created attachment 207638 [details]
patch
Comment 3 Christopher Hall 2019-09-20 04:33:06 UTC
Comment on attachment 207638 [details]
patch

thanks for the patch
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2019-09-20 04:45:12 UTC
^Triage: Reporter is committer, MAINTAINER != committer, assign accordingly

@Piotr Can you do this (self-assign) for the above cases please

Also, build fixes are:

Approved by: portmgr (blanket: build fix), and do not require Bugzilla issues to be created or approved by maintainers.

For ports with MAINTAINER's who are committers, you can continue to create issues and ask for approval, though it is not required
Comment 5 Mark Linimon freebsd_committer freebsd_triage 2019-09-20 18:02:03 UTC
Approved as mentor (pending maintainer review): builds on ppcports.
Comment 6 commit-hook freebsd_committer freebsd_triage 2019-09-21 16:39:30 UTC
A commit references this bug:

Author: pkubaj
Date: Sat Sep 21 16:38:37 UTC 2019
New revision: 512525
URL: https://svnweb.freebsd.org/changeset/ports/512525

Log:
  net-p2p/litecoin: fix build on big-endian architectures

  Include sys/endian.h in src/crypto/scrypt.cpp, big-endian architectures need it:
  crypto/scrypt.cpp:157:3: error: 'be32enc' was not declared in this scope
    157 |   be32enc(ivec, (uint32_t)(i + 1));
        |   ^~~~~~~
  crypto/scrypt.cpp: In function 'void scrypt_1024_1_1_256_sp_generic(const char*, char*, char*)':
  crypto/scrypt.cpp:269:10: error: 'le32dec' was not declared in this scope
    269 |   X[k] = le32dec(&B[4 * k]);
        |          ^~~~~~~
  crypto/scrypt.cpp:285:3: error: 'le32enc' was not declared in this scope
    285 |   le32enc(&B[4 * k], X[k]);
        |   ^~~~~~~

  PR:		240695
  Approved by:	hsw@bitmark.com (maintainer), linimon (mentor)

Changes:
  head/net-p2p/litecoin/files/patch-src_crypto_scrypt.cpp