public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Problems compiing with g++ / c++
@ 2003-03-18  2:16 Anthony R. Mattke
  2003-03-18  3:46 ` LLeweLLyn Reese
  0 siblings, 1 reply; 9+ messages in thread
From: Anthony R. Mattke @ 2003-03-18  2:16 UTC (permalink / raw)
  To: gcc-help

I have a older slack 8 install on my desktop that has been giving me
trouble for a couple months. 

Neithier c++ or g++ can seem to find their own headers anymore in
/usr/include/g++-3 Does anyone have any clue why this would be ?

Here is a partial output from a failed build of mozilla from last
night.. 

Thanks in advance for the help.

g++ -o TestCOMPtr.o -c -DOSTYPE=\"Linux2.4\" -DOSARCH=\"Linux\" -DOJI
-I./../ds
-I./services  -I../../dist/include/string -I../../dist/include/xpcom
-I../../dist/include -I/root/mozilla/dist/include/nspr     
-I/usr/X11R6/include   -fPIC  -I/usr/X11R6/include -fno-rtti
-fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align
-Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -pedantic
-Wno-long-long -pthread -pipe  -DDEBUG -D_DEBUG -DDEBUG_root -DTRACING
-g -fno-inline  -I/usr/X11R6/include -DMOZILLA_CLIENT -include
../../mozilla-config.h -Wp,-MD,.deps/TestCOMPtr.pp TestCOMPtr.cpp
TestCOMPtr.cpp:39: iostream.h: No such file or directory
TestCOMPtr.cpp: In method `test_message::test_message()':
TestCOMPtr.cpp:104: `cout' undeclared (first use this function)
TestCOMPtr.cpp:104: (Each undeclared identifier is reported only once
TestCOMPtr.cpp:104: for each function it appears in.)
TestCOMPtr.cpp:104: `endl' undeclared (first use this function)
make[3]: *** [TestCOMPtr.o] Error 1
make[3]: Leaving directory `/server/root/mozilla/xpcom/tests'
make[2]: *** [libs] Error 2
make[2]: Leaving directory `/server/root/mozilla/xpcom'
make[1]: *** [tier_2] Error 2
make[1]: Leaving directory `/server/root/mozilla'
make: *** [default] Error 2

-- 
Anthony R. Mattke <tonhe@adelphia.net>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Problems compiing with g++ / c++
  2003-03-18  2:16 Problems compiing with g++ / c++ Anthony R. Mattke
@ 2003-03-18  3:46 ` LLeweLLyn Reese
  2003-03-18  5:31   ` Anthony R. Mattke
  0 siblings, 1 reply; 9+ messages in thread
From: LLeweLLyn Reese @ 2003-03-18  3:46 UTC (permalink / raw)
  To: Anthony R. Mattke; +Cc: gcc-help

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

> I have a older slack 8 install on my desktop that has been giving me
> trouble for a couple months. 
> 
> Neithier c++ or g++ can seem to find their own headers anymore in
> /usr/include/g++-3 Does anyone have any clue why this would be ?

The headers provided in <prefix>/include/g++-3 where an interim
    solution to the fact that gcc did not (during the gcc 2.9
    timeframe) have an implementation of the standard C++ library.

Starting with gcc 3.0, gcc now provides an implementation of the
    standard C++ library. It is however provided in a different
    (version-specific) directory.

The g++-3 directory is not used by any gcc 3.0 or greater.

> 
> Here is a partial output from a failed build of mozilla from last
> night.. 
> 
> Thanks in advance for the help.
> 
> g++ -o TestCOMPtr.o -c -DOSTYPE=\"Linux2.4\" -DOSARCH=\"Linux\" -DOJI
> -I./../ds
> -I./services  -I../../dist/include/string -I../../dist/include/xpcom
> -I../../dist/include -I/root/mozilla/dist/include/nspr     
> -I/usr/X11R6/include   -fPIC  -I/usr/X11R6/include -fno-rtti
> -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align
> -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -pedantic
> -Wno-long-long -pthread -pipe  -DDEBUG -D_DEBUG -DDEBUG_root -DTRACING
> -g -fno-inline  -I/usr/X11R6/include -DMOZILLA_CLIENT -include
> ../../mozilla-config.h -Wp,-MD,.deps/TestCOMPtr.pp TestCOMPtr.cpp
> TestCOMPtr.cpp:39: iostream.h: No such file or directory

iostream.h is not part of standard C++. You must complain to the
    mozilla people; they must use <iostream> instead. 

For the near-term, install gcc-2.95.3 alongside of your newer
    compiler, and projects which cannot be built with the newer
    compiler should be built with the old one.

> TestCOMPtr.cpp: In method `test_message::test_message()':
> TestCOMPtr.cpp:104: `cout' undeclared (first use this function)
> TestCOMPtr.cpp:104: (Each undeclared identifier is reported only once
> TestCOMPtr.cpp:104: for each function it appears in.)
> TestCOMPtr.cpp:104: `endl' undeclared (first use this function)

cout and endl are in the std namespace, and proper qualifiers, using
    directives, or using declarations are required.

gcc-2.95.x accepted:

    #include<iostream>
    using std::cout;
    using std::endl;

along with older, pre-standard constructs in order to provide
    developers with time to migrate. But newer gccs require the above,
    and no loonger accept pre-standard stuff.

> make[3]: *** [TestCOMPtr.o] Error 1
> make[3]: Leaving directory `/server/root/mozilla/xpcom/tests'
> make[2]: *** [libs] Error 2
> make[2]: Leaving directory `/server/root/mozilla/xpcom'
> make[1]: *** [tier_2] Error 2
> make[1]: Leaving directory `/server/root/mozilla'
> make: *** [default] Error 2

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Problems compiing with g++ / c++
  2003-03-18  3:46 ` LLeweLLyn Reese
@ 2003-03-18  5:31   ` Anthony R. Mattke
  2003-03-18  9:05     ` LLeweLLyn Reese
  0 siblings, 1 reply; 9+ messages in thread
From: Anthony R. Mattke @ 2003-03-18  5:31 UTC (permalink / raw)
  To: gcc-help

I should've specified.. this problem is when using gcc v2.95.3
i have tried using iostream instead of iostream.h and both fail..

Here are some examples.. 
g++ -v
Reading specs from /usr/lib/gcc-lib/i386-slackware-linux/2.95.3/specs
gcc version 2.95.3 20010315 (release)
tonhe@hiku:~$ cat hello.cpp
#include <iostream.h>
 
int main(int argc, char** argv)
{
cout << "HELLO WORLD!" << endl;
return 0;
}
tonhe@hiku:~$ g++ -o hello hello.cpp
hello.cpp:1: iostream.h: No such file or directory

tonhe@hiku:~$ gcc -o hello hello.cpp -I/usr/include/g++-3
/tmp/ccHh480W.o: In function `main':
/tmp/ccHh480W.o(.text+0xa): undefined reference to `endl(ostream &)'
/tmp/ccHh480W.o(.text+0x17): undefined reference to `cout'
/tmp/ccHh480W.o(.text+0x1c): undefined reference to
`ostream::operator<<(char const *)'
/tmp/ccHh480W.o(.text+0x27): undefined reference to
`ostream::operator<<(ostream &(ostream &))'
collect2: ld returned 1 exit status

tonhe@hiku:~$ gcc -o hello hello.cpp -I/usr/include/g++-3 -L
/usr/lib/gcc-lib/i386-slackware-linux/2.95.3/ -lstdc++
tonhe@hiku:~$ ldd hello
        libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3
(0x40026000)
        libc.so.6 => /lib/libc.so.6 (0x40070000)
        libm.so.6 => /lib/libm.so.6 (0x40181000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
tonhe@hiku:~$ ./hello
HELLO WORLD!

So, how can i fix this ? 

I thought about building a wrapper script to help this problem along..
but i want to find the _REAL_ root of the problem.. 


and for proof the iostream - the .h dosent work aswell.. 
tonhe@hiku:~$ cat hello.cpp
#include <iostream>
 
int main(int argc, char** argv)
{
cout << "HELLO WORLD!" << endl;
return 0;
}
tonhe@hiku:~$ g++ -o hello hello.cpp
hello.cpp:1: iostream: No such file or directory



Thanks for all the help.... 


On Mon, 2003-03-17 at 22:10, LLeweLLyn Reese wrote:
> "Anthony R. Mattke" <tonhe@adelphia.net> writes:
> 
> > I have a older slack 8 install on my desktop that has been giving me
> > trouble for a couple months. 
> > 
> > Neithier c++ or g++ can seem to find their own headers anymore in
> > /usr/include/g++-3 Does anyone have any clue why this would be ?
> 
> The headers provided in <prefix>/include/g++-3 where an interim
>     solution to the fact that gcc did not (during the gcc 2.9
>     timeframe) have an implementation of the standard C++ library.
> 
> Starting with gcc 3.0, gcc now provides an implementation of the
>     standard C++ library. It is however provided in a different
>     (version-specific) directory.
> 
> The g++-3 directory is not used by any gcc 3.0 or greater.
> 
> > 
> > Here is a partial output from a failed build of mozilla from last
> > night.. 
> > 
> > Thanks in advance for the help.
> > 
> > g++ -o TestCOMPtr.o -c -DOSTYPE=\"Linux2.4\" -DOSARCH=\"Linux\" -DOJI
> > -I./../ds
> > -I./services  -I../../dist/include/string -I../../dist/include/xpcom
> > -I../../dist/include -I/root/mozilla/dist/include/nspr     
> > -I/usr/X11R6/include   -fPIC  -I/usr/X11R6/include -fno-rtti
> > -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align
> > -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -pedantic
> > -Wno-long-long -pthread -pipe  -DDEBUG -D_DEBUG -DDEBUG_root -DTRACING
> > -g -fno-inline  -I/usr/X11R6/include -DMOZILLA_CLIENT -include
> > ../../mozilla-config.h -Wp,-MD,.deps/TestCOMPtr.pp TestCOMPtr.cpp
> > TestCOMPtr.cpp:39: iostream.h: No such file or directory
> 
> iostream.h is not part of standard C++. You must complain to the
>     mozilla people; they must use <iostream> instead. 
> 
> For the near-term, install gcc-2.95.3 alongside of your newer
>     compiler, and projects which cannot be built with the newer
>     compiler should be built with the old one.
> 
> > TestCOMPtr.cpp: In method `test_message::test_message()':
> > TestCOMPtr.cpp:104: `cout' undeclared (first use this function)
> > TestCOMPtr.cpp:104: (Each undeclared identifier is reported only once
> > TestCOMPtr.cpp:104: for each function it appears in.)
> > TestCOMPtr.cpp:104: `endl' undeclared (first use this function)
> 
> cout and endl are in the std namespace, and proper qualifiers, using
>     directives, or using declarations are required.
> 
> gcc-2.95.x accepted:
> 
>     #include<iostream>
>     using std::cout;
>     using std::endl;
> 
> along with older, pre-standard constructs in order to provide
>     developers with time to migrate. But newer gccs require the above,
>     and no loonger accept pre-standard stuff.
> 
> > make[3]: *** [TestCOMPtr.o] Error 1
> > make[3]: Leaving directory `/server/root/mozilla/xpcom/tests'
> > make[2]: *** [libs] Error 2
> > make[2]: Leaving directory `/server/root/mozilla/xpcom'
> > make[1]: *** [tier_2] Error 2
> > make[1]: Leaving directory `/server/root/mozilla'
> > make: *** [default] Error 2
-- 
Anthony R. Mattke <tonhe@adelphia.net>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Problems compiing with g++ / c++
  2003-03-18  5:31   ` Anthony R. Mattke
@ 2003-03-18  9:05     ` LLeweLLyn Reese
  2003-03-18 13:57       ` Anthony R. Mattke
  0 siblings, 1 reply; 9+ messages in thread
From: LLeweLLyn Reese @ 2003-03-18  9:05 UTC (permalink / raw)
  To: Anthony R. Mattke; +Cc: gcc-help

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

> I should've specified.. this problem is when using gcc v2.95.3
> i have tried using iostream instead of iostream.h and both fail..

Then I was mistaken. Sorry.

> 
> Here are some examples.. 
> g++ -v
> Reading specs from /usr/lib/gcc-lib/i386-slackware-linux/2.95.3/specs
> gcc version 2.95.3 20010315 (release)
> tonhe@hiku:~$ cat hello.cpp
> #include <iostream.h>
>  
> int main(int argc, char** argv)
> {
> cout << "HELLO WORLD!" << endl;
> return 0;
> }
> tonhe@hiku:~$ g++ -o hello hello.cpp
> hello.cpp:1: iostream.h: No such file or directory
> 
> tonhe@hiku:~$ gcc -o hello hello.cpp -I/usr/include/g++-3
> /tmp/ccHh480W.o: In function `main':
> /tmp/ccHh480W.o(.text+0xa): undefined reference to `endl(ostream &)'
> /tmp/ccHh480W.o(.text+0x17): undefined reference to `cout'
> /tmp/ccHh480W.o(.text+0x1c): undefined reference to
> `ostream::operator<<(char const *)'
> /tmp/ccHh480W.o(.text+0x27): undefined reference to
> `ostream::operator<<(ostream &(ostream &))'
> collect2: ld returned 1 exit status
> 
> tonhe@hiku:~$ gcc -o hello hello.cpp -I/usr/include/g++-3 -L
> /usr/lib/gcc-lib/i386-slackware-linux/2.95.3/ -lstdc++
> tonhe@hiku:~$ ldd hello
>         libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3
> (0x40026000)
>         libc.so.6 => /lib/libc.so.6 (0x40070000)
>         libm.so.6 => /lib/libm.so.6 (0x40181000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
> tonhe@hiku:~$ ./hello
> HELLO WORLD!
> 
> So, how can i fix this ?

I don't know. Add -v to your command line, for both the g++ and the
    gcc tests; that will make gcc and g++ spit out
    more output, such as its version, and where it is looking for
    include files.

> I thought about building a wrapper script to help this problem along..
> but i want to find the _REAL_ root of the problem..

I suspect you have a broken gcc install.

If you are reasonably skilled with slackware's install tools, consider
    trying to use them to uninstall the g++ packages, including the
    libraries.

Also, since your c compiler appears to work, you might try building
    gcc from source, (using a --prefix other than /usr/ or /usr/local,
    of course) and using that.

Just speculating.
    

> and for proof the iostream - the .h dosent work aswell.. 
> tonhe@hiku:~$ cat hello.cpp
> #include <iostream>
>  
> int main(int argc, char** argv)
> {
> cout << "HELLO WORLD!" << endl;
> return 0;
> }
> tonhe@hiku:~$ g++ -o hello hello.cpp
> hello.cpp:1: iostream: No such file or directory
[snip]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Problems compiing with g++ / c++
  2003-03-18  9:05     ` LLeweLLyn Reese
