Re: g++ can't locate iosfwd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/8/25 Ian Lance Taylor <iant@xxxxxxxxxx>:
> Maciej Bliziński <maciej@xxxxxxxxxxx> writes:
>
>> Interestingly, it looks like the include files are found underneath
>> what was probably configured as libdir (PREFIX/lib).  In my build,
>> I've defined prefix to /opt/csw/gcc4, but I have set libdir to
>> /opt/csw/lib.  How does gcc get the idea to search
>> /opt/csw/gcc4/lib/gcc/sparc-sun-solaris2.8/4.3.3/../../../../include/c++/4.3.3
>> for the include files? Is it defined in a file such as config.h?
>
> Look for unlibsubdir and libsubdir_to_prefix in gcc/Makefile.in.

Yes, looks like the libsubdir_to_prefix calculation goes wrong. Here
are the results for my build.  I added a target to print debug
information and ran it.

print-debug:
        @echo "prefix: $(prefix)"
        @echo "libdir: $(libdir)"
        @echo "unlibsubdir: $(unlibsubdir)"
        @echo "libsubdir_to_prefix: $(libsubdir_to_prefix)"

maciej@unstable10s [unstable10s]:~/src/opencsw/pkg/gcc4/branches/gccgo
> (cd work/solaris10-sparc/build-isa-sparcv8/objdir/gcc ; gmake
print-debug)
prefix: /opt/csw/gcc4
libdir: /opt/csw/lib
unlibsubdir: ../../..
libsubdir_to_prefix: ../../../../../../

If prefix is /opt/csw/gcc4 and libdir is /opt/csw/lib, then
libsubdir_to_prefix must have "gcc4" at the end, otherwise it's
invalid.

Perhaps I've run into this problem, because I'm setting the build in a
an unusual or wrong way.  What I want, is having the libraries in
/opt/csw/lib and the binaries in /opt/csw/gcc4/bin, and I don't care
much where everything else lives.  I can either set prefix to
/opt/csw/gcc4 and libdir to /opt/csw/lib, or prefix to /opt/csw and
some other settings to /opt/csw/gcc4. Which way is better?

Maciej



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux