Nuvola Player cannot use system waflib when compiling

Bug #1319043 reported by MartinKG
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Nuvola Apps Runtime (Nuvola Player)
Won't Fix
Undecided
Unassigned

Bug Description

The distribution Fedora 20 comes with a package waflib 1.7.16, why does nuvolaplayer
need a extra waflib in the source package ?
http://rpmfind.net/linux/RPM/fedora/updates/20/x86_64/waf-1.7.16-1.fc20.noarch.html
Is it possible that nuvolaplayer links against the fedora own waf version ?

Revision history for this message
Jiří Janoušek (fenryxo) wrote :

> why does nuvolaplayer need a extra waflib in the source package ?

It's recommended to distribute a waf copy with a project and use that copy to build the project. It's discouraged to use a system-wide copy [1] .

[1] http://code.google.com/p/waf/wiki/FAQ#Why_is_packaging_of_waf_in_distributions_discouraged?

> Is it possible that nuvolaplayer links against the fedora own waf version?

Try to remove the waflib directory in the source directory and check whether the build script still works.

Revision history for this message
MartinKG (mgansser) wrote :

it doesn't work, maybe there is more investigation necessary.

[martin@fc20 SPECS]$ rpmbuild -ba nuvolaplayer.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.zOGRAa
+ umask 022
+ cd /home/martin/rpmbuild/BUILD
+ cd /home/martin/rpmbuild/BUILD
+ rm -rf nuvolaplayer-2.3.3
+ /usr/bin/tar -xf -
+ /usr/bin/gzip -dc /home/martin/rpmbuild/SOURCES/nuvolaplayer-2.3.3.tar.gz
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd nuvolaplayer-2.3.3
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ rm -rf waflib
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.7FQuIw
+ umask 022
+ cd /home/martin/rpmbuild/BUILD
+ cd nuvolaplayer-2.3.3
+ export RSVG=/usr/bin/rsvg-convert
+ RSVG=/usr/bin/rsvg-convert
+ waf configure --prefix=/usr --libdir=/usr/lib64 --no-unity-quick-list --no-svg-optimization --with-gstreamer=1.0
Waf: The wscript in '/home/martin/rpmbuild/BUILD/nuvolaplayer-2.3.3' is unreadable
Traceback (most recent call last):
  File "/usr/share/waf/waflib/Scripting.py", line 86, in waf_entry_point
    set_main_module(Context.run_dir+os.sep+Context.WSCRIPT_FILE)
  File "/usr/share/waf/waflib/Scripting.py", line 111, in set_main_module
    Context.g_module=Context.load_module(file_path)
  File "/usr/share/waf/waflib/Context.py", line 277, in load_module
    exec(compile(code,path,'exec'),module.__dict__)
  File "/home/martin/rpmbuild/BUILD/nuvolaplayer-2.3.3/wscript", line 48, in <module>
    from waflib.nuvolaextras import flags, parse_version
ImportError: No module named nuvolaextras
error: Bad exit status from /var/tmp/rpm-tmp.7FQuIw (%build)

Revision history for this message
Jiří Janoušek (fenryxo) wrote :

Try to move waflib/nuvolaextras.py to the parent directory and change

from waflib.nuvolaextras import flags, parse_version

to

from nuvolaextras import flags, parse_version

summary: - why requieres nuvolaplayer waflib when compiling
+ Nuvola Player cannot use system waflib when compiling
Revision history for this message
MartinKG (mgansser) wrote :

this fails again with a other error message:

[martin@fc20 SPECS]$ rpmbuild -ba nuvolaplayer.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.fK42lp
+ umask 022
+ cd /home/martin/rpmbuild/BUILD
+ cd /home/martin/rpmbuild/BUILD
+ rm -rf nuvolaplayer-2.3.3
+ /usr/bin/tar -xf -
+ /usr/bin/gzip -dc /home/martin/rpmbuild/SOURCES/nuvolaplayer-2.3.3.tar.gz
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd nuvolaplayer-2.3.3
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ mv waflib/nuvolaextras.py .
+ sed -i -e 's|waflib.nuvolaextras import flags, parse_version|nuvolaextras import flags, parse_version|' wscript
+ rm -rf waflib
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.gPFV56
+ umask 022
+ cd /home/martin/rpmbuild/BUILD
+ cd nuvolaplayer-2.3.3
+ export RSVG=/usr/bin/rsvg-convert
+ RSVG=/usr/bin/rsvg-convert
+ waf configure --prefix=/usr --libdir=/usr/lib64 --no-unity-quick-list --no-svg-optimization --with-gstreamer=1.0
Traceback (most recent call last):
  File "/usr/share/waf/waflib/Scripting.py", line 96, in waf_entry_point
    run_commands()
  File "/usr/share/waf/waflib/Scripting.py", line 148, in run_commands
    parse_options()
  File "/usr/share/waf/waflib/Scripting.py", line 126, in parse_options
    Context.create_context('options').execute()
  File "/usr/share/waf/waflib/Options.py", line 133, in execute
    super(OptionsContext,self).execute()
  File "/usr/share/waf/waflib/Context.py", line 83, in execute
    self.recurse([os.path.dirname(g_module.root_path)])
  File "/usr/share/waf/waflib/Context.py", line 124, in recurse
    user_function(self)
  File "/home/martin/rpmbuild/BUILD/nuvolaplayer-2.3.3/wscript", line 71, in options
    ctx.load('compiler_c glibtest vala')
  File "/usr/share/waf/waflib/Context.py", line 77, in load
    module=load_tool(t,path)
  File "/usr/share/waf/waflib/Context.py", line 312, in load_tool
    __import__(d)
ImportError: No module named glibtest
error: Bad exit status from /var/tmp/rpm-tmp.gPFV56 (%build)

Revision history for this message
Jiří Janoušek (fenryxo) wrote :

Could you try folowing patch?

http://bazaar.launchpad.net/~fenryxo/nuvola-player/trunk/revision/823

files renamed:
 - waflib/Tools/glibtest.py => glibtest.py
 - waflib/nuvolaextras.py => waf_nuvolaextras.py
files modified:
 - wscript

Changed in nuvola-player:
status: New → Incomplete
Revision history for this message
MartinKG (mgansser) wrote :

i tried to patch the 2.3.3 with the 823_822.diff file, but the compilation fails again:

[martin@fc20 SPECS]$ rpmbuild -ba nuvolaplayer.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.omPbB1
+ umask 022
+ cd /home/martin/rpmbuild/BUILD
+ cd /home/martin/rpmbuild/BUILD
+ rm -rf nuvolaplayer-2.3.3
+ /usr/bin/tar -xf -
+ /usr/bin/gzip -dc /home/martin/rpmbuild/SOURCES/nuvolaplayer-2.3.3.tar.gz
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd nuvolaplayer-2.3.3
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ echo 'Patch #0 (823_822.diff):'
Patch #0 (823_822.diff):
+ /usr/bin/patch -p0 --fuzz=0
+ /usr/bin/cat /home/martin/rpmbuild/SOURCES/823_822.diff
patching file wscript
Hunk #3 succeeded at 452 (offset -11 lines).
+ rm -rf waflib
+ sed -i -e 's@VERSION="1.7.6"@VERSION="1.7.16"@g' waf
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.Ma8GdZ
+ umask 022
+ cd /home/martin/rpmbuild/BUILD
+ cd nuvolaplayer-2.3.3
+ export RSVG=/usr/bin/rsvg-convert
+ RSVG=/usr/bin/rsvg-convert
+ waf configure --prefix=/usr --libdir=/usr/lib64 --no-unity-quick-list --no-svg-optimization --with-gstreamer=1.0
Waf: The wscript in '/home/martin/rpmbuild/BUILD/nuvolaplayer-2.3.3' is unreadable
Traceback (most recent call last):
  File "/usr/share/waf/waflib/Scripting.py", line 86, in waf_entry_point
    set_main_module(Context.run_dir+os.sep+Context.WSCRIPT_FILE)
  File "/usr/share/waf/waflib/Scripting.py", line 111, in set_main_module
    Context.g_module=Context.load_module(file_path)
  File "/usr/share/waf/waflib/Context.py", line 277, in load_module
    exec(compile(code,path,'exec'),module.__dict__)
  File "/home/martin/rpmbuild/BUILD/nuvolaplayer-2.3.3/wscript", line 48, in <module>
    from waf_nuvolaextras import flags, parse_version
ImportError: No module named waf_nuvolaextras
error: Bad exit status from /var/tmp/rpm-tmp.Ma8GdZ (%build)

the content of the folder nuvolaplayer-2.3.3 is:

[root@fc20 BUILD]# ll
insgesamt 140
drwxr-xr-x 3 martin martin 4096 15. Mai 16:38 audio
-rw-r--r-- 1 martin martin 19075 4. Mai 15:52 CHANGELOG
-rw-r--r-- 1 martin martin 4320 4. Mai 15:52 COPYRIGHT
drwxr-xr-x 5 martin martin 4096 15. Mai 16:38 data
drwxr-xr-x 4 martin martin 4096 15. Mai 16:38 external
drwxr-xr-x 4 martin martin 4096 15. Mai 16:38 graphics
-rw-r--r-- 1 martin martin 6561 4. Mai 15:52 INSTALL
drwxr-xr-x 2 martin martin 4096 15. Mai 16:38 licenses
drwxr-xr-x 2 martin martin 4096 15. Mai 16:38 man
-rwxr-xr-x 1 martin martin 381 4. Mai 15:52 nuvolaplayer.tsocks
-rwxr-xr-x 1 martin martin 457 4. Mai 15:52 nuvolaplayer.wrapper
-rw-r--r-- 1 martin martin 770 4. Mai 15:52 README
-rw-r--r-- 1 martin martin 60 4. Mai 15:52 revision-info
-rw-r--r-- 1 martin martin 540 4. Mai 15:52 setup_env.sh
drwxr-xr-x 4 martin martin 4096 15. Mai 16:38 src
drwxr-xr-x 9 martin martin 4096 15. Mai 16:38 tests
drwxr-xr-x 3 martin martin 4096 15. Mai 16:38 tools
drwxr-xr-x 2 martin martin 4096 15. Mai 16:38 translations
drwxr-xr-x 2 martin martin 4096 15. Mai 16:38 vapi
-rwxr-xr-x 1 martin martin 4110 15. Mai 16:38 waf
-rw-r--r-- 1 martin martin 16369 15. Mai 16:38 wscript
-rw-r--r-- 1 martin martin 16364 4. Mai 15:52 wscript.orig

Revision history for this message
Jiří Janoušek (fenryxo) wrote : Re: [Bug 1319043] Re: Nuvola Player cannot use system waflib when compiling

Have you moved these files?

- waflib/Tools/glibtest.py => glibtest.py
- waflib/nuvolaextras.py => waf_nuvolaextras.py

Revision history for this message
MartinKG (mgansser) wrote :

Sorry forgot to move the 2 files.
The compilation fails now on a other location.
Attached is the build-error.txt file.

Revision history for this message
Jiří Janoušek (fenryxo) wrote :
Revision history for this message
MartinKG (mgansser) wrote :
Download full text (4.2 KiB)

thanks for the patch-824, it doesn't work for me, so i modified it a little bit.

the next error i get is this:

[ 30/140] c: build/src/nuvola/gui/webview.c -> build/src/nuvola/gui/webview.c.16.o
[ 31/140] c: build/src/nuvolaplayer.c -> build/src/nuvolaplayer.c.17.o
src/nuvolaplayer.c:32:21: fatal error: gtk/gtk.h: No such file or directory
 #include <gtk/gtk.h>
                     ^
