Bug 194986 - [New port] databases/levigo
Summary: [New port] databases/levigo
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: Kurt Jaeger
URL:
Keywords: patch-ready
Depends on:
Blocks:
 
Reported: 2014-11-13 08:35 UTC by cheffo
Modified: 2015-07-17 20:12 UTC (History)
2 users (show)

See Also:


Attachments
levigo shar file (2.64 KB, text/plain)
2014-11-13 08:35 UTC, cheffo
no flags Details
poudriere testport output (9.96 KB, text/plain)
2014-11-13 08:36 UTC, cheffo
no flags Details
poudriere testport portlint output (91 bytes, text/plain)
2014-11-13 08:36 UTC, cheffo
no flags Details
levigo shar file (2.53 KB, text/plain)
2015-02-24 15:04 UTC, cheffo
no flags Details
poudriere tesport output (10.49 KB, text/plain)
2015-02-24 15:05 UTC, cheffo
no flags Details
updated shar file as requested. (2.62 KB, text/plain)
2015-03-04 16:57 UTC, cheffo
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description cheffo 2014-11-13 08:35:53 UTC
Created attachment 149354 [details]
levigo shar file

levigo is a Go wrapper for LevelDB.
The API has been godoc'ed and is available on the web.
Questions answered at golang-nuts@googlegroups.com.

WWW: https://github.com/jmhodges/levigo

Redports logs - https://redports.org/buildarchive/20141113083206-85797/
Comment 1 cheffo 2014-11-13 08:36:15 UTC
Created attachment 149355 [details]
poudriere testport output
Comment 2 cheffo 2014-11-13 08:36:35 UTC
Created attachment 149356 [details]
poudriere testport portlint output
Comment 3 John Marino freebsd_committer freebsd_triage 2015-02-06 15:16:55 UTC
regarding this:

X.if ${OSVERSION} >= 900033 && exists(/usr/bin/clang)
XCC=		clang
XCXX=		clang++
XGYP_DEFINES+=	clang=1
X.else
XUSE_GCC?=	yes
XGYP_DEFINES+=	gcc_version=${CXX:S/g++//}
X.endif


Are you aware of USES=compiler (Mk/Uses/compiler.mk)?
If yes, why are you not using that?
Comment 4 cheffo 2015-02-10 15:19:37 UTC
As explained in the other ports that use this: At the time of writing the port the go support what nightmare, so I looked at other ports how they do solve the issue. As redports is down now it's hard for me to test. This is/was requirement for influxdb.com. So once version 0.9 is released I'll look again at those ports.
Comment 5 John Marino freebsd_committer freebsd_triage 2015-02-23 10:43:27 UTC
well, okay, but it needs fixing.  It's not okay as it is currently.
Comment 6 cheffo 2015-02-24 15:04:37 UTC
Created attachment 153438 [details]
levigo shar file

Attached new version that uses compiler.
Comment 7 cheffo 2015-02-24 15:05:16 UTC
Created attachment 153439 [details]
poudriere tesport output
Comment 8 John Marino freebsd_committer freebsd_triage 2015-03-01 21:39:53 UTC
same comment as your other new submission:

X.if ${COMPILER_TYPE} == clang
XCC=		clang
X.else
XUSE_GCC?=	yes
X.endif


You are trying to use USES=compiler, but I don't think you're using it correctly. If it's c++11 that you are looking for, grep other ports to see how it's done.
Comment 9 cheffo 2015-03-03 06:47:46 UTC
The only way to compile this port on FreeBSD with clang is to set CC=clang
The port system do not se this properly (I have no idea why) but grep other ports and you will see that this is how people address this issue. If CC=clang is not set in the environment the build faild miserably with criptic error.

So what is the right way to "guess" CC and set it for GO ENV and to get the port working with clang?

P.S. See https://github.com/szferi/gomdb :

Build
go get github.com/szferi/gomdb

There is no dependency on LMDB dynamic library.

On FreeBSD 10, you must explicitly set CC (otherwise it will fail with a cryptic error), for example:

CC=clang go test -v

As I said our go support is not great so I'm trying to workaround known issues.
Comment 10 John Marino freebsd_committer freebsd_triage 2015-03-03 07:01:45 UTC
same response as https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194946#c11

We will have to accept this workaround because those guys don't have their act together.
Comment 11 cheffo 2015-03-04 16:57:19 UTC
Created attachment 153793 [details]
updated shar file as requested.
Comment 12 John Marino freebsd_committer freebsd_triage 2015-03-04 17:07:29 UTC
okay, I'll promote this, it looks okay based on visual inspection.
Comment 13 Kurt Jaeger freebsd_committer freebsd_triage 2015-03-28 14:48:31 UTC
testing@work
Comment 14 Kurt Jaeger freebsd_committer freebsd_triage 2015-03-28 16:52:30 UTC
poudriere build logs are available at

http://people.freebsd.org/~pi/logs/databases__levigo-*

The build for 8.4i fails, because something causes /usr/local/bin/readelf
to dump core, which causes a left-over.

====>> Error: Files or directories left over:
/readelf.core
build of databases/levigo ended at Sat Mar 28 16:50:09 CET 2015

I saw this in the past, but can't remember, where... As far as I remember,
there was no obvious solution.
Comment 15 Kurt Jaeger freebsd_committer freebsd_triage 2015-03-28 18:33:21 UTC
same on 8.4a.
Comment 16 commit-hook freebsd_committer freebsd_triage 2015-07-17 20:12:09 UTC
A commit references this bug:

Author: pi
Date: Fri Jul 17 20:11:59 UTC 2015
New revision: 392396
URL: https://svnweb.freebsd.org/changeset/ports/392396

Log:
  New port: databases/levigo

  levigo is a Go wrapper for LevelDB.
  The API has been godoc'ed and is available on the web.
  Questions answered at golang-nuts@googlegroups.com.

  WWW: https://github.com/jmhodges/levigo

  PR:		194986
  Submitted by:	cheffo@freebsd-bg.org

Changes:
  head/databases/Makefile
  head/databases/levigo/
  head/databases/levigo/Makefile
  head/databases/levigo/distinfo
  head/databases/levigo/pkg-descr
  head/databases/levigo/pkg-plist
Comment 17 Kurt Jaeger freebsd_committer freebsd_triage 2015-07-17 20:12:46 UTC
Committed, thanks for your patience.