Here are a couple of patches to make gcc-3.4.6/libobjc compile on my system: Gentoo on an AMD box with gcc-3.3.5. The problem was that the configure script was failing with this error: checking for gthread cflags... configure: error: not found because there is nothing to be found about GTHREAD in ../Makefile, contrary to what is said in the file THREADS: <quote> If you are compiling libobjc as part of GCC, the thr-objc.c backend is always used; this backend uses GCC's gthread code. The thread system is automatically configured when GCC is configured. Important: make sure you configure GCC using `--enable-threads' if you want threads ! </quote> I configured gcc-3.4.6 with --enable-threads so I guess this documentation is outdated. $ diff -Naur configure.in{.old,} --- configure.in.old 2006-03-21 21:38:41.000000000 -0800 +++ configure.in 2006-03-21 21:38:00.000000000 -0800 @@ -75,16 +75,16 @@ # Determine CFLAGS for gthread. -AC_CACHE_CHECK([for gthread cflags],objc_cv_gthread_flags, -[if test -f "$r"/gcc/Makefile -then - objc_cv_gthread_flags=`grep \^GTHREAD_FLAGS "$r"/gcc/Makefile | awk -F= '{ print $2 }'` -else - AC_MSG_ERROR([not found]) -fi]) -GTHREAD_FLAGS=$objc_cv_gthread_flags -AC_SUBST(GTHREAD_FLAGS) - +dnl AC_CACHE_CHECK([for gthread cflags],objc_cv_gthread_flags, +dnl [if test -f "$r"/gcc/Makefile +dnl then +dnl objc_cv_gthread_flags=`grep \^GTHREAD_FLAGS "$r"/gcc/Makefile | awk -F= '{ print $2 }'` +dnl else +dnl AC_MSG_ERROR([not found]) +dnl fi]) +dnl GTHREAD_FLAGS=$objc_cv_gthread_flags +dnl AC_SUBST(GTHREAD_FLAGS) + AC_ARG_ENABLE(objc-gc, [ --enable-objc-gc enable the use of Boehm's garbage collector with the GNU Objective-C runtime.], $ diff -Naur Makefile.in{.old,} --- Makefile.in.old 2006-03-21 21:47:16.000000000 -0800 +++ Makefile.in 2006-03-21 21:47:19.000000000 -0800 @@ -69,7 +69,7 @@ CC = @CC@ CFLAGS = @CFLAGS@ WARN_CFLAGS = -W -Wall -Wwrite-strings -Wstrict-prototypes -GTHREAD_FLAGS=@GTHREAD_FLAGS@ +#GTHREAD_FLAGS=@GTHREAD_FLAGS@ ALL_CFLAGS = -I. -I$(srcdir) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(WARN_CFLAGS) \ $(GTHREAD_FLAGS) -DIN_GCC -DIN_TARGET_LIBS -fno-strict-aliasing Now it configures and compiles just fine.
Can you attach the config.log from the libobjc subdirectory as this failure does not make sense? -- Pinski a libobjc maintainer
Also how did you configure GCC?
And GTHREAD is defined in gcc/Makefile: GTHREAD_FLAGS=@gthread_flags@
And the readme is still correct in that thr-objc.c is still used.
Subject: Re: Checking for gthread causes configure script to fail Here it is. Does it help? On 22 Mar 2006 06:08:38 -0000, pinskia at gcc dot gnu dot org <gcc-bugzilla@gcc.gnu.org> wrote: > > > ------- Comment #1 from pinskia at gcc dot gnu dot org 2006-03-22 06:08 ------- > Can you attach the config.log from the libobjc subdirectory as this failure > does not make sense? > > -- Pinski > a libobjc maintainer > > > -- > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26794 > > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. >
Created attachment 11086 [details] config.log
I should note this works for everyone else. Is this a modified version of GCC that you are compiling? Can you attach Makefile from the gcc subdirectory?
Subject: Re: Checking for gthread causes configure script to fail Sure, but it doesn't tell you what to do if the configure script fails saying that it can't find gthread. On 22 Mar 2006 06:13:50 -0000, pinskia at gcc dot gnu dot org <gcc-bugzilla@gcc.gnu.org> wrote: > > > ------- Comment #4 from pinskia at gcc dot gnu dot org 2006-03-22 06:13 ------- > And the readme is still correct in that thr-objc.c is still used. > > > -- > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26794 > > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. >
Subject: Re: Checking for gthread causes configure script to fail On Mar 22, 2006, at 1:27 AM, issac dot trotts at gmail dot com wrote: > > Sure, but it doesn't tell you what to do if the configure script fails > saying that it can't find gthread. If it does not find gthread something else is way wrong. -- Pinski
Subject: Re: Checking for gthread causes configure script to fail OK, you're right. I guess the $r variable (used in the path "$r"/gcc/Makefile) is not being set correctly in the libobjc configure script. Is this a bug or did I do something wrong? On 22 Mar 2006 06:11:57 -0000, pinskia at gcc dot gnu dot org <gcc-bugzilla@gcc.gnu.org> wrote: > > > ------- Comment #3 from pinskia at gcc dot gnu dot org 2006-03-22 06:11 ------- > And GTHREAD is defined in gcc/Makefile: > GTHREAD_FLAGS=@gthread_flags@ > > > -- > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26794 > > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. >
Subject: Re: Checking for gthread causes configure script to fail Sure, here it is. I'm also attaching libobjc/configure{,.in}. On 22 Mar 2006 06:26:54 -0000, pinskia at gcc dot gnu dot org <gcc-bugzilla@gcc.gnu.org> wrote: > > > ------- Comment #7 from pinskia at gcc dot gnu dot org 2006-03-22 06:26 ------- > I should note this works for everyone else. Is this a modified version of GCC > that you are compiling? > Can you attach Makefile from the gcc subdirectory? > > > -- > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26794 > > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. >
Created attachment 11087 [details] Makefile
Created attachment 11088 [details] configure.in
Created attachment 11089 [details] configure
$r is setup by the toplevel Makefile: configure-target-libobjc: $(TARGET_SUBDIR)/libobjc/multilib.out @test ! -f $(TARGET_SUBDIR)/libobjc/Makefile || exit 0; \ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libobjc ; \ r=`${PWD_COMMAND}`; export r; \ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ $(SET_LIB_PATH) \ AR="$(AR_FOR_TARGET)"; export AR; \ AS="$(AS_FOR_TARGET)"; export AS; \ CC="$(CC_FOR_TARGET)"; export CC; \ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \ CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \ CXX="$(CXX_FOR_TARGET)"; export CXX; \ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ LD="$(LD_FOR_TARGET)"; export LD; \ LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ NM="$(NM_FOR_TARGET)"; export NM; \ RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ SET_GCC_LIB_PATH_CMD="@SET_GCC_LIB_PATH@"; export SET_GCC_LIB_PATH_CMD; \ @SET_GCC_LIB_PATH@ \ echo Configuring in $(TARGET_SUBDIR)/libobjc; \ cd "$(TARGET_SUBDIR)/libobjc" || exit 1; \ case $(srcdir) in \ ....
So something is really wrong. How did you configure GCC and build GCC.
Subject: Re: Checking for gthread causes configure script to fail I did this: $ cd ~/downloads/gcc-3.4.6 $ ./configure --enable-threads && make $ cd libobjc $ ./configure Did I leave something out? On 22 Mar 2006 06:43:21 -0000, pinskia at gcc dot gnu dot org <gcc-bugzilla@gcc.gnu.org> wrote: > > > ------- Comment #16 from pinskia at gcc dot gnu dot org 2006-03-22 06:43 ------- > So something is really wrong. > How did you configure GCC and build GCC. > > > -- > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26794 > > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. >
(In reply to comment #17) > Subject: Re: Checking for gthread causes configure script to fail > > I did this: > > $ cd ~/downloads/gcc-3.4.6 > $ ./configure --enable-threads && make > $ cd libobjc > $ ./configure Oh that is the issue, libobjc is configured automatically and is done correctly from the toplevel so you messing up by not following the instructions. All you need to do to configure GCC and build all of GCC is: > $ cd ~/downloads/gcc-3.4.6 > $ ./configure --enable-threads && make Though really you should be configuring in a different directory than the source directory.
Subject: Re: Checking for gthread causes configure script to fail On 22 Mar 2006 06:55:53 -0000, pinskia at gcc dot gnu dot org <gcc-bugzilla@gcc.gnu.org> wrote: > > > ------- Comment #18 from pinskia at gcc dot gnu dot org 2006-03-22 06:55 ------- > (In reply to comment #17) > > Subject: Re: Checking for gthread causes configure script to fail > > > > I did this: > > > > $ cd ~/downloads/gcc-3.4.6 > > $ ./configure --enable-threads && make > > $ cd libobjc > > $ ./configure > > Oh that is the issue, libobjc is configured automatically and is done correctly > from the toplevel so you messing up by not following the instructions. > > All you need to do to configure GCC and build all of GCC is: > > $ cd ~/downloads/gcc-3.4.6 > > $ ./configure --enable-threads && make > > Though really you should be configuring in a different directory than the > source directory. OK, I just read the directions in the INSTALL directory and came up with this: cd ~/downloads mkdir objdir cd objdir ../gcc-3.4.6/configure --enable-languages=c,objc --enable-threads --enable-objc-gc make bootstrap It configured and built without any problems. Thanks very much for your help, and sorry about the false alarm. Issac