Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
03-18-2013, 05:51 PM
|
#1
|
Member
Registered: Oct 2012
Location: The Czech Republic
Posts: 280
Rep:
|
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.)
|
|
|
03-18-2013, 07:39 PM
|
#2
|
LQ Guru
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,338
|
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.
|
03-19-2013, 03:23 AM
|
#3
|
Member
Registered: Oct 2012
Location: The Czech Republic
Posts: 280
Original Poster
Rep:
|
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.
|
|
|
09-20-2013, 12:22 AM
|
#4
|
LQ Newbie
Registered: May 2013
Distribution: FatDog64
Posts: 11
Rep:
|
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.
|
|
|
09-20-2013, 08:36 AM
|
#5
|
Member
Registered: Jul 2012
Location: Czech Republic
Distribution: Slackware64 14.1
Posts: 34
Rep:
|
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.
|
|
|
09-24-2013, 04:19 AM
|
#6
|
Member
Registered: Oct 2012
Location: The Czech Republic
Posts: 280
Original Poster
Rep:
|
Quote:
Originally Posted by chapchap70
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
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.
|
|
|
09-27-2013, 05:03 PM
|
#7
|
LQ Newbie
Registered: May 2013
Distribution: FatDog64
Posts: 11
Rep:
|
Update
Quote:
Originally Posted by natharran
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
|
|
|
06-30-2014, 01:41 PM
|
#8
|
LQ Newbie
Registered: Jun 2014
Location: France
Distribution: SlackWare
Posts: 1
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 02:44 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|