Problems compiing with g++ / c++

LLeweLLyn Reese llewelly@lifesupport.shutdown.com
Wed Mar 19 02:36:00 GMT 2003


"Anthony R. Mattke" <tonhe@adelphia.net> writes:

> I just reinstalled pth from gnu.org and did and ldconfig.. 
> 
> same luck !

I suspect pth intsalls itself with --prefix=/usr/local by default (as that is
    the default for almost all gnu software). Find out what the prefix
    is, and set your environment variables accordingly, before
    configuring glib, gtk, gnome, etc. (note, it is *not* sufficient
    to just set them and run 'make', after configureing; they must be
    set before configure is run.)

Environment variables:

C_INCLUDE_PATH=$C_INCLUDE_PATH:<prefix>/include
LIBRARY_PATH=$LIBRARY_PATH:<prefix>/lib

alternatively, read the configuration build directions for glib, gtk,
    gnome, etc, to discover if they provide a way to specify addtional
    CFLAGS, LDFLAGS, header or library search paths, or configure
    options to specify where to look for a threads lib.

where <prefix> is the directory you passed to --prefix when you
    configured pth .

> 
> 
> On Tue, 2003-03-18 at 18:48, LLeweLLyn Reese wrote:
> > "Anthony R. Mattke" <tonhe@adelphia.net> writes:
> > 
> > > I've just attempted recompling gcc 2.95.3.
> > > 
> > > I used this as my configure
> > > 
> > > --prefix=/usr
> > > --enable-shared 
> > > --with-gnu-ld
> > > --enable-threads
> > > --verbose
> > > --target=i386-slackware-linux
> > > --host=i386-slackware-linux
> > > --with-gxx-include-dir=/usr/include/g++-3
> > > --with-local-prefix=/usr/local
> > > 
> > > now, compile g++ and c++ works great (AFAIK, mozilla is still compiling) but compiling some c source seems to be broken.
> > > 
> > > 
> > > Attempting to build glib (part of gtk/gnome) i ran into a problem running ./configure.. )
> > > 
> > > checking for pthread.h... yes
> > > checking for thread implementation... posix
> > > checking for pthread_attr_init in -lpthread... no
> > > checking for pthread_attr_init in -lpthreads... no
> > > checking for pthread_attr_init in -lthread... no
> > > checking for pthread_attr_init in -lc_r... no
> > > checking for pthread_attr_init... no
> > > checking for __d10_pthread_attr_init in -lthread... no
> > > checking for __pthread_attr_init_system in -lpthread... no
> > > configure: error: I can't find the libraries for the thread implementation
> > >                 posix. Please choose another thread implementation or
> > >                 provide information on your thread implementation.
> > >                 You can also run 'configure --disable-threads'
> > >                 to compile without thread support.
> > > 
> > > What in the world is going on now ? i set --enable-threads..
> > 
> > --enable-threads does not provide a threads library. Instead, it makes
> >   the C++ and objective-C runtimes compatible with threads. I suggest
> >   you install the linuxthreads package for your linux distro.
> -- 
> Anthony R. Mattke <tonhe@adelphia.net>



More information about the Gcc-help mailing list