Re: [gcc] can't build current trunk: ar: .libs/libgomp.lib: File format not recognized
On Mon, Jan 25, 2010 at 12:58 PM, Paolo Bonzini wrote: > >> This probably is a new version of PR41418 then. We have the problem >> that >> fortran is turned on in --enable-languages, so libgomp configure expects >> the >> fortran compiler to be available. > > Does this fix it for you? > > Index: configure.ac > === > --- configure.ac (revision 155240) > +++ configure.ac (working copy) > @@ -146,7 +146,11 @@ case `echo $GFORTRAN` in > -* | no* ) > FC=no ;; > *) > - FC="$GFORTRAN" ;; > + if test -x "$GFORTRAN"; then > + FC="$GFORTRAN" > + else > + FC=no > + fi ;; > esac > AC_PROG_FC(gfortran) > FCFLAGS="$FCFLAGS -Wall" > > (untested) > > Paolo > This caused: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42872 -- H.J.
Re: [gcc] can't build current trunk: ar: .libs/libgomp.lib: File format not recognized
2010/1/26 Dave Korn: > On 25/01/2010 22:38, Dave Korn wrote: >> > On 25/01/2010 20:58, Paolo Bonzini wrote: > >>> >> Does this fix it for you? >> > >> > That succeeded for "rm -rf i686-pc-cygwin/libgomp; make >> > configure-target-libgomp all-target-libgomp". I'll leave a full bootstrap >> > running overnight > > That completed fine. I confirm. -- Cheers, /ChJ
Re: [gcc] can't build current trunk: ar: .libs/libgomp.lib: File format not recognized
On 25/01/2010 22:38, Dave Korn wrote: > > On 25/01/2010 20:58, Paolo Bonzini wrote: >> >> Does this fix it for you? > > > > That succeeded for "rm -rf i686-pc-cygwin/libgomp; make > > configure-target-libgomp all-target-libgomp". I'll leave a full bootstrap > > running overnight That completed fine. cheers, DaveK
Re: [gcc] can't build current trunk: ar: .libs/libgomp.lib: File format not recognized
On 25/01/2010 20:58, Paolo Bonzini wrote: > >>This probably is a new version of PR41418 then. We have the >> problem that >> fortran is turned on in --enable-languages, so libgomp configure >> expects the >> fortran compiler to be available. > > Does this fix it for you? That succeeded for "rm -rf i686-pc-cygwin/libgomp; make configure-target-libgomp all-target-libgomp". I'll leave a full bootstrap running overnight but it looks sound to me. cheers, DaveK
Re: [gcc] can't build current trunk: ar: .libs/libgomp.lib: File format not recognized
This probably is a new version of PR41418 then. We have the problem that fortran is turned on in --enable-languages, so libgomp configure expects the fortran compiler to be available. Does this fix it for you? Index: configure.ac === --- configure.ac(revision 155240) +++ configure.ac(working copy) @@ -146,7 +146,11 @@ case `echo $GFORTRAN` in -* | no* ) FC=no ;; *) -FC="$GFORTRAN" ;; +if test -x "$GFORTRAN"; then + FC="$GFORTRAN" +else + FC=no +fi ;; esac AC_PROG_FC(gfortran) FCFLAGS="$FCFLAGS -Wall" (untested) Paolo
Re: [gcc] can't build current trunk: ar: .libs/libgomp.lib: File format not recognized
On 25/01/2010 20:19, Dave Korn wrote: > am bootstrapping r156219 ATM. Not finished yet, but I may have seen a problem already: make[4]: Leaving directory `/gnu/gcc/obj2/i686-pc-cygwin/libgcc' make[3]: Leaving directory `/gnu/gcc/obj2/i686-pc-cygwin/libgcc' mkdir -p -- i686-pc-cygwin/libgomp Checking multilib configuration for libgomp... Configuring stage 1 in i686-pc-cygwin/libgomp configure: creating cache ./config.cache checking for --enable-version-specific-runtime-libs... yes checking for --enable-generated-files-in-srcdir... no checking build system type... i686-pc-cygwin checking host system type... i686-pc-cygwin checking target system type... i686-pc-cygwin checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for i686-pc-cygwin-gcc... /gnu/gcc/obj2/./gcc/xgcc -B/gnu/gcc/obj2/./gcc/ -B/opt/gcc-tools/i686-pc-cygwin/bin/ -B/opt/gcc-tools/i686-pc-cygwin/lib/ -isystem /opt/gcc-tools/i686-pc-cygwin/include -isystem /opt/gcc-tools/i686-pc-cygwin/sys-include checking for C compiler default output file name... a.exe checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... .exe checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether /gnu/gcc/obj2/./gcc/xgcc -B/gnu/gcc/obj2/./gcc/ -B/opt/gcc-tools/i686-pc-cygwin/bin/ -B/opt/gcc-tools/i686-pc-cygwin/lib/ -isystem /opt/gcc-tools/i686-pc-cygwin/include -isystem /opt/gcc-tools/i686-pc-cygwin/sys-includeaccepts -g... yes checking for /gnu/gcc/obj2/./gcc/xgcc -B/gnu/gcc/obj2/./gcc/ -B/opt/gcc-tools/i686-pc-cygwin/bin/ -B/opt/gcc-tools/i686-pc-cygwin/lib/ -isystem /opt/gcc-tools/i686-pc-cygwin/include -isystem /opt/gcc-tools/i686-pc-cygwin/sys-includeoption to accept ISO C89... none needed checking for style of include used by make... GNU checking dependency style of /gnu/gcc/obj2/./gcc/xgcc -B/gnu/gcc/obj2/./gcc/ -B/opt/gcc-tools/i686-pc-cygwin/bin/ -B/opt/gcc-tools/i686-pc-cygwin/lib/ -isystem /opt/gcc-tools/i686-pc-cygwin/include -isystem /opt/gcc-tools/i686-pc-cygwin/sys-include ... gcc3 checking for i686-pc-cygwin-ar... ar checking for i686-pc-cygwin-ranlib... ranlib checking for perl... /usr/bin/perl checking whether make sets $(MAKE)... (cached) yes checking for makeinfo... makeinfo --split-size=500 --split-size=500 checking for modern makeinfo... yes checking how to print strings... printf checking for a sed that does not truncate output... /usr/bin/sed checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for fgrep... /usr/bin/grep -F checking for ld used by /gnu/gcc/obj2/./gcc/xgcc -B/gnu/gcc/obj2/./gcc/ -B/opt/gcc-tools/i686-pc-cygwin/bin/ -B/opt/gcc-tools/i686-pc-cygwin/lib/ -isystem /opt/gcc-tools/i686-pc-cygwin/include -isystem /opt/gcc-tools/i686-pc-cygwin/sys-include ... /gnu/gcc/obj2/./gcc/collect-ld checking if the linker (/gnu/gcc/obj2/./gcc/collect-ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /gnu/gcc/obj2/./gcc/nm checking the name lister (/gnu/gcc/obj2/./gcc/nm) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 8192 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking for /gnu/gcc/obj2/./gcc/collect-ld option to reload object files... -r checking for i686-pc-cygwin-objdump... objdump checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL checking for i686-pc-cygwin-ar... (cached) ar checking for i686-pc-cygwin-strip... strip checking for i686-pc-cygwin-ranlib... (cached) ranlib checking command to parse /gnu/gcc/obj2/./gcc/nm output from /gnu/gcc/obj2/./gcc/xgcc -B/gnu/gcc/obj2/./gcc/ -B/opt/gcc-tools/i686-pc-cygwin/bin/ -B/opt/gcc-tools/i686-pc-cygwin/lib/ -isystem /opt/gcc-tools/i686-pc-cygwin/include -isystem /opt/gcc-tools/i686-pc-cygwin/sys-includeobject... ok checking how to run the C preprocessor... /gnu/gcc/obj2/./gcc/xgcc -B/gnu/gcc/obj2/./gcc/ -B/opt/gcc-tools/i686-pc-cygwin/bin/ -B/opt/gcc-tools/i686-pc-cygwin/lib/ -isystem /opt/gcc-tools/i686-pc-cygwin/include -isystem /opt/gcc-tools/i686-pc-cygwin/sys-include-E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if /gnu/gcc/obj2/./gcc/xgcc -B/gnu/gcc/obj2/./gcc/ -B/opt/gcc-tools/i686-pc-cygwin/bin/ -B/opt/gcc-tools/i686-pc-cygwin/lib/ -isystem /opt/gcc-tools/
Re: [gcc] can't build current trunk: ar: .libs/libgomp.lib: File format not recognized
On 25/01/2010 19:31, Joern Rennecke wrote: > Quoting Christian Joensson : > >> FWIW, I still get a problem, this: > > Could you show the log file from a successful libgomp build with a previous > version? > Did it usea different ar? It should look something like this: libtool: link: /gnu/gcc/obj-lto/./gcc/xgcc -B/gnu/gcc/obj-lto/./gcc/ -B/opt/gcc-tools/i686-pc-cygwin/bin/ -B/opt/gcc-tools/i686-pc-cygwin/lib/ -isystem /opt/gcc-tools/i686-pc-cygwin/include -isystem /opt/gcc-tools/i686-pc-cygwin/sys-include-shared .libs/alloc.o .libs/barrier.o .libs/critical.o .libs/env.o .libs/error.o .libs/iter.o .libs/iter_ull.o .libs/loop.o .libs/loop_ull.o .libs/ordered.o .libs/parallel.o .libs/sections.o .libs/single.o .libs/task.o .libs/team.o .libs/work.o .libs/lock.o .libs/mutex.o .libs/proc.o .libs/sem.o .libs/bar.o .libs/ptrlock.o .libs/time.o .libs/fortran.o .libs/affinity.o-pthread -Wl,-O1 -o .libs/cyggomp-1.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libgomp.dll.a xgcc: unrecognized option '-pthread' Creating library file: .libs/libgomp.dll.a libtool: link: ar rc .libs/libgomp.a 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 libtool: link: ranlib .libs/libgomp.a libtool: link: ( cd ".libs" && rm -f "libgomp.la" && ln -s "../libgomp.la" "libgomp.la" ) Libtool is definitely confused since it's not got the right 'cyg' prefix for the dll in CJ's version, and it's forgotten the .a suffix for the import library, meaning it'll overwrite (or be overwritten by) the DLL. I think we had something like this a while back when gomp was enabled but fortran not configured in. Hang on PR41418. Same symptoms. Haven't verified if there's a similar cause yet, am bootstrapping r156219 ATM. cheers, DaveK
Re: [gcc] can't build current trunk: ar: .libs/libgomp.lib: File format not recognized
Quoting Christian Joensson : FWIW, I still get a problem, this: Could you show the log file from a successful libgomp build with a previous version? Did it usea different ar?
Re: [gcc] can't build current trunk: ar: .libs/libgomp.lib: File format not recognized
2010/1/25 Joern Rennecke: > Quoting Dave Korn : > >> On 25/01/2010 14:04, Joern Rennecke wrote: >>> >>> Quoting Christian Joensson : > > -Xlinker .libs/libgomp-1.dll > xgcc: unrecognized option '-pthread' >>> >>> Oops, we can't actually always bootstrap libgomp - we shouldn't try if >>> it's >>> not in target_configdirs. >>> >>> Does the cygwin build work with the attached patch? >> >> Was this question and/or patch inspired by the "unrecognized option >> -pthread" warning above? > > Well, I though the reason why you ended up with an unrecognized type > libgomp-1.dll was that this diagnostic indicatde a serious problem. > >> Only we've always gotten that on cygwin and it's >> always been harmless up til now. > > So how is a build with r156189 different from a build with provious > revision? > (I'm not up-to-date with head, >> >> right now I'm >> still on r.156105 where the problem apparently arose at r.156189; I'll >> update >> to head and get a build going.) > > I've now committed the patch as r156218, but we'd still like to know if that > fixes cygwin builds. FWIW, I still get a problem, this: /bin/sh ./libtool --tag CC --mode=link /usr/local/src/trunk/objdir/./gcc/xgcc -B/usr/local/src/trunk/objdir/./gcc/ -B/usr/local/gnu/i686-pc-cygwin/bin/ -B/usr/local/gnu/i686-pc-cygwin/lib/ -isystem /usr/local/gnu/i686-pc-cygwin/include -isystem /usr/local/gnu/i686-pc-cygwin/sys-include-Wall -Werror -Wc,-pthread -g -O2 -Wl,-O1 -o libgomp.la -version-info 1:0:0 -no-undefined -bindir "/usr/local/gnu/bin" -rpath /usr/local/gnu/lib/gcc/i686-pc-cygwin/4.5.0 alloc.lo barrier.lo critical.lo env.lo error.lo iter.lo iter_ull.lo loop.lo loop_ull.lo ordered.lo parallel.lo sections.lo single.lo task.lo team.lo work.lo lock.lo mutex.lo proc.lo sem.lo bar.lo ptrlock.lo time.lo fortran.lo affinity.lo libtool: link: /usr/local/src/trunk/objdir/./gcc/xgcc -B/usr/local/src/trunk/objdir/./gcc/ -B/usr/local/gnu/i686-pc-cygwin/bin/ -B/usr/local/gnu/i686-pc-cygwin/lib/ -isystem /usr/local/gnu/i686-pc-cygwin/include -isystem /usr/local/gnu/i686-pc-cygwin/sys-include-shared .libs/alloc.o .libs/barrier.o .libs/critical.o .libs/env.o .libs/error.o .libs/iter.o .libs/iter_ull.o .libs/loop.o .libs/loop_ull.o .libs/ordered.o .libs/parallel.o .libs/sections.o .libs/single.o .libs/task.o .libs/team.o .libs/work.o .libs/lock.o .libs/mutex.o .libs/proc.o .libs/sem.o .libs/bar.o .libs/ptrlock.o .libs/time.o .libs/fortran.o .libs/affinity.o-pthread -Wl,-O1 -o .libs/libgomp-1.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libgomp-1.dll xgcc: unrecognized option '-pthread' Creating library file: .libs/libgomp-1.dll libtool: link: (cd ".libs" && rm -f "libgomp.lib" && ln -s "libgomp-1.dll" "libgomp.lib") libtool: link: 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 ar: .libs/libgomp.lib: File format not recognized make[5]: *** [libgomp.la] Error 1 make[5]: Leaving directory `/usr/local/src/trunk/objdir/i686-pc-cygwin/libgomp' make[4]: *** [all-recursive] Error 1 make[4]: Leaving directory `/usr/local/src/trunk/objdir/i686-pc-cygwin/libgomp' make[3]: *** [all] Error 2 make[3]: Leaving directory `/usr/local/src/trunk/objdir/i686-pc-cygwin/libgomp' make[2]: *** [all-stage1-target-libgomp] Error 2 make[2]: Leaving directory `/usr/local/src/trunk/objdir' make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory `/usr/local/src/trunk/objdir' make: *** [all] Error 2 (and, yes, I've been building with libgomp for quite a while on cygwin, and, yes, I do remember the pthread warning showing up before, mentioned it to Dave, and it hadn't caused me problems before to my understanding) -- Cheers, /ChJ
Re: [gcc] can't build current trunk: ar: .libs/libgomp.lib: File format not recognized
Quoting Dave Korn : On 25/01/2010 14:04, Joern Rennecke wrote: Quoting Christian Joensson : -Xlinker .libs/libgomp-1.dll xgcc: unrecognized option '-pthread' Oops, we can't actually always bootstrap libgomp - we shouldn't try if it's not in target_configdirs. Does the cygwin build work with the attached patch? Was this question and/or patch inspired by the "unrecognized option -pthread" warning above? Well, I though the reason why you ended up with an unrecognized type libgomp-1.dll was that this diagnostic indicatde a serious problem. Only we've always gotten that on cygwin and it's always been harmless up til now. So how is a build with r156189 different from a build with provious revision? > (I'm not up-to-date with head, right now I'm still on r.156105 where the problem apparently arose at r.156189; I'll update to head and get a build going.) I've now committed the patch as r156218, but we'd still like to know if that fixes cygwin builds.
Re: [gcc] can't build current trunk: ar: .libs/libgomp.lib: File format not recognized
On 25/01/2010 14:04, Joern Rennecke wrote: > Quoting Christian Joensson : >>> -Xlinker .libs/libgomp-1.dll >>> xgcc: unrecognized option '-pthread' > > Oops, we can't actually always bootstrap libgomp - we shouldn't try if it's > not in target_configdirs. > > Does the cygwin build work with the attached patch? Was this question and/or patch inspired by the "unrecognized option -pthread" warning above? Only we've always gotten that on cygwin and it's always been harmless up til now. (I'm not up-to-date with head, right now I'm still on r.156105 where the problem apparently arose at r.156189; I'll update to head and get a build going.) cheers, DaveK
Re: [gcc] can't build current trunk: ar: .libs/libgomp.lib: File format not recognized
On 01/25/2010 03:04 PM, Joern Rennecke wrote: Quoting Christian Joensson : -Xlinker .libs/libgomp-1.dll xgcc: unrecognized option '-pthread' Oops, we can't actually always bootstrap libgomp - we shouldn't try if it's not in target_configdirs. Ok. Paolo
Re: [gcc] can't build current trunk: ar: .libs/libgomp.lib: File format not recognized
Quoting Christian Joensson : -Xlinker .libs/libgomp-1.dll xgcc: unrecognized option '-pthread' Oops, we can't actually always bootstrap libgomp - we shouldn't try if it's not in target_configdirs. Does the cygwin build work with the attached patch? 2010-01-23 Joern Rennecke PR libstdc++/36101, PR libstdc++/42813 * configure.ac (bootstrap_target_libs): Make inclusion of target-libgomp conditional on libgomb being in target_configdirs. * configure: Regenerate. Index: configure.ac === --- configure.ac(revision 156191) +++ configure.ac(working copy) @@ -1744,7 +1744,7 @@ fi stage1_languages=,c, # Target libraries that we bootstrap. -bootstrap_target_libs=,target-libgcc,target-libgomp, +bootstrap_target_libs=,target-libgcc, # Figure out what language subdirectories are present. # Look if the user specified --enable-languages="..."; if not, use @@ -2540,6 +2540,11 @@ fi target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'` build_configdirs=`echo "${build_configdirs}" | sed -e 's/build-//g'` +# If we are building libgomp, bootstrap it. +if echo " ${target_configdirs} " | grep " libgomp " > /dev/null 2>&1 ; then + bootstrap_target_libs=${bootstrap_target_libs}target-libgomp, +fi + # Determine whether gdb needs tk/tcl or not. # Use 'maybe' since enable_gdbtk might be true even if tk isn't available # and in that case we want gdb to be built without tk. Ugh! Index: configure === --- configure (revision 156191) +++ configure (working copy) @@ -6545,7 +6545,7 @@ fi stage1_languages=,c, # Target libraries that we bootstrap. -bootstrap_target_libs=,target-libgcc,target-libgomp, +bootstrap_target_libs=,target-libgcc, # Figure out what language subdirectories are present. # Look if the user specified --enable-languages="..."; if not, use @@ -7394,6 +7394,11 @@ fi target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'` build_configdirs=`echo "${build_configdirs}" | sed -e 's/build-//g'` +# If we are building libgomp, bootstrap it. +if echo " ${target_configdirs} " | grep " libgomp " > /dev/null 2>&1 ; then + bootstrap_target_libs=${bootstrap_target_libs}target-libgomp, +fi + # Determine whether gdb needs tk/tcl or not. # Use 'maybe' since enable_gdbtk might be true even if tk isn't available # and in that case we want gdb to be built without tk. Ugh!
Re: [gcc] can't build current trunk: ar: .libs/libgomp.lib: File format not recognized
Should have gone here I suppose... 2010/1/25 Christian Joensson: > Hi Dave. > > I see you're busy with your cygwin improvement branch... however, I > just want to give you a heads up, as for a some time, I can't build > gcc trunk, there's something with libgomp that's quite wrong. > > libtool: link: /usr/local/src/trunk/objdir/./gcc/xgcc > -B/usr/local/src/trunk/objdir/./gcc/ > -B/usr/local/gnu/i686-pc-cygwin/bin/ > -B/usr/local/gnu/i686-pc-cygwin/lib/ -isystem > /usr/local/gnu/i686-pc-cygwin/include -isystem > /usr/local/gnu/i686-pc-cygwin/sys-include -shared .libs/alloc.o > .libs/barrier.o .libs/critical.o .libs/env.o .libs/error.o > .libs/iter.o .libs/iter_ull.o .libs/loop.o .libs/loop_ull.o > .libs/ordered.o .libs/parallel.o .libs/sections.o .libs/single.o > .libs/task.o .libs/team.o .libs/work.o .libs/lock.o .libs/mutex.o > .libs/proc.o .libs/sem.o .libs/bar.o .libs/ptrlock.o .libs/time.o > .libs/fortran.o .libs/affinity.o -pthread -Wl,-O1 -o > .libs/libgomp-1.dll -Wl,--enable-auto-image-base -Xlinker --out-implib > -Xlinker .libs/libgomp-1.dll > xgcc: unrecognized option '-pthread' > Creating library file: .libs/libgomp-1.dll > libtool: link: (cd ".libs" && rm -f "libgomp.lib" && ln -s > "libgomp-1.dll" "libgomp.lib") > libtool: link: 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 > ar: .libs/libgomp.lib: File format not recognized > make[5]: *** [libgomp.la] Error 1 > make[5]: Leaving directory > `/usr/local/src/trunk/objdir/i686-pc-cygwin/libgomp' > make[4]: *** [all-recursive] Error 1 > make[4]: Leaving directory > `/usr/local/src/trunk/objdir/i686-pc-cygwin/libgomp' > make[3]: *** [all] Error 2 > make[3]: Leaving directory > `/usr/local/src/trunk/objdir/i686-pc-cygwin/libgomp' > make[2]: *** [all-stage1-target-libgomp] Error 2 > make[2]: Leaving directory `/usr/local/src/trunk/objdir' > make[1]: *** [stage1-bubble] Error 2 > make[1]: Leaving directory `/usr/local/src/trunk/objdir' > make: *** [all] Error 2 > > I can't say for sure when this started happening, for me, 156188 seems > to work, and 156189 does not. -- Cheers, /ChJ