Re: [kde-freebsd] Error using CMake similar to error from earlier list post

2014-02-25 Thread David Naylor
Hi Joe,

Apologies for taking so long to get back to you.  Work got really, really 
busy. 

The underlying issue is that gcc pulls in the pthread headers by default while 
clang does not.  I believe clang is following the more correct approach.   

The files you attached are for traverso however I do not see it in the 
Port's Collection.  Are you building it directly from source?  

On Wednesday, 11 December 2013 21:02:27 Joe Nosay wrote:
  I'm attaching files.
  
  1. Undeclared identifier pthread_self:: Does this mean I need to add the
  pthread.h before every declaration of pthread_self?

No, you only need to add it once.  Normally there will be a header file.  
I'm guessing either to src/engine/AudioDeviceThread.cpp or to a header file 
included by src/engine/AudioDeviceThread.cpp

  2.  How do I declare an identifier?

I don't know what you are referring to, could you please elaborate?  

  3. CLang crashed somewhat at the beginning. Files are attached.

I see.  Can you please try with a newer version of clang/traverso.  If that 
does not fix the issue, then please report that upstream to the LLVM 
developers, this is well beyond my capabilities to fix.  

  The files will probably be too big for the mailing lists.
 
 Now, those errors which have references in section 2 of the man pages, do I
 replace as suggested with cpusetid_t. For others, do I introduce a patch
 similar to the pthread.h from the kopete patch?

Yes, patches similar to pthread.h should work.  Once you get the patches 
working please submit them upstream.  It makes our lives easier if those 
developers maintain the patches, instead of us.  

Regards

signature.asc
Description: This is a digitally signed message part.


Re: [kde-freebsd] Error using CMake similar to error from earlier list post

2013-12-11 Thread Joe Nosay
On Wed, Dec 11, 2013 at 6:12 PM, Joe Nosay superbisq...@gmail.com wrote:




 On Tue, Dec 10, 2013 at 8:42 PM, Joe Nosay superbisq...@gmail.com wrote:

 Thank you.



 On Tue, Dec 10, 2013 at 3:42 AM, David Naylor d...@freebsd.org wrote:

 Hi Joe,

 I'm listening!

 I've read through your thread on KDE-FreeBSD and Ports-FreeBSD however I
 am a
 bit fuzzy as to the issues.

 Are these specific to clang, FreeBSD = 10 or some other trigger?  How
 would I
 go about reproducing these errors?

 I'm happy to work with you to resolve these issues.

 Regards

 On Tuesday, 10 December 2013 04:25:58 Joe Nosay wrote:
  On Mon, Dec 9, 2013 at 11:18 PM, Joe Nosay superbisq...@gmail.com
 wrote:
   -- Forwarded message --
   From: Joe Nosay superbisq...@gmail.com
   Date: Sun, Dec 8, 2013 at 6:38 PM
   Subject: Re: Error using CMake similar to error from earlier list
 post
   To: kde-freebsd kde-free...@kde.org
  
   On Sat, Dec 7, 2013 at 3:45 PM, Joe Nosay superbisq...@gmail.com
 wrote:
   On Fri, Dec 6, 2013 at 7:50 PM, Joe Nosay superbisq...@gmail.com
 wrote:
   https://www.mail-archive.com/kde-freebsd@kde.org/msg15778.html
  
   Is there a similar fix for this?
  
   Thanks.
  
   Now would
   
  
   +Build fix for clang.
  
+
+  error: use of undeclared identifier 'pthread_mutex_lock'
+  error: use of undeclared identifier 'pthread_mutex_unlock'
+  error: use of undeclared identifier 'pthread_self'
+  error: use of undeclared identifier 'pthread_mutex_init'
+  error: use of undeclared identifier 'pthread_mutex_destroy'
+
+---
  
  kopete/protocols/jabber/googletalk/libjingle/talk/base/ssladapter.cc.or
ig
   2013-11-04 01:20:09.0 +0200
  

  
  kopete/protocols/jabber/googletalk/libjingle/talk/base/ssladapter.cc
  
   2013-11-04 01:20:20.0 +0200
  
+@@ -29,6 +29,7 @@
+
+ #ifdef POSIX
+ extern C {
++#include pthread.h
+ #include unistd.h
+ }
+ #endif
  
   Be the appropriate fix for
  
  
  
 /usr/home/raspycat/traverso/work/traverso-0.49.2/src/engine/AudioDeviceTh
   read.cpp:58:30: error: use of undeclared identifier 'pthread_self'
   if (pthread_setschedparam (pthread_self(),
 SCHED_FIFO,
   param) != 0) {}
  
  ^
  
  
 /usr/home/raspycat/traverso/work/traverso-0.49.2/src/engine/AudioDeviceTh
   read.cpp:131:30: error: use of undeclared identifier
 'pthread_self'
   if (pthread_setschedparam (pthread_self(),
 SCHED_FIFO,
   param) != 0) {
  
   I need to write a patch and then apply it to the script in question.
   1. Will I need to add the patch to each part that is listed?
  
  
  
  
  
  
  
  
   Since it is suggested to build an application natively - or at least
 try
   to - on FreeBSD before making a port, I am trying to do such.
  
   The errors seems to be the same CLang type as the others.
   Included is the file which was  modified according to the patch from
 the
   hyperlink stated earlier in this thread.
 
  Since this a CLang problem which has occurred and will occur in
 software
  with the same or similar type of instructions, it may be of use to
 make a
  patch for all qtX software and others with the same problem.
 
 
  Me Did I do the patch right?
  KDE FreeBSD Did you hear something?
  Ports FreeBSD Nope, not at all.
 
  GCC patchiness popping up here and there. I can see it and so can
 others.
 
  KDE FreeBSD What was that?
  Ports FreeBSD Nothing, nothing at all.
 
  These problems also show up on Debian and other systems transitioning
 to
  CLang for the compiler. Errors of the same type happen on software not
 in
  ports or natively part of kde3/4.
 
  KDE FreeBSD  There goes that noise again.
  Ports FreeBSD Just ignore it.



 As suggested somewhat by the patch in/for kopete. I tried adding the
 function to the file in question. What I did resulted in no change.

 -- Configuring done
 -- Generating done
 -- Build files have been written to:
 /usr/home/raspycat/traverso/work/traverso-0.49.2
 [  0%] Building CXX object
 src/engine/CMakeFiles/traversoaudiobackend.dir/AudioDeviceThread.o
 /usr/home/raspycat/traverso/work/traverso-0.49.2/src/engine/AudioDeviceThread.cpp:65:30:
 error: use of undeclared identifier 'pthread_self'

 [I see this as a solution to that :
 http://stackoverflow.com/questions/11488361/lldb-error-use-of-undeclared-identifierbut
  how do I implement it as an applied patch ?]
 if (pthread_setschedparam (pthread_self(), SCHED_FIFO,
 param) != 0) {}

 [This was set in kopete and comes up in AudioDeviceThread.cpp as

 #ifdef POSIX
 extern C{
 #include /usr/include/pthread.h
 #include /usr/include/unistd.h
 }
 #endif]
^
 /usr/home/raspycat/traverso/work/traverso-0.49.2/src/engine/AudioDeviceThread.cpp:138:30:
 error: use of undeclared identifier 'pthread_self'

 if (pthread_setschedparam

Re: [kde-freebsd] Error using CMake similar to error from earlier list post

2013-12-10 Thread David Naylor
Hi Joe,

I'm listening!  

I've read through your thread on KDE-FreeBSD and Ports-FreeBSD however I am a 
bit fuzzy as to the issues.  

Are these specific to clang, FreeBSD = 10 or some other trigger?  How would I 
go about reproducing these errors?  

I'm happy to work with you to resolve these issues.  

Regards

On Tuesday, 10 December 2013 04:25:58 Joe Nosay wrote:
 On Mon, Dec 9, 2013 at 11:18 PM, Joe Nosay superbisq...@gmail.com wrote:
  -- Forwarded message --
  From: Joe Nosay superbisq...@gmail.com
  Date: Sun, Dec 8, 2013 at 6:38 PM
  Subject: Re: Error using CMake similar to error from earlier list post
  To: kde-freebsd kde-free...@kde.org
  
  On Sat, Dec 7, 2013 at 3:45 PM, Joe Nosay superbisq...@gmail.com wrote:
  On Fri, Dec 6, 2013 at 7:50 PM, Joe Nosay superbisq...@gmail.com wrote:
  https://www.mail-archive.com/kde-freebsd@kde.org/msg15778.html
  
  Is there a similar fix for this?
  
  Thanks.
  
  Now would
  
  
  +Build fix for clang.
  
   +
   +  error: use of undeclared identifier 'pthread_mutex_lock'
   +  error: use of undeclared identifier 'pthread_mutex_unlock'
   +  error: use of undeclared identifier 'pthread_self'
   +  error: use of undeclared identifier 'pthread_mutex_init'
   +  error: use of undeclared identifier 'pthread_mutex_destroy'
   +
   +---
   kopete/protocols/jabber/googletalk/libjingle/talk/base/ssladapter.cc.or
   ig 
  2013-11-04 01:20:09.0 +0200
  
   
   kopete/protocols/jabber/googletalk/libjingle/talk/base/ssladapter.cc
  
  2013-11-04 01:20:20.0 +0200
  
   +@@ -29,6 +29,7 @@
   +
   + #ifdef POSIX
   + extern C {
   ++#include pthread.h
   + #include unistd.h
   + }
   + #endif
  
  Be the appropriate fix for
  
  
  /usr/home/raspycat/traverso/work/traverso-0.49.2/src/engine/AudioDeviceTh
  read.cpp:58:30: error: use of undeclared identifier 'pthread_self' 
  if (pthread_setschedparam (pthread_self(), SCHED_FIFO,
  param) != 0) {}
  
 ^
  
  /usr/home/raspycat/traverso/work/traverso-0.49.2/src/engine/AudioDeviceTh
  read.cpp:131:30: error: use of undeclared identifier 'pthread_self' 
  if (pthread_setschedparam (pthread_self(), SCHED_FIFO,
  param) != 0) {
  
  I need to write a patch and then apply it to the script in question.
  1. Will I need to add the patch to each part that is listed?
  
  
  
  
  
  
  
  
  Since it is suggested to build an application natively - or at least try
  to - on FreeBSD before making a port, I am trying to do such.
  
  The errors seems to be the same CLang type as the others.
  Included is the file which was  modified according to the patch from the
  hyperlink stated earlier in this thread.
 
 Since this a CLang problem which has occurred and will occur in software
 with the same or similar type of instructions, it may be of use to make a
 patch for all qtX software and others with the same problem.
 
 
 Me Did I do the patch right?
 KDE FreeBSD Did you hear something?
 Ports FreeBSD Nope, not at all.
 
 GCC patchiness popping up here and there. I can see it and so can others.
 
 KDE FreeBSD What was that?
 Ports FreeBSD Nothing, nothing at all.
 
 These problems also show up on Debian and other systems transitioning to
 CLang for the compiler. Errors of the same type happen on software not in
 ports or natively part of kde3/4.
 
 KDE FreeBSD  There goes that noise again.
 Ports FreeBSD Just ignore it.

signature.asc
Description: This is a digitally signed message part.


Re: [kde-freebsd] Error using CMake similar to error from earlier list post

2013-12-10 Thread Joe Nosay
Thank you.


On Tue, Dec 10, 2013 at 3:42 AM, David Naylor d...@freebsd.org wrote:

 Hi Joe,

 I'm listening!

 I've read through your thread on KDE-FreeBSD and Ports-FreeBSD however I
 am a
 bit fuzzy as to the issues.

 Are these specific to clang, FreeBSD = 10 or some other trigger?  How
 would I
 go about reproducing these errors?

 I'm happy to work with you to resolve these issues.

 Regards

 On Tuesday, 10 December 2013 04:25:58 Joe Nosay wrote:
  On Mon, Dec 9, 2013 at 11:18 PM, Joe Nosay superbisq...@gmail.com
 wrote:
   -- Forwarded message --
   From: Joe Nosay superbisq...@gmail.com
   Date: Sun, Dec 8, 2013 at 6:38 PM
   Subject: Re: Error using CMake similar to error from earlier list post
   To: kde-freebsd kde-free...@kde.org
  
   On Sat, Dec 7, 2013 at 3:45 PM, Joe Nosay superbisq...@gmail.com
 wrote:
   On Fri, Dec 6, 2013 at 7:50 PM, Joe Nosay superbisq...@gmail.com
 wrote:
   https://www.mail-archive.com/kde-freebsd@kde.org/msg15778.html
  
   Is there a similar fix for this?
  
   Thanks.
  
   Now would
   
  
   +Build fix for clang.
  
+
+  error: use of undeclared identifier 'pthread_mutex_lock'
+  error: use of undeclared identifier 'pthread_mutex_unlock'
+  error: use of undeclared identifier 'pthread_self'
+  error: use of undeclared identifier 'pthread_mutex_init'
+  error: use of undeclared identifier 'pthread_mutex_destroy'
+
+---
  
  kopete/protocols/jabber/googletalk/libjingle/talk/base/ssladapter.cc.or
ig
   2013-11-04 01:20:09.0 +0200
  

kopete/protocols/jabber/googletalk/libjingle/talk/base/ssladapter.cc
  
   2013-11-04 01:20:20.0 +0200
  
+@@ -29,6 +29,7 @@
+
+ #ifdef POSIX
+ extern C {
++#include pthread.h
+ #include unistd.h
+ }
+ #endif
  
   Be the appropriate fix for
  
  
  
 /usr/home/raspycat/traverso/work/traverso-0.49.2/src/engine/AudioDeviceTh
   read.cpp:58:30: error: use of undeclared identifier 'pthread_self'
   if (pthread_setschedparam (pthread_self(), SCHED_FIFO,
   param) != 0) {}
  
  ^
  
  
 /usr/home/raspycat/traverso/work/traverso-0.49.2/src/engine/AudioDeviceTh
   read.cpp:131:30: error: use of undeclared identifier 'pthread_self'
   if (pthread_setschedparam (pthread_self(), SCHED_FIFO,
   param) != 0) {
  
   I need to write a patch and then apply it to the script in question.
   1. Will I need to add the patch to each part that is listed?
  
  
  
  
  
  
  
  
   Since it is suggested to build an application natively - or at least
 try
   to - on FreeBSD before making a port, I am trying to do such.
  
   The errors seems to be the same CLang type as the others.
   Included is the file which was  modified according to the patch from
 the
   hyperlink stated earlier in this thread.
 
  Since this a CLang problem which has occurred and will occur in software
  with the same or similar type of instructions, it may be of use to make a
  patch for all qtX software and others with the same problem.
 
 
  Me Did I do the patch right?
  KDE FreeBSD Did you hear something?
  Ports FreeBSD Nope, not at all.
 
  GCC patchiness popping up here and there. I can see it and so can others.
 
  KDE FreeBSD What was that?
  Ports FreeBSD Nothing, nothing at all.
 
  These problems also show up on Debian and other systems transitioning to
  CLang for the compiler. Errors of the same type happen on software not in
  ports or natively part of kde3/4.
 
  KDE FreeBSD  There goes that noise again.
  Ports FreeBSD Just ignore it.



As suggested somewhat by the patch in/for kopete. I tried adding the
function to the file in question. What I did resulted in no change.

-- Configuring done
-- Generating done
-- Build files have been written to:
/usr/home/raspycat/traverso/work/traverso-0.49.2
[  0%] Building CXX object
src/engine/CMakeFiles/traversoaudiobackend.dir/AudioDeviceThread.o
/usr/home/raspycat/traverso/work/traverso-0.49.2/src/engine/AudioDeviceThread.cpp:65:30:
error: use of undeclared identifier 'pthread_self'

[I see this as a solution to that :
http://stackoverflow.com/questions/11488361/lldb-error-use-of-undeclared-identifierbut
how do I implement it as an applied patch ?]
if (pthread_setschedparam (pthread_self(), SCHED_FIFO,
param) != 0) {}

[This was set in kopete and comes up in AudioDeviceThread.cpp as

#ifdef POSIX
extern C{
#include /usr/include/pthread.h
#include /usr/include/unistd.h
}
#endif]
   ^
/usr/home/raspycat/traverso/work/traverso-0.49.2/src/engine/AudioDeviceThread.cpp:138:30:
error: use of undeclared identifier 'pthread_self'
if (pthread_setschedparam (pthread_self(), SCHED_FIFO,
param) != 0) {



 http://clang.debian.net/logs/2011-09-11/traverso_0.49.2-4_lsid64c.buildlog

The log shows that the CLang errors also occurs on other operating