Opened 11 years ago

Closed 11 years ago

#40899 closed defect (fixed)

clucene: LuceneThreads.h:58:34: error: unknown type name 'pthread_t'

Reported by: whcordis@… Owned by: dinh.viet.hoa@…
Priority: Normal Milestone:
Component: ports Version: 2.2.0
Keywords: mavericks Cc: egon.geerardyn@…, alexcoder@…, soehn@…, sylvain.girbal@…, diochnos, wahspilihp (Philip Shaw), mymacports@…, lodovico.ratti@…, ryandesign (Ryan Carsten Schmidt), simonyhh1986@…, arnolda@…
Port: clucene

Description

CLucern fails to compile on MacOS 10.9 (Mavericks) with the following error:

:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_clucene/clucene/work/clucene-core-2.3.3.4/src/shared/CLucene/LuceneThreads.h:56:19: error: unknown type name 'pthread_t'
:info:build                 static _LUCENE_THREADID_TYPE _GetCurrentThreadId();
:info:build                        ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_clucene/clucene/work/clucene-core-2.3.3.4/src/shared/CLucene/LuceneThreads.h:40:41: note: expanded from macro '_LUCENE_THREADID_TYPE'
:info:build           #define _LUCENE_THREADID_TYPE pthread_t

Attachments (2)

main.log (69.5 KB) - added by whcordis@… 11 years ago.
Build Log detailing failure of build on OS X 10.9 with XCode 5.1
clucene-main.log.tar.gz (1.9 KB) - added by diochnos 11 years ago.
clucene, Nov 3, 2013

Download all attachments as: .zip

Change History (23)

Changed 11 years ago by whcordis@…

Attachment: main.log added

Build Log detailing failure of build on OS X 10.9 with XCode 5.1

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to dinh.viet.hoa@…
Port: clucene added
Summary: LuceneThreads.h:58:34: error: unknown type name 'pthread_t'clucene: LuceneThreads.h:58:34: error: unknown type name 'pthread_t'

comment:2 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Presumably you mean Xcode 5.0.1; I don't think 5.1 exists yet.

comment:3 Changed 11 years ago by egon.geerardyn@…

Cc: egon.geerardyn@… added

Cc Me!

comment:4 Changed 11 years ago by alexcoder@…

Cc: alexcoder@… added

Cc Me!

comment:5 Changed 11 years ago by soehn@…

Cc: soehn@… added

Cc Me!

comment:6 Changed 11 years ago by sylvain.girbal@…

Cc: sylvain.girbal@… added

Cc Me!

comment:7 Changed 11 years ago by diochnos

Cc: diochnos@… added

Cc Me!

comment:8 Changed 11 years ago by wahspilihp (Philip Shaw)

Cc: wahspilihp@… added

Cc Me!

comment:9 Changed 11 years ago by mymacports@…

Cc: mymacports@… added

Cc Me!

comment:10 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: lodovico.ratti@… added

Has duplicate #41148.

comment:11 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Resolution: fixed
Status: newclosed

Changed 11 years ago by diochnos

Attachment: clucene-main.log.tar.gz added

clucene, Nov 3, 2013

comment:12 in reply to:  11 ; Changed 11 years ago by diochnos

Replying to ryandesign@…:

r112875

I am afraid it is not fixed yet. See the file clucene-main.log.tar.gz which is attached.

comment:13 in reply to:  12 ; Changed 11 years ago by egon.geerardyn@…

Resolution: fixed
Status: closedreopened

It is not fixed here either. I get a similar log trace when trying to run the afflicted make, the following errors pop up:

/opt/local/include/CLucene/LuceneThreads.h:56:19: error: unknown type name 'pthread_t'
                static _LUCENE_THREADID_TYPE _GetCurrentThreadId();
                       ^
/opt/local/include/CLucene/LuceneThreads.h:40:41: note: expanded from macro '_LUCENE_THREADID_TYPE'
          #define _LUCENE_THREADID_TYPE pthread_t
                                        ^
/opt/local/include/CLucene/LuceneThreads.h:57:18: error: unknown type name 'pthread_t'
                        static _LUCENE_THREADID_TYPE CreateThread(luceneThreadStartRoutine* func, void* arg);
                               ^
/opt/local/include/CLucene/LuceneThreads.h:40:41: note: expanded from macro '_LUCENE_THREADID_TYPE'
          #define _LUCENE_THREADID_TYPE pthread_t
                                        ^
/opt/local/include/CLucene/LuceneThreads.h:58:34: error: unknown type name 'pthread_t'
                        static void JoinThread(_LUCENE_THREADID_TYPE id);
                                               ^
/opt/local/include/CLucene/LuceneThreads.h:40:41: note: expanded from macro '_LUCENE_THREADID_TYPE'
          #define _LUCENE_THREADID_TYPE pthread_t

comment:14 in reply to:  13 ; Changed 11 years ago by arnolda@…

Replying to egon.geerardyn@…:

/opt/local/include/CLucene/LuceneThreads.h:56:19: error: unknown type name 'pthread_t'

I had the same problem. Note that the offending LuceneThreads.h comes from /opt/local/include, rather than the build directory, which contains the patched version included pthread.h.

cmake includes /opt/local/include for boost, but if an older version of CLucene is already installed in /opt/local, then these older headers are included. I manually solved the problem by telling ccmake not to include /opt/local/include, since it anyways builds against a copy of boost included in the clucene build. So I guess the solution is simply not to include /opt/local/include.

comment:15 in reply to:  14 ; Changed 11 years ago by egon.geerardyn@…

Replying to arnolda@…:

cmake includes /opt/local/include for boost, but if an older version of CLucene is already installed in /opt/local, then these older headers are included. I manually solved the problem by telling ccmake not to include /opt/local/include, since it anyways builds against a copy of boost included in the clucene build. So I guess the solution is simply not to include /opt/local/include.

Could you describe how/where to do that? I'm not that accustomed to using cmake.

comment:16 Changed 11 years ago by simonyhh1986@…

Cc: simonyhh1986@… added

Cc Me!

comment:17 in reply to:  14 ; Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to arnolda@…:

but if an older version of CLucene is already installed in /opt/local

How could an older version of CLucene already be installed, since this bug report is about how it doesn't build?

comment:18 in reply to:  17 Changed 11 years ago by mymacports@…

Replying to ryandesign@…:

Replying to arnolda@…:

but if an older version of CLucene is already installed in /opt/local

How could an older version of CLucene already be installed, since this bug report is about how it doesn't build?

I get the ":info:build /opt/local/include/CLucene/LuceneThreads.h:58:34: error: unknown type name 'pthread_t'" errors when doing 'port upgrade outdated'

and

'port installed clucene' gives:

The following ports are currently installed:
    clucene @2.3.3.4_0 (active)
Last edited 11 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:19 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: arnolda@… added

Sounds like you didn't follow migration instructions!

Last edited 11 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:20 in reply to:  15 Changed 11 years ago by soehn@…

Replying to egon.geerardyn@…:

Replying to arnolda@…:

cmake includes /opt/local/include for boost, but if an older version of CLucene is already installed in /opt/local, then these older headers are included. I manually solved the problem by telling ccmake not to include /opt/local/include, since it anyways builds against a copy of boost included in the clucene build. So I guess the solution is simply not to include /opt/local/include.

Could you describe how/where to do that? I'm not that accustomed to using cmake.

An easier solution (for those who did not follow the migration instructions): Type

sudo port uninstall -f clucene
sudo port install clucene
Last edited 11 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:21 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: reopenedclosed

Those who did not follow migration instructions should do so now.

Meanwhile I've worked around the problem in r112901.

Note: See TracTickets for help on using tickets.