[opensuse-packaging] Pthread error while building weechat package for SLE12-SP2
Hello Everyone, I am new to RPM packaging and I am trying to package weechat for SLE12-SP3 and am facing `prhread_getspecific` error,
`/home/abuild/rpmbuild/BUILD/weechat-2.2/src/plugins/perl/weechat-perl.c:352: undefined reference to `pthread_getspecific'`
I searched over the internet to find the solution but I am unable to understand on how to implement this in packaging, like where to add/remove that certain flag (pthread). Following is the pastebin for my system details, build log, spec file and other links. [System][1] [Spec File][2] [meta prj][3] [Build log][4] [Build commands][5] [lpthread references in the code][6] [1]: https://pastebin.com/ZvmaUSPS [2]: https://build.opensuse.org/package/view_file/openSUSE:Backports:SLE-15/weech... (without %makejobs macro) [3]: https://pastebin.com/u7TmXiXj [4]: https://pastebin.com/H8i6bhu3 [5]: https://pastebin.com/9MB3hKY0 [6]: https://pastebin.com/AKKkKzLb -- Regards, Mohit Bansal (philomath) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Saturday 2018-08-18 11:47, MOHIT B. wrote:
Hello Everyone,
I am new to RPM packaging and I am trying to package weechat for SLE12-SP3 and am facing `prhread_getspecific` error,
`/home/abuild/rpmbuild/BUILD/weechat-2.2/src/plugins/perl/weechat-perl.c:352: undefined reference to `pthread_getspecific'`
I searched over the internet to find the solution but I am unable to understand on how to implement this in packaging, like where to add/remove that certain flag (pthread).
Following is the pastebin for my system details, build log, spec file and other links.
[System][1] [Spec File][2] [meta prj][3] [Build log][4] [Build commands in .spec][5] [lpthread references in the code][6]
None of those. 7.) In the build description provided in the tarball (Makefile, Makefile.am, CMakeLists.txt, whatever applies). -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Sat, Aug 18, 2018 at 3:55 PM, Jan Engelhardt <jengelh@inai.de> wrote:
On Saturday 2018-08-18 11:47, MOHIT B. wrote:
Hello Everyone,
I am new to RPM packaging and I am trying to package weechat for SLE12-SP3 and am facing `prhread_getspecific` error,
`/home/abuild/rpmbuild/BUILD/weechat-2.2/src/plugins/perl/weechat-perl.c:352: undefined reference to `pthread_getspecific'`
I searched over the internet to find the solution but I am unable to understand on how to implement this in packaging, like where to add/remove that certain flag (pthread).
Following is the pastebin for my system details, build log, spec file and other links.
[System][1] [Spec File][2] [meta prj][3] [Build log][4] [Build commands in .spec][5] [lpthread references in the code][6]
None of those.
7.) In the build description provided in the tarball (Makefile, Makefile.am, CMakeLists.txt, whatever applies).
So, I need to untar the code, make the changes and archive it again? -- Regards, Mohit Bansal (philomath) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Saturday 2018-08-18 12:32, MOHIT B. wrote:
On Sat, Aug 18, 2018 at 3:55 PM, Jan Engelhardt <jengelh@inai.de> wrote:
On Saturday 2018-08-18 11:47, MOHIT B. wrote:
Hello Everyone,
I am new to RPM packaging and I am trying to package weechat for SLE12-SP3 and am facing `prhread_getspecific` error,
`/home/abuild/rpmbuild/BUILD/weechat-2.2/src/plugins/perl/weechat-perl.c:352: undefined reference to `pthread_getspecific'`
I searched over the internet to find the solution but I am unable to understand on how to implement this in packaging, like where to add/remove that certain flag (pthread).
Following is the pastebin for my system details, build log, spec file and other links.
[System][1] [Spec File][2] [meta prj][3] [Build log][4] [Build commands in .spec][5] [lpthread references in the code][6]
None of those.
7.) In the build description provided in the tarball (Makefile, Makefile.am, CMakeLists.txt, whatever applies).
So, I need to untar the code, make the changes and archive it again?
I hope you don't, just "%patch" it after %setup. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Sat, Aug 18, 2018 at 4:11 PM, Jan Engelhardt <jengelh@inai.de> wrote:
So, I need to untar the code, make the changes and archive it again?
I hope you don't, just "%patch" it after %setup.
I will try and let us all know :) -- Regards, Mohit Bansal (philomath) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Am Samstag, 18. August 2018, 11:47:27 CEST schrieb MOHIT B.:
Hello Everyone,
I am new to RPM packaging and I am trying to package weechat for SLE12-SP3 and am facing `prhread_getspecific` error,
`/home/abuild/rpmbuild/BUILD/weechat-2.2/src/plugins/perl/weechat-perl.c:3 52: undefined reference to `pthread_getspecific'` I searched over the internet to find the solution but I am unable to understand on how to implement this in packaging, like where to add/remove that certain flag (pthread).
I added one line to the spec file: BuildRequires: glibc-devel and it builds now. here to see: https://build.opensuse.org/package/show/ home:lemmy04:branches:openSUSE:Backports:SLE-15/weechat Cheers MH -- Mathias Homann Senior Systems Engineer, IT Consultant. IT Trainer Mathias.Homann@openSUSE.org http://www.tuxonline.tech gpg key fingerprint: 8029 2240 F4DD 7776 E7D2 C042 6B8E 029E 13F2 C102
On Sat, Aug 18, 2018 at 4:04 PM, Mathias Homann <Mathias.Homann@opensuse.org> wrote:
I added one line to the spec file:
BuildRequires: glibc-devel
and it builds now.
here to see: https://build.opensuse.org/package/show/ home:lemmy04:branches:openSUSE:Backports:SLE-15/weechat
It works in SLE-15 but not in SLE-12, I wonder why?
Cheers MH
-- Regards, Mohit Bansal (philomath) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Saturday 2018-08-18 13:00, MOHIT B. wrote:
On Sat, Aug 18, 2018 at 4:04 PM, Mathias Homann <Mathias.Homann@opensuse.org> wrote:
I added one line to the spec file:
BuildRequires: glibc-devel
and it builds now.
here to see: https://build.opensuse.org/package/show/ home:lemmy04:branches:openSUSE:Backports:SLE-15/weechat
It works in SLE-15 but not in SLE-12, I wonder why?
It's just papering over the issue. glibc-devel almost always gets installed anyway because some other package already depends on it. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
* MOHIT B. (emohit.bnsl@gmail.com) [20180818 11:01]:
It works in SLE-15 but not in SLE-12, I wonder why?
Because the error is elsewhere. Look at the line with the command to link the plugin and you'll see that the option -lpthread preceeds the objects to be linked and that of cause fails as the libraries to be used need to follow the objects so that the linker knows what is needed before searching the libraries. Why it works in SLE 15 puzzles me though. Philipp -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Tue, Aug 21, 2018 at 4:35 PM, Philipp Thomas <pth@suse.de> wrote:
* MOHIT B. (emohit.bnsl@gmail.com) [20180818 11:01]:
It works in SLE-15 but not in SLE-12, I wonder why?
Because the error is elsewhere. Look at the line with the command to link the plugin and you'll see that the option -lpthread preceeds the objects to be linked and that of cause fails as the libraries to be used need to follow the objects so that the linker knows what is needed before searching the libraries. Why it works in SLE 15 puzzles me though.
Thanks for the pointer, I looked a lot and found that I need to add the flags after the libraries to link but didn't know where. Thanks everyone :) -- Regards, Mohit Bansal (philomath) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
El 18-08-2018 a las 6:47, MOHIT B. escribió:
[2]: https://build.opensuse.org/package/view_file/openSUSE:Backports:SLE-15/weech...
change export CFLAGS="%{optflags}" to export CFLAGS="%{optflags} -pthread" and it should work. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Tuesday 2018-08-21 15:28, Cristian Rodríguez wrote:
El 18-08-2018 a las 6:47, MOHIT B. escribió:
[2]: https://build.opensuse.org/package/view_file/openSUSE:Backports:SLE-15/weech...
change export CFLAGS="%{optflags}" to export CFLAGS="%{optflags} -pthread" and it should work.
export LIBS=-lpthread -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Tue, Aug 21, 2018 at 9:29 PM, Jan Engelhardt <jengelh@inai.de> wrote:
On Tuesday 2018-08-21 15:28, Cristian Rodríguez wrote:
El 18-08-2018 a las 6:47, MOHIT B. escribió:
[2]: https://build.opensuse.org/package/view_file/openSUSE:Backports:SLE-15/weech...
change export CFLAGS="%{optflags}" to export CFLAGS="%{optflags} -pthread" and it should work.
export LIBS=-lpthread
It didn't work but adding `-pthread` to CFLAGS did -- Regards, Mohit Bansal (philomath) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Tue, Aug 21, 2018 at 6:58 PM, Cristian Rodríguez <crrodriguez@opensuse.org> wrote:
El 18-08-2018 a las 6:47, MOHIT B. escribió:
[2]: https://build.opensuse.org/package/view_file/openSUSE:Backports:SLE-15/weech...
change export CFLAGS="%{optflags}" to export CFLAGS="%{optflags} -pthread" and it should work.
It worked! Thanks Cristian :) -- Regards, Mohit Bansal (philomath) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (5)
-
Cristian Rodríguez
-
Jan Engelhardt
-
Mathias Homann
-
MOHIT B.
-
Philipp Thomas