@ 2003-03-18 13:57       ` Anthony R. Mattke
  2003-03-18 19:22         ` Anthony R. Mattke
  0 siblings, 1 reply; 9+ messages in thread
From: Anthony R. Mattke @ 2003-03-18 13:57 UTC (permalink / raw)
  To: gcc-help

Ok, this is rather odd.. 
It states the correct include directory as being EXCLUDED from the search path..

Where does it decide where to search from ? Is this an enviornment variable, or what?


Thanks.. 


tonhe@hiku:~$ g++ -v -o hello hello.cpp
Reading specs from /usr/lib/gcc-lib/i386-slackware-linux/2.95.3/specs
gcc version 2.95.3 20010315 (release)
 /usr/lib/gcc-lib/i386-slackware-linux/2.95.3/cpp0 -lang-c++ -v -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -D__ELF__ -Dunix -D__i386__ -Dlinux
-D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ hello.cpp /tmp/ccbyO8BY.ii
GNU CPP version 2.95.3 20010315 (release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc-lib/i386-slackware-linux/2.95.3/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:
 /usr/lib/gcc-lib/i386-slackware-linux/2.95.3/../../../../include/g++-3
 /usr/lib/gcc-lib/i386-slackware-linux/2.95.3/../../../../i386-slackware-linux/include
End of omitted list.
hello.cpp:1: iostream: No such file or directory


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Problems compiing with g++ / c++
  2003-03-18 13:57       ` Anthony R. Mattke
@ 2003-03-18 19:22         ` Anthony R. Mattke
  2003-03-19  1:28           ` LLeweLLyn Reese
  0 siblings, 1 reply; 9+ messages in thread
From: Anthony R. Mattke @ 2003-03-18 19:22 UTC (permalink / raw)
  To: gcc-help

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..

HELP !

-- 
Anthony R. Mattke <tonhe@adelphia.net>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Problems compiing with g++ / c++
  2003-03-18 19:22         ` Anthony R. Mattke
@ 2003-03-19  1:28           ` LLeweLLyn Reese
  2003-03-19  1:43             ` Anthony R. Mattke
  0 siblings, 1 reply; 9+ messages in thread
From: LLeweLLyn Reese @ 2003-03-19  1:28 UTC (permalink / raw)
  To: Anthony R. Mattke; +Cc: gcc-help

"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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Problems compiing with g++ / c++
  2003-03-19  1:28           ` LLeweLLyn Reese
@ 2003-03-19  1:43             ` Anthony R. Mattke
  2003-03-19  2:36               ` LLeweLLyn Reese
  0 siblings, 1 reply; 9+ messages in thread
From: Anthony R. Mattke @ 2003-03-19  1:43 UTC (permalink / raw)
  To: gcc-help

I just reinstalled pth from gnu.org and did and ldconfig.. 

same luck !


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>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Problems compiing with g++ / c++
  2003-03-19  1:43             ` Anthony R. Mattke
@ 2003-03-19  2:36               ` LLeweLLyn Reese
  0 siblings, 0 replies; 9+ messages in thread
From: LLeweLLyn Reese @ 2003-03-19  2:36 UTC (permalink / raw)
  To: Anthony R. Mattke; +Cc: gcc-help

"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>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-03-19  2:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-18  2:16 Problems compiing with g++ / c++ Anthony R. Mattke
2003-03-18  3:46 ` LLeweLLyn Reese
2003-03-18  5:31   ` Anthony R. Mattke
2003-03-18  9:05     ` LLeweLLyn Reese
2003-03-18 13:57       ` Anthony R. Mattke
2003-03-18 19:22         ` Anthony R. Mattke
2003-03-19  1:28           ` LLeweLLyn Reese
2003-03-19  1:43             ` Anthony R. Mattke
2003-03-19  2:36               ` LLeweLLyn Reese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).