Bug 194946 - [New port]: databases/gomdb
Summary: [New port]: databases/gomdb
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:
Depends on:
Blocks:
 
Reported: 2014-11-11 14:41 UTC by cheffo
Modified: 2015-10-14 05:46 UTC (History)
3 users (show)

See Also:


Attachments
shar archive of databases/gomdb (2.60 KB, text/plain)
2014-11-11 14:41 UTC, cheffo
no flags Details
poudriere testport output (9.67 KB, text/plain)
2014-11-11 14:41 UTC, cheffo
no flags Details
poudriere testport portlint output (91 bytes, text/plain)
2014-11-11 14:42 UTC, cheffo
no flags Details
gomdb shar file (2.47 KB, text/plain)
2015-02-24 15:22 UTC, cheffo
no flags Details
poudriere testport output (10.32 KB, text/plain)
2015-02-24 15:23 UTC, cheffo
no flags Details
updated shar file as requested. (2.55 KB, text/plain)
2015-03-04 16:56 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-11 14:41:30 UTC
Created attachment 149285 [details]
shar archive of databases/gomdb

[New port] Go wrapper for OpenLDAP Lightning Memory-Mapped Database (LMDB).

WWW: https://github.com/szferi/gomdb
WWW: http://symas.com/mdb/

Redport logs: https://redports.org/buildarchive/20141111143153-06536/
Comment 1 cheffo 2014-11-11 14:41:57 UTC
Created attachment 149286 [details]
poudriere testport output
Comment 2 cheffo 2014-11-11 14:42:17 UTC
Created attachment 149287 [details]
poudriere testport portlint output
Comment 3 Pawel Pekala freebsd_committer freebsd_triage 2014-12-30 18:26:48 UTC
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

This looks like can be converted to USES=compiler.

XCONFIGURE_ENV+=	CC=${CC} \
X		CXX=${CXX} \

Is this really necessary? MAKE_ENV already have those.
Comment 4 John Marino freebsd_committer freebsd_triage 2015-02-06 16:03:38 UTC
ping - I had the exact same question to another [new port] PR cheffo submitted.
Comment 5 cheffo 2015-02-10 15:11:51 UTC
At the time I have tested which is like two months ago they were needed.
Those ports were needed for building/porting influxdb (but now I'm waiting for version 0.9.0) and do not have time to experiment before upstream release update. Once influxdb 0.9* is released I'm going to update all dependencies and will check again.
Comment 6 cheffo 2015-02-24 15:22:48 UTC
Created attachment 153440 [details]
gomdb shar file

Let me know if this variant of the port is acceptable.
Comment 7 cheffo 2015-02-24 15:23:18 UTC
Created attachment 153441 [details]
poudriere testport output
Comment 8 John Marino freebsd_committer freebsd_triage 2015-03-01 21:37:04 UTC
X.if ${COMPILER_TYPE} == clang
XCC=		clang
X.else
XUSE_GCC?=	yes
X.endif



what are you trying to accomplish?

What is the requirement for the compiler? 
I think you need to use "USES=compiler:<feature>" where you fill in the feature that you want.  Do you need c++11?

You are obviously trying to force gcc48 for FreeBSD 8 and 9, but you don't say why.
Comment 9 cheffo 2015-03-03 06:45:57 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?
Comment 10 cheffo 2015-03-03 06:49:13 UTC
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.

Let me know if there is another way to know if clang or gcc is used.
Comment 11 John Marino freebsd_committer freebsd_triage 2015-03-03 06:58:52 UTC
well, that software must be garbage.  On later FreeBSD "cc" is a symlink to "clang"; they are the same thing.  The fact that the software is relying on the name of the executable to determine that is not a good sign.  Really, the fact that it's sensitive to which compiler is being uses is also not a good sign.

Okay, so at least you have a valid reason for this.

I need to you make 2 simple changes and we'll have to accept this as a workaround.

1) change "USE_GCC?= yes" to "USE_GCC=yes"

2) above ".if ${COMPILER_TYPE} == clang" add a block of comments explaining that the value of "CC" must be "clang" (checked by configure) otherwise the build fails on FreeBSD10+
Comment 12 cheffo 2015-03-04 16:56:56 UTC
Created attachment 153792 [details]
updated shar file as requested.
Comment 13 John Marino freebsd_committer freebsd_triage 2015-03-04 17:05:45 UTC
Still needs a tweak.
If I am readying shar correctly, you have two WWW: lines on pkg-descr file.  You are limited to one.
Comment 14 cheffo 2015-03-04 17:32:56 UTC
I copied this approach from other port like ports/www/npm/pkg-descr but I'll fix and resend tomorrow.
Comment 15 John Marino freebsd_committer freebsd_triage 2015-03-04 17:34:44 UTC
okay.  I guess the npm reviewer missed it.
Comment 16 commit-hook freebsd_committer freebsd_triage 2015-10-14 05:45:14 UTC
A commit references this bug:

Author: pi
Date: Wed Oct 14 05:44:50 UTC 2015
New revision: 399239
URL: https://svnweb.freebsd.org/changeset/ports/399239

Log:
  New port: databases/gomdb

  Go wrapper for OpenLDAP Lightning Memory-Mapped Database, LMDB.

  WWW: https://github.com/szferi/gomdb

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

Changes:
  head/databases/Makefile
  head/databases/gomdb/
  head/databases/gomdb/Makefile
  head/databases/gomdb/distinfo
  head/databases/gomdb/pkg-descr
  head/databases/gomdb/pkg-plist
Comment 17 Kurt Jaeger freebsd_committer freebsd_triage 2015-10-14 05:46:27 UTC
Test-builds on 11a, 10.2a+i, 9.3 are fine.

Committed, thanks!