[Bug libgomp/39939] MinGW 4.3.0 fails to link sample programme.
--- Comment #13 from julian1844 at yahoo dot com 2009-05-04 06:23 --- (In reply to comment #12) Should I conclude that the MinGW site is now www.equation.com? (In reply to comment #11) (In reply to comment #9, comment #10) I did not build MinGW 4.3.0. I got it from the official MinGW site (gcc-4.3.0-20080502-mingw32-alpha). I have also found that on www.equation.com there are even newer versions (binaries), like 4.3.3 with OpenMP 2.5, 4.4.0 with OpenMP 3.0 and MinGW 4.5 compilation snapshot. They seem to work fine with OpenMP. Its a shame that www.equation.com doesn't tell us how to obtain their source code for the gcc, gdb ands make binaries. They aren't present on the official MinGW site. Why? No one has had put them there. Danny -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39939
[Bug libgomp/39939] MinGW 4.3.0 fails to link sample programme.
--- Comment #11 from julian1844 at yahoo dot com 2009-05-01 17:26 --- (In reply to comment #9, comment #10) I did not build MinGW 4.3.0. I got it from the official MinGW site (gcc-4.3.0-20080502-mingw32-alpha). I have also found that on www.equation.com there are even newer versions (binaries), like 4.3.3 with OpenMP 2.5, 4.4.0 with OpenMP 3.0 and MinGW 4.5 compilation snapshot. They seem to work fine with OpenMP. They aren't present on the official MinGW site. Why? (In reply to comment #6) (In reply to comment #4) Your libpthreads is doing something wrong. Re. comment 5 The command was actually gcc -fopemnp test.c -lgomp -o test.exe That command works for me with gcc 4.3.4, 4.4.0 and trunk In 4.4.0 and trunk, test.exe links against LIBGOMP-1.DLL which in turn resolves the pthread imports from PTHREADGCE2.DLL, which is distributed by the pthreads-win32 project http://sources.redhat.com/pthreads-win32/ My version of 4.3.4 has local mods. I'm not sure if the shared libgomp build was standard then. How did you build gcc-4.3.0? You need to add --enable-libgomp to configure and ensure that libpthread.a (note spelling) can be found. Danny -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39939
[Bug target/39939] MinGW 4.3.0 fails to link sample programme.
--- Comment #8 from julian1844 at yahoo dot com 2009-04-30 06:38 --- (In reply to comment #7) ok, mingw should be linking against libpthreads with -fopenmp (it should also be linking against libgomp also) I don't think libgomp has been ported to mingw yet. I wonder if the source code for libgomp is available. I'm looking for it about 5 days and I cannot find it. Have you got any idea? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39939
[Bug libgomp/39939] MinGW 4.3.0 fails to link sample programme.
--- Comment #5 from julian1844 at yahoo dot com 2009-04-30 04:42 --- Let us forget everything about libpthread. MinGW fails to link the sample programme at the command gcc -fopemnp test.c -gomp -o test.exe The error messages I get are: c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(parallel.o):(.text+0xe): undefin ed reference to `_imp__pthread_getspecific' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(parallel.o):(.text+0x46): undefi ned reference to `_imp__pthread_getspecific' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(parallel.o):(.text+0x5e): undefi ned reference to `_imp__pthread_getspecific' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(parallel.o):(.text+0x9e): undefi ned reference to `_imp__pthread_getspecific' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(team.o):(.text+0xf): undefined r eference to `_imp__pthread_key_create' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(team.o):(.text+0x22): undefined reference to `_imp__pthread_setspecific' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(team.o):(.text+0x34): undefined reference to `_imp__sem_init' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(team.o):(.text+0x55): undefined reference to `_imp__pthread_setspecific' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(team.o):(.text+0x66): undefined reference to `_imp__sem_init' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(team.o):(.text+0x16d): undefined reference to `_imp__pthread_getspecific' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(team.o):(.text+0x1a1): undefined reference to `_imp__pthread_mutex_destroy' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(team.o):(.text+0x1b6): undefined reference to `_imp__sem_destroy' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(team.o):(.text+0x1e1): undefined reference to `_imp__pthread_getspecific' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(team.o):(.text+0x209): undefined reference to `_imp__pthread_mutex_init' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(team.o):(.text+0x268): undefined reference to `_imp__sem_init' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(team.o):(.text+0x2dd): undefined reference to `_imp__pthread_attr_init' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(team.o):(.text+0x2e8): undefined reference to `_imp__pthread_attr_setdetachstate' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(team.o):(.text+0x2f9): undefined reference to `_imp__pthread_attr_getstacksize' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(team.o):(.text+0x37f): undefined reference to `_imp__pthread_create' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(team.o):(.text+0x3a7): undefined reference to `_imp__pthread_attr_destroy' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(team.o):(.text+0x4e5): undefined reference to `_imp__pthread_attr_setstacksize' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(env.o):(.text+0x4ad): undefined reference to `_imp__pthread_attr_init' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(env.o):(.text+0x4bc): undefined reference to `_imp__pthread_attr_setdetachstate' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(env.o):(.text+0x562): undefined reference to `_imp__pthread_attr_setstacksize' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(bar.o):(.text+0x11): undefined r eference to `_imp__pthread_mutex_lock' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(bar.o):(.text+0x20): undefined r eference to `_imp__pthread_mutex_unlock' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(bar.o):(.text+0x56): undefined r eference to `_imp__sem_post' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(bar.o):(.text+0x74): undefined r eference to `_imp__pthread_mutex_unlock' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(bar.o):(.text+0x89): undefined r eference to `_imp__pthread_mutex_unlock' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(bar.o):(.text+0xa5): undefined r eference to `_imp__pthread_mutex_lock' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(bar.o):(.text+0xd0): undefined r eference to `_imp__sem_post' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(bar.o):(.text+0xed): undefined r eference to `_imp__pthread_mutex_lock' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(bar.o):(.text+0x122): undefined reference to `_imp__pthread_mutex_lock' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(bar.o):(.text+0x12b): undefined reference to `_imp__pthread_mutex_unlock' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(bar.o):(.text+0x134): undefined reference to `_imp__pthread_mutex_destroy' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(bar.o):(.text+0x14a): undefined reference to `_imp__sem_destroy' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(bar.o):(.text+0x174): undefined reference to `_imp__pthread_mutex_init' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(bar.o):(.text+0x191): undefined reference to `_imp__sem_init' c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(sem.o):(.text+0xa): undefined re ference to `_imp__sem_wait' collect2: ld returned 1 exit status My question is how
[Bug libgomp/39939] MinGW 4.3.0 fails to link sample programme.
--- Comment #6 from julian1844 at yahoo dot com 2009-04-30 04:49 --- (In reply to comment #4) Your libpthreads is doing something wrong. Re. comment 5 The command was actually gcc -fopemnp test.c -lgomp -o test.exe -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39939
[Bug libgomp/39939] New: MinGW 4.3.0 fails to link sample programme.
Sample program test.c #include omp.h #include stdlib.h #include stdio.h int main() { #pragma omp parallel printf(Hello from thread %d, nthreads %d\n, omp_get_thread_num(), omp_get_num_threads()); return 0;} fails to link with MinGW 4.3.0 (windows xp sp2), command gcc -fopemnp test.c -lpthreads -o test.exe issuing error message c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(parallel.o):(.text+0xe): undefined reference to `_imp__pthread_getspecific' (more similar messages follow). Importing from dll expects prefix __imp__ instead. -- Summary: MinGW 4.3.0 fails to link sample programme. Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgomp AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: julian1844 at yahoo dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39939
[Bug libgomp/39939] MinGW 4.3.0 fails to link sample programme.
--- Comment #2 from julian1844 at yahoo dot com 2009-04-28 07:16 --- libpthread is needed to link libgomp, otherwise you get unresolved references like c:/mingw/bin/../lib/gcc/mingw32/4.3.0/libgomp.a(parallel.o):(.text+0xe): undefin ed reference to `_imp__pthread_getspecific'. Symbol pthread_getspecific is in libpthread. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39939
[Bug libgomp/39939] MinGW 4.3.0 fails to link sample programme.
--- Comment #3 from julian1844 at yahoo dot com 2009-04-28 07:23 --- (In reply to comment #1) Well libpthreads is not part of the GCC project. I posted my reply as comment #2. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39939