You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucy.apache.org by "Marvin Humphrey (Created) (JIRA)" <ji...@apache.org> on 2011/11/28 22:47:40 UTC
[lucy-issues] [jira] [Created] (LUCY-195) Revisit pthreads linking on OpenBSD.
Revisit pthreads linking on OpenBSD.
------------------------------------
Key: LUCY-195
URL: https://issues.apache.org/jira/browse/LUCY-195
Project: Lucy
Issue Type: Bug
Components: Perl bindings
Affects Versions: 0.2.2 (incubating)
Reporter: Marvin Humphrey
Assignee: Marvin Humphrey
Priority: Minor
Fix For: 0.3.0 (incubating)
In LUCY-157, we added '-pthread' to the linker flags on OpenBSD. This does
not seem to have sufficed, as we are still getting missing symbol errors
for pthread_mutex_lock, etc.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[lucy-issues] [jira] [Updated] (LUCY-195) Revisit pthreads linking on OpenBSD.
Posted by "Marvin Humphrey (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCY-195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marvin Humphrey updated LUCY-195:
---------------------------------
Attachment: 0001-LUCY-195-Avoid-pthreads-if-possible-on-OpenBSD.patch
This patch removes the guards so that lucy_Atomic_cas_ptr
is not guaranteed to be atomic on certain systems: OpenBSD
single-threaded Perls.
> Revisit pthreads linking on OpenBSD.
> ------------------------------------
>
> Key: LUCY-195
> URL: https://issues.apache.org/jira/browse/LUCY-195
> Project: Lucy
> Issue Type: Bug
> Components: Perl bindings
> Affects Versions: 0.2.2 (incubating)
> Reporter: Marvin Humphrey
> Assignee: Marvin Humphrey
> Priority: Minor
> Fix For: 0.3.0 (incubating)
>
> Attachments: 0001-LUCY-195-Avoid-pthreads-if-possible-on-OpenBSD.patch
>
>
> In LUCY-157, we added '-pthread' to the linker flags on OpenBSD. This does
> not seem to have sufficed, as we are still getting missing symbol errors
> for pthread_mutex_lock, etc.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[lucy-issues] [jira] [Resolved] (LUCY-195) Revisit pthreads linking on OpenBSD.
Posted by "Marvin Humphrey (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCY-195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marvin Humphrey resolved LUCY-195.
----------------------------------
Resolution: Fixed
> Revisit pthreads linking on OpenBSD.
> ------------------------------------
>
> Key: LUCY-195
> URL: https://issues.apache.org/jira/browse/LUCY-195
> Project: Lucy
> Issue Type: Bug
> Components: Perl bindings
> Affects Versions: 0.2.2 (incubating)
> Reporter: Marvin Humphrey
> Assignee: Marvin Humphrey
> Priority: Minor
> Fix For: 0.3.0 (incubating)
>
> Attachments: 0001-LUCY-195-Avoid-pthreads-if-possible-on-OpenBSD.patch
>
>
> In LUCY-157, we added '-pthread' to the linker flags on OpenBSD. This does
> not seem to have sufficed, as we are still getting missing symbol errors
> for pthread_mutex_lock, etc.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[lucy-issues] [jira] [Resolved] (LUCY-195) Revisit pthreads linking on OpenBSD.
Posted by "Marvin Humphrey (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCY-195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marvin Humphrey resolved LUCY-195.
----------------------------------
Resolution: Fixed
> Revisit pthreads linking on OpenBSD.
> ------------------------------------
>
> Key: LUCY-195
> URL: https://issues.apache.org/jira/browse/LUCY-195
> Project: Lucy
> Issue Type: Bug
> Components: Perl bindings
> Affects Versions: 0.2.2 (incubating)
> Reporter: Marvin Humphrey
> Assignee: Marvin Humphrey
> Priority: Minor
> Fix For: 0.3.0 (incubating)
>
>
> In LUCY-157, we added '-pthread' to the linker flags on OpenBSD. This does
> not seem to have sufficed, as we are still getting missing symbol errors
> for pthread_mutex_lock, etc.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[lucy-issues] [jira] [Reopened] (LUCY-195) Revisit pthreads linking on OpenBSD.
Posted by "Marvin Humphrey (Reopened) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCY-195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marvin Humphrey reopened LUCY-195:
----------------------------------
It turns out that adding -lpthread can cause non-threaded Perls on OpenBSD
to experience test failures along these lines:
{noformat}
-------------------
t/211-seg_posting_list.t (Wstat: 0 Tests: 1964 Failed: 0)
Parse errors: Tests out of sequence. Found (651) but expected (611)
Tests out of sequence. Found (652) but expected (612)
Tests out of sequence. Found (653) but expected (613)
Tests out of sequence. Found (654) but expected (614)
Tests out of sequence. Found (655) but expected (615)
{noformat}
> Revisit pthreads linking on OpenBSD.
> ------------------------------------
>
> Key: LUCY-195
> URL: https://issues.apache.org/jira/browse/LUCY-195
> Project: Lucy
> Issue Type: Bug
> Components: Perl bindings
> Affects Versions: 0.2.2 (incubating)
> Reporter: Marvin Humphrey
> Assignee: Marvin Humphrey
> Priority: Minor
> Fix For: 0.3.0 (incubating)
>
>
> In LUCY-157, we added '-pthread' to the linker flags on OpenBSD. This does
> not seem to have sufficed, as we are still getting missing symbol errors
> for pthread_mutex_lock, etc.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[lucy-issues] [jira] [Commented] (LUCY-195) Revisit pthreads linking on OpenBSD.
Posted by "Marvin Humphrey (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCY-195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13159597#comment-13159597 ]
Marvin Humphrey commented on LUCY-195:
--------------------------------------
I bit the bullet and installed a VirtualBox OpenBSD instance, and was
immediately able to duplicate the problem. A one-letter change solves it:
{noformat}
- my $link_flags = $Config{osname} =~ /openbsd/i ? '-pthread ' : '';
+ my $link_flags = $Config{osname} =~ /openbsd/i ? '-lpthread ' : '';
{noformat}
This approach appears to contradict the OpenBSD man page for [pthreads|http://www.openbsd.org/cgi-bin/man.cgi?query=pthreads&sektion=3]:
{noformat}
In OpenBSD, threads are implemented in a user-level library. A program
using these routines must be linked with the -pthread option.
{noformat}
Whatever. The -pthread vs. -lpthread situation is a big mess -- it's not just
us who's confused. Here's a thread about libclamav which draws the same
conclusion -- use -lpthread instead of -pthread:
http://kerneltrap.org/mailarchive/openbsd-misc/2009/2/16/4958354/thread#mid-4958354
{quote}
-pthread won't link libpthread into shared objects, while -lpthread
will. use -pthread when linking the executables that will load
libclamav.
{quote}
Hopefully after this patch we can stop thinking about it.
> Revisit pthreads linking on OpenBSD.
> ------------------------------------
>
> Key: LUCY-195
> URL: https://issues.apache.org/jira/browse/LUCY-195
> Project: Lucy
> Issue Type: Bug
> Components: Perl bindings
> Affects Versions: 0.2.2 (incubating)
> Reporter: Marvin Humphrey
> Assignee: Marvin Humphrey
> Priority: Minor
> Fix For: 0.3.0 (incubating)
>
>
> In LUCY-157, we added '-pthread' to the linker flags on OpenBSD. This does
> not seem to have sufficed, as we are still getting missing symbol errors
> for pthread_mutex_lock, etc.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira