Bug 215277 - security/nacl - cannot compile sample program
Summary: security/nacl - cannot compile sample program
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Johan van Selst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-13 13:24 UTC by Pietro Cerutti
Modified: 2016-12-14 13:43 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (johans)


Attachments
Fix REINPLACE_CMD, add LICENSE (824 bytes, patch)
2016-12-13 14:51 UTC, Pietro Cerutti
gahr: maintainer-approval? (johans)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pietro Cerutti freebsd_committer freebsd_triage 2016-12-13 13:24:22 UTC
$ uname -a
FreeBSD dev.ptrcrt.ch 11.0-RELEASE-p2 FreeBSD 11.0-RELEASE-p2 #0: Mon Oct 24 06:55:27 UTC 2016     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERI
C  amd64

$ pkg query %v nacl
20110221_1

$ cat hash-sample.cpp
#include <crypto_hash.h>

int main()
{
    std::string hash = crypto_hash("Hello, world");
}

$ c++ -o hash-sample hash-sample.cpp -I/usr/local/include -L/usr/local/lib -lnacl
/tmp/hash-sample-464bef.o: In function `main':
hash-sample.cpp:(.text+0x6a): undefined reference to `crypto_hash_sha512_ref(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> 
> const&)'
c++: error: linker command failed with exit code 1 (use -v to see invocation)
Comment 1 Pietro Cerutti freebsd_committer freebsd_triage 2016-12-13 14:51:15 UTC
Created attachment 177943 [details]
Fix REINPLACE_CMD, add LICENSE
Comment 2 Johan van Selst freebsd_committer freebsd_triage 2016-12-14 13:24:41 UTC
Approved, feel free to commit
Comment 3 commit-hook freebsd_committer freebsd_triage 2016-12-14 13:43:48 UTC
A commit references this bug:

Author: gahr
Date: Wed Dec 14 13:43:35 UTC 2016
New revision: 428560
URL: https://svnweb.freebsd.org/changeset/ports/428560

Log:
  security/nacl: fix post-patch (prevented c++ from working) and add LICENSE

  PR:		215277
  Submitted by:	gahr@
  Approved by:	johans@ (maintainer)

Changes:
  head/security/nacl/Makefile