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 03-18-2013, 05:51 PM   #1
Captain Pinkeye
Member
 
Registered: Oct 2012
Location: The Czech Republic
Posts: 280

Rep: Reputation: 98
Trouble building Musescore on Slackware 64


Hi, i tried to compile Musescore (sbopkg + mscore.Slackbuild), but it failed.

Build quits with:
Quote:
[ 84%] Building CXX object scriptgen/qtbindings/gui/CMakeFiles/qtscript_gui.dir/qtscriptshell_QDrag.cpp.o
Linking CXX shared library libqtscript_gui.so
make[3]: Leaving directory `/tmp/sbopkg.Mz0E69/mscore-1.2/build'
[ 84%] Built target qtscript_gui
make[2]: Leaving directory `/tmp/sbopkg.Mz0E69/mscore-1.2/build'
make[1]: Leaving directory `/tmp/sbopkg.Mz0E69/mscore-1.2/build'
But much further up there is this (and only) error:
Quote:
/usr/lib64/gcc/x86_64-slackware-linux/4.7.1/../../../../x86_64-slackware-linux/bin/ld: note: 'pthread_cancel@@GLIBC_2.2.5' is defined in DSO /lib64/libpthread.so.0 so try adding it to the linker command line
/lib64/libpthread.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[3]: *** [mscore/mscore] Error 1
make[2]: *** [mscore/CMakeFiles/mscore.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
So i did my homework, and it seems i need to add '/lib64/libpthread.so.0' to the linker command line, as it is written here:
http://forums.fedoraforum.org/showthread.php?t=247730, but i don't know how to do it and i don't want to bork my system. Plus my brain was starting to melt down, too.


So my question is:
1. How to succesfully build this package?
2. How to add something into linker command line, preferably using the slackbuild?


Tried to compile both 1.2 and 1.3, with -j3 and without any -j, with -02 and -01, on 64 bit Slackware 14, both optional deps (portaudio & jack) i have not.
The same slackbuild went fine on Slackware64 13.37.
(I tried to attach both logs, but i can't for some reason.)
 
Old 03-18-2013, 07:39 PM   #2
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,338

Rep: Reputation: 4330Reputation: 4330Reputation: 4330Reputation: 4330Reputation: 4330Reputation: 4330Reputation: 4330Reputation: 4330Reputation: 4330Reputation: 4330Reputation: 4330
This is a case of underlinking, so the solution is to pass the linker the specific library.
You forgot to post when it happens, the first line of the error
Code:
/usr/lib64/gcc/x86_64-slackware-linux/4.7.1/../../../../x86_64-slackware-linux/bin/ld: CMakeFiles/mscore.dir/alsa.cpp.o: undefined reference to symbol 'pthread_cancel@@GLIBC_2.2.5'
Normally, it's sufficient to pass the library with LDFLAGS="-lpthread" to configure, but in this case cmake is used so you have to hunt a little in the CMakeLists.txt of the project and sed in the additional library: I've looked around and seems you have to add this line to the slackbuild, just before the first make
Code:
# Fix linking
sed -i '/^\ \ \ \ \ \ \${ALSA_LIB}$/i\      pthread' mscore/mscore/CMakeLists.txt
have a look at the file in question and search for pthread (after sed has run) to see in which block is added.

Last edited by ponce; 03-18-2013 at 07:45 PM.
 
1 members found this post helpful.
Old 03-19-2013, 03:23 AM   #3
Captain Pinkeye
Member
 
Registered: Oct 2012
Location: The Czech Republic
Posts: 280

Original Poster
Rep: Reputation: 98
Quote:
you have to add this line to the slackbuild, just before the first make

Code:
Quote:
# Fix linking
sed -i '/^\ \ \ \ \ \ \${ALSA_LIB}$/i\ pthread' mscore/mscore/CMakeLists.txt
I did just that, and yes, the package compiled succesfully and seems to be working well!

Thanks for your time and knowledge, i'll mark this as solved now.
 
Old 09-20-2013, 12:22 AM   #4
chapchap70
LQ Newbie
 
Registered: May 2013
Distribution: FatDog64
Posts: 11

Rep: Reputation: Disabled
Hi,

I got the same error and it quit on the same line but I'm a little dense as to what file and where I have to add the "#Fix linking" code. (I do not know what is meant by "just before the first make")

I was trying to compile and build Mscore 1.3 on Puppy Slacko 5.6 (which I believe uses slackware.)

Thanks

Last edited by chapchap70; 09-20-2013 at 12:26 AM.
 
Old 09-20-2013, 08:36 AM   #5
natharran
Member
 
Registered: Jul 2012
Location: Czech Republic
Distribution: Slackware64 14.1
Posts: 34

Rep: Reputation: Disabled
Hi,

sorry for posting to a [SOLVED] thread, but I believe I found an easier solution. You simply add "-lpthread" to CFLAGS and CXXFLAGS as instructed here.

I'm not using any slackbuild script for this so I ran
Code:
CFLAGS="-O2 -fPIC -lpthread" CPPFLAGS="-O2 -fPIC -lpthread" CXXFLAGS="-O2 -fPIC -lpthread" make release
Compiled ok and everything seems to run.

Hope it helps.
 
Old 09-24-2013, 04:19 AM   #6
Captain Pinkeye
Member
 
Registered: Oct 2012
Location: The Czech Republic
Posts: 280

Original Poster
Rep: Reputation: 98
Quote:
Originally Posted by chapchap70 View Post
Hi,

I got the same error and it quit on the same line but I'm a little dense as to what file and where I have to add the "#Fix linking" code. (I do not know what is meant by "just before the first make")

I was trying to compile and build Mscore 1.3 on Puppy Slacko 5.6 (which I believe uses slackware.)

Thanks
Yes it uses Slackware, but i'm not sure if it uses slackbuilds for making packages (i doubt it). We were talking about this one in particular. If you build the program the traditional MAKE way, i recommend following natharran's advice instead.


Quote:
Originally Posted by natharran View Post
Hi,

sorry for posting to a [SOLVED] thread, but I believe I found an easier solution. You simply add "-lpthread" to CFLAGS and CXXFLAGS as instructed here.

I'm not using any slackbuild script for this so I ran
Code:
CFLAGS="-O2 -fPIC -lpthread" CPPFLAGS="-O2 -fPIC -lpthread" CXXFLAGS="-O2 -fPIC -lpthread" make release
Compiled ok and everything seems to run.

Hope it helps.
Thanks for this.
 
Old 09-27-2013, 05:03 PM   #7
chapchap70
LQ Newbie
 
Registered: May 2013
Distribution: FatDog64
Posts: 11

Rep: Reputation: Disabled
Update

Quote:
Originally Posted by natharran View Post
Hi,

sorry for posting to a [SOLVED] thread, but I believe I found an easier solution. You simply add "-lpthread" to CFLAGS and CXXFLAGS as instructed here.

I'm not using any slackbuild script for this so I ran
Code:
CFLAGS="-O2 -fPIC -lpthread" CPPFLAGS="-O2 -fPIC -lpthread" CXXFLAGS="-O2 -fPIC -lpthread" make release
Compiled ok and everything seems to run.



Hope it helps.

Instead of starting a new thread and referencing this one, I figured I would post my situation in this thread because it seemed the exact same scenario. However, the solution offered here did not work. I can try again if anyone is curious about what the error code is but I got it to work in a way I believe did not work for the Captain Pinkeye. I simply tried ponce's way just for the heck of it. (I didn't think it would work.)

Code:
LDFLAGS="-lpthread" make release
I guess there are differences in what I am using and regular Slackware and the fact that this Puppy is a 32 bit os. Next time, I'll refer to a solved thread instead of post in it. Thanks for the help.

I did not use the slackbuilds; I did make from the tarball source.

Last edited by chapchap70; 09-27-2013 at 05:10 PM. Reason: Added
 
Old 06-30-2014, 01:41 PM   #8
pacas
LQ Newbie
 
Registered: Jun 2014
Location: France
Distribution: SlackWare
Posts: 1

Rep: Reputation: Disabled
How to compile mscore

I had the same problem as you : I can compile on a portable newly installed,
but the compilation failed on my very powerfull and modern desktop. I made
a "locale jack" on the two computers in order to find the missing or wrong files.

Only on the desktop, remains old files unused of "jack" and "jack-audio-connection-kit"
that I tested before without great success. I think they where not removed by uninstallation
process, and worse, I think one of them indicate that 'jack' was present in order that the
compilation fail. I do :

rm /usr/include/sound/jack.h
rm /usr/include/cryptopp/skipjack.h
rm /usr/include/???/pa_jack.h (I don't remember the folder, do a "locate")

After, I uninstall and reinstall "portaudio"
After, the compilation of mscore was good...

Voilą, bonne chance ą toi
 
  


Reply


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
Trouble building CDE (Slackware 64 13.37) penduin Linux - Software 16 09-02-2012 09:03 PM
trouble building nspluginwrapper on Slackware 13.1 cygnus-x1 Linux - Software 1 01-04-2011 12:51 PM
Classical organ sound fonts for MuseScore Tom Nichol Linux - Software 0 06-18-2009 03:30 PM
Trouble building vmmon module for VMware Server with Slackware 10.2 Lothoir Linux - Software 14 07-15-2006 10:01 PM
MusEScore 0.1pre2 compilation issues stev160 Linux - Software 0 07-15-2004 10:59 AM

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

All times are GMT -5. The time now is 02:44 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