This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Question about alternative PATHS with GCC-3.1


I use relink; all my packages are in /app

[war@war war]$ ls -ld /app/g*
drwxr-xr-x    6 war      war          4.0k Jun  2 20:34 /app/gaim-0.58/
drwxr-xr-x    7 war      war          4.0k Jun  2 20:34 /app/gawk-3.1.1/

drwxr-xr-x    4 war      war          4.0k Jun  2 20:34
/app/gbonds-0.7.4/
drwxr-xr-x    8 war      war          4.0k Jun  2 19:21 /app/gcc-3.1/
drwxr-xr-x    5 war      war          4.0k Jun  2 20:34 /app/gd-1.8.4/
drwxr-xr-x    7 war      war          4.0k Jun  7 22:08 /app/gdbm-1.8.0/

drwxr-xr-x    6 war      war          4.0k Jun  2 20:34
/app/gdk-pixbuf-0.17.0/
drwxr-xr-x    8 war      war          4.0k Jun  2 20:03
/app/gettext-0.11.2/
drwxr-xr-x    5 war      war          4.0k Jun  2 20:34
/app/gftp-2.0.12/
drwxr-xr-x    8 war      war          4.0k Jun  2 20:34 /app/gimp-1.2.3/

drwxr-xr-x    6 war      war          4.0k Jun  2 20:34
/app/gkrellm-1.2.11/
drwxr-xr-x    3 war      war          4.0k Jun  2 20:34
/app/gkrellm-plugins/
drwxr-xr-x    7 war      war          4.0k Jun  8 21:55 /app/glib-2.0.3/

drwxr-xr-x    5 war      war          4.0k Jun  2 20:34 /app/gmp-4.0.1/
drwxr-xr-x    6 war      war          4.0k Jun  2 20:34 /app/gocr-0.3.6/

drwxr-xr-x    5 war      war          4.0k Jun  2 20:34
/app/gqview-1.0.2/
drwxr-xr-x    5 war      war          4.0k Jun  2 20:34 /app/grep-2.5/
drwxr-xr-x    8 war      war          4.0k Jun  8 22:26 /app/gtk+-2.0.3/

drwxr-xr-x    4 war      war          4.0k Jun  2 20:34
/app/gtkhx-0.9.3/
drwxr-xr-x    7 war      war          4.0k Jun  2 19:36
/app/guile-1.4.1/
drwxr-xr-x    5 war      war          4.0k Jun  2 20:34 /app/gzip-1.3.3/

[war@war war]$

relink symbolically links (bin,lib,man,includes,etc) to /vapp

[war@war include]$ cd /vapp/include ; ls | head -10
a52dec/
aalib.h@
af_vfs.h@
align.h@
ansidecl.h@
ao/
ap_alloc.h@
ap_compat.h@
ap_config_auto.h@
ap_config.h@
[war@war include]$

ap_config.h@
[war@war include]$ ls -l aalib.h
lrwxrwxrwx    1 war      war            35 Jun  9 08:42 aalib.h ->
../../app/aalib-1.2/include/aalib.h
[war@war include]$

so in my ~/.bashrc I use this:
#################################################################
# GCC PATHS
#################################################################
export C_INCLUDE_PATH=/vapp/include
export CPLUS_INCLUDE_PATH=/vapp/include
export LIBRARY_PATH=/vapp/lib:/appc/jre-1.4.0/lib:/appc/jdk-1.4.0/lib
#################################################################

This finds all libs and headers in /vapp/include (thus allowing me to
use the latest programs in my /app and not conflict with the rest of my
system).

However; with the same setup with GCC-2.95.3, I did not get this
annoying warning.

cc -c -I../../.. -I../../../src -I../../../src/core
-I../../../src/fe-common/core -I/usr/include/glib-1.2
-I/usr/lib/glib/include -fno-strict-aliasing -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"0.9\"
-DXS_VERSION=\"0.9\" -fpic -I/app/perl-5.6.1/lib/5.6.1/i686-linux/CORE
UI.c
cc1: warning: changing search order for system directory
"/usr/local/include"
cc1: warning:   as it has already been specified as a non-system
directory

I can turn the warning off with an option or an enviromental variable,
but, is there a PROPER way to setup the INCLUDE & LIBRARY_PATHS for the
GCC compiler?

The documentation on this option is VERY SPARSE in manuals, but utterly
useful.

Instead of changing all of the include paths to
/vapp/include/<someheader>.h, I just use the C and
C++ (include_paths) and it works flawlessly.

Anyone have any comments on this?

Please let me know, thanks.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]