From: Alexander S. <ash...@gm...> - 2009-07-10 15:14:58
|
Hello, On Fri, 10 Jul 2009 07:08:23 +0800 JonY <10...@gm...> wrote: > > Creating library file: .libs/libgomp-1.dll > > libtool: link: (cd ".libs"&& rm -f "libgomp.lib"&& ln -s "libgomp-1.dll" "libgomp.lib") > > libtool: link: /opt/cross-w32/i386-pc-mingw32/bin/ar rc .libs/libgomp.lib alloc.o barrier.o critical.o env.o error.o iter.o iter_ull.o loop.o loop_ull.o ordered.o parallel.o sections.o single.o task.o team.o work.o lock.o mutex.o proc.o sem.o bar.o ptrlock.o time.o fortran.o affinity.o > > /opt/cross-w32/i386-pc-mingw32/bin/ar: .libs/libgomp.lib: File format not recognized > > make[4]: *** [libgomp.la] Error 1 > > make[4]: Leaving directory `/0S/a11/0build/11.1-BUILD/mingw32-gcc-4.4.0/build/i386-pc-mingw32/libgomp' > > make[3]: *** [all-recursive] Error 1 > > make[3]: Leaving directory `/0S/a11/0build/11.1-BUILD/mingw32-gcc-4.4.0/build/i386-pc-mingw32/libgomp' > > make[2]: *** [all] Error 2 > > make[2]: Leaving directory `/0S/a11/0build/11.1-BUILD/mingw32-gcc-4.4.0/build/i386-pc-mingw32/libgomp' > > make[1]: *** [all-target-libgomp] Error 2 > > make[1]: Leaving directory `/0S/a11/0build/11.1-BUILD/mingw32-gcc-4.4.0/build' > > make: *** [all] Error 2 > Hi, > I'm not sure what really happened, but you can fix this by editing > "libtool" in > "/0S/a11/0build/11.1-BUILD/mingw32-gcc-4.4.0/build/i386-pc-mingw32/libgomp". > > Search for ".lib", and replace it with ".dll.a". Your first result > should be line you need to edit. Sorry, I don't remember the line number. Thanks a lot for the hint! The thing is, while it does compile now, I'm not sure it's correct. These are the relevant files in libgomp/.libs: -rwxr-xr-x 1 root root 262318 Jul 10 18:54 libgomp-1.dll lrwxrwxrwx 1 root root 13 Jul 10 18:54 libgomp.dll.a -> libgomp-1.dll lrwxrwxrwx 1 root root 13 Jul 10 18:54 libgomp.la -> ../libgomp.la -rw-r--r-- 1 root root 1124 Jul 10 18:54 libgomp.lai -rw-r--r-- 1 root root 284660 Jul 10 18:54 libgomp.lib libgomp.la still says # The name of the static archive. old_library='libgomp.lib' The .lib file seems to be a static library. There's no import library anywhere. The sibling directory, libssp, seems to have everything correct: -rwxr-xr-x 1 root root 39408 Jul 10 18:54 libssp-0.dll -rw-r--r-- 1 root root 33196 Jul 10 18:54 libssp.a -rw-r--r-- 1 root root 8114 Jul 10 18:54 libssp.dll.a lrwxrwxrwx 1 root root 12 Jul 10 18:54 libssp.la -> ../libssp.la -rw-r--r-- 1 root root 1093 Jul 10 18:54 libssp.lai -rw-r--r-- 1 root root 1996 Jul 10 16:56 libssp_nonshared.a lrwxrwxrwx 1 root root 22 Jul 10 16:56 libssp_nonshared.la -> ../libssp_nonshared.la -rw-r--r-- 1 root root 1092 Jul 10 16:56 libssp_nonshared.lai I copied the libtool file from libssp to libgomp, and now the files seem to be correct: -rwxr-xr-x 1 root root 262318 Jul 10 19:10 libgomp-1.dll -rw-r--r-- 1 root root 284660 Jul 10 19:10 libgomp.a -rw-r--r-- 1 root root 143514 Jul 10 19:10 libgomp.dll.a lrwxrwxrwx 1 root root 13 Jul 10 19:10 libgomp.la -> ../libgomp.la -rw-r--r-- 1 root root 1108 Jul 10 19:10 libgomp.lai So, is this the right way to proceed? I'm also interested in patching the original gcc source tree (as opposed to build tree), because I'm actually trying to build an rpm package. Thanks a lot, Alexander |