My Cantata port : help needed for compilation to succeed

Hello,

I'm new to FreeBSD. I use 10.1.

I've created a Makefile for cantata (QT musicpd player), here it is :

Code:
# $FreeBSD:$

PORTNAME= cantata
PORTVERSION= 1.4.2
CATEGORIES= audio
MASTER_SITES= https://code.google.com/p/cantata/

MAINTAINER= nobody@FreeBSD.org
COMMENT= Full featured QT client for musicpd

LICENSE= GPLv2

RUN_DEPENDS= mpg123:${PORTSDIR}/audio/mpg123 \
cdparanoia:${PORTSDIR}/audio/cdparanoia \
musicpd:${PORTSDIR}/audio/musicpd

LIB_DEPENDS= libmpd.so:${PORTSDIR}/audio/libmpd \
libmusicbrainz5.so:${PORTSDIR}/audio/libmusicbrainz5 \
libmtp.so:${PORTSDIR}/multimedia/libmtp \
libcddb.so:${PORTSDIR}/audio/libcddb \
libtag.so:${PORTSDIR}/audio/taglib

USE_QT5+= multimedia \
svg \
concurrent

USE_KDE4+= oxygen

USE_GTK2= hicolor-icon-theme

USES= cmake tar:bz2
CMAKE_ARGS= -DCMAKE_PREFIX=${PREFIX} \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_KDE=OFF \
-DENABLE_QT5=ON

MAKE_JOBS_UNSAFE=yes

INSTALLS_ICONS= yes

.include <bsd.port.mk>

But it fails with those errors :

Code:
[LIST=1]
[*][0m[ 96%] Built target cantata
[*][35m[1mScanning dependencies of target ebur128
[*][0m[ 97%] [32mBuilding C object 3rdparty/ebur128/CMakeFiles/ebur128.dir/ebur128.c.o
[*][0m[31m[1mLinking C static library libebur128.a
[*][0m[ 97%] Built target ebur128
[*][ 97%] [34m[1mGenerating moc_replaygain.cpp
[*][0m[ 98%] [34m[1mGenerating moc_trackscanner.cpp
[*][0m[ 98%] [34m[1mGenerating __/support/moc_thread.cpp
[*][0m[35m[1mScanning dependencies of target cantata-replaygain
[*][0m[ 98%] [32mBuilding CXX object replaygain/CMakeFiles/cantata-replaygain.dir/ffmpeginput.cpp.o
[*][0mIn file included from /usr/ports/audio/cantata/work/cantata-1.4.2/replaygain/ffmpeginput.cpp:31:
[*]In file included from /usr/local/include/qt5/QtCore/QFile:1:
[*]In file included from /usr/local/include/qt5/QtCore/qfile.h:45:
[*]In file included from /usr/local/include/qt5/QtCore/qfiledevice.h:45:
[*]In file included from /usr/local/include/qt5/QtCore/qiodevice.h:47:
[*]In file included from /usr/local/include/qt5/QtCore/qobject.h:49:
[*]In file included from /usr/local/include/qt5/QtCore/qstring.h:50:
[*]In file included from /usr/include/c++/v1/string:437:
[*][1m/usr/include/c++/v1/cstdio:143:9: [0m[0;1;31merror: [0m[1mno member named 'snprintf' in the
[*] global namespace[0m
[*]using ::snprintf;
[*][0;1;32m ~~^
[*][0m[1m/usr/include/c++/v1/cstdio:148:9: [0m[0;1;31merror: [0m[1mno member named 'vfscanf' in the global
[*] namespace; did you mean 'fscanf'?[0m
[*]using ::vfscanf;
[*][0;1;32m ~~^
[*][0m[1m/usr/include/stdio.h:248:6: [0m[0;1;30mnote: [0m'fscanf' declared here[0m
[*]int fscanf(FILE * __restrict, const char * __restrict, ...);
[*][0;1;32m  ^
[*][0mIn file included from /usr/ports/audio/cantata/work/cantata-1.4.2/replaygain/ffmpeginput.cpp:31:
[*]In file included from /usr/local/include/qt5/QtCore/QFile:1:
[*]In file included from /usr/local/include/qt5/QtCore/qfile.h:45:
[*]In file included from /usr/local/include/qt5/QtCore/qfiledevice.h:45:
[*]In file included from /usr/local/include/qt5/QtCore/qiodevice.h:47:
[*]In file included from /usr/local/include/qt5/QtCore/qobject.h:49:
[*]In file included from /usr/local/include/qt5/QtCore/qstring.h:50:
[*]In file included from /usr/include/c++/v1/string:437:
[*][1m/usr/include/c++/v1/cstdio:149:9: [0m[0;1;31merror: [0m[1mno member named 'vscanf' in the global
[*] namespace[0m
[*]using ::vscanf;
[*][0;1;32m ~~^
[*][0m[1m/usr/include/c++/v1/cstdio:150:9: [0m[0;1;31merror: [0m[1mno member named 'vsscanf' in the global
[*] namespace; did you mean 'sscanf'?[0m
[*]using ::vsscanf;
[*][0;1;32m ~~^
[*][0m[1m/usr/include/stdio.h:268:6: [0m[0;1;30mnote: [0m'sscanf' declared here[0m
[*]int sscanf(const char * __restrict, const char * __restrict, ...);
[*][0;1;32m  ^
[*][0mIn file included from /usr/ports/audio/cantata/work/cantata-1.4.2/replaygain/ffmpeginput.cpp:31:
[*]In file included from /usr/local/include/qt5/QtCore/QFile:1:
[*]In file included from /usr/local/include/qt5/QtCore/qfile.h:45:
[*]In file included from /usr/local/include/qt5/QtCore/qfiledevice.h:45:
[*]In file included from /usr/local/include/qt5/QtCore/qiodevice.h:47:
[*]In file included from /usr/local/include/qt5/QtCore/qobject.h:49:
[*]In file included from /usr/local/include/qt5/QtCore/qstring.h:50:
[*]In file included from /usr/include/c++/v1/string:437:
[*][1m/usr/include/c++/v1/cstdio:153:9: [0m[0;1;31merror: [0m[1mno member named 'vsnprintf' in the
[*] global namespace[0m
[*]using ::vsnprintf;
[*][0;1;32m ~~^
[*][0mIn file included from /usr/ports/audio/cantata/work/cantata-1.4.2/replaygain/ffmpeginput.cpp:31:
[*]In file included from /usr/local/include/qt5/QtCore/QFile:1:
[*]In file included from /usr/local/include/qt5/QtCore/qfile.h:45:
[*]In file included from /usr/local/include/qt5/QtCore/qfiledevice.h:45:
[*]In file included from /usr/local/include/qt5/QtCore/qiodevice.h:47:
[*]In file included from /usr/local/include/qt5/QtCore/qobject.h:49:
[*]In file included from /usr/local/include/qt5/QtCore/qstring.h:50:
[*]In file included from /usr/include/c++/v1/string:438:
[*]In file included from /usr/include/c++/v1/cwchar:107:
[*]In file included from /usr/include/c++/v1/cwctype:54:
[*][1m/usr/include/c++/v1/cctype:71:9: [0m[0;1;31merror: [0m[1mno member named 'isblank' in the global
[*] namespace[0m
[*]using ::isblank;
[*][0;1;32m ~~^
[*][0mIn file included from /usr/ports/audio/cantata/work/cantata-1.4.2/replaygain/ffmpeginput.cpp:31:
[*]In file included from /usr/local/include/qt5/QtCore/QFile:1:
[*]In file included from /usr/local/include/qt5/QtCore/qfile.h:45:
[*]In file included from /usr/local/include/qt5/QtCore/qfiledevice.h:45:
[*]In file included from /usr/local/include/qt5/QtCore/qiodevice.h:47:
[*]In file included from /usr/local/include/qt5/QtCore/qobject.h:49:
[*]In file included from /usr/local/include/qt5/QtCore/qstring.h:50:
[*]In file included from /usr/include/c++/v1/string:438:
[*][1m/usr/include/c++/v1/cwchar:132:9: [0m[0;1;31merror: [0m[1mno member named 'vfwscanf' in the
[*] global namespace; did you mean 'fwscanf'?[0m
[*]using ::vfwscanf;
[*][0;1;32m ~~^
[*][0m[1m/usr/include/wchar.h:113:5: [0m[0;1;30mnote: [0m'fwscanf' declared here[0m
[*]int  fwscanf(FILE * __restrict, const wchar_t * __restrict, ...);
[*][0;1;32m ^
[*][0mIn file included from /usr/ports/audio/cantata/work/cantata-1.4.2/replaygain/ffmpeginput.cpp:31:
[*]In file included from /usr/local/include/qt5/QtCore/QFile:1:
[*]In file included from /usr/local/include/qt5/QtCore/qfile.h:45:
[*]In file included from /usr/local/include/qt5/QtCore/qfiledevice.h:45:
[*]In file included from /usr/local/include/qt5/QtCore/qiodevice.h:47:
[*]In file included from /usr/local/include/qt5/QtCore/qobject.h:49:
[*]In file included from /usr/local/include/qt5/QtCore/qstring.h:50:
[*]In file included from /usr/include/c++/v1/string:438:
[*][1m/usr/include/c++/v1/cwchar:133:9: [0m[0;1;31merror: [0m[1mno member named 'vswscanf' in the
[*] global namespace; did you mean 'swscanf'?[0m
[*]using ::vswscanf;
[*][0;1;32m ~~^
[*][0m[1m/usr/include/wchar.h:126:5: [0m[0;1;30mnote: [0m'swscanf' declared here[0m
[*]int  swscanf(const wchar_t * __restrict, const wchar_t * __restrict, ...);
[*][0;1;32m ^
[*][0mIn file included from /usr/ports/audio/cantata/work/cantata-1.4.2/replaygain/ffmpeginput.cpp:31:
[*]In file included from /usr/local/include/qt5/QtCore/QFile:1:
[*]In file included from /usr/local/include/qt5/QtCore/qfile.h:45:
[*]In file included from /usr/local/include/qt5/QtCore/qfiledevice.h:45:
[*]In file included from /usr/local/include/qt5/QtCore/qiodevice.h:47:
[*]In file included from /usr/local/include/qt5/QtCore/qobject.h:49:
[*]In file included from /usr/local/include/qt5/QtCore/qstring.h:50:
[*]In file included from /usr/include/c++/v1/string:438:
[*][1m/usr/include/c++/v1/cwchar:134:9: [0m[0;1;31merror: [0m[1mno member named 'vwscanf' in the global
[*] namespace[0m
[*]using ::vwscanf;
[*][0;1;32m ~~^
[*][0m[1m/usr/include/c++/v1/cwchar:150:9: [0m[0;1;31merror: [0m[1mno member named 'wcstof' in the global
[*] namespace[0m
[*]using ::wcstof;
[*][0;1;32m ~~^
[*][0m[1m/usr/include/c++/v1/cwchar:151:9: [0m[0;1;31merror: [0m[1mno member named 'wcstold' in the global
[*] namespace[0m
[*]using ::wcstold;
[*][0;1;32m ~~^
[*][0m[1m/usr/include/c++/v1/cwchar:155:9: [0m[0;1;31merror: [0m[1mno member named 'wcstoll' in the global
[*] namespace[0m
[*]using ::wcstoll;
[*][0;1;32m ~~^
[*][0m[1m/usr/include/c++/v1/cwchar:159:9: [0m[0;1;31merror: [0m[1mno member named 'wcstoull' in the
[*] global namespace; did you mean 'wcstoul'?[0m
[*]using ::wcstoull;
[*][0;1;32m ~~^
[*][0m[1m/usr/include/wchar.h:161:3: [0m[0;1;30mnote: [0m'wcstoul' declared here[0m
[*]  wcstoul(const wchar_t * __restrict, wchar_t ** __restrict, int);
[*][0;1;32m  ^
[*][0m13 errors generated.
[*]*** Error code 1
[*]Stop.
[*]make[3]: stopped in /usr/ports/audio/cantata/work/cantata-1.4.2
[*]*** Error code 1
[*]Stop.
[*]make[2]: stopped in /usr/ports/audio/cantata/work/cantata-1.4.2
[*]*** Error code 1
[*]Stop.
[*]make[1]: stopped in /usr/ports/audio/cantata/work/cantata-1.4.2
[*]*** Error code 1
[*]Stop.
[*]make: stopped in /usr/ports/audio/cantata
[/LIST]

I know nothing about programming, so I hope you will help me to make it build.

Regards,

Nad
 
We had a discussion IRC earlier today about this build error. Commenting out the

Code:
#define _POSIX_C_SOURCE 1

at the top of both ffmpeginput.cpp and mpg123input.cpp helps fix the errors. I'm unsure if this should be considered a bug in the cstdio C++ include.

Did the build succeed? I'm curious :)
 
Hello bhughes,

It compiles really well now :)

But I have serious issues when Cantata is launched : there are a lot of buttons missing (play, pause and so on), IIRC no menu.
Cantata 1.4.2 don't use my GTK2 theme...

I've compiled Cantata 1.3.4, this time it uses my GTK2 theme but still unusable (missing buttons and so on).

Tonight I'll check the dependencies.

Thanks once again,
Nad
 
Here is a screenshot of 1.3.4 compiled with Qt5 (1.4.2 is the same crap, plus it does not apply my dark GTK2 theme)
 
cantata-1.3.4-Qt5_bad.png
 
Thanks all...

I've tried building 1.4.2 with Qt4, and I have no issues at all :)

Will try your suggestions with Qt5 and the icons (that should have been installed if you have a look at my Makefile...)

I'll post my Qt4 Makefile tonight.

Cheers!

Nad
 
Hello all, after some hours of work and help, here is a Qt4 1.5.1 that compiles fine.
The albums art are missing though -don’t know if I missed something- :

Code:
# $FreeBSD:$

PORTNAME=   cantata
PORTVERSION=   1.5.1
CATEGORIES=   audio
MASTER_SITES=   https://googledrive.com/host/
DISTNAME=   0Bzghs6gQWi60UktwaTRMTjRIUW8
EXTRACT_SUFX=

MAINTAINER=   ports@FreeBSD.org
COMMENT=   Full featured QT client for musicpd

LICENSE=   GPLv3

RUN_DEPENDS=   mpg123:${PORTSDIR}/audio/mpg123 \
     cdparanoia:${PORTSDIR}/audio/cdparanoia \
     musicpd:${PORTSDIR}/audio/musicpd  \
     taglib-extras-config:${PORTSDIR}/audio/taglib-extras
LIB_DEPENDS=   libavcodec0.so:${PORTSDIR}/multimedia/ffmpeg0 \
     libmpd.so:${PORTSDIR}/audio/libmpd \
     libmusicbrainz5.so:${PORTSDIR}/audio/libmusicbrainz5 \
     libmtp.so:${PORTSDIR}/multimedia/libmtp \
     libcddb.so:${PORTSDIR}/audio/libcddb \
     libsamplerate.so:${PORTSDIR}/audio/libsamplerate \
     libqjson.so:${PORTSDIR}/devel/qjson \
     libspeex.so:${PORTSDIR}/audio/speex

USES=     cmake:outsource tar:bzip2

USE_QT4+=   corelib \
     gui \
     network \
     multimedia \
     svg \
     moc_build \
     qmake_build \
     xml \
     dbus

USE_KDE4+=   oxygen

USE_GTK2=   hicolor-icon-theme

CMAKE_ARGS+=   -DENABLE_FFMPEG:BOOL=TRUE  \
     -DENABLE_KDE:BOOL=FALSE

CPPFLAGS+=   -I${LOCALBASE}/include

USE_LDCONFIG=   yes

MAKE_JOBS_UNSAFE=yes

WRKSRC=     ${WRKDIR}/${PORTNAME}-${PORTVERSION}

INSTALLS_ICONS=   yes

post-patch:
   ${REINPLACE_CMD} -e '11d' ${WRKSRC}/replaygain/mpg123input.cpp
   ${REINPLACE_CMD} -e '11d' ${WRKSRC}/replaygain/ffmpeginput.cpp

.include <bsd.port.mk>
 
Back
Top