compilation terminated.
Waf: Leaving directory `/home/martin/rpmbuild/BUILD/nuvolaplayer-2.3.3/build'
Build failed
 -> task in 'nuvolaplayer' failed (exit status 1):
 {task 13985808: c nuvolaplayer.c -> nuvolaplayer.c.17.o}
['/usr/lib64/ccache/gcc', '-O2', '-I/home/martin/rpmbuild/BUILD/nuvolaplayer-2.3.3/build/src/diorite', '-I/home/martin/rpmbuild/BUILD/nuvolaplayer-2.3.3/src/diorite', '-I/home/martin/rpmbuild/BUILD/nuvolaplayer-2.3.3/build/src', '-I/home/martin/rpmbuild/BUILD/nuvolaplayer-2.3.3/src', '-I/home/martin/rpmbuild/BUILD/nuvolaplayer-2.3.3', '-I/home/martin/rpmbuild/BUILD/nuvolaplayer-2.3.3/build', '-I/usr/include/glib-2.0', '-I/usr/lib64/glib-2.0/include', '-DHAVE_GOBJECT=1', '-DHAVE_GTHREAD=1', '-DLOCALEDIR="/usr/share/locale"', '-DDATADIR="/usr/share"', '-DHAVE_LOCALE_H=1', '-DLOCALES_DIR="/usr/share/locale"', '-DHAVE_GEE=1', '-DHAVE_NOTIFY=1', '-DHAVE_XLIB=1', '-DHAVE_GTK_=1', '-DHAVE_GDK=1', '-DHAVE_GST=1', '-DLIBSOUP_2_4_VERSION="2.44.2"', '-DHAVE_SOUP=1', '-DLIBSOUP_USE_UNSTABLE_REQUEST_API="1"', '-DHAVE_JSON_GLIB=1', '-DHAVE_UNITY=1', '-DHAVE_DBUSMENU=1', '-DHAVE_WEBKIT=1', '-DHAVE_JSCORE=1', '-DHAVE_GLIB=1', '-DHAVE_GIO=1', '-DCONFIG_DEV_STAGE="stable"', '-DG_LOG_DOMAIN="Nuvola"', '-DGETTEXT_PACKAGE="nuvolaplayer"', '-DCONFIG_UNIQUE_NAME="cz.fenryxo.NuvolaPlayer"', '-DCONFIG_CONFIG_FILE="main.conf"', '-DCONFIG_COPYRIGHT="\xc2\xa9 2011-2013 Ji\xc5\x99\xc3\xad Janou\xc5\xa1ek"', '-DCONFIG_TWITTER_URL="https://www.twitter.com/NuvolaPlayer"', '-DCONFIG_PREFERENCES_HELP_URL="http://nuvolaplayer.fenryxo.cz/releases/2.3/configuration.html"', '-DCONFIG_BUG_TRACKER="http://nuvolaplayer.fenryxo.cz/support/bug_reporting.html"', '-DCONFIG_VERSION_MINOR=3', '-DCONFIG_UI_STATE_FILE="ui_state.conf"', '-DCONFIG_WEBSITE="http://nuvolaplayer.fenryxo.cz/home.html"', '-DCONFIG_APP_ICON="nuvolaplayer"', '-DCONFIG_SUPPORT_URL="http://nuvolaplayer.fenryxo.cz/support.html"', '-DCONFIG_DESKTOP_ENTRY="nuvolaplayer"', '-DCONFIG_UPDATE_PACKS_URL="http://nuvolaplayer.fenryxo.cz/services.html"', '-DCONFIG_DISPLAY_NAME="Nuvola Player"', '-DCONFIG_APPNAME="nuvolaplayer"', '-DCONFIG_SERIES="2.3"', '-DCONFIG_COOKIES_FILE="cookies.dat"', '-DCONFIG_VERSION_BUGFIX=3', '-DCONFIG_VERSION="2.3.3"', '-DCONFIG_SERIES_URL="http://nuvolaplayer.fenryxo.cz/releases/2.3.html"', '-DCONFIG_VERSION_MAJOR=2', '-DCONFIG_FACEBOOK_URL="https://www.facebook.com/nuvolaplayer"', '-DCONFIG_VERSION_SUFFIX=""', '-DCONFIG_DONATE_URL="https://www.gittip.com/NuvolaPlayer/"', '-<email address hidden>"', '-DCONFIG_GOOGLE_PLUS_URL="https://plus.google.com/110794636546911932554"', '-DCONFIG_REVISION="814"', '-DCONFIG_ENABLED_FEATURES="Last.fm scrobbling, Notifications"', '-DCONFIG_DISABLED_FEATURES="Unity Quicklist, optimization of SVG images, experim...

Read more...

Revision history for this message
Jiří Janoušek (fenryxo) wrote :

Could you attach whole output of `waf distclean configure build --with-gstreamer=1.0`?

Revision history for this message
MartinKG (mgansser) wrote :

attached is the output:

Revision history for this message
Jiří Janoušek (fenryxo) wrote :

You have omitted the *build* subcommand in the last command. Please run both

waf distclean configure build --prefix=/usr --libdir=/usr/lib64 --no-unity-quick-list --no-svg-optimization --with-gstreamer=1.0

and

./waf distclean configure build --prefix=/usr --libdir=/usr/lib64 --no-unity-quick-list --no-svg-optimization --with-gstreamer=1.0

Revision history for this message
MartinKG (mgansser) wrote :

attached is the output:

Changed in nuvola-player:
status: Incomplete → New
Revision history for this message
Jiří Janoušek (fenryxo) wrote :

Won't fix in Nuvola Player 2.

Changed in nuvola-player:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.