Cmake error in diamond-aligner: pthreads - not found

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Cmake error in diamond-aligner: pthreads - not found

Andreas Tille-5
Hi folks,

I have problems to upgrade diamond-aligner[1] to its latest upstream
version and upstream can't reproduce the issue.  Sorry, currently I'm
swamped with COVID-19 issues so I'd like to ask here simply for a patch
which is probably not that hard.  In pbuilder I get:

...
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE..
CMake Error at CMakeLists.txt:69 (else):
  else An ELSE command was found outside of a proper IF ENDIF structure.  Or
  its arguments did not match the opening IF command.


CMake Error at CMakeLists.txt:166 (endif):
  endif An ENDIF command was found outside of a proper IF ENDIF structure.
  Or its arguments did not match the opening IF command.


CMake Error at CMakeLists.txt:271 (add_executable):
  add_executable cannot create target "diamond" because another target with
  the same name already exists.  The existing target is an executable created
  in source directory "/build/diamond-aligner-0.9.31".  See documentation for
  policy CMP0002 for more details.


-- Configuring incomplete, errors occurred!
See also "/build/diamond-aligner-0.9.31/obj-x86_64-linux-gnu/CMakeFiles/CMakeOutput.log".
See also "/build/diamond-aligner-0.9.31/obj-x86_64-linux-gnu/CMakeFiles/CMakeError.log".
...


Any patch would be really welcome.

Thanks a lot

      Andreas.


[1] https://salsa.debian.org/med-team/diamond-aligner


--
http://fam-tille.de

Reply | Threaded
Open this post in threaded view
|

Re: Cmake error in diamond-aligner: pthreads - not found

Matthew Fernandez
Hi Andreas,

I can’t reproduce this either, but in case your subject was hinting at a suspected cause, I don’t think this is it. The output shows CMake successfully finding Pthreads. The line numbers don’t make much sense to me; there is no else statement on line 69, and CMakeLists.txt is only 199 lines long. The final error almost looks like it’s somehow encountered the targets at both line 174 and 179, or its somehow recursively parsing the same CMakeLists.txt again. Maybe there’s something not right in the CMake install on this build machine?

Thanks,
Matt

> On Mar 27, 2020, at 03:32, Andreas Tille <[hidden email]> wrote:
>
> Hi folks,
>
> I have problems to upgrade diamond-aligner[1] to its latest upstream
> version and upstream can't reproduce the issue.  Sorry, currently I'm
> swamped with COVID-19 issues so I'd like to ask here simply for a patch
> which is probably not that hard.  In pbuilder I get:
>
> ...
> -- Looking for pthread.h
> -- Looking for pthread.h - found
> -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
> -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
> -- Looking for pthread_create in pthreads
> -- Looking for pthread_create in pthreads - not found
> -- Looking for pthread_create in pthread
> -- Looking for pthread_create in pthread - found
> -- Found Threads: TRUE..
> CMake Error at CMakeLists.txt:69 (else):
>  else An ELSE command was found outside of a proper IF ENDIF structure.  Or
>  its arguments did not match the opening IF command.
>
>
> CMake Error at CMakeLists.txt:166 (endif):
>  endif An ENDIF command was found outside of a proper IF ENDIF structure.
>  Or its arguments did not match the opening IF command.
>
>
> CMake Error at CMakeLists.txt:271 (add_executable):
>  add_executable cannot create target "diamond" because another target with
>  the same name already exists.  The existing target is an executable created
>  in source directory "/build/diamond-aligner-0.9.31".  See documentation for
>  policy CMP0002 for more details.
>
>
> -- Configuring incomplete, errors occurred!
> See also "/build/diamond-aligner-0.9.31/obj-x86_64-linux-gnu/CMakeFiles/CMakeOutput.log".
> See also "/build/diamond-aligner-0.9.31/obj-x86_64-linux-gnu/CMakeFiles/CMakeError.log".
> ...
>
>
> Any patch would be really welcome.
>
> Thanks a lot
>
>      Andreas.
>
>
> [1] https://salsa.debian.org/med-team/diamond-aligner
>
>
> --
> http://fam-tille.de
>

Reply | Threaded
Open this post in threaded view
|

Re: Cmake error in diamond-aligner: pthreads - not found

Andrey Rahmatullin-3
On Fri, Mar 27, 2020 at 07:24:38AM -0700, Matthew Fernandez wrote:
> Hi Andreas,
>
> I can’t reproduce this either, but in case your subject was hinting at a
> suspected cause, I don’t think this is it. The output shows CMake
> successfully finding Pthreads.
But the build fails with "/usr/bin/ld.gold: error: cannot find -lpthreads"

> The line numbers don’t make much sense to
> me; there is no else statement on line 69, and CMakeLists.txt is only
> 199 lines long. The final error almost looks like it’s somehow
> encountered the targets at both line 174 and 179, or its somehow
> recursively parsing the same CMakeLists.txt again. Maybe there’s
> something not right in the CMake install on this build machine?
Have you checked that before or after applying patches?
https://salsa.debian.org/med-team/diamond-aligner/-/blob/master/debian/patches/multi_arch
was broken in the "Refresh patches" commit 434c6968.


--
WBR, wRAR

signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Cmake error in diamond-aligner: pthreads - not found

Ryan Pavlik-2


On 3/27/20 9:44 AM, Andrey Rahmatullin wrote:

> On Fri, Mar 27, 2020 at 07:24:38AM -0700, Matthew Fernandez wrote:
>> Hi Andreas,
>>
>> I can’t reproduce this either, but in case your subject was hinting at a
>> suspected cause, I don’t think this is it. The output shows CMake
>> successfully finding Pthreads.
> But the build fails with "/usr/bin/ld.gold: error: cannot find -lpthreads"
>
>> The line numbers don’t make much sense to
>> me; there is no else statement on line 69, and CMakeLists.txt is only
>> 199 lines long. The final error almost looks like it’s somehow
>> encountered the targets at both line 174 and 179, or its somehow
>> recursively parsing the same CMakeLists.txt again. Maybe there’s
>> something not right in the CMake install on this build machine?
> Have you checked that before or after applying patches?
> https://salsa.debian.org/med-team/diamond-aligner/-/blob/master/debian/patches/multi_arch
> was broken in the "Refresh patches" commit 434c6968.
>
>

Looks like two of the patches were actually applied upstream and can be
dropped:

- multi_arch
https://github.com/bbuchfink/diamond/commit/2248fefb362e931ce1cee4d9292efe8d1499f225
- fix_i386_and_s390x
https://github.com/bbuchfink/diamond/commit/aea535c07e09fd41c5ab48ae72b6901d01d8decb

I've done this via gbp pq here:
https://salsa.debian.org/med-team/diamond-aligner/-/merge_requests/2



signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Cmake error in diamond-aligner: pthreads - not found

Andreas Tille-5
On Fri, Mar 27, 2020 at 10:05:05AM -0500, Ryan Pavlik wrote:

>
> Looks like two of the patches were actually applied upstream and can be
> dropped:
>
> - multi_arch
> https://github.com/bbuchfink/diamond/commit/2248fefb362e931ce1cee4d9292efe8d1499f225
> - fix_i386_and_s390x
> https://github.com/bbuchfink/diamond/commit/aea535c07e09fd41c5ab48ae72b6901d01d8decb
>
> I've done this via gbp pq here:
> https://salsa.debian.org/med-team/diamond-aligner/-/merge_requests/2

Thanks a lot for watching me!  This was pretty helpful.

Kind regards

      Andreas.


--
http://fam-tille.de