LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-08-2014, 05:37 AM   #1
slacksam
Member
 
Registered: Oct 2012
Location: Germany
Distribution: Slackware, Salix, slarm64
Posts: 212

Rep: Reputation: 40
Question py3cairo slackbuild fails


Hi,

trying to build py3cairo from SlackBuilds on Slackware 14.1 fails with the following message:
Code:
pycairo-1.10.0/test/isurface_get_data.py
pycairo-1.10.0/test/pygame-test1.py
pycairo-1.10.0/test/pygame-test2.py
pycairo-1.10.0/test/surface_create_for_stream.py
pycairo-1.10.0/test/surface_write_to_png.py
pycairo-1.10.0/waf
pycairo-1.10.0/wscript
  ./options()
Setting top to                           : /tmp/SBo/pycairo-1.10.0 
Setting out to                           : /tmp/SBo/pycairo-1.10.0/build_directory 
  ./configure()
Checking for 'gcc' (c compiler)          : ok 
Checking for program python              : /usr/bin/python3 
Checking for python version              : (3, 4, 0, 'final', 0) 
Checking for library python3.4 in LIBDIR : not found 
Checking for library python3.4 in python_LIBPL : not found 
Checking for library python3.4 in $prefix/libs : not found 
Checking for library python3.4m in LIBDIR      : yes 
Checking for program python3.4-config          : /usr/bin/python3.4-config 
command ['/usr/bin/python3', '/usr/bin/python3.4-config', '--includes'] returned 1
Any ideas how I can get it built?

Last edited by slacksam; 05-08-2014 at 09:19 AM. Reason: Solved
 
Old 05-08-2014, 06:39 AM   #2
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,887

Rep: Reputation: 1924Reputation: 1924Reputation: 1924Reputation: 1924Reputation: 1924Reputation: 1924Reputation: 1924Reputation: 1924Reputation: 1924Reputation: 1924Reputation: 1924
do you have python3 installed?
 
Old 05-08-2014, 06:39 AM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,414

Rep: Reputation: Disabled
Did you install python3? If yes, I'd suggest you contact the slackbuild's maintainer.
 
Old 05-08-2014, 06:54 AM   #4
slacksam
Member
 
Registered: Oct 2012
Location: Germany
Distribution: Slackware, Salix, slarm64
Posts: 212

Original Poster
Rep: Reputation: 40
Hi Willy and Didier,
thanks for your replies.

Python 3 is installed, works and was found by the build script:
Code:
...
Checking for program python              : /usr/bin/python3 
Checking for python version              : (3, 4, 0, 'final', 0)
...
I will try to contact the maintainer. Thanks.
 
Old 05-08-2014, 07:14 AM   #5
ml4711
Member
 
Registered: Aug 2012
Location: Ryomgård, Danmark
Distribution: Slackware64
Posts: 146

Rep: Reputation: 103Reputation: 103
It's needed to patch py3cairo to build it with python 3.4.0

Here you get patches and howto:
http://www.linuxfromscratch.org/blfs...s.html#pycairo

If you also want to build pygobject, only the newest one (version 3.12.1) builds with python 3.4.0.

With older versions You get this error:
"SystemError: Parent module '' not loaded, cannot perform relative import"

Also needed for building pygobject is:
* glib2 >= 2.38.0 and
* gobject-introspection-1.0 >= 1.38.0

... and probably also very new gtk3 stuff

But enjoy :-)

Last edited by ml4711; 05-08-2014 at 07:16 AM.
 
1 members found this post helpful.
Old 05-08-2014, 09:18 AM   #6
slacksam
Member
 
Registered: Oct 2012
Location: Germany
Distribution: Slackware, Salix, slarm64
Posts: 212

Original Poster
Rep: Reputation: 40
Thumbs up

@ml4711: Cool, it worked!

Saving the patch files into the slackbuild directory and changing py3cairo.SlackBuild, the lines
Code:
...
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2
cd $SRCNAM-$VERSION
chown -R root:root .
find -L . \
 \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
  -o -perm 511 \) -exec chmod 755 {} \; -o \
 \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
 -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;

PYTHON="/usr/bin/python3" \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
...
to
Code:
...
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2
cd $SRCNAM-$VERSION
cp $CWD/*.patch .
chown -R root:root .
find -L . \
 \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
  -o -perm 511 \) -exec chmod 755 {} \; -o \
 \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
 -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;

patch -Np1 -i pycairo-1.10.0-waf_unpack-1.patch
wafdir=$(python3 ./waf unpack)
pushd $wafdir
patch -Np1 -i ../pycairo-1.10.0-waf_python_3_4-1.patch
popd
unset wafdir

PYTHON="/usr/bin/python3" \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
...
did the job.

Very cool!

Now I will try to build pygobject.

Thank you very much!
 
Old 05-08-2014, 09:54 AM   #7
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,887

Rep: Reputation: 1924Reputation: 1924Reputation: 1924Reputation: 1924Reputation: 1924Reputation: 1924Reputation: 1924Reputation: 1924Reputation: 1924Reputation: 1924Reputation: 1924
Thanks
it's now fixed on my branch (http://slackbuilds.org/cgit/slackbuilds/log/?h=willysr) and it will be part of the next public update
 
1 members found this post helpful.
  


Reply

Tags
cairo, python, slackbuilds, slackware 14.1


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] WebkitGtk Slackbuild fails pcelka Slackware 2 11-03-2012 04:50 AM
[SOLVED] ffmpeg slackbuild fails in 13.37 arubin Slackware 3 04-29-2011 10:02 AM
FBReader Slackbuild fails bogzab Slackware 3 04-08-2011 09:41 AM
[SOLVED] Conky SlackBuild fails agi93 Slackware 6 07-02-2010 05:21 PM
wmii slackbuild fails... What can I do...? Alexvader Slackware 3 11-02-2009 09:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration