Using reference from FreeBSD-KDE mailing lists ...

sossego

Retired from the forums
Still results in an error. There is a character limit in the title which prevents me from writing the entire problem as the topic.

Okay. Using http://osdir.com/ml/kde-freebsd/2013-12/msg00044.html as the reference, I copied
Code:
 + #ifdef POSIX
 + extern "C" {[
 ++#include <pthread.h>
 + #include <unistd.h>
 + }
 + #endif"
sans "+" to the first mentioned error in src/engine with the results being
Code:
/usr/home/raspycat/traverso/work/traverso-0.49.2/src/engine/AudioDeviceThread.cpp:65: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/AudioDeviceThread.cpp:138:30: error: use of undeclared identifier 'pthread_self'
                if (pthread_setschedparam (pthread_self(), SCHED_FIFO, &param) != 0) {
                                           ^

Now, without anyone else working on this, what method must I take to properly correct the first set of errors?
 
Code:
===>  Building for 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'
                if (pthread_setschedparam (pthread_self(), SCHED_FIFO, &param) != 0) {}
                                           ^
/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) {
                                           ^
/usr/home/raspycat/traverso/work/traverso-0.49.2/src/engine/AudioDeviceThread.cpp:158:58: error: unknown type name 'cpu_set_t'; did you mean 'cpusetid_t'?
typedef int* (*setaffinity_func_type)(pid_t,unsigned int,cpu_set_t *);
                                                         ^~~~~~~~~
                                                         cpusetid_t
/usr/include/sys/types.h:84:22: note: 'cpusetid_t' declared here
typedef __cpusetid_t    cpusetid_t;
                        ^
/usr/home/raspycat/traverso/work/traverso-0.49.2/src/engine/AudioDeviceThread.cpp:170:3: error: unknown type name 'cpu_set_t'; did you mean 'cpusetid_t'?
                cpu_set_t mask;
                ^~~~~~~~~
                cpusetid_t
/usr/include/sys/types.h:84:22: note: 'cpusetid_t' declared here
typedef __cpusetid_t    cpusetid_t;
                        ^
/usr/home/raspycat/traverso/work/traverso-0.49.2/src/engine/AudioDeviceThread.cpp:171:3: error: use of undeclared identifier 'CPU_ZERO'
                CPU_ZERO(&mask);
                ^
/usr/home/raspycat/traverso/work/traverso-0.49.2/src/engine/AudioDeviceThread.cpp:172:3: error: use of undeclared identifier 'CPU_SET'
                CPU_SET(cpu, &mask);
                ^
6 errors generated.
*** Error code 1

Stop.
make[4]: stopped in /usr/home/raspycat/traverso/work/traverso-0.49.2
*** Error code 1

Stop.
make[3]: stopped in /usr/home/raspycat/traverso/work/traverso-0.49.2
*** Error code 1

Stop.
make[2]: stopped in /usr/home/raspycat/traverso/work/traverso-0.49.2
*** Error code 1

Stop.
make[1]: stopped in /usr/home/raspycat/traverso
*** Error code 1

Stop.
make: stopped in /usr/home/raspycat/traverso


I am trying to create a patch based upon the previous information in the first post. Within the first listed source file, the patch was added yet the error remains. Will it be necessary to add the patch to each area mentioned in the error log?
  1. I am looking for a solution.
  2. I am trying to solve the problem as I go along.
  3. Being aware that this is Clang, it is probably a new set of problems.
 
With
Code:
 #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Woverloaded-virtual"
    // Member declaration raising the warning.
#pragma clang diagnostic pop
does one add this to the source file or can it be added to the /etc/make.conf to prevent further warnings when building other ports?
 
I take it the appearance of a [ character after the external C declaration in the first posts' patch is a formatting error of this forums rather than in your patch.

Then you need to consider KDE is not only quite large software, but also has a feature-rich build system that provides a lot functionality not offered by unextended cmake by default. The patch listed in the first post branches on the POSIX macro, however there is no such macro on posix systems by default - it's introduced by the KDE build system instead.

If you want to test for *BSD, try branching on the __unix__ macro. Also, you can write some #error lines into the branches to check whether the branches are being evaluated.

EDIT:

The #pragma instructions are written into the source and/or header files rather then into make.conf().
 
It seems that the compilation of source code in question requires that I create a static library in order for it to be built. The same type of error occurs a few more times. What gets created is a set of links to where it would be installed and an "null type" file. Is assuming that the said library would need to be linked to the header and preprocessor files wrong? By the way clang is at version 3.5 with gcc-4.7 compatibility at the official site.
 
Back
Top