Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#20353 closed update (fixed)

Hydrogen portfile update request

Reported by: michieldelange@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.8.0
Keywords: Cc:
Port: hydrogen

Description

Hi, I've successfully built Hydrogen via Macports, but it appears the version in the repository (svn-97) is very old. There is a newer version svn-1252, and I'd like to request an update of the portfile.

However, the Hydrogen developers have moved to a new build system (from qmake to scons) so I don't know if this will cause problems?

See discussion at: http://www.hydrogen-music.org/forum/index.php?p=show&action=show_thread&thread=1093&fid=7&page=last

Thanks!

Change History (6)

comment:1 Changed 10 years ago by ryandesign (Ryan Schmidt)

There are several other ports in MacPorts that build using scons.

comment:2 Changed 10 years ago by michieldelange@…

When I try to build the newest version of Hydrogen from a local portfile repository (as described here) I get the following error message:

macmichiel:~ michiel$ sudo port -n upgrade hydrogen +universal
--->  Configuring hydrogen
Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_Users_michiel_builds_audio_hydrogen/work/trunk" && ./configure --disable-dependency-tracking " returned error 127
Command output: sh: ./configure: No such file or directory

Error: Unable to upgrade port: 1

It appears the port command looks for the classical ./configure ; make ; make install set of commands, and does not recognize that Hydrogen needs to be build with scons. Manually changing the command

&& ./configure --disable-dependency-tracking

with

sudo scons

only gave me a pile of errors about QT (which I did compile earlier with Macports):

scons: warning: QTDIR variable is not defined, using moc executable as a hint (QTDIR=/opt/local/libexec/qt4-mac)
File "/opt/local/var/macports/build/_Users_michiel_builds_audio_hydrogen/work/trunk/qt4.py", line 207, in _detect

scons: warning: QTDIR variable is not defined, using moc executable as a hint (QTDIR=/opt/local/libexec/qt4-mac)
File "/opt/local/var/macports/build/_Users_michiel_builds_audio_hydrogen/work/trunk/qt4.py", line 207, in _detect
scons: done reading SConscript files.
scons: Building targets ...
g++ -o gui/src/SongEditor/SongEditor.o -c -O3 -fomit-frame-pointer -funroll-loops -DLRDF_SUPPORT -DPORTMIDI_SUPPORT -DFLAC_SUPPORT -DCOREAUDIO_SUPPORT -DLADSPA_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -I. -Igui/src -I3rdparty/install/include -I/opt/local/include -I/usr/local/include -Ilibs/hydrogen/include -Igui/src/UI -I/opt/local/libexec/qt4-mac/include -I/opt/local/libexec/qt4-mac/include/QtCore -I/opt/local/libexec/qt4-mac/include/QtGui -I/opt/local/libexec/qt4-mac/include/QtNetwork -I/opt/local/libexec/qt4-mac/include/QtXml gui/src/SongEditor/SongEditor.cpp
libs/hydrogen/include/hydrogen/Object.h:66: error: ISO C++ forbids declaration of 'list' with no type
libs/hydrogen/include/hydrogen/Object.h:66: error: typedef name may not be a nested-name-specifier
libs/hydrogen/include/hydrogen/Object.h:66: error: expected ';' before '<' token
libs/hydrogen/include/hydrogen/Object.h:106: error: 'queue_t' does not name a type
libs/hydrogen/include/hydrogen/action.h:72: error: field 'actionList' has incomplete type

etc. etc. etc...

I have no idea how to change this? Any help is appreciated!

comment:3 in reply to:  description ; Changed 10 years ago by ryandesign (Ryan Schmidt)

Resolution: fixed
Status: newclosed

I would rather not update the hydrogen port to the latest svn revision, because ports should use released tarballs when available. Ideally ports would be for stable versions of the software, but the hydrogen project seems to take its sweet time between stable releases, and the port has been checking out from Subversion already. So I think the port should track the 0.9.4 release candidates, be updated to 0.9.4 final when that becomes available, and then stick with stable releases from there.

I updated the hydrogen port to 0.9.4-rc1-1 in r54834. It looks pretty good on Leopard. It looks awful on Tiger.

Replying to michieldelange@…:

See discussion at: http://www.hydrogen-music.org/forum/index.php?p=show&action=show_thread&thread=1093&fid=7&page=last

Somehow I neglected to read the above until after I had finished my update. I knew from this ticket's description that the project has switched from the qmake build system to scons, but in that discussion I read that there is still a branch that uses qmake (the win_ports branch) and that they recommended we use this instead. I did not understand why, nor why they would want to duplicate effort by maintaining two build systems. The update I committed uses scons (in part because I didn't know at the time that there was an alternative).

