Bug 223361 - [new port] audio/amsynth, analog modelling (a.k.a virtual analog) software synthesizer
Summary: [new port] audio/amsynth, analog modelling (a.k.a virtual analog) software sy...
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: Tobias Kortkamp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-01 09:52 UTC by bye
Modified: 2017-12-19 13:15 UTC (History)
2 users (show)

See Also:


Attachments
svn diff file (6.93 KB, patch)
2017-11-01 09:52 UTC, bye
no flags Details | Diff
new amsynth.diff (6.85 KB, patch)
2017-11-01 19:25 UTC, bye
no flags Details | Diff
amsynth svn diff (7.16 KB, patch)
2017-11-03 04:06 UTC, bye
no flags Details | Diff
audio/amsynth svn diff (7.02 KB, patch)
2017-11-03 15:16 UTC, bye
no flags Details | Diff
audio/amsynth possible AS_IF fix (7.04 KB, patch)
2017-11-03 17:12 UTC, bye
no flags Details | Diff
amsynth.diff (7.59 KB, patch)
2017-11-08 15:20 UTC, Tobias Kortkamp
no flags Details | Diff
audio/amsynth dot diff (7.04 KB, patch)
2017-11-11 05:09 UTC, bye
no flags Details | Diff
updated amsynth (1.70 KB, patch)
2017-12-19 13:15 UTC, bye
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description bye 2017-11-01 09:52:16 UTC
Created attachment 187640 [details]
svn diff file

This is a port of amsynth
Comment 1 bye 2017-11-01 09:53:02 UTC
I made this svn diff from ports/audio/amsynth but that might the the incorrect place to do the svn diff from, if it is please let me know.
Comment 2 Adam Weinberger freebsd_committer freebsd_triage 2017-11-01 12:41:55 UTC
You're off to a good start here, but there's still lots to be done.

NLS needs to be an option. See https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-options.html for more details. Either way, your PLIST_SUB is unused, given that you have no %%NLS%% tags in the pkg-plist.

The post-extract is wrong. You're calling commands that haven't been installed yet, which leads me to suspect that you haven't tested this in poudriere, which is a requirement of all submissions. Add USES=autoreconf instead and remove that entire post-extract block.

The pre.mk/post.mk is unused here. Just call ".include <bsd.port.mk>" at the end.

Once you've fixed up those issues, test it in "poudriere testport" and "portlint -AC" and attach the output of both.
Comment 3 bye 2017-11-01 14:08:13 UTC
I actively avoided setting up a poudriere, I did test it in a few jails.

Can I test it in a jail instead?
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2017-11-01 16:19:41 UTC
I have given the PR a more appropriate Summary.
Comment 5 Mark Linimon freebsd_committer freebsd_triage 2017-11-01 16:21:31 UTC
(In reply to bcomputerguy from comment #3)

poudriere is the recommended way.  That is the exact technology that is used on the FreeBSD.org ports building cluster, so it will need to pass in that environment.

I agree that the man page is dense, but once you've set it up, it's worth it.

You should also become familiar with portlint.  Although portlint is not 100% accurate, it does help to detect many common mistakes.
Comment 6 bye 2017-11-01 19:25:23 UTC
Created attachment 187657 [details]
new amsynth.diff
Comment 7 bye 2017-11-01 19:29:33 UTC
adding an attachment made me comment get erased.

I wanted to say that the post-extract blob is a workaround for a bug in GNU autotools that will fail to build because of a timestamp conflict on some /po files.

I tried to replace /usr/local with ${PREFIX} in the install dir and I built the port in a new jail; I really try to avoid poud..

me@blubee:/usr/ports/audio/amsynth % portlint -AC
looks fine.
Comment 8 Adam Weinberger freebsd_committer freebsd_triage 2017-11-01 23:42:03 UTC
(In reply to bcomputerguy from comment #7)

Then you should probably update timestamps with ${TOUCH} as needed, and have USES=autoreconf. Even with your new patch, you are calling autoreconf, but you haven't installed it yet with an autoconf dependency. USES=autoreconf does more than just call autoreconf.

Your NLS option will fail to package if it's turned off. Every gettext file needs to be behind %%NLS%% in the plist.

None of those GH_* variables are necessary, and it would be very unusual if those CONFIGURE_ARGS are necessary too.

Testing in a jail isn't really a substitute for "poudriere testport". I know it's a pain to set up, but it simply how port creation needs to happen these days.
Comment 9 bye 2017-11-03 04:05:15 UTC
There's a bug in the configure.ac script, see here: https://bugs.launchpad.net/inkscape/+bug/1418943
and
https://mail.gnome.org/archives/gtkmm-list/2009-August/msg00051.html
and
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=724555

I contacted the developer and hope they do a more permanent fix upstream.

#/usr/ports/audio/amsynth % portlint -AC
WARN: Makefile: [24]: possible direct use of command "autoreconf" found. Use ${AUTORECONF} instead and set according USE_AUTOTOOLS=<tool> macro
0 fatal errors and 1 warning found.
me@blubee:/usr/ports/audio/amsynth %
Comment 10 bye 2017-11-03 04:06:14 UTC
Created attachment 187679 [details]
amsynth svn diff

svn diff for new port amsynth 1.8.0
Comment 11 Tobias Kortkamp freebsd_committer freebsd_triage 2017-11-03 08:52:24 UTC
You have made the same mistake of inventing a version number as in bug #223397.
Commit 37f25f2 is not tagged as 1.8.0 by upstream.

+do-configure:
+	@(cd ${WRKSRC} && ./autogen.sh && \
+	  ./configure )

This is wrong.  It ignores CONFIGURE_{ARGS,ENV} and basically the NLS option is
broken because of it.  NLS_CONFIGURE_ENABLE=nls adds --enable-nls or
--disable-nls to CONFIGURE_ARGS but this is just ignored by your port.
Comment 12 Tobias Kortkamp freebsd_committer freebsd_triage 2017-11-03 09:06:54 UTC
(In reply to Tobias Kortkamp from comment #11)
If you have to run autogen.sh then do it in pre-configure with
USES=autoreconf:build

pre-configure:
	@cd ${WRKSRC} && ./autogen.sh
Comment 13 bye 2017-11-03 14:09:21 UTC
(In reply to Tobias Kortkamp from comment #12)
Thanks, I didn't know this and was having a hard time trying to work my way around it.

With github I just looked at the latest release and used that as a version number. I don't see anything else under tags: https://github.com/amsynth/amsynth/tags

How do I find the proper version that upstream is referring to.
Comment 14 bye 2017-11-03 14:28:34 UTC
I cloned the git repo to my machine and tried to follow the steps here:
https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-distfiles.html#makefile-master_sites-github-ex5

# git describe --tags 37f25f2
fatal: No tags can describe '37f25f2b74a736d6813798d5e3e7dc08119161b2'.
Try --always, or create some tags.

here's git log from the same folder:
commit 37f25f2b74a736d6813798d5e3e7dc08119161b2 (HEAD -> develop, origin/develop, origin/HEAD)
Author: Nick Dowell <nick@nickdowell.com>
Date:   Sat Jul 22 09:25:39 2017 +0100

    Allow disabling auto-selection of last received MIDI CC

commit 58c1ecfcc54569c85f4b4d1e2b61118a3c9f75ff
Author: Nick Dowell <nick@nickdowell.com>
Date:   Sat Jul 22 07:09:02 2017 +0100

    Improve thread safety of UI updates, no longer using gdk_threads_enter()


and I also tried this:
git describe --tags commit 37f25f2b74a736d6813798d5e3e7dc08119161b2 
fatal: Not a valid object name commit

How do I get the version number that you're requesting?
Comment 15 Tobias Kortkamp freebsd_committer freebsd_triage 2017-11-03 14:59:07 UTC
(In reply to bcomputerguy from comment #14)
Yeah, it can't work because there are not tagged commits on amsynth's
'develop' branch which is unfortunate.  Since it cannot possibly work
just use

DISTVERSION=	1.8.0.g20171103

if you really need the extra commits over version 1.8.0, or use

DISTVERSIONPREFIX=	release-
DISTVERSION=	1.8.0

if you don't.
Comment 16 bye 2017-11-03 15:16:06 UTC
Created attachment 187695 [details]
audio/amsynth svn diff

audio/amsynth
Comment 17 Tobias Kortkamp freebsd_committer freebsd_triage 2017-11-03 16:27:50 UTC
(In reply to bcomputerguy from comment #16)
In Poudriere the build fails in the configure phase. No idea why.

autoreconf-2.69: running: /usr/local/bin/autoconf-2.69 --force
configure.ac:30: error: possibly undefined macro: AS_IF
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:70: error: possibly undefined macro: AC_DEFINE
configure.ac:79: error: possibly undefined macro: AC_CHECK_HEADERS
autoreconf-2.69: /usr/local/bin/autoconf-2.69 failed with exit status: 1
*** Error code 1
Comment 18 bye 2017-11-03 17:12:00 UTC
Created attachment 187698 [details]
audio/amsynth possible AS_IF fix

https://stackoverflow.com/questions/28570244/as-if-and-ac-msg-error-error-possibly-undefined-macro

That says it could be related to pkg-config; I added that to USES
Comment 19 Tobias Kortkamp freebsd_committer freebsd_triage 2017-11-08 15:20:12 UTC
Created attachment 187862 [details]
amsynth.diff

Had to add USE_GNOME=intltool too and then it failed to build with NLS=off.
But it builds fine on 10.3/i386 and 11.1/amd64 now.
Comment 20 bye 2017-11-08 15:29:53 UTC
Had to add USE_GNOME=intltool too and then it failed to build with NLS=off.
But it builds fine on 10.3/i386 and 11.1/amd64 now.

I am on 12-CURRENT what versions of FreeBSD should I test on? You go all the way back to 10?

Also, I will have to update my email address in the future. I cannot change it at the moment, I talked about it in this other port: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223176#c16

I hope that you can understand.
Comment 21 Tobias Kortkamp freebsd_committer freebsd_triage 2017-11-08 15:47:19 UTC
(In reply to bcomputerguy from comment #20)

> I am on 12-CURRENT what versions of FreeBSD should I test on? You go all the way back to 10?

At least a cross-section of all supported versions.  There is only one ports
tree for all of them.  This is also in your interest, since you don't want to
be spammed by pkg-fallout@ when the port fails to build on the cluster for
some older FreeBSD version.

Btw, Poudriere makes this very easy to do.
Comment 22 bye 2017-11-11 05:09:57 UTC
Created attachment 187914 [details]
audio/amsynth dot diff

I just tested this port on FreeBSD 12 CURRENT in two fresh jails with options NLS enable and disabled both build correctly.

There shouldn't be any problems with building.

Compiling LLVM4 and GCC takes a long time to test but I did it.
Comment 23 Tobias Kortkamp freebsd_committer freebsd_triage 2017-11-11 12:35:36 UTC
(In reply to bcomputerguy from comment #22)
No, you threw away all the fixes I made.  Did you even look a the diff I
uploaded?

Your version simply does not build in a Poudriere jail.
Comment 24 commit-hook freebsd_committer freebsd_triage 2017-11-11 14:44:41 UTC
A commit references this bug:

Author: tobik
Date: Sat Nov 11 14:43:34 UTC 2017
New revision: 453974
URL: https://svnweb.freebsd.org/changeset/ports/453974

Log:
  New port: audio/amsynth

  Amsynth is an analog modelling (a.k.a virtual analog) software
  synthesizer.

  It mimics the operation of early analog subtractive synthesizers with
  classic oscillator waveforms, envelopes, filter, modulation and
  effects.

  WWW: http://amsynth.github.io/

  PR:		223361
  Submitted by:	owen94012@gmail.com

Changes:
  head/audio/Makefile
  head/audio/amsynth/
  head/audio/amsynth/Makefile
  head/audio/amsynth/distinfo
  head/audio/amsynth/pkg-descr
  head/audio/amsynth/pkg-plist
Comment 25 bye 2017-11-11 23:47:37 UTC
(In reply to Tobias Kortkamp from comment #23)

I did take a look at your diff, I don
t really understand why it wouldn't build in poudriere jail. This is my testing process.

I mount a FreeBSD disk image;
create a md0 device;
copy base and ports into a jail directory.
cd into the jail directory;
make buildworld &make distribution to the jail.

Then I log into the jail, copy the port into the jail

and just run make BATCH=yes -C /usr/ports/audio/amsynth

it runs for a very long time but successfully completes.

I don't understand what could be going wrong in a poudriere jail that's different than the steps I laid out above.

I did see your diff but after testing with the process I just listed above I don't understand where's the issues between what I'm doing and what poudriere does.

If I am doing something wrong, I'd prefer to understand what I am doing wrong.
Comment 26 Tobias Kortkamp freebsd_committer freebsd_triage 2017-11-13 10:31:57 UTC
(In reply to bcomputerguy from comment #25)
> I mount a FreeBSD disk image;
> create a md0 device;
> copy base and ports into a jail directory.
> cd into the jail directory;
> make buildworld &make distribution to the jail.
>
> Then I log into the jail, copy the port into the jail
> and just run make BATCH=yes -C /usr/ports/audio/amsynth

This is not what Poudriere does.  make BATCH=yes -C
/usr/ports/audio/amsynth leaves build dependencies of all ports you
build with it lying around on the system that are not declared in the
port i.e. the build environment is polluted by them.  This is pure
conjecture, but intltool and autopoint (from gettext-tools) are
probably still installed in the jail afterwards even though they are
not declared as build dependencies in the port.

Poudriere builds packages in isolation and build dependencies that are
not explicitly declared in the port are not installed in the build
jail.  So both autopoint and intltool were missing and that's where
the port failed to build in Poudriere.

Poudriere's testport command also does additional checks that
uncovered pkg-plist problems when building WITH=NLS.
Comment 27 bye 2017-11-13 12:02:39 UTC
(In reply to Tobias Kortkamp from comment #26)
Thank you for the explanation, I appreciate it. I'll look closer at Poudriere for build testing before I submit further ports.
Comment 28 bye 2017-12-19 13:15:38 UTC
Created attachment 188958 [details]
updated amsynth

This revision of amsynth follows the oss 4 programming guide.