
I just discovered that OpenMP support (used to parallelize Gaussian blur) is not functional on Linux and OS X because of a missing AC_DEFINE. Here is a patch that fixes this problem. Admins: please apply to 0.48 branch also.
Regards, Krzysztof

On 21/7/10 15:42, Krzysztof Kosiński wrote:
I applied your patch and reran autogen.sh and configure - twice, to test both compilers provided by OSX/Xcode, setting $CC and $CXX accordingly:
output from configure [1]:
checking for OpenMP flag of C++ compiler... unknown
for both default compilers installed on OS X 10.5.8:
GCC 4.0.1 does not support OpenMP. GCC 4.2.1 _does_ support OpenMP according to its man page:
<omp.h> does exist:
$ ll /usr/lib/gcc/i686-apple-darwin9/4.2.1/include/omp.h -rw-r--r-- 1 root wheel 2793 Jul 7 2009 /usr/lib/gcc/i686-apple-darwin9/4.2.1/include/omp.h
What do I miss here?
~suv
[1] configure output for g++-4.2:
(...)
checking for OpenMP flag of C++ compiler... unknown

W dniu 21 lipca 2010 17:21 użytkownik ~suv <suv-sf@...58...> napisał:
It might be a bug in the AX_OPENMP autoconf macro (in m4/ax_openmp.m4). The first thing that comes to mind is that it relies on $IFS being set to space. Do you modify $IFS anywhere in the OSX build script?
Regards, Krzysztof

On 21/7/10 17:32, Krzysztof Kosiński wrote:
no modifications of $IFS I'm aware of:
suv$ echo $IFS | cat -e $ suv$ env | grep IFS suv$ suv$ set | grep IFS IFS=$' \t\n' suv$ grep IFS packaging/macosx/*.sh suv$
nothing special here AFAICT, using bash:
suv$ bash --version GNU bash, version 3.2.17(1)-release (i386-apple-darwin9.0)
~suv

On 21/7/10 17:21, ~suv wrote:
grepping for 'fopenmp' revealed this in config.log:
-> It seems that '-fopenmp' fails with Apple's GCC 4.2.1 on Mac OS X 10.5.8 Leopard even though the installed man page for g++-4.2 tells otherwise.
-> No multiple threads for Gaussian blurs with osx-builds using the system-provided compiler?
~suv (still not having newer gcc versions installed via MacPorts)
configure:18063: checking for OpenMP flag of C++ compiler configure:18099: g++-4.2 -o conftest -O3 -Wall -fopenmp -Werror=format-security -Wall -Wformat -Wformat-security -W -D_FORTIFY_SOURCE=2 -I/Volumes/blue/mp-inkscape/with-a-long-long-long-directory-name/include -L/Volumes/blue/mp-inkscape/with-a-long-long-long-directory-name/lib conftest.cpp >&5 Undefined symbols: "_gomp_thread_attr", referenced from: _gomp_run_sched_chunk in libgomp.a(env.o) ld: symbol(s) not found collect2: ld returned 1 exit status configure:18099: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "inkscape" | #define PACKAGE_TARNAME "inkscape" | #define PACKAGE_VERSION "0.48+devel" | #define PACKAGE_STRING "inkscape 0.48+devel" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define PACKAGE "inkscape" | #define VERSION "0.48+devel" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define STDC_HEADERS 1 | #define HAVE_TR1_UNORDERED_SET 1 | #define HAVE_BOOST_UNORDERED_SET 1 | #define HAVE_EXT_HASH_SET 1 | #define GETTEXT_PACKAGE "inkscape" | #define HAVE_LOCALE_H 1 | #define HAVE_LC_MESSAGES 1 | #define HAVE_BIND_TEXTDOMAIN_CODESET 1 | #define HAVE_GETTEXT 1 | #define HAVE_DCGETTEXT 1 | #define ENABLE_NLS 1 | /* end confdefs.h. */ | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | #ifdef __cplusplus | extern "C" | #endif | char omp_set_num_threads (); | int | main () | { | return omp_set_num_threads (); | ; | return 0; | } configure:18099: g++-4.2 -o conftest -O3 -Wall -openmp -Werror=format-security -Wall -Wformat -Wformat-security -W -D_FORTIFY_SOURCE=2 -I/Volumes/blue/mp-inkscape/with-a-long-long-long-directory-name/include -L/Volumes/blue/mp-inkscape/with-a-long-long-long-directory-name/lib conftest.cpp >&5 ld: unknown option: -openmp collect2: ld returned 1 exit status configure:18099: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "inkscape" | #define PACKAGE_TARNAME "inkscape" | #define PACKAGE_VERSION "0.48+devel" | #define PACKAGE_STRING "inkscape 0.48+devel" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define PACKAGE "inkscape" | #define VERSION "0.48+devel" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define STDC_HEADERS 1 | #define HAVE_TR1_UNORDERED_SET 1 | #define HAVE_BOOST_UNORDERED_SET 1 | #define HAVE_EXT_HASH_SET 1 | #define GETTEXT_PACKAGE "inkscape" | #define HAVE_LOCALE_H 1 | #define HAVE_LC_MESSAGES 1 | #define HAVE_BIND_TEXTDOMAIN_CODESET 1 | #define HAVE_GETTEXT 1 | #define HAVE_DCGETTEXT 1 | #define ENABLE_NLS 1 | /* end confdefs.h. */ | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | #ifdef __cplusplus | extern "C" | #endif | char omp_set_num_threads (); | int | main () | { | return omp_set_num_threads (); | ; | return 0; | } configure:18099: g++-4.2 -o conftest -O3 -Wall -mp -Werror=format-security -Wall -Wformat -Wformat-security -W -D_FORTIFY_SOURCE=2 -I/Volumes/blue/mp-inkscape/with-a-long-long-long-directory-name/include -L/Volumes/blue/mp-inkscape/with-a-long-long-long-directory-name/lib conftest.cpp >&5 cc1plus: error: unrecognized command line option "-mp" configure:18099: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "inkscape" | #define PACKAGE_TARNAME "inkscape" | #define PACKAGE_VERSION "0.48+devel" | #define PACKAGE_STRING "inkscape 0.48+devel" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define PACKAGE "inkscape" | #define VERSION "0.48+devel" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define STDC_HEADERS 1 | #define HAVE_TR1_UNORDERED_SET 1 | #define HAVE_BOOST_UNORDERED_SET 1 | #define HAVE_EXT_HASH_SET 1 | #define GETTEXT_PACKAGE "inkscape" | #define HAVE_LOCALE_H 1 | #define HAVE_LC_MESSAGES 1 | #define HAVE_BIND_TEXTDOMAIN_CODESET 1 | #define HAVE_GETTEXT 1 | #define HAVE_DCGETTEXT 1 | #define ENABLE_NLS 1 | /* end confdefs.h. */ | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | #ifdef __cplusplus | extern "C" | #endif | char omp_set_num_threads (); | int | main () | { | return omp_set_num_threads (); | ; | return 0; | } configure:18099: g++-4.2 -o conftest -O3 -Wall -xopenmp -Werror=format-security -Wall -Wformat -Wformat-security -W -D_FORTIFY_SOURCE=2 -I/Volumes/blue/mp-inkscape/with-a-long-long-long-directory-name/include -L/Volumes/blue/mp-inkscape/with-a-long-long-long-directory-name/lib conftest.cpp >&5 i686-apple-darwin9-g++-4.2.1: language openmp not recognized i686-apple-darwin9-g++-4.2.1: language openmp not recognized ld warning: in conftest.cpp, file is not of required architecture Undefined symbols: "_main", referenced from: start in crt1.10.5.o ld: symbol(s) not found collect2: ld returned 1 exit status configure:18099: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "inkscape" | #define PACKAGE_TARNAME "inkscape" | #define PACKAGE_VERSION "0.48+devel" | #define PACKAGE_STRING "inkscape 0.48+devel" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define PACKAGE "inkscape" | #define VERSION "0.48+devel" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define STDC_HEADERS 1 | #define HAVE_TR1_UNORDERED_SET 1 | #define HAVE_BOOST_UNORDERED_SET 1 | #define HAVE_EXT_HASH_SET 1 | #define GETTEXT_PACKAGE "inkscape" | #define HAVE_LOCALE_H 1 | #define HAVE_LC_MESSAGES 1 | #define HAVE_BIND_TEXTDOMAIN_CODESET 1 | #define HAVE_GETTEXT 1 | #define HAVE_DCGETTEXT 1 | #define ENABLE_NLS 1 | /* end confdefs.h. */ | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | #ifdef __cplusplus | extern "C" | #endif | char omp_set_num_threads (); | int | main () | { | return omp_set_num_threads (); | ; | return 0; | } configure:18099: g++-4.2 -o conftest -O3 -Wall -omp -Werror=format-security -Wall -Wformat -Wformat-security -W -D_FORTIFY_SOURCE=2 -I/Volumes/blue/mp-inkscape/with-a-long-long-long-directory-name/include -L/Volumes/blue/mp-inkscape/with-a-long-long-long-directory-name/lib conftest.cpp >&5 ld: unknown option: -omp collect2: ld returned 1 exit status configure:18099: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "inkscape" | #define PACKAGE_TARNAME "inkscape" | #define PACKAGE_VERSION "0.48+devel" | #define PACKAGE_STRING "inkscape 0.48+devel" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define PACKAGE "inkscape" | #define VERSION "0.48+devel" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define STDC_HEADERS 1 | #define HAVE_TR1_UNORDERED_SET 1 | #define HAVE_BOOST_UNORDERED_SET 1 | #define HAVE_EXT_HASH_SET 1 | #define GETTEXT_PACKAGE "inkscape" | #define HAVE_LOCALE_H 1 | #define HAVE_LC_MESSAGES 1 | #define HAVE_BIND_TEXTDOMAIN_CODESET 1 | #define HAVE_GETTEXT 1 | #define HAVE_DCGETTEXT 1 | #define ENABLE_NLS 1 | /* end confdefs.h. */ | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | #ifdef __cplusplus | extern "C" | #endif | char omp_set_num_threads (); | int | main () | { | return omp_set_num_threads (); | ; | return 0; | } configure:18099: g++-4.2 -o conftest -O3 -Wall -qsmp=omp -Werror=format-security -Wall -Wformat -Wformat-security -W -D_FORTIFY_SOURCE=2 -I/Volumes/blue/mp-inkscape/with-a-long-long-long-directory-name/include -L/Volumes/blue/mp-inkscape/with-a-long-long-long-directory-name/lib conftest.cpp >&5 Undefined symbols: "_omp_set_num_threads", referenced from: _main in ccfRoEUD.o ld: symbol(s) not found collect2: ld returned 1 exit status configure:18099: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "inkscape" | #define PACKAGE_TARNAME "inkscape" | #define PACKAGE_VERSION "0.48+devel" | #define PACKAGE_STRING "inkscape 0.48+devel" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define PACKAGE "inkscape" | #define VERSION "0.48+devel" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define STDC_HEADERS 1 | #define HAVE_TR1_UNORDERED_SET 1 | #define HAVE_BOOST_UNORDERED_SET 1 | #define HAVE_EXT_HASH_SET 1 | #define GETTEXT_PACKAGE "inkscape" | #define HAVE_LOCALE_H 1 | #define HAVE_LC_MESSAGES 1 | #define HAVE_BIND_TEXTDOMAIN_CODESET 1 | #define HAVE_GETTEXT 1 | #define HAVE_DCGETTEXT 1 | #define ENABLE_NLS 1 | /* end confdefs.h. */ | | /* Override any GCC internal prototype to avoid an error. | Use char because int might match the return type of a GCC | builtin and then its argument prototype would still apply. */ | #ifdef __cplusplus | extern "C" | #endif | char omp_set_num_threads (); | int | main () | { | return omp_set_num_threads (); | ; | return 0; | }

Any luck resolving this? I've just run into this very same message and have no idea how to resolve.
Thx

W dniu 21 lipca 2010 23:11 użytkownik the Adib <theadib@...1439...> napisał:
I recall compiling it with GCC 4.4.1, and it worked fine. Did something change?
W dniu 21 lipca 2010 19:09 użytkownik ~suv <suv-sf@...58...> napisał:
no modifications of $IFS I'm aware of:
I have no idea what's wrong... probably something in ax_openmp.m4 is not accepted by OSX's bash.
Regards, Krzysztof
participants (4)
-
Krzysztof Kosiński
-
newguy
-
the Adib
-
~suv