You mentioned in the above thread that you were unhappy that this ticket was not acted on sooner. We are not magicians :) -- we cannot magically make software work on Mac OS X. I had to spend time familiarizing myself with how scons works and where qt4's files are and research several problems and wrong assumptions in hydrogen's use of them to figure out how to coerce this software to build on Mac OS X and with the dependencies already in MacPorts.

MacPorts is a volunteer project and requires contributions from people who care about and understand each software package in order to keep those ports current. The hydrogen port has no maintainer, but since you seem interested in it, would you like to become its maintainer? Let us know.

comment:4 in reply to:  3 ; Changed 10 years ago by michieldelange@…

Replying to ryandesign@…:

Hi Ryan, (CC Sebastian, one of the Hydrogen maintainers -> I tried emailing to the <macports-dev> list but it bounced)

Thanks for your reply to the ticket, and your email. Today I successfully built the latest Hydrogen version "0.9.4-svnexported" with Macports on Leopard. It looks good (I have no idea about Tiger)!

What quite puzzles me is that Macports is able to build Hydrogen with scons, while I haven't previously been able to manually build the SVN version with scons... So I applied your patch files to the SVN trunk (or rather, copied the Sconstruct file from the Macport build tree to the SVN trunk, since patching Sconstruct failed with the following error:

bash-3.2$ patch -p0 </opt/local/var/macports/sources/rsync.macports.org/release/ports/audio/hydrogen/files/patch-Sconstruct.diff patching file Sconstruct Hunk #2 FAILED at 84. Hunk #3 FAILED at 212. Hunk #4 FAILED at 266. Hunk #5 succeeded at 375 (offset 9 lines). 3 out of 5 hunks FAILED -- saving rejects to file Sconstruct.rej

I then built with:

bash-3.2$ scons prefix=/opt/local alsa=0 coreaudio=1 flac=1 jack=0 lash=0 libarchive=0 lrdf=0 oss=0 portaudio=0 portmidi=0

And it works! The latest SVN version 1307 now builds with scons. So Hydrogen can be build on macosx with scons after all... :) The Hydrogen dev team is actually reconsidering the whole build method, so this might be a great new development in favor of a single build method: scons.

I think we (the Hydrogen dev team, and I - just an interested user trying to build on osx) should now look at a way to add your patches to the trunk, so that in the future it will be easy the build on osx with scons, and bypass qmake altogether.

@ Sebastian: I have zipped and attached the patch files, perhaps there is a way to easily include/apply this?

As for my sour remark about you Macport guys not being quicker: sorry about that...:) I understand this is all a volunteering effort. I did not mean to scoff you..

About me becoming the Macports maintainer: what would that entail? I am quite ignorant when it comes to coding or even writing portfiles...

Best: michiel

comment:5 in reply to:  4 Changed 10 years ago by michieldelange@…

[sorry, pasted code looks ugly - try again]

bash-3.2$ patch -p0 </opt/local/var/macports/sources/rsync.macports.org/release/ports/audio/hydrogen/files/patch-Sconstruct.diff

patching file Sconstruct

Hunk #2 FAILED at 84.

Hunk #3 FAILED at 212.

Hunk #4 FAILED at 266.

Hunk #5 succeeded at 375 (offset 9 lines).

3 out of 5 hunks FAILED -- saving rejects to file Sconstruct.rej

comment:6 Changed 10 years ago by michieldelange@…

By the way, I modified the Sconstruct file a little to also include building Coremidi. Might be handy for a next version/patch?

[from line 72]

if sys.platform == "darwin" and str(envcoreaudio?) == "1": cppflags.append('-DCOREAUDIO_SUPPORT')

+ if sys.platform == "darwin" and str(envcoremidi?) == "1": cppflags.append('-DCOREMIDI_SUPPORT')

[from line 276]

if sys.platform == "darwin" and str(envcoreaudio?) == "1":

env.Append( LINKFLAGS = ['-framework','ApplicationServices'])

env.Append( LINKFLAGS = ['-framework','AudioUnit'])

env.Append( LINKFLAGS = ['-framework','Coreaudio'])

+ if sys.platform == "darwin" and str(envcoremidi?) == "1":

+ env.Append( LINKFLAGS = ['-framework','ApplicationServices'])

+ env.Append( LINKFLAGS = ['-framework','AudioUnit'])

+ env.Append( LINKFLAGS = ['-framework','Coreaudio'])

+ env.Append( LINKFLAGS = ['-framework','Coremidi'])

[from line 334]

#platform dependent settings

if sys.platform == "darwin":

opts.Add('coreaudio', 'Set to 1 to enable Coreaudio',1)

+ opts.Add('coremidi', 'Set to 1 to enable Coremidi',1)

[from line 487]

if sys.platform == "darwin":

print " coreaudio: " + printStatus( envcoreaudio? )

+ print " coremidi: " + printStatus( envcoremidi? )

Note: See TracTickets for help on using tickets.