Re: [Mageia-dev] need some help to build a linuxsampler.rpm
PhilippeDidier a écrit : > PhilippeDidier a écrit : >> Hi ! Happy packagers... >> >> I'm trying to build some missing rpms that exist in Mandriva-contrib but >> not yet in Mageia... (most of them concern Computer Aided Music) >> >> gig >> linuxsampler >> gigedit >> qsampler >> >> linuxsampler depends on gig >> gigedit and qsampler depend on linuxsampler >> >> I use the same spec files and sources and patches as in Mandriva... >> (with minor cosmetic changes) >> >> It's OK for gig >> >> >> But >> >> I'm having problem with linuxsampler that could be built for >> Mandriva2010.2 but that can't be with Mageia2 >> >> I get several times this kind of message when running rpmbuild -ba >> (before it aborts) : >> >> ../src/plugins/.libs/liblinuxsamplerplugins.a(InstrumentEditorFactory.o): In >> function `__exchange_and_add_dispatch': >> /usr/lib/gcc/i586-mageia-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/atomicity.h:80: >> undefined reference to `pthread_cancel' >> >> ../src/common/.libs/liblinuxsamplercommon.a(Path.o): In function >> `__exchange_and_add_dispatch': >> /usr/lib/gcc/i586-mageia-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/atomicity.h:80: >> undefined reference to `pthread_cancel' >> >> >> >> >> What may cause this ? >> libpthread-2.1.14-1.so is of course present and linked in /lib/ and >> /lib/i686 >> >> >> but there's an empty libpthread.so file in /usr/lib/ >> (same as in Mandriva) does it induces any confusion ? >> >> >> Any idea ? >> >> Thanks for your help... >> >> Philippe >> >> > Last news ... > > Thanks to your help and patience and pedagogy > I could package : > gig > liblscp > linuwsampler > and test them ... OK ! > > But it's not enough : > I could package > Qsampler too (a GUI for linuxsampler which is useless without a GUI) > But Qsampler sometimes segfaults... it's a known upstream bug which is > not yet fixed ! (it worked well with the previous versions of qt4-devel > provided by Mandriva 2010.2) I don't think it's nice to provide it now > as it is. > > > I can provide the spec and patches files through bugzilla in package > requests > > But it's useless without a working and safe GUI ... > If someone want to test them (knowing that it is not ready to use) > May I use the package request in spite of this errors perhaps with a > warning ? > > > Nevertheless we can use an opensource java interface (provided by the > linuxsampler team) > I tested it : there's no segfault > > Two way to package it : > - simply provide a platform independent Java executable (already built > by linuxsampler team, tested and working with Mageia's JRE ) with a > desktop file and the jar file in a easy to create rpm... but not > providing the source code > - build a package from sources with the Mageia's openJDK > > What is the Mageia policy about jar files ? > > Last but not least I'm still stuck with gigedit > it seems to be an autoconfigure problem > > Any volunteer (need to have built and installed gig, liblscp and > linuxsampler first) > > I could build everything with the last svn revision ... only need a patch for LinuxSampler The spec files and patches can be found in bugzilla bug 7575, bug 7576, bug 7579, bug 7580, bug 7581, bug 7639. If you want to try : you need to build and install the rpms in this order : gig liblscp lv2 linuxsampler gigedit qsampler NB I don't use a buildsystem... I have several devel packages installed => Maybe some BuildRequires are missing in the spec files
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
Guillaume Rousse a écrit : > Le 24/09/2012 14:51, PhilippeDidier a écrit : >> I found that there is only one Makefile.in to modify >> >> 1 chance among more that 2 millions combinations ... and I did it, >> thanks for your help !! > Don't forget to push the fix upstream if you don't want to keep it forever. > Done ... hope it will be readable and useful :) https://bugs.linuxsampler.org/cgi-bin/show_bug.cgi?id=190
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
Le 24/09/2012 14:51, PhilippeDidier a écrit : I found that there is only one Makefile.in to modify 1 chance among more that 2 millions combinations ... and I did it, thanks for your help !! Don't forget to push the fix upstream if you don't want to keep it forever. -- BOFH excuse #343: The ATM board has run out of 10 pound notes. We are having a whip round to refill it, care to contribute ?
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
Le 22/09/2012 15:33, PhilippeDidier a écrit : Johnny A. Solbu a écrit : On Saturday 22 September 2012 02:45, PhilippeDidier wrote: %install make DESTDIR=%buildroot install Use %makeinstall instead of the make DESTDIR command. It's shorter, and does the same. And it conforms to policy, if I'm not mistaken. Hi Johnny I modified the spec file way you suggested but I got errors : The install process tried to write into /usr/lib instead of /home/philippe/rpm/BUILDROOT/linuxsampler-1.0.0-2.mga2.i386/usr/lib... fortunately there is no write access for me as simple user !!! of course this aborted the creation of rpms ! reverting to : %install make DESTDIR=%buildroot install corrected this %makeinstall_std, not %makeinstall hint: use "rpm --eval %macro" to check how it is expanded -- BOFH excuse #250: Program load too heavy for processor to lift.
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
PhilippeDidier a écrit : > Hi ! Happy packagers... > > I'm trying to build some missing rpms that exist in Mandriva-contrib but > not yet in Mageia... (most of them concern Computer Aided Music) > > gig > linuxsampler > gigedit > qsampler > > linuxsampler depends on gig > gigedit and qsampler depend on linuxsampler > > I use the same spec files and sources and patches as in Mandriva... > (with minor cosmetic changes) > > It's OK for gig > > > But > > I'm having problem with linuxsampler that could be built for > Mandriva2010.2 but that can't be with Mageia2 > > I get several times this kind of message when running rpmbuild -ba > (before it aborts) : > > ../src/plugins/.libs/liblinuxsamplerplugins.a(InstrumentEditorFactory.o): In > function `__exchange_and_add_dispatch': > /usr/lib/gcc/i586-mageia-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/atomicity.h:80: > undefined reference to `pthread_cancel' > > ../src/common/.libs/liblinuxsamplercommon.a(Path.o): In function > `__exchange_and_add_dispatch': > /usr/lib/gcc/i586-mageia-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/atomicity.h:80: > undefined reference to `pthread_cancel' > > > > > What may cause this ? > libpthread-2.1.14-1.so is of course present and linked in /lib/ and > /lib/i686 > > > but there's an empty libpthread.so file in /usr/lib/ > (same as in Mandriva) does it induces any confusion ? > > > Any idea ? > > Thanks for your help... > > Philippe > > Last news ... Thanks to your help and patience and pedagogy I could package : gig liblscp linuwsampler and test them ... OK ! But it's not enough : I could package Qsampler too (a GUI for linuxsampler which is useless without a GUI) But Qsampler sometimes segfaults... it's a known upstream bug which is not yet fixed ! (it worked well with the previous versions of qt4-devel provided by Mandriva 2010.2) I don't think it's nice to provide it now as it is. I can provide the spec and patches files through bugzilla in package requests But it's useless without a working and safe GUI ... If someone want to test them (knowing that it is not ready to use) May I use the package request in spite of this errors perhaps with a warning ? Nevertheless we can use an opensource java interface (provided by the linuxsampler team) I tested it : there's no segfault Two way to package it : - simply provide a platform independent Java executable (already built by linuxsampler team, tested and working with Mageia's JRE ) with a desktop file and the jar file in a easy to create rpm... but not providing the source code - build a package from sources with the Mageia's openJDK What is the Mageia policy about jar files ? Last but not least I'm still stuck with gigedit it seems to be an autoconfigure problem Any volunteer (need to have built and installed gig, liblscp and linuxsampler first)
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
On 23/09/12 21:16, zezinho wrote: "svn export" gives a better tarball... Yes - thanks for the correction - maybe even better to use: svn co https://svn.linuxsampler.org/svn/linuxsampler/trunk linuxsampler tar -czf linuxsampler.tar.gz linuxsampler/ --exclude-vcs .. which strips the svn stuff during tarball creation. This way the tree may be updated if required.
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
Thomas Backlund a écrit : > > > > Actually the way to fix it is to look at the error to help narrow down > where the fix is needed: > > > > -- > Thomas I won ... I found that there is only one Makefile.in to modify 1 chance among more that 2 millions combinations ... and I did it, thanks for your help !! I'm gonna go and win lot of money in the casino now ! ;) and I will share the won money with you... Philippe
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
Thomas Backlund a écrit : > PhilippeDidier skrev 24.9.2012 14:25: >> >> Hey ! You ! you are a happiness breaker :-( >> > > [...] >> >> Argh ! >> You killed me ;-( >> > > Nope, just showing how to learn about and fix some problems :) > >> Mageia will have to wait for sometime :... >> There are 21 makefiles >> There are 0 or 1 or 2 links to add to them (but which of them really >> need the added links ?) >> Than means some combinations to try : >> 2 square to the power of 21 = 2097152 if I blindly test all of them ! >> If I win early I will try the casino >> ;-) >> >> I will try a rational approach to decrease the number of tests to do... >> > > > > Actually the way to fix it is to look at the error to help narrow down > where the fix is needed: > > ../src/plugins/.libs/liblinuxsamplerplugins.a(InstrumentEditorFactory.o): In > > function `__exchange_and_add_dispatch': > /usr/lib/gcc/i586-mageia-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/atomicity.h:80: > > undefined reference to `pthread_cancel' > > ../src/common/.libs/liblinuxsamplercommon.a(Path.o): In function > `__exchange_and_add_dispatch': > /usr/lib/gcc/i586-mageia-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/atomicity.h:80: > > undefined reference to `pthread_cancel' > > > so the files that uses "pthread_cancel", need linking help. > in this case the Makefiles responsible for the build of > "liblinuxsamplerplugins" and "liblinuxsamplercommon" are the > ones you need to fix.. > > > Same goes for the: > "There came now undefined references to 'dlopen' 'dlerror' 'dlclose' > > I had to add -ldl to each Makefile.in" > > > -- > Thomas > > > Thanks again ! I was thinking about this rational approach ... Thank you for affording some humour too ;)
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
PhilippeDidier skrev 24.9.2012 14:25: Hey ! You ! you are a happiness breaker :-( [...] Argh ! You killed me ;-( Nope, just showing how to learn about and fix some problems :) Mageia will have to wait for sometime :... There are 21 makefiles There are 0 or 1 or 2 links to add to them (but which of them really need the added links ?) Than means some combinations to try : 2 square to the power of 21 = 2097152 if I blindly test all of them ! If I win early I will try the casino ;-) I will try a rational approach to decrease the number of tests to do... Actually the way to fix it is to look at the error to help narrow down where the fix is needed: ../src/plugins/.libs/liblinuxsamplerplugins.a(InstrumentEditorFactory.o): In function `__exchange_and_add_dispatch': /usr/lib/gcc/i586-mageia-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/atomicity.h:80: undefined reference to `pthread_cancel' ../src/common/.libs/liblinuxsamplercommon.a(Path.o): In function `__exchange_and_add_dispatch': /usr/lib/gcc/i586-mageia-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/atomicity.h:80: undefined reference to `pthread_cancel' so the files that uses "pthread_cancel", need linking help. in this case the Makefiles responsible for the build of "liblinuxsamplerplugins" and "liblinuxsamplercommon" are the ones you need to fix.. Same goes for the: "There came now undefined references to 'dlopen' 'dlerror' 'dlclose' I had to add -ldl to each Makefile.in" -- Thomas
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
Thomas Backlund a écrit : >>> writes: >> Hello ! >> Some news : >> Indeed it was more difficult than I thought : >> There were 21 different Makefile.in in 21 directories to modify : >> I wrote a patch that replaces >> -LDFLAGS = @LDFLAGS@ >> by >> +LDFLAGS = @LDFLAGS@ -lpthread >> in each of them... >> > > And now you are overlinking :) > > You only need to patch the Makefile(s) that is responsible for > building the code that relies on pthread > Hey ! You ! you are a happiness breaker :-( > >> Now each Makefile contains : >> LDFLAGS = -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 >> -Wl,--build-id -Wl,--enable-new-dtags -lpthread >> >> >> And I discover that my first workaround was indeed bad : >> I used >> %build >> %configure2_5x >> %make LDFLAGS="-lpthread" >> >> instead of >> %build >> %configure2_5x >> %make >> >> this allowed to package and I felt happy ;) ... but wrongly happy :( >> >> >> Now that I use a correct LDFLAGS I got new errors about other undefined >> references (thanks to --as-needed option) >> ... and I feel sad :( >> >> There came now undefined references to 'dlopen' 'dlerror' 'dlclose' >> >> I had to add -ldl to each Makefile.in >> > > And overlinking again :) > Argh ! You killed me ;-( >> And now it's OK >> >> Thanks to all of you ! I'm now less ignorant than I was ... >> >> But packaging for Mageia will need more skill and more time than for >> Mandriva ... and more patches ! (hope it's worth of it) >> > > Of course it is worth it... > By finding and fixing issues like this (and also send the fix upstream) > the quality of the code is improving... > > -- > > Thomas > You gave me some more work indeed : >> I will provide my spec and patch files to anyone (perhaps through >> bugzilla with a package request) > Mageia will have to wait for sometime :... There are 21 makefiles There are 0 or 1 or 2 links to add to them (but which of them really need the added links ?) Than means some combinations to try : 2 square to the power of 21 = 2097152 if I blindly test all of them ! If I win early I will try the casino ;-) I will try a rational approach to decrease the number of tests to do... Anyway... Did you think that inactivating the --as needed option will imply so much time to build only one package ? I really am afraid with this ! > > Regards Philippe
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
Em 23-09-2012 14:09, Barry Jackson escreveu: On 22/09/12 23:02, PhilippeDidier wrote: Ok ! That's what I try...but there are several makefiles ! You may want to try the latest dev version from the linuxsampler svn as many issues may already be fixed upstream. This will produce a current linuxsampler.tar.gz to test with:- svn co https://svn.linuxsampler.org/svn/linuxsampler/trunk linuxsampler tar -czf linuxsampler.tar.gz linuxsampler/ Barry "svn export" gives a better tarball...
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
23.09.2012 16:19, PhilippeDidier skrev: Olivier Blin a écrit : PhilippeDidier writes: indeed the configured Makefile contains LDFLAGS option --as-needed htat worked for Mandriva !!! I need now to write a patch for the makefiles... to fix it in a better way than overriding LDFLAGS May we now suppress the --as-needed option for LDFLAGS in every makefile ? No, you should not remove this option, this is the intended behavior. It just exposed a missing -l flag in the software you are packaging. The proper fix, as Thomas said, is to patch the Makefile to add the -lpthread flag where appropriate. Hello ! Some news : Indeed it was more difficult than I thought : There were 21 different Makefile.in in 21 directories to modify : I wrote a patch that replaces -LDFLAGS = @LDFLAGS@ by +LDFLAGS = @LDFLAGS@ -lpthread in each of them... And now you are overlinking :) You only need to patch the Makefile(s) that is responsible for building the code that relies on pthread Now each Makefile contains : LDFLAGS = -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags -lpthread And I discover that my first workaround was indeed bad : I used %build %configure2_5x %make LDFLAGS="-lpthread" instead of %build %configure2_5x %make this allowed to package and I felt happy ;) ... but wrongly happy :( Now that I use a correct LDFLAGS I got new errors about other undefined references (thanks to --as-needed option) ... and I feel sad :( There came now undefined references to 'dlopen' 'dlerror' 'dlclose' I had to add -ldl to each Makefile.in And overlinking again :) And now it's OK Thanks to all of you ! I'm now less ignorant than I was ... But packaging for Mageia will need more skill and more time than for Mandriva ... and more patches ! (hope it's worth of it) Of course it is worth it... By finding and fixing issues like this (and also send the fix upstream) the quality of the code is improving... I will provide my spec and patch files to anyone (perhaps through bugzilla with a package request) -- Thomas
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
Barry Jackson a écrit : > On 22/09/12 23:02, PhilippeDidier wrote: > >> Ok ! >> That's what I try...but there are several makefiles ! >> >> > > You may want to try the latest dev version from the linuxsampler svn as > many issues may already be fixed upstream. > > This will produce a current linuxsampler.tar.gz to test with:- > > svn co https://svn.linuxsampler.org/svn/linuxsampler/trunk linuxsampler > tar -czf linuxsampler.tar.gz linuxsampler/ > > Barry > Thanks for the information... I was first trying to write a working spec file and a patch file to package it... Now it works ! :) :) I will try later to use the latest dev version (that wouldn't have resolved the problem I encountered). Philippe
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
Olivier Blin a écrit : > PhilippeDidier writes: > >> indeed the configured Makefile contains >> LDFLAGS option --as-needed htat worked for Mandriva !!! >> >> I need now to write a patch for the makefiles... >> to fix it in a better way than overriding LDFLAGS >> >> May we now suppress the --as-needed option for LDFLAGS in every makefile ? > > No, you should not remove this option, this is the intended behavior. > It just exposed a missing -l flag in the software you are packaging. > > The proper fix, as Thomas said, is to patch the Makefile to add the > -lpthread flag where appropriate. > Hello ! Some news : Indeed it was more difficult than I thought : There were 21 different Makefile.in in 21 directories to modify : I wrote a patch that replaces -LDFLAGS = @LDFLAGS@ by +LDFLAGS = @LDFLAGS@ -lpthread in each of them... Now each Makefile contains : LDFLAGS = -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags -lpthread And I discover that my first workaround was indeed bad : I used %build %configure2_5x %make LDFLAGS="-lpthread" instead of %build %configure2_5x %make this allowed to package and I felt happy ;) ... but wrongly happy :( Now that I use a correct LDFLAGS I got new errors about other undefined references (thanks to --as-needed option) ... and I feel sad :( There came now undefined references to 'dlopen' 'dlerror' 'dlclose' I had to add -ldl to each Makefile.in And now it's OK Thanks to all of you ! I'm now less ignorant than I was ... But packaging for Mageia will need more skill and more time than for Mandriva ... and more patches ! (hope it's worth of it) I will provide my spec and patch files to anyone (perhaps through bugzilla with a package request) Regards Philippe
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
On 22/09/12 23:02, PhilippeDidier wrote: Ok ! That's what I try...but there are several makefiles ! You may want to try the latest dev version from the linuxsampler svn as many issues may already be fixed upstream. This will produce a current linuxsampler.tar.gz to test with:- svn co https://svn.linuxsampler.org/svn/linuxsampler/trunk linuxsampler tar -czf linuxsampler.tar.gz linuxsampler/ Barry
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
Olivier Blin a écrit : > PhilippeDidier writes: > >> indeed the configured Makefile contains >> LDFLAGS option --as-needed htat worked for Mandriva !!! >> >> I need now to write a patch for the makefiles... >> to fix it in a better way than overriding LDFLAGS >> >> May we now suppress the --as-needed option for LDFLAGS in every makefile ? > > No, you should not remove this option, this is the intended behavior. > It just exposed a missing -l flag in the software you are packaging. > > The proper fix, as Thomas said, is to patch the Makefile to add the > -lpthread flag where appropriate. > Ok ! That's what I try...but there are several makefiles !
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
PhilippeDidier writes: > indeed the configured Makefile contains > LDFLAGS option --as-needed htat worked for Mandriva !!! > > I need now to write a patch for the makefiles... > to fix it in a better way than overriding LDFLAGS > > May we now suppress the --as-needed option for LDFLAGS in every makefile ? No, you should not remove this option, this is the intended behavior. It just exposed a missing -l flag in the software you are packaging. The proper fix, as Thomas said, is to patch the Makefile to add the -lpthread flag where appropriate. -- Olivier Blin - blino
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
Thomas Backlund a écrit : > PhilippeDidier skrev 22.9.2012 16:26: >> Pierre-Malo Deniélou a écrit : >>> Le 22/09/12 01:45,PhilippeDidier nous adresse ces quelques mots : > You need to add -lpthread to the linker options... > > -- > Thomas > > > Thanks Thomas ... I use a very simple spec file in which these parts were working for Mandriva : %prep %setup -q -n %name-%version %build %configure2_5x %make %install make DESTDIR=%buildroot install I don't know where to add this option I thought it was done by %configure (I can see the option -pthread in the CXXFLAGS of the different makefiles) I tried to add CXXFLAGS="-lpthread" in the spec but it didn't change anything ... >>> >>> the linker flags use the LDFLAGS variable. >>> >> Thanks a lot Pierre-Malo ! >> >> I only modified this >> >> %build >> %configure2_5x >> %make LDFLAGS="-lpthread" >> > > Not good. you are overriding default LDFLAGS... > The proper fix is to add the flag in the Makefile that misses the needed > linking... > > >> >> And it works now !! >> >> But I don't understand why I have to add this for Mageia2 when it is not >> needed for Mandriva ... >> Is there something badly configured on my system ? >> Is it a package problem in glibc-2.14.1-8.mga2 or in glibc-devel ? >> >> Does it reveal a Mageia's bug ? >> > > > Nope. It's about under/overlinking, so the package you try to build, > does not properly specify what it needs to be linked against. > > -- > > Thomas > > > Thanks to both of you : I understand what happens and what to modify ... indeed the configured Makefile contains LDFLAGS option --as-needed htat worked for Mandriva !!! I need now to write a patch for the makefiles... to fix it in a better way than overriding LDFLAGS May we now suppress the --as-needed option for LDFLAGS in every makefile ?
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
PhilippeDidier skrev 22.9.2012 16:26: Pierre-Malo Deniélou a écrit : Le 22/09/12 01:45,PhilippeDidier nous adresse ces quelques mots : You need to add -lpthread to the linker options... -- Thomas Thanks Thomas ... I use a very simple spec file in which these parts were working for Mandriva : %prep %setup -q -n %name-%version %build %configure2_5x %make %install make DESTDIR=%buildroot install I don't know where to add this option I thought it was done by %configure (I can see the option -pthread in the CXXFLAGS of the different makefiles) I tried to add CXXFLAGS="-lpthread" in the spec but it didn't change anything ... the linker flags use the LDFLAGS variable. Thanks a lot Pierre-Malo ! I only modified this %build %configure2_5x %make LDFLAGS="-lpthread" Not good. you are overriding default LDFLAGS... The proper fix is to add the flag in the Makefile that misses the needed linking... And it works now !! But I don't understand why I have to add this for Mageia2 when it is not needed for Mandriva ... Is there something badly configured on my system ? Is it a package problem in glibc-2.14.1-8.mga2 or in glibc-devel ? Does it reveal a Mageia's bug ? Nope. It's about under/overlinking, so the package you try to build, does not properly specify what it needs to be linked against. -- Thomas
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
Le 22/09/12 14:26,PhilippeDidier nous adresse ces quelques mots : > Thanks a lot Pierre-Malo ! > > I only modified this > > %build > %configure2_5x > %make LDFLAGS="-lpthread" > > > And it works now !! > > But I don't understand why I have to add this for Mageia2 when it is not > needed for Mandriva ... > Is there something badly configured on my system ? > Is it a package problem in glibc-2.14.1-8.mga2 or in glibc-devel ? > > Does it reveal a Mageia's bug ? It reveals that before the --as-needed option was activated by default, which led to some problems: https://wiki.mageia.org/en/Overlinking_issues_in_packaging So --as-needed is no longer used, but the underlinking happens ;-) https://wiki.mageia.org/en/Underlinking_issues_in_packaging Anyway, this is not a bug, just the consequence of different choices made for the distrib between Mandriva and Mageia. Cheers, -- Malo
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
Le 22/09/2012 14:22, PhilippeDidier a écrit : I really surrender ! I don't understand where the difference between Mandriva2010.2 and Mageia2 may stand ... The compiler is different ;-) In fact, all the build chain is different, and it refuses now things that passed before.
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
Johnny A. Solbu a écrit : > On Saturday 22 September 2012 02:45, PhilippeDidier wrote: >> %install >> make DESTDIR=%buildroot install > > Use %makeinstall instead of the make DESTDIR command. > It's shorter, and does the same. And it conforms to policy, if I'm not > mistaken. > Hi Johnny I modified the spec file way you suggested but I got errors : The install process tried to write into /usr/lib instead of /home/philippe/rpm/BUILDROOT/linuxsampler-1.0.0-2.mga2.i386/usr/lib... fortunately there is no write access for me as simple user !!! of course this aborted the creation of rpms ! reverting to : %install make DESTDIR=%buildroot install corrected this Thanks anyway philippe
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
Pierre-Malo Deniélou a écrit : > Le 22/09/12 01:45,PhilippeDidier nous adresse ces quelques mots : >>> You need to add -lpthread to the linker options... >>> >>> -- >>> Thomas >>> >>> >>> >> Thanks Thomas ... >> >> >> I use a very simple spec file in which these parts were working for >> Mandriva : >> >> >> %prep >> %setup -q -n %name-%version >> >> %build >> %configure2_5x >> %make >> >> %install >> make DESTDIR=%buildroot install >> >> >> I don't know where to add this option >> >> I thought it was done by %configure (I can see the option -pthread in >> the CXXFLAGS of the different makefiles) >> >> I tried to add >> CXXFLAGS="-lpthread" in the spec but it didn't change anything ... > > the linker flags use the LDFLAGS variable. > Thanks a lot Pierre-Malo ! I only modified this %build %configure2_5x %make LDFLAGS="-lpthread" And it works now !! But I don't understand why I have to add this for Mageia2 when it is not needed for Mandriva ... Is there something badly configured on my system ? Is it a package problem in glibc-2.14.1-8.mga2 or in glibc-devel ? Does it reveal a Mageia's bug ? Thanks again ! Philippe
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
Le 22/09/12 01:45,PhilippeDidier nous adresse ces quelques mots : >> You need to add -lpthread to the linker options... >> >> -- >> Thomas >> >> >> > Thanks Thomas ... > > > I use a very simple spec file in which these parts were working for > Mandriva : > > > %prep > %setup -q -n %name-%version > > %build > %configure2_5x > %make > > %install > make DESTDIR=%buildroot install > > > I don't know where to add this option > > I thought it was done by %configure (I can see the option -pthread in > the CXXFLAGS of the different makefiles) > > I tried to add > CXXFLAGS="-lpthread" in the spec but it didn't change anything ... the linker flags use the LDFLAGS variable. -- Malo
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
PhilippeDidier a écrit : > Johnny A. Solbu a écrit : >> On Saturday 22 September 2012 02:45, PhilippeDidier wrote: >>> %install >>> make DESTDIR=%buildroot install >> >> Use %makeinstall instead of the make DESTDIR command. >> It's shorter, and does the same. And it conforms to policy, if I'm not >> mistaken. >> > thanks > > Philippe > > I really surrender ! I don't understand where the difference between Mandriva2010.2 and Mageia2 may stand ... I wanted to try to package and test the softwares before requesting those rpms to be added in Mageia. (as I have often done in the past ... providing tested spec files to submitters) Here I'm stuck !!! If anyone want to try to import the srpms from Mandriva 2010.2 he's welcome... they must be packaged (and installed) in that order : gig linuxsampler gigedit qsampler Perhaps it's only a problem on my own Mageia2 install (but where ?) Thanks again to Thomas AL13N Johnny ...
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
Johnny A. Solbu a écrit : > On Saturday 22 September 2012 02:45, PhilippeDidier wrote: >> %install >> make DESTDIR=%buildroot install > > Use %makeinstall instead of the make DESTDIR command. > It's shorter, and does the same. And it conforms to policy, if I'm not > mistaken. > thanks Philippe
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
On Saturday 22 September 2012 02:45, PhilippeDidier wrote: > %install > make DESTDIR=%buildroot install Use %makeinstall instead of the make DESTDIR command. It's shorter, and does the same. And it conforms to policy, if I'm not mistaken. -- Johnny A. Solbu PGP key ID: 0xFA687324 signature.asc Description: This is a digitally signed message part.
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
Thomas Backlund a écrit : > PhilippeDidier skrev 21.9.2012 22:24: >> Hi ! Happy packagers... >> >> I'm trying to build some missing rpms that exist in Mandriva-contrib but >> not yet in Mageia... (most of them concern Computer Aided Music) >> >> gig >> linuxsampler >> gigedit >> qsampler >> >> linuxsampler depends on gig >> gigedit and qsampler depend on linuxsampler >> >> I use the same spec files and sources and patches as in Mandriva... >> (with minor cosmetic changes) >> >> It's OK for gig >> >> >> But >> >> I'm having problem with linuxsampler that could be built for >> Mandriva2010.2 but that can't be with Mageia2 >> >> I get several times this kind of message when running rpmbuild -ba >> (before it aborts) : >> >> ../src/plugins/.libs/liblinuxsamplerplugins.a(InstrumentEditorFactory.o): >> In >> function `__exchange_and_add_dispatch': >> /usr/lib/gcc/i586-mageia-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/atomicity.h:80: >> >> undefined reference to `pthread_cancel' >> >> ../src/common/.libs/liblinuxsamplercommon.a(Path.o): In function >> `__exchange_and_add_dispatch': >> /usr/lib/gcc/i586-mageia-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/atomicity.h:80: >> >> undefined reference to `pthread_cancel' >> > > You need to add -lpthread to the linker options... > > -- > Thomas > > > Thanks Thomas ... I use a very simple spec file in which these parts were working for Mandriva : %prep %setup -q -n %name-%version %build %configure2_5x %make %install make DESTDIR=%buildroot install I don't know where to add this option I thought it was done by %configure (I can see the option -pthread in the CXXFLAGS of the different makefiles) I tried to add CXXFLAGS="-lpthread" in the spec but it didn't change anything ...
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
AL13N a écrit : > Op vrijdag 21 september 2012 21:24:17 schreef PhilippeDidier: > > > > make a small test program, that uses pthread_cancel and try to compile and > link it. when compiling (with gcc or g++) I've got this : pthread_cancel.c:(.text+0xf0): undefined reference to `pthread_create' pthread_cancel.c:(.text+0x142): undefined reference to `pthread_cancel' pthread_cancel.c:(.text+0x184): undefined reference to `pthread_join' when I compile with gcc -pthread -c it works... It seems to be a linkage problem ! Is there anything to do on the computer so that I don't have to add the -pthread option to compile ? or something to add in the spec file ? > > or you could find out with strings if that function is in there. > > lastly, i see you're building the .a file. don't do it and make it dynamic, > that could also have been an issue. if not at least it'll make the problem > alot more visible > > I didn't change anything neither in the spec file nor in the source file that I could use on my mandriva 2010.2 engine (Franck Kober aka emuse maintainer of the music packages for Mandriva 2011 didn't modify the spec file... no more) Thanks for your help !! Regards Philippe #include #include #include #include #include #define handle_error_en(en, msg) \ do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0) static void * thread_func(void *ignored_argument) { int s; /* Disable cancellation for a while, so that we don't immediately react to a cancellation request */ s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); if (s != 0) handle_error_en(s, "pthread_setcancelstate"); printf("thread_func(): started; cancellation disabled\n"); sleep(5); printf("thread_func(): about to enable cancellation\n"); s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); if (s != 0) handle_error_en(s, "pthread_setcancelstate"); /* sleep() is a cancellation point */ sleep(1000);/* Should get canceled while we sleep */ /* Should never get here */ printf("thread_func(): not canceled!\n"); return NULL; } int main(void) { pthread_t thr; void *res; int s; /* Start a thread and then send it a cancellation request */ s = pthread_create(&thr, NULL, &thread_func, NULL); if (s != 0) handle_error_en(s, "pthread_create"); sleep(2); /* Give thread a chance to get started */ printf("main(): sending cancellation request\n"); s = pthread_cancel(thr); if (s != 0) handle_error_en(s, "pthread_cancel"); /* Join with thread to see what its exit status was */ s = pthread_join(thr, &res); if (s != 0) handle_error_en(s, "pthread_join"); if (res == PTHREAD_CANCELED) printf("main(): thread was canceled\n"); else printf("main(): thread wasn't canceled (shouldn't happen!)\n"); exit(EXIT_SUCCESS); }
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
PhilippeDidier skrev 21.9.2012 22:24: Hi ! Happy packagers... I'm trying to build some missing rpms that exist in Mandriva-contrib but not yet in Mageia... (most of them concern Computer Aided Music) gig linuxsampler gigedit qsampler linuxsampler depends on gig gigedit and qsampler depend on linuxsampler I use the same spec files and sources and patches as in Mandriva... (with minor cosmetic changes) It's OK for gig But I'm having problem with linuxsampler that could be built for Mandriva2010.2 but that can't be with Mageia2 I get several times this kind of message when running rpmbuild -ba (before it aborts) : ../src/plugins/.libs/liblinuxsamplerplugins.a(InstrumentEditorFactory.o): In function `__exchange_and_add_dispatch': /usr/lib/gcc/i586-mageia-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/atomicity.h:80: undefined reference to `pthread_cancel' ../src/common/.libs/liblinuxsamplercommon.a(Path.o): In function `__exchange_and_add_dispatch': /usr/lib/gcc/i586-mageia-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/atomicity.h:80: undefined reference to `pthread_cancel' You need to add -lpthread to the linker options... -- Thomas
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
Op vrijdag 21 september 2012 21:24:17 schreef PhilippeDidier: > Hi ! Happy packagers... > > I'm trying to build some missing rpms that exist in Mandriva-contrib but > not yet in Mageia... (most of them concern Computer Aided Music) > > gig > linuxsampler > gigedit > qsampler > > linuxsampler depends on gig > gigedit and qsampler depend on linuxsampler > > I use the same spec files and sources and patches as in Mandriva... > (with minor cosmetic changes) > > It's OK for gig > > > But > > I'm having problem with linuxsampler that could be built for > Mandriva2010.2 but that can't be with Mageia2 > > I get several times this kind of message when running rpmbuild -ba > (before it aborts) : > > ../src/plugins/.libs/liblinuxsamplerplugins.a(InstrumentEditorFactory.o): In > function `__exchange_and_add_dispatch': > /usr/lib/gcc/i586-mageia-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/a > tomicity.h:80: undefined reference to `pthread_cancel' > > ../src/common/.libs/liblinuxsamplercommon.a(Path.o): In function > `__exchange_and_add_dispatch': > /usr/lib/gcc/i586-mageia-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/a > tomicity.h:80: undefined reference to `pthread_cancel' make a small test program, that uses pthread_cancel and try to compile and link it. or you could find out with strings if that function is in there. lastly, i see you're building the .a file. don't do it and make it dynamic, that could also have been an issue. if not at least it'll make the problem alot more visible > What may cause this ? > libpthread-2.1.14-1.so is of course present and linked in /lib/ and > /lib/i686 > > > but there's an empty libpthread.so file in /usr/lib/ > (same as in Mandriva) does it induces any confusion ? > > > Any idea ? > > Thanks for your help... > > Philippe
Re: [Mageia-dev] need some help to build a linuxsampler.rpm
PS : I forgot to say that it's a local building in a /rpm tree on a real Mageia2 machine (not a virtual one) I built several rpms for personal use this way and that the first time I get this kind of error... I don't use iurt !
[Mageia-dev] need some help to build a linuxsampler.rpm
Hi ! Happy packagers... I'm trying to build some missing rpms that exist in Mandriva-contrib but not yet in Mageia... (most of them concern Computer Aided Music) gig linuxsampler gigedit qsampler linuxsampler depends on gig gigedit and qsampler depend on linuxsampler I use the same spec files and sources and patches as in Mandriva... (with minor cosmetic changes) It's OK for gig But I'm having problem with linuxsampler that could be built for Mandriva2010.2 but that can't be with Mageia2 I get several times this kind of message when running rpmbuild -ba (before it aborts) : ../src/plugins/.libs/liblinuxsamplerplugins.a(InstrumentEditorFactory.o): In function `__exchange_and_add_dispatch': /usr/lib/gcc/i586-mageia-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/atomicity.h:80: undefined reference to `pthread_cancel' ../src/common/.libs/liblinuxsamplercommon.a(Path.o): In function `__exchange_and_add_dispatch': /usr/lib/gcc/i586-mageia-linux-gnu/4.6.3/../../../../include/c++/4.6.3/ext/atomicity.h:80: undefined reference to `pthread_cancel' What may cause this ? libpthread-2.1.14-1.so is of course present and linked in /lib/ and /lib/i686 but there's an empty libpthread.so file in /usr/lib/ (same as in Mandriva) does it induces any confusion ? Any idea ? Thanks for your help... Philippe