From: Kai-Uwe B. <ku...@gm...> - 2014-03-14 16:27:18
|
I did only some static checking for compiling with clang. Thanks for then patch. It will be applied during next week. For the detection, it is not clear to me if ít means missing support in cmake for clang or if something like the clang-omp package would enable support for. OpenMP is used for paralellising colour conversions with lcms. kind regards Kai-Uwe Boris Samorodov <bs...@pa...> schrieb: >-----BEGIN PGP SIGNED MESSAGE----- >Hash: SHA512 > >Hi Kai-Uwe and All, > >I try to compile oyranos 0.9.5 at FreeBSD-10 with clang (default) >compiler: >- ----- >% uname -a >FreeBSD srv.bb.tel.ru 10.0-RC3 FreeBSD 10.0-RC3 #1 r260036: Mon Dec 30 >03:21:53 SAMT 2013 bs...@sr...:/usr/obj/usr/src/sys/GENERIC >amd64 > >% clang -v >FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610 >Target: x86_64-unknown-freebsd10.0 >Thread model: posix >- ----- > >While configure it's properly detected that OpenMP is missing: >- ----- >Could NOT find OpenMP (missing: OpenMP_C_FLAGS OpenMP_CXX_FLAGS) >- ----- > >But while compiling an error occures: >- ----- >[...] >Linking CXX executable qcmsevents >[ 94%] Built target qcmsevents >Scanning dependencies of target image-display >[ 94%] Building CXX object >src/examples/CMakeFiles/image-display.dir/image_display/image_display.cpp.o >In file included from >/usr/ports/graphics/oyranos/work/oyranos-0.9.5/src/examples/image_display/image_display.cpp:201: >/usr/ports/graphics/oyranos/work/oyranos-0.9.5/src/examples/image_display/../../liboyranos_core/oyranos_threads.c:184:9: >error: use of undeclared identifier 'omp_get_num_procs' > if((omp_get_num_procs() - 1) >= 1) > ^ >/usr/ports/graphics/oyranos/work/oyranos-0.9.5/src/examples/image_display/../../liboyranos_core/oyranos_threads.c:185:26: >error: use of undeclared identifier 'omp_get_num_procs' > oy_thread_count_ = omp_get_num_procs() - 1; > ^ >- ----- > >Looking at the code (src/liboyranos_core/oyranos_threads.c) >there is an unconditional inclusion of omp_get_num_procs(): >- ----- > if((omp_get_num_procs() - 1) >= 1) > oy_thread_count_ = omp_get_num_procs() - 1; > else > oy_thread_count_ = 1; >- ----- > >If first three lines are surrounded with an ifdef then oyranos >compiles. >The patch is: >- ----- >- --- src/liboyranos_core/oyranos_threads.c.orig 2014-03-13 >22:06:34.153920114 +0400 >+++ src/liboyranos_core/oyranos_threads.c 2014-03-13 >22:07:12.182505283 +0400 >@@ -181,9 +181,11 @@ > oyObject_Lock( oy_job_message_list_->oy_, __func__, __LINE__ ); > oyObject_UnLock( oy_job_message_list_->oy_, __func__, __LINE__ ); > >+#ifdef _OPENMP > if((omp_get_num_procs() - 1) >= 1) > oy_thread_count_ = omp_get_num_procs() - 1; > else >+#endif > oy_thread_count_ = 1; > > oy_threads_ = >(oyThread_t*)calloc(sizeof(oyThread_t),oy_thread_count_+1); >- ----- > >Is it the right thing to do? > >Thanks for your attention. >- -- >WBR, Boris Samorodov (bsam) >FreeBSD Committer, http://www.FreeBSD.org The Power To Serve >-----BEGIN PGP SIGNATURE----- >Version: GnuPG v2.0.22 (FreeBSD) >Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > >iQIcBAEBCgAGBQJTIfmKAAoJEJYOILA6P20oyFAP/0xZki0HOyPXpow48Mwr7Jht >U2qSATlPEHuBu2WNmyOSsjAKs8D7X0C0+33bu1D5EjSEgoqyw+439eudGNvK1Wow >HY1O0/4fWbM7ZS1vmM4ZSssVw7NUX6wFbVITIP+HyusNTulfPyUUK1EbxrGo1qMm >wLzEzNj51RUAEfa7ZyTSdvmQ0ysxPBiGLCrlhekAEKMj1y0H5dcML5BbruFd05GG >tC62NuSdLGu8VN38ddjblrFy8/lGmX1dfxFQeHcoTvzhmDQ5oBZ1Mnwk4EV9JNAV >Ul7Tb2xmbSuBUUA0JovLTuWvxFKX0NhWayJJacd4rHnJ3anPPVmWrpF0ISASiBtd >bOqGMW3y6/8scEc72Kj4yGvHfC1W2pHc9DP63DEmnAypCIkT8G2gnynbqYUF56z9 >/KL8GU7Ep6Te+5zbrYhRCleFM/nyNlP02wbWQrXdji/aJpH6cmtLL9BHKvejQ/hG >TXjQbqiCbA5A1hGlwxK/5iGXtRZkzV6U+VLADr84N9qK22pbd7utoW6pIhjA6yb8 >quT2GUlfJl3FAm3QaT0M3rZK897YaxPRIWiKyilh0dK4UBtpm0fuBvZ1gd3Y3QLH >SlzWm//oaed/6SNHy9i8CJH10hc9R7LpLOm3JzSUFbw1Zf46OBVa49dyIVOiBQwt >OR9wVz39OqYAG1cBcN01 >=ofeI >-----END PGP SIGNATURE----- > >------------------------------------------------------------------------------ >Learn Graph Databases - Download FREE O'Reilly Book >"Graph Databases" is the definitive new guide to graph databases and >their >applications. Written by three acclaimed leaders in the field, >this first edition is now available. Download your free book today! >http://p.sf.net/sfu/13534_NeoTech >_______________________________________________ >Oyranos-devel mailing list >Oyr...@li... >https://lists.sourceforge.net/lists/listinfo/oyranos-devel -- Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet. |